diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-07-26 16:04:19 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-08-14 11:44:44 +0200 |
commit | f2c95a685a3b950a68122af1e5673978a07df773 (patch) | |
tree | a81639fe40a98b6d746369658d8a3f88082fd3a2 /server/sonar-web/src/main/js/apps/issues | |
parent | cadc6bb011393ff5092f83f146bd9b74bad21460 (diff) | |
download | sonarqube-f2c95a685a3b950a68122af1e5673978a07df773.tar.gz sonarqube-f2c95a685a3b950a68122af1e5673978a07df773.zip |
SONAR-9608 SONAR-9609 Create the new measures page sidebar with all facets
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues')
2 files changed, 8 insertions, 18 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js index 58e64edbad7..88c5a0e7c77 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js @@ -64,17 +64,19 @@ export default class FacetItem extends React.PureComponent { <span className="facet-name"> {this.props.name} </span> - <span className="facet-stat"> - {formattedStat} - </span> + {formattedStat != null && + <span className="facet-stat"> + {formattedStat} + </span>} </span> : <a className={className} data-value={this.props.value} href="#" onClick={this.handleClick}> <span className="facet-name"> {this.props.name} </span> - <span className="facet-stat"> - {formattedStat} - </span> + {formattedStat != null && + <span className="facet-stat"> + {formattedStat} + </span>} </a>; } } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap index 1d5c7a04b95..b8db949fded 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/__snapshots__/FacetItem-test.js.snap @@ -12,9 +12,6 @@ exports[`should render active 1`] = ` > foo </span> - <span - className="facet-stat" - /> </a> `; @@ -27,9 +24,6 @@ exports[`should render disabled 1`] = ` > foo </span> - <span - className="facet-stat" - /> </span> `; @@ -65,9 +59,6 @@ exports[`should render half width 1`] = ` > foo </span> - <span - className="facet-stat" - /> </a> `; @@ -83,9 +74,6 @@ exports[`should render inactive 1`] = ` > foo </span> - <span - className="facet-stat" - /> </a> `; |