summaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/hbs/quality-gates/quality-gate-detail-condition.hbs
blob: 7acd9800f2a80058ce7de6ae3a85b5923f7df5e9 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<td nowrap>
  {{metric.name}}
  {{#if metric.hidden}}
    <span class="deprecated">{{t 'deprecated'}}</span>
  {{/if}}
</td>
<td width="20%" nowrap>
  {{#if canEdit}}
    <select name="period" style="width: 100%">
      {{#unless isDiffMetric}}<option value="0">{{t 'value'}}</option>{{/unless}}
      {{#each periods}}<option value="{{key}}">&Delta; {{text}}</option>{{/each}}
    </select>
  {{else}}
    {{#if periodText}}&Delta; {{periodText}}
    {{else}}{{t 'value'}}
    {{/if}}
  {{/if}}
</td>
<td width="10%" nowrap>
  {{#if canEdit}}
    <select name="operator">
      {{#operators metric.type}}
        <option value="{{this}}">{{t 'quality_gates.operator' this}}</option>
      {{/operators}}
    </select>
  {{else}}
    {{t 'quality_gates.operator' op}}
  {{/if}}
</td>
<td width="15%" nowrap="nowrap">
  <i class="icon-alert-warn" title="{{t 'alerts.warning_tooltip'}}"></i>
  {{#if canEdit}}
    <input name="warning" class="measure-input" data-type="{{metric.type}}" placeholder="{{metric.placeholder}}"
           type="text">
  {{else}}
    {{warning}}
  {{/if}}
</td>
<td width="15%" nowrap="nowrap">
  <i class="icon-alert-error" title="{{t 'alerts.error_tooltip'}}"></i>
  {{#if canEdit}}
    <input name="error" class="measure-input" data-type="{{metric.type}}" placeholder="{{metric.placeholder}}"
           type="text">
  {{else}}
    {{error}}
  {{/if}}
</td>
<td class="quality-gate-condition-actions" width="120px" nowrap>
  {{#if canEdit}}
    {{#if id}}
      <div class="button-group">
        <button class="update-condition" disabled>{{t 'update_verb'}}</button>
        <button class="button-red delete-condition">{{t 'delete'}}</button>
      </div>
    {{else}}
      <div class="button-group">
        <button class="add-condition">{{t 'add_verb'}}</button>
        <a class="action cancel-add-condition">{{t 'cancel'}}</a>
      </div>
    {{/if}}
  {{/if}}
</td>