From feeef9a5f2cf8e110d2453af545ecd4f9962a7fa Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Thu, 4 Apr 2024 13:40:59 +0200 Subject: [PATCH] 13191-Fix background color trap severity --- .../include/class/SnmpConsole.class.php | 14 ++-- pandora_console/include/styles/pandora.css | 79 +++++++++++++++++++ 2 files changed, 86 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 160e020e07..d166f03590 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -240,27 +240,27 @@ class SnmpConsole extends HTML 'status', [ 'text' => 'snmp_agent', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'enterprise_string', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'count', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'trap_subtype', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'user_id', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'timestamp', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], 'alert', [ @@ -791,7 +791,7 @@ class SnmpConsole extends HTML // SNMP Agent. $agent = agents_get_agent_with_ip($tmp->source); if ($agent === false) { - $tmp->snmp_agent .= ''.$tmp->source.''; + $tmp->snmp_agent .= 'source.'" title="'.__('Create agent').'">'.$tmp->source.''; } else { $tmp->snmp_agent .= '
'; $tmp->snmp_agent .= ''.$agent['alias'].ui_print_help_tip($tmp->source, true); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 9a39b63681..0dee73f7d3 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -37,6 +37,31 @@ --table-hover-background: #edfffe; --background-main-color: #f6f7fb; --border-color-4: #e5e9ed; + + /* Events priorities colors */ + --events-priority-bg-green: #82b92e; + --events-priority-text-green: #fff; + + --events-priority-bg-red: #e63c52; + --events-priority-text-red: #fff; + + --events-priority-bg-yellow: #f3b200; + --events-priority-text-yellow: #111; + + --events-priority-bg-blue: #4ca8e0; + --events-priority-text-blue: #fff; + + --events-priority-bg-grey: #999999; + --events-priority-text-grey: #fff; + + --events-priority-bg-pink: #fdc4ca; + --events-priority-text-pink: #111; + + --events-priority-bg-brown: #a67c52; + --events-priority-text-brown: #fff; + + --events-priority-bg-orange: #f7931e; + --events-priority-text-orange: #111; } /* @@ -13909,3 +13934,57 @@ button.disabled { height: 48px; cursor: pointer; } + +table#snmp_console tbody td:not(.table_action_buttons) * { + height: 100%; + display: flex; + align-items: center; +} + +table#snmp_console tbody .datos_green, +table#snmp_console tbody .datos_green * { + background-color: var(--events-priority-bg-green); + color: var(--events-priority-text-green) !important; +} + +table#snmp_console tbody .datos_red, +table#snmp_console tbody .datos_red * { + background-color: var(--events-priority-bg-red); + color: var(--events-priority-text-red) !important; +} + +table#snmp_console tbody .datos_yellow, +table#snmp_console tbody .datos_yellow * { + background-color: var(--events-priority-bg-yellow); + color: var(--events-priority-text-yellow) !important; +} + +table#snmp_console tbody .datos_blue, +table#snmp_console tbody .datos_blue * { + background-color: var(--events-priority-bg-blue); + color: var(--events-priority-text-blue) !important; +} + +table#snmp_console tbody .datos_grey, +table#snmp_console tbody .datos_grey * { + background-color: var(--events-priority-bg-grey); + color: var(--events-priority-text-grey) !important; +} + +table#snmp_console tbody .datos_pink, +table#snmp_console tbody .datos_pink * { + background-color: var(--events-priority-bg-pink); + color: var(--events-priority-text-pink) !important; +} + +table#snmp_console tbody .datos_brown, +table#snmp_console tbody .datos_brown * { + background-color: var(--events-priority-bg-brown); + color: var(--events-priority-text-brown) !important; +} + +table#snmp_console tbody .datos_orange, +table#snmp_console tbody .datos_orange * { + background-color: var(--events-priority-bg-orange); + color: var(--events-priority-text-orange) !important; +}