aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-05-06 17:12:05 +0200
committerSonarTech <sonartech@sonarsource.com>2019-05-22 20:21:13 +0200
commite861cb3f45bc28434dc59d857c38e414dba2a0bc (patch)
treed856732255bfb0fcc92ae28bc0eb7ef0a5d339af /server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
parent7a547418b7fc4beae7a541f81a0c225b0af60631 (diff)
downloadsonarqube-e861cb3f45bc28434dc59d857c38e414dba2a0bc.tar.gz
sonarqube-e861cb3f45bc28434dc59d857c38e414dba2a0bc.zip
SONAR-12026 Add new hotspot status facet in issues page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx18
1 files changed, 13 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
index 03d6864947a..ea83e7a20c2 100644
--- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
@@ -38,14 +38,14 @@ interface Props {
statuses: string[];
}
-const STATUSES = ['OPEN', 'RESOLVED', 'REOPENED', 'CLOSED', 'CONFIRMED'];
+const STATUSES = ['OPEN', 'CONFIRMED', 'REOPENED', 'RESOLVED'];
+const HOTSPOT_STATUSES = ['TO_REVIEW', 'REVIEWED', 'IN_REVIEW'];
+const COMMON_STATUSES = ['CLOSED'];
export default class StatusFacet extends React.PureComponent<Props> {
property = 'statuses';
- static defaultProps = {
- open: true
- };
+ static defaultProps = { open: true };
handleItemClick = (itemValue: string, multiple: boolean) => {
const { statuses } = this.props;
@@ -110,7 +110,15 @@ export default class StatusFacet extends React.PureComponent<Props> {
<DeferredSpinner loading={this.props.fetching} />
{this.props.open && (
<>
- <FacetItemsList>{STATUSES.map(this.renderItem)}</FacetItemsList>
+ <FacetItemsList title={translate('issues')}>
+ {STATUSES.map(this.renderItem)}
+ </FacetItemsList>
+ <FacetItemsList title={translate('issue.type.SECURITY_HOTSPOT.plural')}>
+ {HOTSPOT_STATUSES.map(this.renderItem)}
+ </FacetItemsList>
+ <FacetItemsList title={translate('issues.issues_and_hotspots')}>
+ {COMMON_STATUSES.map(this.renderItem)}
+ </FacetItemsList>
<MultipleSelectionHint options={Object.keys(stats).length} values={statuses.length} />
</>
)}