mirror of
https://github.com/SonarSource/sonarqube.git
synced 2024-09-13 15:45:52 +02:00
SONAR-8119 Correctly display rating conditions in quality gates and in project dashboard
This commit is contained in:
parent
7bedbecd02
commit
2bd1401370
@ -41,6 +41,10 @@ const QualityGateCondition = ({ component, periods, condition }) => {
|
||||
const periodLabel = getPeriodLabel(period);
|
||||
const periodDate = getPeriodDate(period);
|
||||
|
||||
const operator = metric.type === 'RATING' ?
|
||||
translate('quality_gates.operator', condition.op, 'rating') :
|
||||
translate('quality_gates.operator', condition.op, 'short');
|
||||
|
||||
return (
|
||||
<li className="overview-quality-gate-condition">
|
||||
<div className="overview-quality-gate-condition-period">
|
||||
@ -65,7 +69,7 @@ const QualityGateCondition = ({ component, periods, condition }) => {
|
||||
{metric.name}
|
||||
</div>
|
||||
<div className="overview-quality-gate-condition-threshold">
|
||||
{translate('quality_gates.operator', condition.op, 'short')}
|
||||
{operator}
|
||||
{' '}
|
||||
{formatMeasure(threshold, metric.type)}
|
||||
</div>
|
||||
|
@ -153,10 +153,10 @@ export default class Condition extends Component {
|
||||
const isLeakSelected = !!this.state.period;
|
||||
const operators = ['LT', 'GT', 'EQ', 'NE'];
|
||||
const operatorOptions = operators.map(op => {
|
||||
return {
|
||||
label: translate('quality_gates.operator', op),
|
||||
value: op
|
||||
};
|
||||
const label = metric.type === 'RATING' ?
|
||||
translate('quality_gates.operator', op, 'rating') :
|
||||
translate('quality_gates.operator', op);
|
||||
return { label, value: op };
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -2802,6 +2802,10 @@ quality_gates.operator.LT.short=<
|
||||
quality_gates.operator.GT.short=>
|
||||
quality_gates.operator.EQ.short==
|
||||
quality_gates.operator.NE.short=\u2260
|
||||
quality_gates.operator.LT.rating=is better than
|
||||
quality_gates.operator.GT.rating=is worse than
|
||||
quality_gates.operator.EQ.rating=is
|
||||
quality_gates.operator.NE.rating=is not
|
||||
quality_gates.delete.confirm.message=Are you sure you want to delete the "{0}" quality gate?
|
||||
quality_gates.delete.confirm.default=Are you sure you want to delete the "{0}" quality gate, which is the default quality gate?
|
||||
quality_gates.delete_condition=Delete Condition
|
||||
|
Loading…
Reference in New Issue
Block a user