diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cee94ae512..396505d4c9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-10-14 Ramon Novoa + + * operation/snmpconsole/snmp_view.php: Made the SNMP trap viewer look + more like the event viewer. + 2013-10-14 Miguel de Dios * include/graphs/flot/pandora.flot.js, diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 0828cc3ae7..eb1f30685d 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -434,7 +434,7 @@ $table->size[1] = '15%'; $table->head[2] = __('OID'); $table->align[2] = "center"; -$table->size[2] = '13%'; +$table->size[2] = '18%'; $table->head[3] = __('Value'); $table->align[3] = "center"; @@ -450,7 +450,7 @@ $table->size[5] = '10%'; $table->head[6] = __('Alert'); $table->align[6] = "center"; -$table->size[6] = '10%'; +$table->size[6] = '5%'; $table->head[7] = __('Action'); $table->align[7] = "center"; @@ -460,6 +460,8 @@ $table->head[8] = html_print_checkbox_extended ("allbox", 1, false, false, "java $table->align[8] = "center"; $table->size[8] = '5%'; +$table->style[7] = "background: #F3F3F3; color: #111 !important;"; + // Skip offset records $idx = 0; if ($traps !== false) { @@ -482,6 +484,7 @@ if ($traps !== false) { } // Agent matching source address + $table->cellclass[$idx][1] = get_priority_class ($severity); $agent = agents_get_agent_with_ip ($trap['source']); if ($agent === false) { if (! check_acl ($config["id_user"], 0, "AR")) { @@ -498,17 +501,11 @@ if ($traps !== false) { } //OID - if (empty ($trap["oid"])) { - $data[2] = __('N/A'); - } - else { - $data[2] = enterprise_hook ('editor_link', array ($trap)); - if ($data[2] === ENTERPRISE_NOT_HOOK) { - $data[2] = $trap["oid"]; - } - } + $table->cellclass[$idx][2] = get_priority_class ($severity); + $data[2] = '' . (empty($trap["oid"]) ? __('N/A') : $trap["oid"]) .''; //Value + $table->cellclass[$idx][3] = get_priority_class ($severity); if (empty ($trap["value"])) { $data[3] = __('N/A'); } @@ -517,6 +514,7 @@ if ($traps !== false) { } //User + $table->cellclass[$idx][4] = get_priority_class ($severity); if (!empty ($trap["status"])) { $data[4] = ''.substr ($trap["id_usuario"], 0, 8).''; if (!empty($trap["id_usuario"])) @@ -527,6 +525,7 @@ if ($traps !== false) { } // Timestamp + $table->cellclass[$idx][5] = get_priority_class ($severity); $data[5] = ''; $data[5] .= ui_print_timestamp ($trap["timestamp"], true); $data[5] .= ''; @@ -539,9 +538,6 @@ if ($traps !== false) { $data[6] = html_print_image("images/pixel_gray.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert not fired'))); } - // Severity - $table->rowclass[$idx] = get_priority_class ($severity); - //Actions $data[7] = ""; @@ -552,6 +548,8 @@ if ($traps !== false) { $data[7] .= '' . html_print_image("images/cross.png", true, array("border" => "0", "title" => __('Delete'))) . ' '; } $data[7] .= '' . html_print_image("images/eye.png", true, array("alt" => __('Show more'), "title" => __('Show more'))) .''; + $data[7] .= enterprise_hook ('editor_link', array ($trap)); + $data[8] = html_print_checkbox_extended ("snmptrapid[]", $trap["id_trap"], false, false, '', 'class="chk"', true);