summaryrefslogtreecommitdiff
path: root/client/html/tag_metric.tpl
blob: 3f06d0c070529ad91683f337499a693749016edc (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
<div class='tag-metric'>
    <form class='horizontal edit-metric'>
        <div class='metric-bounds-edit'>
            <%= ctx.makeNumericInput({
                text: 'Minimum',
                name: 'metric-min',
                value: ctx.metricMin,
                step: 'any',
                readonly: !ctx.canEditMetricBounds,
            }) %>
            <%= ctx.makeNumericInput({
                text: 'Maximum',
                name: 'metric-max',
                value: ctx.metricMax,
                step: 'any',
                readonly: !ctx.canEditMetricBounds,
            }) %>
        </div>

        <% if (ctx.tag.metric && ctx.canDeleteMetric) { %>
        <div class='confirmation'>
            <%= ctx.makeCheckbox({name: 'confirm-delete',
                text: 'I confirm that I want to delete this metric.'}) %>
        </div>
        <% } %>

        <div class='messages'></div>

        <div class='buttons'><!--
            --><% if (!ctx.tag.metric && ctx.canCreateMetric) { %><!--
                --><input type='submit' value='Create metric'/><!--
            --><% } else if (ctx.tag.metric && ctx.canEditMetricBounds) { %><!--
                --><input type='submit' value='Update metric'/><!--
            --><% } %><!--
            --><% if (ctx.tag.metric && ctx.canDeleteMetric) { %><!--
                --><input type='button' name='delete' class='delete' value='Delete metric'/><!--
            --><% } %>
        </div>
    </form>
</div>