Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When listing rules, show rule specific labels #153

Merged
merged 2 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion promgen/templates/promgen/alert_row.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<dd>
<ul class="list-inline">
<li v-for="(value, label, index) in alert.labels">
<a @click.prevent="silenceAppendLabel" class="label label-warning" :data-label="label" :data-value="value">{{label}}:{{value}}</a>
<a @click.prevent="silenceAppendLabel" class="label label-danger" :data-label="label" :data-value="value">{{label}}:{{value}}</a>
</li>
</ul>
</dd>
Expand Down
16 changes: 8 additions & 8 deletions promgen/templates/promgen/rule_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
{% for rule in rule_list %}
<tr {% if collapse %}class="active collapse {{ collapse }}{{overwrite_id}}" {% endif %}>
<td>
<a href="{% url 'rule-edit' rule.id %}">{{ rule.name }}</a>
<a title="{{rule.description}}" data-toggle="tooltip" data-placement="right" href="{% url 'rule-edit' rule.id %}">{{ rule.name }}</a>
{% if rule.parent %}
<a class="pull-right" title="{% trans "View Parent" %}" href="{% url 'rule-edit' rule.parent.id %}" data-toggle="tooltip" data-placement="right">
<a class="pull-right" title="{% trans "View Parent" %}" href="{% url 'rule-edit' rule.parent.id %}">
<span class="glyphicon glyphicon-upload"></span>
</a>
{% endif %}
<ul>
{% for k,v in rule.labels.items|dictsort:0 %}
<li class="label label-primary">{{k}}:{{v}}</li>
{% endfor %}
</ul>
</td>
<td {% if not rule.enabled %}class="bg-disabled text-muted" {% endif %} style="word-break: break-word;">
{{ rule.clause }}
{% if rule.description %}
<span title="{{rule.description}}" data-toggle="tooltip" data-placement="right" class="glyphicon glyphicon-question-sign pull-right" aria-hidden="true"></span>
{% endif %}
</td>
<td {% if not rule.enabled %}class="bg-disabled text-muted" {% endif %} style="word-break: break-word;">{{ rule.clause }}</td>

<td>{{ rule.duration }}</td>

Expand Down