diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/gate')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js | 18 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/gate/gate.js | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js b/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js index 6d88348ed1a..c688d959d68 100644 --- a/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js +++ b/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js @@ -18,12 +18,12 @@ const Measure = React.createClass({ export default React.createClass({ render() { - let metricName = window.t('metric', this.props.condition.metric.name, 'name'), - threshold = this.props.condition.level === 'ERROR' ? - this.props.condition.error : this.props.condition.warning, - period = this.props.condition.period ? - getPeriodLabel(this.props.component.periods, this.props.condition.period) : null, - periodDate = getPeriodDate(this.props.component.periods, this.props.condition.period); + let metricName = window.t('metric', this.props.condition.metric.name, 'name'); + let threshold = this.props.condition.level === 'ERROR' ? + this.props.condition.error : this.props.condition.warning; + let period = this.props.condition.period ? + getPeriodLabel(this.props.component.periods, this.props.condition.period) : null; + let periodDate = getPeriodDate(this.props.component.periods, this.props.condition.period); let classes = 'alert_' + this.props.condition.level.toUpperCase(); @@ -43,7 +43,11 @@ export default React.createClass({ <div className="overview-gate-condition-metric"> <div>{metricName}</div> - <div>{window.t('quality_gates.operator', this.props.condition.op, 'short')} <Measure value={threshold} type={this.props.condition.metric.type}/></div> + <div> + {window.t('quality_gates.operator', this.props.condition.op, 'short')} + {' '} + <Measure value={threshold} type={this.props.condition.metric.type}/> + </div> </div> </div> </li> diff --git a/server/sonar-web/src/main/js/apps/overview/gate/gate.js b/server/sonar-web/src/main/js/apps/overview/gate/gate.js index 05ebfda1892..3f78fe08dba 100644 --- a/server/sonar-web/src/main/js/apps/overview/gate/gate.js +++ b/server/sonar-web/src/main/js/apps/overview/gate/gate.js @@ -26,9 +26,9 @@ export default React.createClass({ return this.props.component.qualifier === 'TRK' ? <GateEmpty/> : null; } - let level = this.props.gate.level.toLowerCase(), - badgeClassName = 'badge badge-' + level, - badgeText = window.t('overview.gate', this.props.gate.level); + let level = this.props.gate.level.toLowerCase(); + let badgeClassName = 'badge badge-' + level; + let badgeText = window.t('overview.gate', this.props.gate.level); return ( <div className="overview-gate"> |