pandorafms/pandora_console/godmode/agentes/modificar_agente.php

255 lines
8.3 KiB
PHP
Raw Normal View History

<?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
2008-04-01 Sancho Lerena <slerena@gmail.com> * pandoradb_data.sql: Alert type 0 is not 1. 1-3 are reserved. Removed prediction module (nosense since it uses normal modules). * include/functions_db.php: Added wrapper give_db_value to get_db_value because A LOT of code uses old syntax and this makes too many errors. * include/functions.php: Fixed pagination issues with blocksize config. * pandoradb.sql: Change alert command lenght and added some comments for future implementation of alert criticity and others. * operation/incidents/incident.php: Fixed some bugs calling to old funcions / variables. * operation/events/events.php: Fixed some bugs calling to old funcions / variables. Removed graph and simplified header. * operation/agentes/estado_alertas.php: Changed get_db_value call and removed (Raul) button to create alert from here. * operation/agentes/estado_grupo.php: Implemented support for optional view of down modules and fired alerts. * operation/agentes/ver_agente.php, operation/agentes/datos_agente.php: Uses of new get_db_value and new session id variable. * images/mod_async_string.png: Added image. * images/mod_async_inc.png: Added image. * images/mod_image_png.png: Added image. * images/mod_async_data.png: Added image. * images/mod_async_proc.png: Added image. * images/mod_image_jpg.png: Added image. * godmode/setup/setup.php: Several fixes. * godmode/agentes/alert_manager.php: Several changes for new alert manager. Not finished. Interim commit. * godmode/agentes/configurar_agente.php: More changes needed to alert editor. * godmode/agentes/alert_manager_editor.php: New file for alert management. * godmode/modules/module_list.php: Some updates, removed invalid column. * godmode/alerts/modify_alert.php: Alert types < 4 cannot be modified (this includes combined, internal audit and Pandora FMS log). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@783 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-04-01 15:53:11 +02:00
// 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
2009-01-07 16:57:33 +01:00
check_login ();
// Take some parameters (GET)
$offset = (int) get_parameter ("offset");
$group_id = (int) get_parameter ("group_id");
$ag_group = get_parameter ("ag_group_refresh", -1);
if ($ag_group == -1 )
$ag_group = (int) get_parameter ("ag_group", -1);
if (($ag_group == -1) && ($group_id != 0))
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
$ag_group = $group_id;
2009-04-02 Sancho Lerena <slerena@artica.es> * pandoradb.sql: Final DB changes proposed for closing this month the DB scheme. tagente-> new server_name field to assign server (old fields will be removed). talert_templates has two new types (warning, critical). tevento has "user_comment" new field. Tserver has three new fields, server_type (so some old fields will be deleted), threads and queued_modules this last two are for statistical options. Tusuario add language type to override global language. * update_manager/main.php: Minor changes for correct ACL usage. Non PM users could see in what revision it the system, but only that. * pandoradb_migrate_v2.x_to_v3.0.sql: Updated script for new DB changes. * general/noaccess.php: Added footer and ending div. Page was very ugly when showing noaccess errors, nobody see it ???. * godmode/menu.php: A LOT of ACL fixes on several options. * godmode/agentes/agent_manager.php: Fixed a crazy floating icon. * godmode/agentes/manage_config_remote.php: A LOT of changes, rewriting stuff, because was not working. This also adds a lot of ACL checks. * godmode/agentes/massive_config.php, massive*: ACL changes. * godmode/agentes/modificar_agente.php: Fixed ACL problems. * godmode/agentes/module_manager_editor.php: Fixed bad module categories for some types (data, plugin and prediction). * godmode/alerts/alert_list.php: Fixed ACL problem. * godmode/reporting/graph_builder.php: Added ACl restriction for non-viewable agents for current user. Seems to be a problem with data with more than 2 sources. * godmode/reporting/map_builder.php: ACL checks improved. * godmode/reporting/reporting_builder.php: ACL checks added (was missing), some code ported from 2.1, other is new. New fields shown in list. * include/functions.php: Fixed the annoying bug of "bad counters" in function human_time_description_raw(). Function used,format_numeric() should not be used never to calculate nothing, only to print formatted strings. * include/functions_db.php: Added function user_access_to_agent() to know if a given user has access to a given agent. * include/functioins_report.php: get_report() should let admin to watch any report. Fixed. * agentes/alerts_status.php: Fixed ACL problem for view alert. * operation/incidents/incident.php: Bad call for pagination() was giving problems to pagination call. Somebody changes pagination() interface and make this broken. Please if you change any interface, be sure that is compatible with old code or make a post in the list about this ! * godmode/users/user_edit.php: Additional ACL check to do not let anybody to watch non accesible users. Even for see the username or description. * reporting/pchart_graph.php:Progress bar shown text in white when > 60%. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-02 21:16:59 +02:00
if (! give_acl ($config["id_user"], 0, "AW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation",
"Trying to access agent manager");
require ("general/noaccess.php");
exit;
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
}
$search = get_parameter ("search", "");
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
if (isset ($_GET["borrar_agente"])) { // if delete agent
$id_agente = get_parameter_get ("borrar_agente");
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
$agent_name = get_agent_name ($id_agente);
$id_grupo = dame_id_grupo ($id_agente);
if (give_acl ($config["id_user"], $id_grupo, "AW")==1) {
2009-01-12 Sancho Lerena <slerena@artica.es> * pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered some indexes) on tagente_datos, tagente_datos_string and tagente_datos_inc. tagente_estado table: removed cambio, added status_changes, last_status. tagente_modulo: added five new fields (warning,critical mgmt., flipflop detection, history module and delete_pending bit. * agent_manager.php: Group ALL not shown anymore. * configurar_agente.php: Support for new options. Delete a module now mark for deletion the module, not delete data (It's VERY slow!). * modificar_agente.php: Delete agent now uses the global function, minor fixes. * module_manager_editor.php: New fields initializacion. * module_manager_editor_network.php: At this time, the first module editor who implements the new fields and improve old ones (tcp data). * setup.php: Added support for new token: event_view_hr (Filter of max old (in hr) for the event viewer. Removed old tokens show_unknown and show_lastalert. * functions.php: format_for_graph() has an important BUG that makes all units rendered without the "K" !!!!. Fixed. * delete_agent.php: Delete remote config (if present). Also mark for deletion modules instead delete them (and let the data without being deleted, because it's a HUGE consuming time, and it's left for the daily db maintance process). * estado_agente.php: Updated code for view new status. * estado_generalagente.php: Total packets are removed from this view, this was a huge time consuming SQL operation that don't give important infomation. Groupname is now visualized. * estado_ultimopaquete.php, * estado_monitores.php, * estado_grupo.php: Rewritten much code to view new status and other minor changes. * ver_agente.php: Data view now works under the tabs and other minor changes. * events.php: Support for the new events and status. Added filter for username and for a max. hours old events. Some boxes are now hidden by default. * fgraph.php: Some graphs are now fixed and uses tagente_datos and tagent_access with utimestamp and without id_agent index. Works faster * images/*: Updated icons (module types) and two new bulb colors. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
$id_agentes[0] = $id_agente;
if (delete_agent ($id_agentes))
audit_db($config["id_user"],$REMOTE_ADDR, "Agent \'$agent_name\' deleted", "Agent Management");
} else { // NO permissions.
audit_db ($config["id_user"],$REMOTE_ADDR, "ACL Violation",
"Trying to delete agent \'$agent_name\'");
require ("general/noaccess.php");
exit;
}
}
2009-04-13 Esteban Sanchez <estebans@artica.es> * general/footer.php: Removed Firefox icon. Style correction. * godmode/agentes/agent_manager.php: Replaced &gt; with &raquo;. Style correction when setting bold attributes. * godmode/agentes/manage_config_remote.php, godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php, godmode/alerts/alert_list.php, godmode/db/db_audit.php, godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php, godmode/db/db_purge.php, godmode/db/db_refine.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/modules/manage_nc_groups.php, godmode/modules/manage_network_components.php, godmode/modules/manage_network_templates.php, godmode/modules/manage_network_templates_form.php, godmode/modules/module_list.php, godmode/profiles/profile_list.php, godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php, godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php, godmode/servers/manage_export_form.php, godmode/servers/manage_recontask.php, godmode/servers/manage_recontask_form.php, godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php, godmode/setup/links.php, godmode/setup/news.php, godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php, godmode/users/user_list.php, operation/agentes/alerts_status.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/exportdata.php, operation/agentes/networkmap.php, operation/agentes/status_monitor.php, operation/agentes/tactical.php, operation/events/events.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_statistics.php, operation/messages/message.php, operation/reporting/custom_reporting.php, operation/reporting/graph_viewer.php, operation/reporting/reporting_viewer.php, operation/servers/view_server.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/visual_console/index.php, godmode/agentes/agent_template.php: Replaced &gt; with &raquo; * operation/agentes/datos_agente.php: Return instead of exit * include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS control to preview the OS icon on a select. * include/functions_reports.php: Fixed a bug on delete_report() that returns error when the report has no content. * include/functions_ui.php: Removed border attribute on print_os_icon(). Some fixes to meta refresh element on process_page_head(). Fixed format_filesize() when length is zero. * godmode/menu.php: Replaced link to file manager. Added enterprise hook. * godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php * include/styles/pandora.css: Textarea width reduced to 99% * godmode/setup/setup.php: Added get_os_icon AJAX operation. * images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png, images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to repository. Mime type icons. * extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments. * include/functions_filemanager.php: Added to repository. Minimal API for file manager system. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
echo "<h2>".__('Agent configuration')." &raquo; ".__('Agents defined in Pandora')."</h2>";
// Show group selector
if (isset($_POST["ag_group"])){
$ag_group = get_parameter_post ("ag_group");
echo "<form method='post'
action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group_refresh=".$ag_group."'>";
} else {
echo "<form method='post'
action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>";
}
echo "<table cellpadding='4' cellspacing='4' class='databox' width=700><tr>";
2008-08-12 Esteban Sanchez <estebans@artica.es> * pandoradb_data.sql: Added default languages. * include/streams.php, include/gettext.php: Added to repository. New files to add gettext support of mo files. * include/functions_db.php: Function lang_string() functionallity changed to use gettext library. * include/languages/language_es_es.php, include/languages/language_gl.php, include/languages/language_en.php, include/languages/language_pt_br.php, include/languages/language_it.php, include/languages/language_ast_es.php, include/languages/language_es_la.php, include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_ca.php: Files deleted, they are deprecated since we have moved to gettext. * lude/languages/pt_br.mo, include/languages/es.mo, include/languages/fr.po, include/languages/it.po, include/languages/ca.po, include/languages/ast.po, include/languages/de.po, include/languages/gl.mo: Gettext translations of the previous languages we have in language_*.php files. * include/languages/Makefile: Added to repository to generate index.pot and mo files of each translation. * include/functions_reporting_pdf.php, include/functions_reporting.php, include/config_process.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced string parameters of __() callings to plain english. Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo "<td valign='top'>".__('Group')."</td>";
echo "<td valign='top'>";
echo "<select name='ag_group' onChange='javascript:this.form.submit();'
class='w130'>";
if ($ag_group > 1) {
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
echo "<option value='".$ag_group."'>".get_group_name ($ag_group).
"</option>";
}
2008-12-12 Evi Vanoost <vanooste@rcbi.rochester.edu> * pandora_console/operation/agentes/datos_agente.php: Rewrite. Uses new functions and better security and validation * pandora_console/include/functions_db.php: Renamed some functions and created agentmodule functions for consistency with documentation and to avoid searching for and typing certain function names: get_agentmodules is now get_agent_modules; dame_grupo is now get_group_name; dame_nombre_agente is now get_agent_name; get_agentmodule_agent is new; dame_nombre_agente_agentemodulo is now get_agentmodule_agent_name; dame_nombre_modulo_agentemodulo is now get_agentmodule_name; dame_id_tipo_modulo_agentemodulo is now get_agentmodule_type; dame_nombre_tipo_modulo is now get_moduletype_name; dame_nombre_grupo is now get_group_name; get_agentmodule_count is get_agent_modules_count; get_agentmodule_group is new; get_agent_group is new; * pandora_console/include/functions_reporting.php, pandora_console/include/functions.php, pandora_console/operation/incidents/incident.php, pandora_console/operation/users/user.php, pandora_console/operation/users/user_edit.php, pandora_console/operation/events/events.php, pandora_console/operation/visual_console/index.php, pandora_console/operation/agentes/estado_grupo.php, pandora_console/operation/agentes/export_csv.php, pandora_console/operation/agentes/estado_agente.php, pandora_console/operation/agentes/estado_ultimopaquete.php, pandora_console/operation/agentes/estado_generalagente.php, pandora_console/operation/agentes/sla_view.php, pandora_console/operation/agentes/exportdata.php, pandora_console/operation/agentes/ver_agente.php, pandora_console/operation/agentes/tactical.php, pandora_console/operation/agentes/networkmap.php, pandora_console/operation/messages/message.php, pandora_console/operation/reporting/reporting_xml.php, pandora_console/operation/reporting/reporting_viewer.php, pandora_console/reporting/fgraph.php, pandora_console/godmode/groups/group_list.php, pandora_console/godmode/users/user_list.php, pandora_console/godmode/users/configure_user.php, pandora_console/godmode/db/db_refine.php, pandora_console/godmode/db/db_info.php, pandora_console/godmode/db/db_purge.php, pandora_console/godmode/agentes/manage_config.php, pandora_console/godmode/agentes/modificar_agente.php, pandora_console/godmode/agentes/configurar_agente.php, pandora_console/godmode/agentes/manage_config_remote.php, pandora_console/godmode/modules/manage_network_components_form_network.php, pandora_console/godmode/modules/manage_network_components_form_wmi.php, pandora_console/godmode/reporting/reporting_builder.php, pandora_console/godmode/reporting/map_builder.php, pandora_console/godmode/reporting/graph_builder.php: Renamed functions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-12 22:54:40 +01:00
echo "<option value=1>".get_group_name (1)."</option>"; // Group all is always active
$mis_grupos = list_group ($config["id_user"]); //Print combo for groups and set an array with all groups
echo "</select>";
echo "<td valign='top'>
<noscript>
<input name='uptbutton' type='submit' class='sub upd' value='".__('Show')."'>
</noscript>
</td>
</form>
<td valign='top'>";
2008-08-12 Esteban Sanchez <estebans@artica.es> * pandoradb_data.sql: Added default languages. * include/streams.php, include/gettext.php: Added to repository. New files to add gettext support of mo files. * include/functions_db.php: Function lang_string() functionallity changed to use gettext library. * include/languages/language_es_es.php, include/languages/language_gl.php, include/languages/language_en.php, include/languages/language_pt_br.php, include/languages/language_it.php, include/languages/language_ast_es.php, include/languages/language_es_la.php, include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_ca.php: Files deleted, they are deprecated since we have moved to gettext. * lude/languages/pt_br.mo, include/languages/es.mo, include/languages/fr.po, include/languages/it.po, include/languages/ca.po, include/languages/ast.po, include/languages/de.po, include/languages/gl.mo: Gettext translations of the previous languages we have in language_*.php files. * include/languages/Makefile: Added to repository to generate index.pot and mo files of each translation. * include/functions_reporting_pdf.php, include/functions_reporting.php, include/config_process.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced string parameters of __() callings to plain english. Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo __('Free text for search (*)');
echo "</td><td>";
// Show group selector
if (isset($_POST["ag_group"])){
$group_mod = "&ag_group_refresh=".get_parameter_post ("ag_group");
} else {
$group_mod ="";
}
echo "<form method='post' action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&refr=60$group_mod'>";
echo "<input type=text name='search' size='15' >";
echo "</td><td valign='top'>";
echo "<input name='srcbutton' type='submit' class='sub' value='".__('Search')."'>";
echo "</form>";
echo "</td></table>";
$search_sql = '';
if ($search != ""){
2009-03-31 Sancho Lerena <slerena@artica.es> * include/styles/menu.css: Added icons for dashboard option (enterprise). * include/functions_config.php: Added support for round_corner option. * include/functions_db.php: Temporal support (not really work) for enterprise servers webcheck/goliat and inventory. This code should be corrected when make final dbstruct changes for new server_type numeric field. * include/functions_reports.php: Fixed an annoying notice. * index.php: Dashboard is not entered automatically on login in enterprise. * operation/events/events.php: Events from group 0 always displayed. * operation/servers/view_server.php: Icon for server status is now smaller. * operation/menu.php: New enterprise hook for Dashboard menu entry. * reporting/pchart_graph.php: Round corners on progressbar acording to setup option. Color of border is smoother. * godmode/setup/links.php: Fixed ACL condition (AND -> OR). * godmode/setup/setup.php: Fixed ACL. Moved visual options to other setup. * godmode/setup/filemgr.php: Fixed ACL condition (AND -> OR). * godmode/agentes/modificar_agente.php: Support for IP address search. * godmode/menu.php: Added new setup section for visual options. * godmode/setup/setup_visuals.php: New setup section for visual options. * images/mod_web_proc.png, images/screenshot_not_found.jpg images/mod_web_data.png images/server_web.png: New icons added for enterprise options. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1580 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-31 16:32:58 +02:00
$search_sql = " AND ( nombre LIKE '%$search%' OR direccion LIKE '%$search%') ";
} else {
}
// Show only selected groups
if ($ag_group > 1) {
$sql = sprintf ('SELECT COUNT(*)
FROM tagente
WHERE id_grupo = %d
%s',
$ag_group, $search_sql);
$total_agents = get_db_sql ($sql);
$sql = sprintf ('SELECT *
FROM tagente
WHERE id_grupo = %d
%s
ORDER BY nombre LIMIT %d, %d',
$ag_group, $search_sql, $offset, $config["block_size"]);
} else {
$sql = sprintf ('SELECT COUNT(*)
FROM tagente
WHERE id_grupo IN (%s)
%s',
implode (',', array_keys (get_user_groups ())),
$search_sql);
$total_agents = get_db_sql ($sql);
$sql = sprintf ('SELECT *
FROM tagente
WHERE id_grupo IN (%s)
%s
ORDER BY nombre LIMIT %d, %d',
implode (',', array_keys (get_user_groups ())),
$search_sql, $offset, $config["block_size"]);
}
$agents = get_db_all_rows_sql ($sql);
// Prepare pagination
pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group", $offset);
echo "<div style='height: 20px'> </div>";
if ($agents !== false) {
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='95%' class='databox'>";
2008-08-12 Esteban Sanchez <estebans@artica.es> * pandoradb_data.sql: Added default languages. * include/streams.php, include/gettext.php: Added to repository. New files to add gettext support of mo files. * include/functions_db.php: Function lang_string() functionallity changed to use gettext library. * include/languages/language_es_es.php, include/languages/language_gl.php, include/languages/language_en.php, include/languages/language_pt_br.php, include/languages/language_it.php, include/languages/language_ast_es.php, include/languages/language_es_la.php, include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_ca.php: Files deleted, they are deprecated since we have moved to gettext. * lude/languages/pt_br.mo, include/languages/es.mo, include/languages/fr.po, include/languages/it.po, include/languages/ca.po, include/languages/ast.po, include/languages/de.po, include/languages/gl.mo: Gettext translations of the previous languages we have in language_*.php files. * include/languages/Makefile: Added to repository to generate index.pot and mo files of each translation. * include/functions_reporting_pdf.php, include/functions_reporting.php, include/config_process.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced string parameters of __() callings to plain english. Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo "<th>".__('Agent name')."</th>";
2008-08-11 Esteban Sanchez <estebans@artica.es> * include/functions_db.php: Added __ as an alias of lang_string(). * include/functions_reporting_pdf.php, include/functions_reporting.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/extensions.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/export_csv.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/status_events.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, ajax.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/extensions.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_network_components_form.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a instead of $lang_label to future use of gettext. Style corrections. * godmode/agentes/planned_downtime.php: Rewritten to use Pandora functions and adopt the UI style. Replaced lang_string with __(). * pandoradb.sql: Fields in tplanned_downtime renamed to fit guidelines. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
echo "<th title='".__('Remote agent configuration')."'>".__('R')."</th>";
2008-08-12 Esteban Sanchez <estebans@artica.es> * pandoradb_data.sql: Added default languages. * include/streams.php, include/gettext.php: Added to repository. New files to add gettext support of mo files. * include/functions_db.php: Function lang_string() functionallity changed to use gettext library. * include/languages/language_es_es.php, include/languages/language_gl.php, include/languages/language_en.php, include/languages/language_pt_br.php, include/languages/language_it.php, include/languages/language_ast_es.php, include/languages/language_es_la.php, include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_ca.php: Files deleted, they are deprecated since we have moved to gettext. * lude/languages/pt_br.mo, include/languages/es.mo, include/languages/fr.po, include/languages/it.po, include/languages/ca.po, include/languages/ast.po, include/languages/de.po, include/languages/gl.mo: Gettext translations of the previous languages we have in language_*.php files. * include/languages/Makefile: Added to repository to generate index.pot and mo files of each translation. * include/functions_reporting_pdf.php, include/functions_reporting.php, include/config_process.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced string parameters of __() callings to plain english. Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo "<th>".__('OS')."</th>";
echo "<th>".__('Group')."</th>";
echo "<th>".__('Description')."</th>";
echo "<th>".__('Delete')."</th>";
$color=1;
foreach ($agents as $agent) {
$id_grupo = $agent["id_grupo"];
if (! give_acl ($config["id_user"], $id_grupo, "AW"))
continue;
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
// Agent name
echo "<tr><td class='$tdcolor' width='40%'>";
if ($agent["disabled"]){
echo "<em>";
}
echo '<span class="left">';
echo "<strong><a href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=main&
id_agente=".$agent["id_agente"]."'>".substr(strtoupper($agent["nombre"]),0,20)."</a></strong>";
if ($agent["disabled"]) {
echo "</em>";
}
echo '</span><div class="left actions" style="visibility: hidden; clear: left">';
echo '<a href="index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=main&
id_agente='.$agent["id_agente"].'">'.__('Edit').'</a>';
echo ' | ';
echo '<a href="index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=module&
id_agente='.$agent["id_agente"].'">'.__('Modules').'</a>';
echo ' | ';
echo '<a href="index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=alert&
id_agente='.$agent["id_agente"].'">'.__('Alerts').'</a>';
echo ' | ';
echo '<a href="index.php?sec=estado
&sec2=operation/agentes/ver_agente
&id_agente='.$agent["id_agente"].'">'.__('View').'</a>';
echo '</div>';
echo "</td>";
echo "<td align='center' class='$tdcolor'>";
// Has remote configuration ?
$agent_md5 = md5 ($agent["nombre"], false);
if (file_exists ($config["remote_config"]."/".$agent_md5.".md5")) {
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$agent["id_agente"]."&disk_conf=1'>";
echo "<img src='images/application_edit.png' align='middle' title='".__('Edit remote config')."'>";
echo "</a>";
}
echo "</td>";
// Operating System icon
echo "<td class='$tdcolor' align='center'>";
print_os_icon ($agent["id_os"], false);
echo "</td>";
// Group icon and name
echo "<td class='$tdcolor' align='center'>".print_group_icon ($id_grupo, true)."</td>";
// Description
echo "<td class='".$tdcolor."f9'>".$agent["comentarios"]."</td>";
// Action
echo "<td class='$tdcolor' align='center'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
borrar_agente=".$agent["id_agente"]."'";
echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
echo "<img border='0' src='images/cross.png'></a></td>";
}
echo "</table>";
echo "<table width='95%'><tr><td align='right'>";
} else {
2008-08-12 Esteban Sanchez <estebans@artica.es> * pandoradb_data.sql: Added default languages. * include/streams.php, include/gettext.php: Added to repository. New files to add gettext support of mo files. * include/functions_db.php: Function lang_string() functionallity changed to use gettext library. * include/languages/language_es_es.php, include/languages/language_gl.php, include/languages/language_en.php, include/languages/language_pt_br.php, include/languages/language_it.php, include/languages/language_ast_es.php, include/languages/language_es_la.php, include/languages/language_de.php, include/languages/language_fr.php, include/languages/language_ca.php: Files deleted, they are deprecated since we have moved to gettext. * lude/languages/pt_br.mo, include/languages/es.mo, include/languages/fr.po, include/languages/it.po, include/languages/ca.po, include/languages/ast.po, include/languages/de.po, include/languages/gl.mo: Gettext translations of the previous languages we have in language_*.php files. * include/languages/Makefile: Added to repository to generate index.pot and mo files of each translation. * include/functions_reporting_pdf.php, include/functions_reporting.php, include/config_process.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced string parameters of __() callings to plain english. Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
echo "<div class='nf'>".__('There are no defined agents')."</div>";
echo "&nbsp;</td></tr><tr><td>";
}
// Create agent button
2009-04-20 Esteban Sanchez <estebans@artica.es> * godmode/agentes/module_manager_editor.php, godmode/agentes/module_manager_editor_common.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/module_manager.php: Some fixes to allow form reutilization. * include/javascript/jquery.pandora.controls.js: Fixed a typo. Added pandoraSelectGroup control. * include/javascript/jquery.pandora.js: Separate between auto executed code and document ready function. * include/javascript/pandora_modules.js: Added to repository. Functions to use on module editors. * include/functions_agents.php: Added get_agents(). * include/functions_db.php: Added get_user_first_group(). Changed user_access_to_agent() parameters order. * include/functions_reporting.php: Style corrections. * include/functions_ui.php: Added doc to print_status_image(). Added print_ui_agents_list() to print a list of agents with a search form and a lot of configuration options easily. * include/functions_ui_renders.php: Added to repository. New API for renders on UI components. * operation/agentes/estado_agente.php: Make table wider. * godmode/reporting/reporting_builder.php: Replaced exit with return. Use pandoraSelectGroup control. * godmode/servers/manage_recontask_form.php: Style corrections to fit Pandora styles. * godmode/servers/modificar_server.php: Removed a notice from a typo. * godmode/setup/setup.php: Fixed table data indexes. Removed javascript code from visual setup. * godmode/setup/setup_visuals.php: Some strings changed. Style correction. * godmode/menu.php: Added policies enterprise menu option. * images/policies.png: Added to repository. * godmode/agentes/modificar_agente.php: Style correction by using pandora functions. * godmode/agentes/massive_operations.php: Fixed tab styles that was showing wrong the . * godmode/agentes/manage_config_remote.php: Changes in user_access_to_agent() * general/ui/agents_list.php: Added to repository. Reusable render for an agent list. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1632 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-20 16:00:27 +02:00
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
print_input_hidden ('new_agent', 1);
2009-04-20 Esteban Sanchez <estebans@artica.es> * godmode/agentes/module_manager_editor.php, godmode/agentes/module_manager_editor_common.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/module_manager.php: Some fixes to allow form reutilization. * include/javascript/jquery.pandora.controls.js: Fixed a typo. Added pandoraSelectGroup control. * include/javascript/jquery.pandora.js: Separate between auto executed code and document ready function. * include/javascript/pandora_modules.js: Added to repository. Functions to use on module editors. * include/functions_agents.php: Added get_agents(). * include/functions_db.php: Added get_user_first_group(). Changed user_access_to_agent() parameters order. * include/functions_reporting.php: Style corrections. * include/functions_ui.php: Added doc to print_status_image(). Added print_ui_agents_list() to print a list of agents with a search form and a lot of configuration options easily. * include/functions_ui_renders.php: Added to repository. New API for renders on UI components. * operation/agentes/estado_agente.php: Make table wider. * godmode/reporting/reporting_builder.php: Replaced exit with return. Use pandoraSelectGroup control. * godmode/servers/manage_recontask_form.php: Style corrections to fit Pandora styles. * godmode/servers/modificar_server.php: Removed a notice from a typo. * godmode/setup/setup.php: Fixed table data indexes. Removed javascript code from visual setup. * godmode/setup/setup_visuals.php: Some strings changed. Style correction. * godmode/menu.php: Added policies enterprise menu option. * images/policies.png: Added to repository. * godmode/agentes/modificar_agente.php: Style correction by using pandora functions. * godmode/agentes/massive_operations.php: Fixed tab styles that was showing wrong the . * godmode/agentes/manage_config_remote.php: Changes in user_access_to_agent() * general/ui/agents_list.php: Added to repository. Reusable render for an agent list. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1632 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-20 16:00:27 +02:00
print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"');
echo "</form></td></tr></table>";
?>
<script type="text/javascript">
$(document).ready (function () {
$("table#agent_list tr").hover (function () {
$(".actions", this).css ("visibility", "");
},
function () {
$(".actions", this).css ("visibility", "hidden");
});
});
</script>