2006-03-27 05:37:27 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:15:58 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
2010-05-31 13:41:10 +02:00
|
|
|
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
2009-06-08 20:15:58 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2006-07-17 18:37:43 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-08-22 20:07:32 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2006-07-17 18:37:43 +02:00
|
|
|
// 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.
|
|
|
|
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
if (is_ajax ()) {
|
|
|
|
$search_agents = (bool) get_parameter ('search_agents');
|
|
|
|
|
|
|
|
if ($search_agents) {
|
|
|
|
|
|
|
|
require_once ('include/functions_agents.php');
|
|
|
|
|
|
|
|
$id_agent = (int) get_parameter ('id_agent');
|
|
|
|
$string = (string) get_parameter ('q'); /* q is what autocomplete plugin gives */
|
|
|
|
$id_group = (int) get_parameter('id_group');
|
2009-11-18 19:10:41 +01:00
|
|
|
$addedItems = html_entity_decode((string) get_parameter('add'));
|
|
|
|
$addedItems = json_decode($addedItems);
|
|
|
|
|
|
|
|
if ($addedItems != null) {
|
|
|
|
foreach ($addedItems as $item) {
|
|
|
|
echo $item . "|\n";
|
|
|
|
}
|
|
|
|
}
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
|
|
|
|
$filter = array ();
|
2009-10-13 Sancho Lerena <slerena@artica.es>
Upps, Tuesday #13, bad day for a last commit before launch RC1 ! :-S
* general/logon_ok.php: Fixed ugly format of table showing last activity
(has a too wide table width).
* godmode/admin_access_logs.php: Removed that crappy div fashion code and
replaced by old and reliable table-based-code :-) to fix the mess with the
pagination.
* godmode/agentes/configurar_agente.php: fixed problem with postprocess
values very bug (like 0.0000000123), parameter is now passed as string
because PHP is passing the value as scientific notation and mYsql don't
understand that.
* operation/agentes/exportdata.php,
* operation/search_results.php,
* godmode/reporting/map_builder.php,
* godmode/agentes/agent_manager.php,
* godmode/reporting/graph_builder.php,
* godmode/agentes/modificar_agente.php: Added non-case search SQL code for make
agent searches non case sensitive (nombre COLLATE utf8_general_ci LIKE...)
* module_manager_editor_common.php: More size for postprocess field.
* pandora_console/godmode/alerts/configure_alert_action.php: More width for
field2 in action form.
* godmode/alerts/configure_alert_command.php: Command field has more width
and added a help icon for macro subtitutions.
* include/functions_db.php: get_agent_name() now defaults to non uppercase
the agent names, because 3.0 has case sensitive agent names, and all
data must show the real Case.
* include/styles/pandora.css: removed uppercase transition for menu items
and agent tabs.
* operation/agentes/estado_agente.php: Agent is not shown in uppercase
anymore.
* operation/agentes/estado_generalagente.php: Agent name and parent name
is not in uppercase. OS version shows only last 15 characters or full string
if strlen() < 15.
* operation/agentes/status_monitor.php: Agent name is not in uppercase
anymore.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2015 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-10-13 20:59:48 +02:00
|
|
|
$filter[] = '(nombre COLLATE utf8_general_ci LIKE "%'.$string.'%" OR direccion LIKE "%'.$string.'%" OR comentarios LIKE "%'.$string.'%")';
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
$filter['id_grupo'] = $id_group;
|
|
|
|
|
|
|
|
$agents = get_agents ($filter, array ('nombre', 'direccion'));
|
|
|
|
if ($agents === false)
|
|
|
|
return;
|
2009-11-18 19:10:41 +01:00
|
|
|
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
foreach ($agents as $agent) {
|
2010-10-14 19:04:19 +02:00
|
|
|
echo safe_output($agent['nombre'])."|".safe_output($agent['direccion'])."\n";
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2009-06-08 20:15:58 +02:00
|
|
|
|
2008-08-22 20:07:32 +02:00
|
|
|
|
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
|
|
|
// Load global vars
|
2009-04-01 10:04:49 +02:00
|
|
|
require_once ("include/config.php");
|
2009-05-19 21:04:43 +02:00
|
|
|
require_once ("include/functions_agents.php");
|
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
|
|
|
|
|
|
|
check_login();
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
if (!give_acl ($config['id_user'], 0, "AR")) {
|
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
|
|
|
require ("general/noaccess.php");
|
|
|
|
return;
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
require_javascript_file ('calendar');
|
|
|
|
|
2010-02-19 Sancho Lerena <slerena@artica.es>
* functions_events.php: Fixed typo (switched meaning) in two labels.
* include/styles/pandora.css: Changed background color of th default style.
* include/functions_reporting.php: Improved function get_group_stats(). Now
supports stats from batch-mode and get realtime stats in a more efficient
way. Fixed get_fired_alerts_reporting_table() to avoid problems in external
reporting (PDF & XML).
* include/functions_servers.php: get_server_performance() now uses batch mode
stats reporting, and improved also the realtime stats generation. Same with
function get_server_info().
* include/functions_config.php: Added new config tokens (not fully
implemented yet) for event, trap, strings and audit automatic purge.
* include/functions_ui.php: Added new print_page_header() function to set
the new standard header in all pages, using the "tabbed" format to show
the title, subtitle and other options like help, or custom-tabs for the page
* pandoradb.sql: Added tserver.stat_utimestamp field. Added indexes to
tsession table. Fixed typo in field name in tgroup_stat: agents_uknown to
agents_unknown.
* extensions/ext_backup: New directory to place "deleted" extensions.
* extensions/dbmanager/dbmanager.css: Table names now are in it's original
lowercase/uppercase format.
* extensions/dbmanager.php: Updated headers, and now return "empty" when
a search is empty, instead "error" as before.
* extensions/users_connected.php
extensions/module_groups.php
extensions/plugin_registration.php
extensions/pandora_logs.php
operation/incidents/incident.php
operation/snmpconsole/snmp_view.php
operation/users/user.php
operation/users/user_edit.php
godmode/agentes/planned_downtime.php
operation/events/events.php
operation/visual_console/index.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_agente.php
operation/agentes/exportdata.php
operation/agentes/ver_agente.php
operation/agentes/status_monitor.php
operation/agentes/alerts_status.php
operation/users/user_statistics.php: Added new header format.
* operation/agentes/estado_grupo.php: Removed old group view.
* operation/agentes/tactical.php: Adapted to use new realtime/batch
statistical system. Placed events above server info. Showing only pending
events and other minor changes.
* operation/agentes/group_view.php: NEW screen, replacing old one. Probably
most ugly, but much more useful than before.
* operation/agentes/networkmap.php: Added title.
* operation/messages/message.php: Added title and adding some exists in
code was missing before.
* operation/reporting/reporting_viewer.php: Added title.
* operation/reporting/graph_viewer.php: Added title.
* operation/reporting/custom_reporting.php: Added title.
* operation/servers/view_server.php:
* operation/menu.php: Replaced old group view with new (this has english
name). Removed autorefresh "by default" in server view.
* extras/pandoradb_migrate_v3.0_to_v3.1.sql: Fixed typo.
* extras/pandora_diag.php: Minor changes, removed some info and added other.
* general/logon_ok.php: Minor aesthetic changes.
* general/header.php: Fixed missing ";"
* operation/extensions.php,
godmode/extensions.php: Added support for delete extensions.
* godmode/menu.php: New setup items.
* godmode/setup/setup.php,
godmode/setup/performance.php,
godmode/setup/setup_visuals.php: Reordered setup options, new setup section
"Performance", added new performance options to set "realtime" statistics
or "batchmode" with it's own interval. Some setup info is now shared with
the servers (but it it's any change in setup, servers should be restarted
anyway).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2390 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-02-19 16:16:03 +01:00
|
|
|
|
|
|
|
// Header
|
|
|
|
print_page_header (__("Export data"), "images/bricks.png");
|
|
|
|
|
2010-04-22 18:51:23 +02:00
|
|
|
$group = get_parameter_post ('group', 0);
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
//$agent = get_parameter_post ('agent', 0);
|
|
|
|
$agentName = get_parameter_post ('agent', 0);
|
|
|
|
$agents = get_agents (array('nombre LIKE "' . $agentName . '"'), array ('id_agente'));
|
|
|
|
$agent = $agents[0]['id_agente'];
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$module = (array) get_parameter_post ('module_arr', array ());
|
|
|
|
$start_date = get_parameter_post ('start_date', 0);
|
|
|
|
$end_date = get_parameter_post ('end_date', 0);
|
|
|
|
$start_time = get_parameter_post ('start_time', 0);
|
|
|
|
$end_time = get_parameter_post ('end_time', 0);
|
|
|
|
$export_type = get_parameter_post ('export_type', 'data');
|
|
|
|
$export_btn = get_parameter_post ('export_btn', 0);
|
|
|
|
|
|
|
|
if (!empty ($export_btn) && !empty ($module)) {
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
// Disable SQL cache
|
|
|
|
global $sql_cache;
|
|
|
|
$sql_cache = array ('saved' => 0);
|
|
|
|
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Convert start time and end time to unix timestamps
|
|
|
|
$start = strtotime ($start_date." ".$start_time);
|
|
|
|
$end = strtotime ($end_date." ".$end_time);
|
|
|
|
$period = $end - $start;
|
|
|
|
$data = array ();
|
|
|
|
|
|
|
|
//If time is negative or zero, don't process - it's invalid
|
|
|
|
if ($start < 1 || $end < 1) {
|
|
|
|
print_error_message (__('Invalid time specified'));
|
|
|
|
return;
|
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
// ***************************************************
|
2009-05-19 21:04:43 +02:00
|
|
|
// Starts, ends and dividers
|
2010-02-01 20:22:34 +01:00
|
|
|
// ***************************************************
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
switch ($export_type) {
|
|
|
|
case "data":
|
|
|
|
case "avg":
|
|
|
|
default:
|
|
|
|
//HTML output - don't style or use XHTML just in case somebody needs to copy/paste it. (Office doesn't handle <thead> and <tbody>)
|
2010-02-01 20:22:34 +01:00
|
|
|
$datastart = '<table style="width:700px;"><tr><th>'.__('Agent').'</th><th>'.__('Module').'</th><th>'.__('Data').'</th><th>'.__('Timestamp').'</th></tr>';
|
2009-05-19 21:04:43 +02:00
|
|
|
$rowstart = '<tr><td>';
|
|
|
|
$divider = '</td><td>';
|
|
|
|
$rowend = '</td></tr>';
|
|
|
|
$dataend = '</table>';
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2009-05-19 21:04:43 +02:00
|
|
|
case "excel":
|
|
|
|
//Excel is tab-delimited, needs quotes and needs Windows-style newlines
|
|
|
|
$datastart = __('Agent')."\t".__('Module')."\t".__('Data')."\t".__('Timestamp')."\r\n";
|
|
|
|
$rowstart = '"';
|
|
|
|
$divider = '"'."\t".'"';
|
|
|
|
$rowend = '"'."\r\n";
|
|
|
|
$dataend = "\r\n";
|
|
|
|
$extension = "xls";
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2009-05-19 21:04:43 +02:00
|
|
|
case "csv":
|
|
|
|
//Pure CSV is comma delimited
|
|
|
|
$datastart = __('Agent').','.__('Module').','.__('Data').','.__('Timestamp')."\n";
|
|
|
|
$rowstart = '"';
|
|
|
|
$divider = '","';
|
|
|
|
$rowend = '"'."\n";
|
|
|
|
$dataend = "\n";
|
|
|
|
$extension = "csv";
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2009-05-19 21:04:43 +02:00
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2010-02-01 20:22:34 +01:00
|
|
|
// ***************************************************
|
|
|
|
// Header output
|
|
|
|
// ***************************************************
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
switch ($export_type) {
|
|
|
|
case "excel":
|
|
|
|
case "csv":
|
|
|
|
$config['ignore_callback'] = true;
|
|
|
|
while (@ob_end_clean ());
|
2010-02-01 20:22:34 +01:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
header("Content-type: application/octet-stream");
|
|
|
|
header("Content-Disposition: attachment; filename=export_".date("Ymd", $start)."_".date("Ymd", $end).".".$extension);
|
|
|
|
header("Pragma: no-cache");
|
|
|
|
header("Expires: 0");
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2010-02-01 20:22:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// ***************************************************
|
|
|
|
// Data processing
|
|
|
|
// ***************************************************
|
|
|
|
|
|
|
|
$data = array ();
|
|
|
|
switch ($export_type) {
|
|
|
|
case "data":
|
|
|
|
case "excel":
|
|
|
|
case "csv":
|
|
|
|
|
|
|
|
// Show header
|
|
|
|
echo $datastart;
|
|
|
|
|
|
|
|
foreach ($module as $selected) {
|
|
|
|
|
|
|
|
$output = "";
|
2010-11-26 13:44:18 +01:00
|
|
|
$work_period = 120000;
|
|
|
|
if ($work_period > $period) {
|
|
|
|
$work_period = $period;
|
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
$work_end = $end - $period + $work_period;
|
|
|
|
//Buffer to get data, anyway this will report a memory exhaustin
|
|
|
|
|
2010-11-26 13:44:18 +01:00
|
|
|
while ($work_end <= $end) {
|
2010-02-01 20:22:34 +01:00
|
|
|
$work_end = $work_end + $work_period;
|
|
|
|
|
|
|
|
$data = array (); // Reinitialize array for each module chunk
|
|
|
|
$data_single = get_agentmodule_data ($selected, $work_period, $work_end);
|
|
|
|
if (!empty ($data_single)) {
|
|
|
|
$data = array_merge ($data, $data_single);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
if ($work_end > $end) {
|
|
|
|
$work_period = $work_end - $end;
|
|
|
|
$work_end = $end;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
foreach ($data as $key => $module) {
|
|
|
|
$output .= $rowstart;
|
|
|
|
$output .= $module['agent_name'];
|
|
|
|
$output .= $divider;
|
|
|
|
$output .= $module['module_name'];
|
|
|
|
$output .= $divider;
|
|
|
|
$output .= $module['data'];
|
|
|
|
$output .= $divider;
|
2010-07-27 11:51:58 +02:00
|
|
|
$output .= date ("Y-m-d G:i:s", $module['utimestamp']);
|
2010-02-01 20:22:34 +01:00
|
|
|
$output .= $rowend;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch ($export_type) {
|
|
|
|
default:
|
|
|
|
case "data":
|
|
|
|
case "avg":
|
|
|
|
echo $output;
|
|
|
|
break;
|
|
|
|
case "excel":
|
|
|
|
case "csv":
|
|
|
|
echo $output;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
unset($output);
|
|
|
|
$output = "";
|
|
|
|
unset($data);
|
|
|
|
unset($data_single);
|
|
|
|
}
|
|
|
|
unset ($output);
|
|
|
|
$output = "";
|
|
|
|
} // main foreach
|
|
|
|
echo $dataend;
|
2010-07-27 11:51:58 +02:00
|
|
|
break;
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
case "avg":
|
|
|
|
foreach ($module as $selected) {
|
|
|
|
$arr = array ();
|
|
|
|
$arr["data"] = get_agentmodule_data_average ($selected, $period, $end);
|
|
|
|
if ($arr["data"] === false) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$arr["module_name"] = get_agentmodule_name ($selected);
|
|
|
|
$arr["agent_name"] = get_agentmodule_agent_name ($selected);
|
|
|
|
$arr["agent_id"] = get_agentmodule_agent ($selected);
|
|
|
|
$arr["utimestamp"] = $end;
|
|
|
|
array_push ($data, $arr);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
print_error_message (__('Invalid method supplied'));
|
|
|
|
return;
|
2009-05-19 21:04:43 +02:00
|
|
|
break;
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
}
|
2010-02-01 20:22:34 +01:00
|
|
|
|
|
|
|
switch ($export_type) {
|
|
|
|
case "excel":
|
|
|
|
case "csv":
|
|
|
|
exit; // Necesary for CSV export, if not give problems
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
} elseif (!empty ($export_btn) && empty ($module)) {
|
|
|
|
print_error_message (__('No modules specified'));
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
}
|
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
echo '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/exportdata" name="export_form">';
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->width = 550;
|
|
|
|
$table->border = 0;
|
|
|
|
$table->cellspacing = 3;
|
|
|
|
$table->cellpadding = 5;
|
|
|
|
$table->class = "databox_color";
|
2007-10-12 18:27:50 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data = array ();
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Group selector
|
|
|
|
$table->data[0][0] = '<b>'.__('Group').'</b>';
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$groups = get_user_groups ($config['id_user'], "AR");
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2010-07-15 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: added the function "print_select_groups" to
print the field select box for groups with tree style.
* include/functions_db.php: in function "get_user_groups" added test to
false value in parameter $privilege for get all groups without ACL test.
Fixed in function "get_user_groups_tree" the call to "get_user_groups" with
the correct parameters.
* operation/incidents/incident.php, operation/incidents/incident_detail.php,
operation/events/events.php, operation/agentes/status_monitor.php,
operation/agentes/estado_agente.php,
operation/agentes/alerts_status.functions.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/messages/message.php, general/ui/agents_list.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/agentes/massive_add_alerts.php,
godmode/agentes/massive_delete_agents.php,
godmode/agentes/massive_config.php,
godmode/agentes/massive_delete_action_alerts.php,
godmode/agentes/massive_delete_alerts.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/massive_delete_modules.php,
godmode/agentes/massive_add_action_alerts.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_compounds.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php, godmode/setup/gis_step_2.php,
godmode/users/configure_user.php, godmode/gis_maps/configure_gis_map.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php: changed the fields select
box of group to tree style select box for groups.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3009 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-07-15 17:20:43 +02:00
|
|
|
$table->data[0][1] = print_select_groups($config['id_user'], "AR", true, "group", $group, 'this.form.submit();', '', 0, true, false, true, 'w130', false);
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Agent selector
|
|
|
|
$table->data[1][0] = '<b>'.__('Source agent').'</b>';
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
if ($group > 0) {
|
|
|
|
$filter['id_grupo'] = (array) $group;
|
|
|
|
} else {
|
|
|
|
$filter['id_grupo'] = array_keys ($groups);
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$agents = array ();
|
|
|
|
$rows = get_agents ($filter, false, 'AR');
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
if ($rows == null) $rows = array();
|
2009-05-19 21:04:43 +02:00
|
|
|
foreach ($rows as $row) {
|
|
|
|
$agents[$row['id_agente']] = $row['nombre'];
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
if (!in_array ($agent, array_keys ($agents))) {
|
|
|
|
$agent = current (array_keys ($agents));
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
//$table->data[1][1] = print_select ($agents, "agent", $agent, 'this.form.submit();', '', 0, true, false, true, 'w130', false);
|
|
|
|
$table->data[1][1] = print_input_text_extended ('agent', get_agent_name ($agent), 'text-agent', '', 30, 100, false, '',
|
|
|
|
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
|
2009-12-07 Pablo de la Concepcipón <pablo.concepcion@artica.es>
* include/functions_api.php, include/functions.php,
extensions/plugin_registration.php, operation/events/events.php,
operation/agentes/exportdata.php, operation/agentes/stat_win.php,
godmode/setup/setup.php, godmode/agentes/configurar_agente.php,
godmode/agentes/agent_manager.php, godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/graph_builder.php, godmode/alerts/alert_list.php: English
text strings updated to be more clear.
* include/languages/index.pot: Regenerated with updated strings
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2171 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-12-07 19:48:59 +01:00
|
|
|
. '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>';
|
2010-04-22 18:51:23 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Module selector
|
|
|
|
$table->data[2][0] = '<b>'.__('Modules').'</b>';
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
if ($agent > 0) {
|
|
|
|
$modules = get_agent_modules ($agent);
|
|
|
|
} else {
|
|
|
|
$modules = array ();
|
|
|
|
}
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[2][1] = print_select ($modules, "module_arr[]", array_keys ($modules), '', '', 0, true, true, true, 'w130', false);
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Start date selector
|
2010-02-01 20:22:34 +01:00
|
|
|
$table->data[3][0] = '<b>'.__('Begin date').'</b>';
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[3][1] = print_input_text ('start_date', date ("Y-m-d", get_system_time () - 86400), false, 10, 10, true);
|
2010-12-21 20:33:59 +01:00
|
|
|
$table->data[3][1] .= print_image ("images/calendar_view_day.png", true, array ("alt" => "calendar", "onclick" => "scwShow(scwID('text-start_date'),this);"));
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[3][1] .= print_input_text ('start_time', date ("H:m", get_system_time () - 86400), false, 10, 5, true);
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//End date selector
|
2010-02-01 20:22:34 +01:00
|
|
|
$table->data[4][0] = '<b>'.__('End date').'</b>';
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[4][1] = print_input_text ('end_date', date ("Y-m-d", get_system_time ()), false, 10, 10, true);
|
2010-12-21 20:33:59 +01:00
|
|
|
$table->data[4][1] .= print_image ("images/calendar_view_day.png", true, array ("alt" => "calendar", "onclick" => "scwShow(scwID('text-end_date'),this);"));
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[4][1] .= print_input_text ('end_time', date ("H:m", get_system_time ()), false, 10, 5, true);
|
2007-05-03 Sancho Lerena <slerena@artica.es>
* include/FreeSans.ttf: Added to repos, should be here to use in graphs.
* include/functions_db.php: Deleted noaccess include from
comprueba_login(). This should return value, not render pages or
exit.
* include/config.inc.php: Modified some typos.
* include/calendar.js: Added generic calendar javascript, to be
used on exportdata and incident management code.
* include/languages/language_en.php: More strings.
* install.php: In my render, box height is too low. PLEASE recheck
before changing this kind of properties because in other browsers
could have a bad render (Sophus!).
* index.php: Added script call (need to be done on header).
* operation/agentes/export_csv.php: Added new file to create a
standalone CSV on download icon / link.
* operation/agentes/exportdata.php: New export data code, used
some code from Leando Doctors, and mixed with old code. Now have
three options to render export data.
* operation/agentes/datos_agente_calendar.php: Deleted old code from Leandro.
* operation/active_console/lib/extra_functions.php: Solved a lot
of warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/lib/db_functions.php:Solved a lot of
warnings, but there are TONS of more warnings that need to be
corrected.
* operation/active_console/index.php: Solved a lot of warnings,
but there are TONS of more warnings that need to be
corrected. This code DONT work if you are showing warning/notice
erros. This code is not ready for production usage, too buggy yet
:(
* pandora_graphical_console_data.sql: Cleanup.
* godmode/agentes/module_manager.php: Added wizard button.
* pandora_graphical_console.sql: Cleanup.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@448 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-03 04:08:00 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
//Export type
|
|
|
|
$table->data[5][0] = '<b>'.__('Export type').'</b>';
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$export_types = array ();
|
|
|
|
$export_types["data"] = __('Data table');
|
|
|
|
$export_types["csv"] = __('CSV');
|
|
|
|
$export_types["excel"] = __('MS Excel');
|
|
|
|
$export_types["avg"] = __('Average per hour/day');
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2009-05-19 21:04:43 +02:00
|
|
|
$table->data[5][1] = print_select ($export_types, "export_type", $export_type, '', '', 0, true, false, true, 'w130', false);
|
|
|
|
|
|
|
|
print_table ($table);
|
|
|
|
|
|
|
|
// Submit button
|
|
|
|
echo '<div class="action-buttons" style="width:550px;">';
|
|
|
|
print_submit_button (__('Export'), 'export_btn', false, 'class="sub wand"');
|
|
|
|
echo '</div></form>';
|
2007-03-28 18:07:29 +02:00
|
|
|
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
require_jquery_file ('pandora.controls');
|
|
|
|
require_jquery_file ('ajaxqueue');
|
|
|
|
require_jquery_file ('bgiframe');
|
|
|
|
require_jquery_file ('autocomplete');
|
2009-06-08 20:15:58 +02:00
|
|
|
?>
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
/* <![CDATA[ */
|
|
|
|
$(document).ready (function () {
|
|
|
|
var inputActive = true;
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "ajax.php",
|
|
|
|
data: "page=operation/agentes/exportdata&search_agents=1&id_group=" + $("#group").val(),
|
|
|
|
success: function(msg){
|
|
|
|
if (msg.length == 0) {
|
|
|
|
$("#text-agent").css ('background-color', '#FF8080');
|
|
|
|
$("#text-agent").val("<?php echo __("None agent in this category");?>");
|
|
|
|
$("#text-agent").attr("disabled", true);
|
|
|
|
$("#text-agent").css ('color', '#000000');
|
|
|
|
inputActive = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (inputActive) {
|
|
|
|
$("#text-agent").autocomplete(
|
|
|
|
"ajax.php",
|
|
|
|
{
|
|
|
|
minChars: 2,
|
|
|
|
scroll:true,
|
|
|
|
extraParams: {
|
|
|
|
page: "operation/agentes/exportdata",
|
|
|
|
search_agents: 1,
|
|
|
|
id_group: function() { return $("#group").val(); }
|
|
|
|
},
|
|
|
|
formatItem: function (data, i, total) {
|
|
|
|
if (total == 0)
|
|
|
|
$("#text-agent").css ('background-color', '#cc0000');
|
|
|
|
else
|
2009-09-14 16:38:13 +02:00
|
|
|
$("#text-agent").css ('background-color', '');
|
2009-08-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php, godmode/agentes/massive_config.php,
godmode/alerts/alert_list.php, godmode/reporting/graph_builder.php,
godmode/reporting/map_builder.php, include/functions_db.php,
include/functions_html.php, operation/agentes/exportdata.php,
operation/agentes/ver_agente.php: very changes for add input text
autocomplete with ajax jquery for agent input in several forms. Add to form
this exportdata, graph_builder, map_builder.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-08-14 18:38:57 +02:00
|
|
|
if (data == "")
|
|
|
|
return false;
|
|
|
|
return data[0]+'<br><span class="ac_extra_field"><?php echo __("IP") ?>: '+data[1]+'</span>';
|
|
|
|
},
|
|
|
|
delay: 200
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#text-agent").result(function(event, data, formatted) {
|
|
|
|
this.form.submit();
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
/* ]]> */
|
|
|
|
</script>
|