Merge branch 'ent-13191-mejorar-la-visualizacion-de-los-traps-segun-su-severidad' into 'develop'

Ent 13191 mejorar la visualizacion de los traps segun su severidad

See merge request artica/pandorafms!7139
This commit is contained in:
Matias Didier 2024-04-10 12:29:49 +00:00
commit 3b6699b738
4 changed files with 88 additions and 8 deletions

View File

@ -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 .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
$tmp->snmp_agent .= '<a class="'.$severity_class.' href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$tmp->source.'" title="'.__('Create agent').'">'.$tmp->source.'</a>';
} else {
$tmp->snmp_agent .= '<div class="'.$severity_class.' snmp-div"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'" title="'.__('View agent details').'">';
$tmp->snmp_agent .= '<strong>'.$agent['alias'].ui_print_help_tip($tmp->source, true);

View File

@ -4597,7 +4597,7 @@ function html_print_table(&$table, $return=false)
} else {
$headStyle = '';
}
if (isset($table->headStyle[$heading])) {
$headStyle = ' style = "'.$table->headStyle[$heading].'" ';
}

View File

@ -778,6 +778,7 @@ class Group extends Entity
exit;
}
/**
* Check whether group is linked to a database element (needed for ajax check).
*

View File

@ -44,6 +44,31 @@
--input-border: #c0ccdc;
--table-hover-background: #ebfffe;
/* 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;
}
/*
@ -14017,3 +14042,57 @@ form#aws-view > span.select2 {
vertical-align: bottom;
margin-right: 15px;
}
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;
}