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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* feature: Adopt the Cacti plugin table API and relocate schema provisioning into includes/database.php
* feature: Add a fleet-wide manifest.json with upgrade-time file pruning
* feature: Consolidate per-theme override stylesheets from themes/ into css/
* feature: Redesign the status legend as evenly sized, rounded colour chips with solid, theme-appropriate colours across every theme (including Deepness), matching the thold and syslog legends
* dev: Rename includes/db_functions.php to includes/functions.php and move bundled libraries under includes/
* dev: Set the Cacti compatibility floor to 1.2.29

Expand Down
4 changes: 0 additions & 4 deletions css/classic.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
padding-bottom: 120px;
}

.monitor_legend {
background-color: snow;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
4 changes: 0 additions & 4 deletions css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
padding-bottom: 120px;
}

.monitor_legend {
background-color: #161616;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
5 changes: 3 additions & 2 deletions css/deepness.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
padding-bottom: 120px;
}

.monitor_legend {
background-color: #11161d;
/* emerald-accented Up chip to harmonise with the Deepness palette */
.monitorLegend .deviceUpFull {
background-color: #197a54;
}

.deviceThresholdFull {
Expand Down
8 changes: 0 additions & 8 deletions css/midwinter.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
+-------------------------------------------------------------------------+
*/

.monitor_legend {
display:none;
}

.monitor_legend {
background-color: #1D1F21;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
4 changes: 0 additions & 4 deletions css/modern.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
padding-bottom: 120px;
}

.monitor_legend {
background-color: snow;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
72 changes: 58 additions & 14 deletions css/monitor.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,69 @@
display: block;
}

.monitor_legend {
position: fixed;
left: 0;
bottom: 0;
/*
* Status legend. Rendered as an evenly sized, wrapping flex row (flex: 1 1 0
* gives every chip the same width) of rounded chips with spacing between them.
* A legend is a colour key, so the chips use their own solid, opaque colours
* with white text to stay legible on every theme rather than inheriting the
* subtle tile tints. Per-theme tuning lives in each theme's css (see
* deepness.css for the emerald-accented variant).
*/
.monitorLegend {
display: flex;
flex-flow: row wrap;
margin-left: auto;
margin-right: auto;
flex-wrap: wrap;
gap: 4px;
width: 100%;
margin-top: 4px;
}

.monitor_legend_cell {
padding: 0px;
display: column;
.monitorLegend .monitorLegendItem {
flex: 1 1 0;
text-align: center;
white-space: nowrap;
min-width: 120px;
font-size: 11px;
flex: 1 14%;
font-weight: normal;
padding: 4px 6px;
border-radius: 3px;
color: #ffffff;
}

.monitorLegend .deviceUpFull {
background-color: #2b8235;
}

.monitorLegend .deviceDownFull {
background-color: #a12820;
}

.monitorLegend .deviceDownMutedFull {
background-color: #93302a;
}

.monitorLegend .deviceRecoveringFull {
background-color: #9a6a1a;
}

.monitorLegend .deviceThresholdFull {
background-color: #a85712;
}

.monitorLegend .deviceThresholdMutedFull {
background-color: #6a4a9c;
}

.monitorLegend .deviceWarningFull {
background-color: #7d6f18;
}

.monitorLegend .deviceAlertFull {
background-color: #86407a;
}

.monitorLegend .deviceUnknownFull {
background-color: #5f5f57;
}

.monitorLegend .deviceUnmonitoredFull {
background-color: #3f6a8a;
}

/* extra small styles */
Expand Down
4 changes: 0 additions & 4 deletions css/paper-plane.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
padding-bottom: 120px;
}

.monitor_legend {
background-color: #1D1F21;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
4 changes: 0 additions & 4 deletions css/paw.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
+-------------------------------------------------------------------------+
*/

.monitor_legend {
background-color: snow;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
15 changes: 0 additions & 15 deletions css/sunrise.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@
+-------------------------------------------------------------------------+
*/

.monitor_legend {
position: fixed;
left: 0;
bottom: 24px;
display: flex;
flex-flow: row wrap;
margin-left: auto;
margin-right: auto;
width: 100%;
}

.monitorFooter {
display: none;
}
Expand All @@ -56,10 +45,6 @@
color: white;
}

.monitor_legend {
background-color: #1D1F21;
}

.deviceThresholdFull {
background-color: rgba(242, 25, 36, 0.4);
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions includes/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ function drawPage(): void {
html_end_box();

if (read_user_setting('monitor_legend', read_config_option('monitor_legend'))) {
print "<div class='center monitor_legend'>";
print "<div class='monitorLegend'>";

foreach ($iclasses as $index => $class) {
print "<div class='monitor_legend_cell center $class" . "Full'>" . $icolorsdisplay[$index] . '</div>';
print "<div class='monitorLegendItem $class" . "Full'>" . $icolorsdisplay[$index] . '</div>';
}

print '</div>';
Expand Down
Loading