Use dummy buttons to fake an ON/OFF switch
{% endif %}
</tr>
{% for rule in rule_list %}
- <tr {% if not rule.enabled %}class="bg-disabled text-muted"{% endif %}>
+ <tr>
<td><a href="{% url 'rule-edit' rule.id %}">{{ rule.name }}</a></td>
- <td style="word-break: break-word;">{{ rule.clause }}</td>
+ <td {% if not rule.enabled %}class="bg-disabled text-muted"{% endif %} style="word-break: break-word;">{{ rule.clause }}</td>
<td>{{ rule.duration }}</td>
{% if show_full %}
<td>{{ rule.labels }}</td>
<td style="word-break: break-word;">{{ rule.annotations }}</td>
{% endif %}
{% if show_edit %}
- <td>
+ <td style="white-space: nowrap">
<form method="post" action="{% url 'rule-toggle' rule.id %}" style="display: inline">
{% csrf_token %}
{% if rule.enabled %}
- <button class="btn btn-default btn-sm">Disable</button>
+ <a href="#" class="btn btn-default btn-sm" disabled>ON</a>
+ <button class="btn btn-primary btn-sm">OFF</button>
{% else %}
- <button class="btn btn-primary btn-sm">Enable</button>
+ <button class="btn btn-primary btn-sm">ON</button>
+ <a href="#" class="btn btn-default btn-sm" disabled>OFF</a>
{% endif %}
</form>
</td>
