forked from GithubBackups/healthchecks
Filtering by tags works properly again.
This commit is contained in:
parent
114d1a830b
commit
dc0a5cb8d8
@ -1,22 +1,32 @@
|
|||||||
#my-checks-tags button.up {
|
#my-checks-tags div {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#my-checks-tags .up {
|
||||||
color: #333;
|
color: #333;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#my-checks-tags button.grace {
|
#my-checks-tags .grace {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #f0ad4e;
|
background-color: #f0ad4e;
|
||||||
border-color: #eea236;
|
border-color: #eea236;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#my-checks-tags .down {
|
||||||
#my-checks-tags button.down {
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #d9534f;
|
background-color: #d9534f;
|
||||||
border-color: #d43f3a;
|
border-color: #d43f3a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#my-checks-tags .checked {
|
||||||
|
box-shadow: 0 0 3px #ddd;
|
||||||
|
background: #333;
|
||||||
|
color: #eee;
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
#update-timeout-modal .modal-dialog, #ping-details-modal .modal-dialog {
|
#update-timeout-modal .modal-dialog, #ping-details-modal .modal-dialog {
|
||||||
width: 800px;
|
width: 800px;
|
||||||
|
@ -231,14 +231,14 @@ $(function () {
|
|||||||
|
|
||||||
|
|
||||||
// Filtering by tags
|
// Filtering by tags
|
||||||
$("#my-checks-tags button").click(function() {
|
$("#my-checks-tags div").click(function() {
|
||||||
// .active has not been updated yet by bootstrap code,
|
// .active has not been updated yet by bootstrap code,
|
||||||
// so cannot use it
|
// so cannot use it
|
||||||
$(this).toggleClass('checked');
|
$(this).toggleClass('checked');
|
||||||
|
|
||||||
// Make a list of currently checked tags:
|
// Make a list of currently checked tags:
|
||||||
var checked = [];
|
var checked = [];
|
||||||
$("#my-checks-tags button.checked").each(function(index, el) {
|
$("#my-checks-tags .checked").each(function(index, el) {
|
||||||
checked.push(el.textContent);
|
checked.push(el.textContent);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -331,11 +331,13 @@ $(function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#my-checks-tags button").each(function(a) {
|
$("#my-checks-tags div").each(function(a) {
|
||||||
var status = data.tags[this.innerText];
|
var status = data.tags[this.innerText];
|
||||||
if (status) {
|
if (lastStatus[this.innerText] == status)
|
||||||
this.setAttribute("class", "btn btn-xs " + status);
|
return;
|
||||||
}
|
|
||||||
|
$(this).removeClass("up grace down").addClass(status);
|
||||||
|
lastStatus[this.innerText] = status;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (document.title != data.title) {
|
if (document.title != data.title) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{% if tags %}
|
{% if tags %}
|
||||||
<div id="my-checks-tags" class="col-sm-12">
|
<div id="my-checks-tags" class="col-sm-12">
|
||||||
{% for tag, status in tags %}
|
{% for tag, status in tags %}
|
||||||
<button class="btn btn-xs {{ status }}" data-toggle="button">{{ tag }}</button>
|
<div class="btn btn-xs {{ status }}">{{ tag }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user