2012-04-02 Dario Rodriguez <dario.rodriguez@artica.es>

* operation/menu.php,
	operation/snmpconsole/snmp_view.php,
	godmode/menu.php,
	godmode/snmpconsole/snmp_trap_generator.php,
	godmode/snmpconsole/snmp_alert.php,
	godmode/snmpconsole/snmp_filters.php: Merged changes in menus from 4.0.2
	SNMP menu now is inside Monitoring menu.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5877 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-04-02 16:45:08 +00:00
parent c3879f3c50
commit b1b60818eb
7 changed files with 43 additions and 29 deletions

View File

@ -1,3 +1,13 @@
2012-04-02 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/menu.php,
operation/snmpconsole/snmp_view.php,
godmode/menu.php,
godmode/snmpconsole/snmp_trap_generator.php,
godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php: Merged changes in menus from 4.0.2
SNMP menu now is inside Monitoring menu.
2012-04-02 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: added into function "html_debug_print" the

View File

@ -114,22 +114,6 @@ if (check_acl ($config['id_user'], 0, "UM")) {
$menu["gusuarios"]["sub"] = $sub;
}
// SNMP console
if (check_acl($config['id_user'], 0, "LW")) {
$menu["gsnmpconsole"]["text"] = __('Manage SNMP console');
$menu["gsnmpconsole"]["sec2"] = "godmode/snmpconsole/snmp_alert";
$menu["gsnmpconsole"]["id"] = "god-snmpc";
$sub = array ();
$sub['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
//$sub["godmode/snmpconsole/snmp_alert"]["text"] = __('Component groups');
$sub['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters');
enterprise_hook ('snmpconsole_submenu');
$menu["gsnmpconsole"]["sub"] = $sub;
}
// GIS
if (check_acl ($config['id_user'], 0, "IW")) {

View File

@ -190,7 +190,7 @@ if (isset ($_GET["delete_alert"])) { // Delete alert
// Alert form
if (isset ($_GET["update_alert"])) {
//the update_alert means the form should be displayed. If update_alert > 1 then an existing alert is updated
echo '<form name="agente" method="post" action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&submit='.$id_as.'">';
echo '<form name="agente" method="post" action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&submit='.$id_as.'">';
/* SNMP alert filters */
@ -428,7 +428,7 @@ if (isset ($_GET["update_alert"])) {
foreach ($result as $row) {
$data = array ();
$data[0] = '<a href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&update_alert='.$row["id_as"].'">' . alerts_get_alert_action_name ($row["id_alert"]) . '</a>';
$data[0] = '<a href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&update_alert='.$row["id_as"].'">' . alerts_get_alert_action_name ($row["id_alert"]) . '</a>';
$data[1] = __('SNMP Agent');
$data[1] = $row["agent"];
@ -446,9 +446,9 @@ if (isset ($_GET["update_alert"])) {
$data[6] = __('Never');
}
$data[7] = '<a href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&update_alert='.$row["id_as"].'">' .
$data[7] = '<a href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&update_alert='.$row["id_as"].'">' .
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>' .
'&nbsp;&nbsp;<a href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row["id_as"].'">' .
'&nbsp;&nbsp;<a href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row["id_as"].'">' .
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . '</a>';
$idx = count ($table->data); //The current index of the table is 1 less than the count of table data so we count before adding to table->data
array_push ($table->data, $data);
@ -463,7 +463,7 @@ if (isset ($_GET["update_alert"])) {
unset ($table);
echo '<div style="text-align:right; width:98%">';
echo '<form name="agente" method="post" action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_alert&update_alert=-1">';
echo '<form name="agente" method="post" action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&update_alert=-1">';
html_print_submit_button (__('Create'), "add_alert", false, 'class="sub next"');
echo "</form></div>";

View File

@ -95,7 +95,7 @@ if ($edit_filter > -2) {
$table->data[1][0] = __('Filter');
$table->data[1][1] = html_print_input_text ('filter', $filter, '', 60, 100, true);
echo '<form action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_filters" method="post">';
echo '<form action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_filters" method="post">';
html_print_input_hidden ('update_filter', $edit_filter);
html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
@ -131,11 +131,11 @@ if ($edit_filter > -2) {
foreach ($result as $row) {
$data = array ();
$data[0] = '<a href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$row['id_snmp_filter'].'">' . $row['description'] . '</a>';
$data[0] = '<a href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$row['id_snmp_filter'].'">' . $row['description'] . '</a>';
$data[1] = $row['filter'];
$data[2] = '<a href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$row['id_snmp_filter'].'">' .
$data[2] = '<a href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$row['id_snmp_filter'].'">' .
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>' .
'&nbsp;&nbsp;<a onclick="if (confirm(\'' . __('Are you sure?') . '\')) return true; else return false;" href="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$row['id_snmp_filter'].'">' .
'&nbsp;&nbsp;<a onclick="if (confirm(\'' . __('Are you sure?') . '\')) return true; else return false;" href="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$row['id_snmp_filter'].'">' .
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . '</a>';
array_push ($table->data, $data);
}
@ -147,7 +147,7 @@ if ($edit_filter > -2) {
unset ($table);
echo '<div style="text-align:right; width:98%">';
echo '<form name="agente" method="post" action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1">';
echo '<form name="agente" method="post" action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1">';
html_print_submit_button (__('Create'), 'submit_button', false, 'class="sub next"');
echo '</form></div>';
}

View File

@ -50,7 +50,7 @@ if($generate_trap) {
__('Could not be generated'));
}
$traps_generator = '<form method="POST" action="index.php?sec=gsnmpconsole&sec2=godmode/snmpconsole/snmp_trap_generator">';
$traps_generator = '<form method="POST" action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_trap_generator">';
$table->width = '90%';
$table->size = array ();
$table->data = array ();

View File

@ -56,9 +56,29 @@ if (check_acl ($config['id_user'], 0, "AR")) {
enterprise_hook ('inventory_menu');
$sub["operation/servers/recon_view"]["text"] = __('Recon View');
$sub["operation/servers/recon_view"]["text"] = __('Recon view');
$sub["operation/servers/recon_view"]["refr"] = 0;
//SNMP Console
$sub["operation/snmpconsole/snmp_view"]["text"] = __('SNMP console');
$sub["operation/snmpconsole/snmp_view"]["refr"] = 0;
$sub["operation/snmpconsole/snmp_view"]["subsecs"] = array("enterprise/godmode/snmpconsole",
"godmode/snmpconsole/snmp_trap_editor",
"godmode/snmpconsole/snmp_alert",
"godmode/snmpconsole/snmp_filters");
$sub2 = array();
$sub2["godmode/snmpconsole/snmp_alert"]["text"] = __("SNMP alerts");
$sub2['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters');
enterprise_hook ('snmpconsole_submenu');
$sub["operation/snmpconsole/snmp_view"]["sub2"] = $sub2;
$sub['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
$sub["godmode/snmpconsole/snmp_trap_generator"]["refr"] = 0;
$menu["estado"]["sub"] = $sub;
//End of view agents

View File

@ -42,7 +42,7 @@ $pagination = (int) get_parameter ("pagination", $config["block_size"]);
$offset = (int) get_parameter ('offset',0);
$trap_type = (int) get_parameter ('trap_type', -1);
$url = "index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&filter_agent=".$filter_agent."&filter_oid=".$filter_oid."&filter_severity=".$filter_severity."&filter_fired=".$filter_fired."&search_string=".$search_string."&free_search_string=".$free_search_string."&pagination=".$pagination."&offset=".$offset . "&trap_type=" . $trap_type;
$url = "index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&filter_agent=".$filter_agent."&filter_oid=".$filter_oid."&filter_severity=".$filter_severity."&filter_fired=".$filter_fired."&search_string=".$search_string."&free_search_string=".$free_search_string."&pagination=".$pagination."&offset=".$offset . "&trap_type=" . $trap_type;
if ($config["pure"]) {