From 0009222ad6fa860a93b202363658069f9891745d Mon Sep 17 00:00:00 2001 From: ramonn Date: Mon, 16 Sep 2013 12:58:14 +0000 Subject: [PATCH] 2013-09-16 Ramon Novoa * operation/snmpconsole/snmp_view.php: Hide binding vars from the main view (they do not fit in the table). They are translated and shown in the detailed view. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8775 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 +++ .../operation/snmpconsole/snmp_view.php | 52 +++++++------------ 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index afab0628ad..5287481a69 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-09-16 Ramon Novoa + + * operation/snmpconsole/snmp_view.php: Hide binding vars from the main + view (they do not fit in the table). They are translated and shown in + the detailed view. + 2013-09-16 Ramon Novoa * godmode/servers/plugin.php: Added tab support for the metaconsole. diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index c67c1dc772..0828cc3ae7 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -440,29 +440,25 @@ $table->head[3] = __('Value'); $table->align[3] = "center"; $table->size[3] = '10%'; -$table->head[4] = __('Custom'); +$table->head[4] = __('User ID'); $table->align[4] = "center"; -$table->size[4] = '12%'; +$table->size[4] = '10%'; -$table->head[5] = __('User ID'); +$table->head[5] = __('Timestamp'); $table->align[5] = "center"; $table->size[5] = '10%'; -$table->head[6] = __('Timestamp'); +$table->head[6] = __('Alert'); $table->align[6] = "center"; $table->size[6] = '10%'; -$table->head[7] = __('Alert'); +$table->head[7] = __('Action'); $table->align[7] = "center"; $table->size[7] = '10%'; -$table->head[8] = __('Action'); +$table->head[8] = html_print_checkbox_extended ("allbox", 1, false, false, "javascript:CheckAll();", 'class="chk" title="'.__('All').'"', true); $table->align[8] = "center"; -$table->size[8] = '10%'; - -$table->head[9] = html_print_checkbox_extended ("allbox", 1, false, false, "javascript:CheckAll();", 'class="chk" title="'.__('All').'"', true); -$table->align[9] = "center"; -$table->size[9] = '5%'; +$table->size[8] = '5%'; // Skip offset records $idx = 0; @@ -520,52 +516,44 @@ if ($traps !== false) { $data[3] = ui_print_truncate_text($trap["value"], GENERIC_SIZE_TEXT, false); } - //Custom - if (empty ($trap["oid_custom"])) { - $data[4] = __('N/A'); - } - else { - $data[4] = ui_print_truncate_text($trap["oid_custom"], GENERIC_SIZE_TEXT, false); - } - //User if (!empty ($trap["status"])) { - $data[5] = ''.substr ($trap["id_usuario"], 0, 8).''; + $data[4] = ''.substr ($trap["id_usuario"], 0, 8).''; if (!empty($trap["id_usuario"])) - $data[5] .= ui_print_help_tip(get_user_fullname($trap["id_usuario"]), true); + $data[4] .= ui_print_help_tip(get_user_fullname($trap["id_usuario"]), true); } else { - $data[5] = '--'; + $data[4] = '--'; } // Timestamp - $data[6] = ''; - $data[6] .= ui_print_timestamp ($trap["timestamp"], true); - $data[6] .= ''; + $data[5] = ''; + $data[5] .= ui_print_timestamp ($trap["timestamp"], true); + $data[5] .= ''; // Use alert severity if fired if (!empty ($trap["alerted"])) { - $data[7] = html_print_image("images/pixel_yellow.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert fired'))); + $data[6] = html_print_image("images/pixel_yellow.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert fired'))); } else { - $data[7] = html_print_image("images/pixel_gray.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert not fired'))); + $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[8] = ""; + $data[7] = ""; if (empty ($trap["status"]) && check_acl ($config["id_user"], 0, "IW")) { - $data[8] .= '' . html_print_image("images/ok.png", true, array("border" => '0', "title" => __('Validate'))) . ' '; + $data[7] .= '' . html_print_image("images/ok.png", true, array("border" => '0', "title" => __('Validate'))) . ' '; } if (check_acl ($config["id_user"], 0, "IM")) { - $data[8] .= '' . html_print_image("images/cross.png", true, array("border" => "0", "title" => __('Delete'))) . ' '; + $data[7] .= '' . html_print_image("images/cross.png", true, array("border" => "0", "title" => __('Delete'))) . ' '; } - $data[8] .= '' . html_print_image("images/eye.png", true, array("alt" => __('Show more'), "title" => __('Show more'))) .''; + $data[7] .= '' . html_print_image("images/eye.png", true, array("alt" => __('Show more'), "title" => __('Show more'))) .''; - $data[9] = html_print_checkbox_extended ("snmptrapid[]", $trap["id_trap"], false, false, '', 'class="chk"', true); + $data[8] = html_print_checkbox_extended ("snmptrapid[]", $trap["id_trap"], false, false, '', 'class="chk"', true); array_push ($table->data, $data);