blob: 2436d2d468e10f1c8bee9e1862a29f65f6dea471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import React from 'react';
import GateConditions from './gate-conditions';
import GateEmpty from './gate-empty';
export default React.createClass({
render() {
if (!this.props.gate || !this.props.gate.level) {
return this.props.component.qualifier === 'TRK' ? <GateEmpty/> : null;
}
let
badgeClassName = 'badge badge-' + this.props.gate.level.toLowerCase(),
badgeText = window.t('overview.gate', this.props.gate.level);
return (
<div className="overview-gate">
<h2 className="overview-title">
{window.t('overview.quality_gate')}
<span className={badgeClassName}>{badgeText}</span>
</h2>
<GateConditions gate={this.props.gate} component={this.props.component}/>
</div>
);
}
});
|