pandorafms/pandora_console/godmode/agentes/massive_operations.php

85 lines
3.2 KiB
PHP
Raw Normal View History

2009-03-17 Esteban Sanchez <estebans@artica.es> * godmode/agentes/massive_operations.php: Added to repository. New page to group massive operations in a single page. * godmode/agentes/massive_config.php: Renamed from manage_config.php. * godmode/agentes/massive_delete_agents.php: Renamed from manage_delete.php. * godmode/agentes/massive_delete_modules.php: Added to repository. Interface to delete modules. * godmode/agentes/massive_delete_alerts.php: Added to repository. Interface to delete alerts. * godmode/agentes/agent_manager.php: Fixed table width to make it variable. * godmode/agentes/module_manager.php: Rewritten to use Pandora functions. * include/javascript/jquery.pandora.controls.js: Added pandoraSelectAgentAlert. Renamed pandoraSelectAgent to pandoraSelectAgentModule. Get only needed fields to make it quicker and avoid showing disabled modules. * godmode/alerts/alert_list.php: Adapted to changes in jquery.pandora.controls.js. * godmode/menu.php: Group some pages into new "Massive operation" submenu. * images/copy.png: Replaced with a better icon. * images/delete_agents.png, images/delete_alerts.php, images/delete_modules.php: Added to repository. * include/styles/pandora.css: Set color on input.sub * include/styles/pandora_width.css: Make menu_tab_frame wider. * include/functions_db.php: Removed deprecated dame_nombre_grupomodulo(). Added support to __() to receive multiple parameters so translatable strings can handle now printf format characters. * include/functions_modules.php: Added delete_agent_module(). * operation/agentes/ver_agente.php: Allow fields to be passed to get_agent_modules_json AJAX operation. * reporting/fgraph.php: Replaced sprintf() with __(). Some casts added. Show a sparse chart even if it has no max/min value. * godmode/modules/manage_network_components_form_network.php, operation/agentes/estado_ultimopaquete.php, godmode/modules/manage_network_components_form_wmi.php: Use get_modulegroup_name(). * godmode/agentes/configurar_agente.php, godmode/modules/manage_network_components.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1544 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-17 16:15:55 +01:00
<?php
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
// Please see http://pandora.sourceforge.net for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation",
"Trying to access Agent Config Management Admin section");
require ("general/noaccess.php");
return;
}
require_once ('include/functions_agents.php');
require_once ('include/functions_alerts.php');
require_once ('include/functions_modules.php');
$tab = (string) get_parameter ('tab');
$img_style = array ("class" => "top", "width" => 16);
echo '<div id="menu_tab_frame">';
echo '<div id="menu_tab">';
echo '<ul class="mn">';
echo '<li class="'.($tab == 'copy_modules' ? 'nomn_high' : 'nomn').'">';
echo '<a href="index.php?sec=estado&sec2=godmode/agentes/massive_operations&tab=copy_modules">';
print_image ("images/copy.png", false, $img_style);
echo '&nbsp;'.__('Copy modules').'</a>';
echo '</li>';
echo '<li class="'.($tab == 'delete_agents' || $tab == '' ? 'nomn_high' : 'nomn').'">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=delete_agents">';
print_image ("images/delete_agents.png", false, $img_style);
echo '&nbsp; '.__('Delete agents').'</a>';
echo '</li>';
echo '<li class="'.($tab == 'delete_modules' || $tab == '' ? 'nomn_high' : 'nomn').'">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=delete_modules">';
print_image ("images/delete_modules.png", false, $img_style);
echo '&nbsp; '.__('Delete modules').'</a>';
echo '</li>';
echo '<li class="'.($tab == 'delete_alerts' || $tab == '' ? 'nomn_high' : 'nomn').'">';
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=delete_alerts">';
print_image ("images/delete_alerts.png", false, $img_style);
echo '&nbsp; '.__('Delete alerts').'</a>';
echo '</li>';
echo "</ul></div></div>";
echo '<div style="height: 25px;">&nbsp;</div>';
echo '<h2>'.__('Agent configuration'). ' &raquo; '. __('Massive operations').'</h2>';
switch ($tab) {
case 'delete_alerts':
require_once ('godmode/agentes/massive_delete_alerts.php');
break;
case 'delete_agents':
require_once ('godmode/agentes/massive_delete_agents.php');
break;
case 'delete_modules':
require_once ('godmode/agentes/massive_delete_modules.php');
break;
case 'copy_modules':
default:
require_once ('godmode/agentes/massive_config.php');
}
?>