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

*extensions/snmp_explorer.php,
	operation/agentes/estado_monitores.php,
	operation/agentes/ver_agente.php,
	operation/snmpconsole/snmp_view.php,
	operation/gis_maps/render_view.php,
	godmode/agentes/fields_manager.php,
	godmode/agentes/configure_field.php,
	godmode/agentes/planned_downtime.php: Fixed a problem with agent sec
	param changed from gagente to estado in order to display new menus properly

	MERGED FROM 4.0.2



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-04-23 07:56:23 +00:00
parent e005640eb8
commit 74facd9b6c
9 changed files with 32 additions and 18 deletions

View File

@ -1,3 +1,17 @@
2012-04-23 Dario Rodriguez <dario.rodriguez@artica.es>
*extensions/snmp_explorer.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php,
operation/snmpconsole/snmp_view.php,
operation/gis_maps/render_view.php,
godmode/agentes/fields_manager.php,
godmode/agentes/configure_field.php,
godmode/agentes/planned_downtime.php: Fixed a problem with agent sec
param changed from gagente to estado in order to display new menus properly
MERGED FROM 4.0.2
2012-04-21 Junichi Satoh <junichi@rworks.jp>
* include/functions_config.php: Fixed SQL error with PostgreSQL.

View File

@ -270,7 +270,7 @@ function snmp_explorer() {
}
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
echo "<form method='post' id='walk_form' action='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente=$id_agent&id_extension=snmp_explorer'>";
echo "<form method='post' id='walk_form' action='index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente=$id_agent&id_extension=snmp_explorer'>";
$table->width = '98%';
@ -351,7 +351,7 @@ function snmp_explorer() {
if(!empty($interfaces_list)){
echo '<span id="form_interfaces">';
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
echo "<form method='post' action='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente=$id_agent&id_extension=snmp_explorer'>";
echo "<form method='post' action='index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente=$id_agent&id_extension=snmp_explorer'>";
$id_snmp_serialize = serialize_in_temp($interfaces, $config['id_user']."_snmp");
html_print_input_hidden('id_snmp_serialize', $id_snmp_serialize);

View File

@ -46,7 +46,7 @@ $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 100, true);
$table->data[1][0] = __('Display on front').ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
$table->data[1][1] = html_print_checkbox ('display_on_front', 1, $display_on_front, true);
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
echo '<form name="field" method="post" action="index.php?sec=estado&sec2=godmode/agentes/fields_manager">';
html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';

View File

@ -110,8 +110,8 @@ foreach ($fields as $field) {
$data[1] = html_print_image('images/delete.png', true);
}
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>';
$data[2] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>';
$data[2] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>';
$data[2] .= '&nbsp;&nbsp;<a href="index.php?sec=estado&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>';
array_push ($table->data, $data);
}
@ -119,7 +119,7 @@ foreach ($fields as $field) {
if($fields)
html_print_table ($table);
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
echo '<form method="post" action="index.php?sec=estado&sec2=godmode/agentes/configure_field">';
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button (__('Create field'), 'crt', false, 'class="sub next"');
echo '</div>';

View File

@ -246,7 +246,7 @@ if ($create_downtime || $update_downtime) {
$table->data[5][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group, '', '', 0, true);
$table->data[6][0] = __('Only alerts');
$table->data[6][1] = html_print_checkbox('only_alerts', 1, $only_alerts, true);
echo '<form method="POST" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">';
echo '<form method="POST" action="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime">';
if ($id_downtime > 0){
echo "<table width=100% border=0 cellpadding=4 >";
@ -305,7 +305,7 @@ if ($create_downtime || $update_downtime) {
$disabled_add_button = true;
}
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&id_downtime=$id_downtime'>";
echo "<form method=post action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime&first_update=1&id_downtime=$id_downtime'>";
html_print_select_groups(false, "AR", true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'width:180px');
@ -313,7 +313,7 @@ if ($create_downtime || $update_downtime) {
html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false);
echo "</form>";
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&insert_downtime_agent=1&id_downtime=$id_downtime'>";
echo "<form method=post action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime&first_update=1&insert_downtime_agent=1&id_downtime=$id_downtime'>";
echo html_print_select ($data, "id_agent[]", '', '', '', 0, false, true, true, '', false, 'width: 180px;');
echo "<br /><br /><br />";
@ -359,7 +359,7 @@ if ($create_downtime || $update_downtime) {
$data[3] = $downtime["ultimo_contacto"];
$data[4] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$data[4] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$id_agent.'&amp;delete_downtime_agent=1&amp;first_update=1&amp;id_downtime_agent='.$downtime["id"].'&amp;id_downtime='.$id_downtime.'">' .
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
@ -422,10 +422,10 @@ else {
$data[5] = __('All');
}
if ($downtime["executed"] == 0){
$data[6] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$data[6] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$id_agent.'&amp;delete_downtime=1&amp;id_downtime='.$downtime['id'].'">' .
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
$data[7] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;edit_downtime=1&amp;first_update=1&amp;id_downtime='.$downtime['id'].'">' .
$data[7] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime&amp;edit_downtime=1&amp;first_update=1&amp;id_downtime='.$downtime['id'].'">' .
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>';
}
else {
@ -439,7 +439,7 @@ else {
$data[8] = html_print_image ("images/pixel_red.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
if ($downtime["executed"] != 0) {
$data[9] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;stop_downtime=1&amp;id_downtime='.$downtime['id'].'">' .
$data[9] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime&amp;stop_downtime=1&amp;id_downtime='.$downtime['id'].'">' .
html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime')));
}
@ -449,7 +449,7 @@ else {
}
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">';
echo '<form method="post" action="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime">';
html_print_input_hidden ("first_create", 1);
html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
echo '</form>';

View File

@ -313,7 +313,7 @@ foreach ($modules as $module) {
$data[2] = servers_show_type ($module['id_modulo']) . '&nbsp;';
if (check_acl ($config['id_user'], $id_grupo, "AW"))
$data[2] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module["id_agente_modulo"].'&amp;edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "")) . '</a>';
$data[2] .= '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module["id_agente_modulo"].'&amp;edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "")) . '</a>';
$data[3] = ui_print_string_substr ($module["nombre"], 30, true);
if (!empty($module["extended_info"])) {

View File

@ -515,7 +515,7 @@ $tab = get_parameter ("tab", "main");
$managetab = "";
if (check_acl ($config['id_user'],$id_grupo, "AW") || $is_extra) {
$managetab['text'] ='<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'">'
$managetab['text'] ='<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'">'
. html_print_image("images/setup.png", true, array ("title" => __('Manage')))
. '</a>';

View File

@ -98,7 +98,7 @@ else {
if (check_acl ($config["id_user"], $map['group_id'], "IW"))
$buttons [] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='. $idMap.'">'.html_print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';
$buttonsString = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3">' . html_print_image("images/bricks.png", true, array("class" => "top", "border" => '0')) . '&nbsp; Agent&nbsp;-&nbsp;test_gis1</a></li></ul></div><div id="menu_tab"><ul class="mn"><li class="nomn"><a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente=3">' . html_print_image("images/setup.png", true, array("class" => "top", "title" => "Manage", "border" => "0", "width" => "16", "title" => "Manage")) . '&nbsp;</a></li><li class="nomn_high"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3">' . html_print_image("images/monitor.png", true, array("class" => "top", "title" => "Main", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3&amp;tab=data">' . html_print_image("images/lightbulb.png", true, array("class" => "top", "title" => "Data", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3&amp;tab=alert">' . html_print_image("images/bell.png", true, array("class" => "top", "title" => "Alerts", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=sla&amp;id_agente=3">' . html_print_image("images/images.png", true, array("class" => "top", "title" => "S.L.A.", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/estado_agente&amp;group_id=2">' . html_print_image("images/agents_group.png", true, array("class" => "top", "title" => "Group", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=inventory&amp;id_agente=3">' . html_print_image("images/page_white_text.png", true, array("class" => "top", "title" => "Inventory", "border" => "0", "width" => "16")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=gis&amp;id_agente=3">' . html_print_image("images/world.png", array("class" => "top", "title" => "GIS data", "border" => "0")) . '&nbsp;</a>';
$buttonsString = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3">' . html_print_image("images/bricks.png", true, array("class" => "top", "border" => '0')) . '&nbsp; Agent&nbsp;-&nbsp;test_gis1</a></li></ul></div><div id="menu_tab"><ul class="mn"><li class="nomn"><a href="index.php?sec=estado&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente=3">' . html_print_image("images/setup.png", true, array("class" => "top", "title" => "Manage", "border" => "0", "width" => "16", "title" => "Manage")) . '&nbsp;</a></li><li class="nomn_high"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3">' . html_print_image("images/monitor.png", true, array("class" => "top", "title" => "Main", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3&amp;tab=data">' . html_print_image("images/lightbulb.png", true, array("class" => "top", "title" => "Data", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente=3&amp;tab=alert">' . html_print_image("images/bell.png", true, array("class" => "top", "title" => "Alerts", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=sla&amp;id_agente=3">' . html_print_image("images/images.png", true, array("class" => "top", "title" => "S.L.A.", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/estado_agente&amp;group_id=2">' . html_print_image("images/agents_group.png", true, array("class" => "top", "title" => "Group", "border" => "0")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=inventory&amp;id_agente=3">' . html_print_image("images/page_white_text.png", true, array("class" => "top", "title" => "Inventory", "border" => "0", "width" => "16")) . '&nbsp;</a></li><li class="nomn"><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;tab=gis&amp;id_agente=3">' . html_print_image("images/world.png", array("class" => "top", "title" => "GIS data", "border" => "0")) . '&nbsp;</a>';
$times = array(
5 => 5 . ' ' . __('seconds'),

View File

@ -451,7 +451,7 @@ if ($traps !== false) {
if (! check_acl ($config["id_user"], 0, "AR")) {
continue;
}
$data[1] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap["source"].'" title="'.__('Create agent').'">'.$trap["source"].'</a>';
$data[1] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap["source"].'" title="'.__('Create agent').'">'.$trap["source"].'</a>';
} else {
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
continue;