Skip to content
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## ChangeLog

--- develop ---
* bug: Element-qualify the `.thold-pill` CSS so it outranks the single-class theme rules (e.g. `.deviceUpFull` `width:14%`) that were clipping the pill to a fixed width; status pills now size to their label on the Device Status page and everywhere else
* feature: Clicking an already-selected status pill now clears that filter (resets to All) instead of re-applying it, on the Thresholds, Device Status and Threshold Log sub-tabs
* bug: Pass a boolean (not the integer `1`) to `api_plugin_register_hook()`'s `$enable` argument so the hook registration stays type-correct under Cacti 1.3's strict `bool $enable` type-hint (the int only coerces while this file lacks `declare(strict_types=1)`)
* feature: Show each threshold's status as a sortable, clickable pill in a new Status column (right of Name) on the Thresholds page instead of colouring the whole row; rows now zebra-stripe, clicking a pill filters the list to that status, and the Status filter gains per-severity options
* feature: Extend the clickable status pills to the Device Status and Threshold Log pages (thold_graph.php) - device rows now show a status pill and zebra-stripe instead of full-row colouring, and the Threshold Log gains a Status pill column right after Type; clicking a pill filters that list to the chosen status, the Device Status filter gains an exact Error option, and each status filter now classifies the per-host failure-count override the same way as the pill so a clicked pill returns exactly the rows showing that state
Expand Down
3 changes: 2 additions & 1 deletion css/pills.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
*/

/* Threshold status pills - shape only; per-theme .thold<State> rules supply the colours */
.thold-pill {
/* Element-qualified to outrank single-class theme rules (e.g. .deviceUpFull width:14%) so the pill hugs its label. */
span.thold-pill {
display: inline-block;
width: auto;
padding: 1px 9px;
Expand Down
3 changes: 2 additions & 1 deletion thold.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ function clearFilter() {
}

e.preventDefault();
$('#state').val($(this).attr('data-state'));
var state = $(this).attr('data-state');
$('#state').val($('#state').val() === state ? '-1' : state);
applyFilter();
});

Expand Down
9 changes: 6 additions & 3 deletions thold_graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ function clearFilter() {
}

e.preventDefault();
$('#state').val($(this).attr('data-state'));
var state = $(this).attr('data-state');
$('#state').val($('#state').val() === state ? '-1' : state);
applyFilter();
});

Expand Down Expand Up @@ -1443,7 +1444,8 @@ function clearFilter() {
}

e.preventDefault();
$('#host_status').val($(this).attr('data-state'));
var state = $(this).attr('data-state');
$('#host_status').val($('#host_status').val() === state ? '-1' : state);
applyFilter();
});

Expand Down Expand Up @@ -2007,7 +2009,8 @@ function exportLog() {
}

e.preventDefault();
$('#status').val($(this).attr('data-state'));
var state = $(this).attr('data-state');
$('#status').val($('#status').val() === state ? '-1' : state);
applyFilter();
});

Expand Down
Loading