diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0085ffc310..218bea3245 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,28 @@ +2010-08-20 Sergio Martin + + * godmode/agentes/massive_copy_modules.php + godmode/agentes/massive_add_alerts.php + godmode/agentes/massive_delete_agents.php + godmode/agentes/massive_delete_action_alerts.php + godmode/agentes/massive_delete_alerts.php + godmode/agentes/massive_edit_modules.php + godmode/agentes/massive_operations.php + godmode/agentes/massive_delete_modules.php + godmode/agentes/massive_add_action_alerts.php + godmode/menu.php + godmode/massive + godmode/massive/massive_copy_modules.php + godmode/massive/massive_add_alerts.php + godmode/massive/massive_delete_agents.php + godmode/massive/massive_operations.php + godmode/massive/massive_delete_action_alerts.php + godmode/massive/massive_delete_modules.php + godmode/massive/massive_delete_alerts.php + godmode/massive/massive_edit_modules.php + godmode/massive/massive_add_action_alerts.php: Created + a new section for massive operations and change the + structure of the files to new folder + 2010-08-19 Sergio Martin * godmode/agentes/module_manager_editor_common.php diff --git a/pandora_console/godmode/agentes/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php similarity index 98% rename from pandora_console/godmode/agentes/massive_add_action_alerts.php rename to pandora_console/godmode/massive/massive_add_action_alerts.php index bf1d8a3afc..2c86e7d49c 100644 --- a/pandora_console/godmode/agentes/massive_add_action_alerts.php +++ b/pandora_console/godmode/massive/massive_add_action_alerts.php @@ -112,7 +112,7 @@ $table->data[2][1] .= print_input_text ('fires_max', 0, '', 4, 10, true); $table->data[2][1] .= print_help_icon ("alert-matches", true); $table->data[2][1] .= ''; -echo '
'; +echo ''; print_table ($table); echo '
'; diff --git a/pandora_console/godmode/agentes/massive_add_alerts.php b/pandora_console/godmode/massive/massive_add_alerts.php similarity index 97% rename from pandora_console/godmode/agentes/massive_add_alerts.php rename to pandora_console/godmode/massive/massive_add_alerts.php index ee5c8c0b62..1d8b03c096 100644 --- a/pandora_console/godmode/agentes/massive_add_alerts.php +++ b/pandora_console/godmode/massive/massive_add_alerts.php @@ -117,7 +117,7 @@ $table->data[2][0] = __('Alert template'); $table->data[2][1] = print_select (index_array ($templates, 'id', 'name'), 'id_alert_template', $id_alert_template, false, __('Select'), 0, true); -echo ''; +echo ''; print_table ($table); echo '
'; @@ -141,7 +141,7 @@ $(document).ready (function () { $("option", $select).remove (); jQuery.post ("ajax.php", - {"page" : "godmode/agentes/massive_add_alerts", + {"page" : "godmode/massive/massive_add_alerts", "get_agents" : 1, "id_group" : this.value }, diff --git a/pandora_console/godmode/agentes/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php similarity index 99% rename from pandora_console/godmode/agentes/massive_copy_modules.php rename to pandora_console/godmode/massive/massive_copy_modules.php index 61644622fd..fa6564b413 100644 --- a/pandora_console/godmode/agentes/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -69,7 +69,7 @@ $table->data[0][3] = print_select (get_group_agents ($source_id_group, false, "n // array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) // . ' ' . __("Type two chars at least for search") . ''; -echo ''; +echo ''; echo '
'; echo ''.__('Source'); @@ -199,7 +199,7 @@ $(document).ready (function () { var no_alerts; /* Get modules */ jQuery.post ("ajax.php", - {"page" : "operation/agentes/ver_agente", + {"page" : "operation/massive/ver_agente", "get_agent_modules_json" : 1, "id_agent" : this.value, "filter" : "disabled = 0", diff --git a/pandora_console/godmode/agentes/massive_delete_action_alerts.php b/pandora_console/godmode/massive/massive_delete_action_alerts.php similarity index 98% rename from pandora_console/godmode/agentes/massive_delete_action_alerts.php rename to pandora_console/godmode/massive/massive_delete_action_alerts.php index 939b64ee4b..b93831476c 100644 --- a/pandora_console/godmode/agentes/massive_delete_action_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_action_alerts.php @@ -104,7 +104,7 @@ $actions = get_alert_actions (); $table->data[2][0] = __('Action'); $table->data[2][1] = print_select ($actions, 'action', '', '', __('None'), 0, true); -echo ''; +echo ''; print_table ($table); echo '
'; diff --git a/pandora_console/godmode/agentes/massive_delete_agents.php b/pandora_console/godmode/massive/massive_delete_agents.php similarity index 98% rename from pandora_console/godmode/agentes/massive_delete_agents.php rename to pandora_console/godmode/massive/massive_delete_agents.php index 39b6e3facf..d29972911c 100644 --- a/pandora_console/godmode/agentes/massive_delete_agents.php +++ b/pandora_console/godmode/massive/massive_delete_agents.php @@ -90,7 +90,7 @@ $table->data[1][0] .= ''; $table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), 'id_agents[]', 0, false, '', '', true, true); -echo ''; +echo ''; print_table ($table); echo '
'; diff --git a/pandora_console/godmode/agentes/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php similarity index 95% rename from pandora_console/godmode/agentes/massive_delete_alerts.php rename to pandora_console/godmode/massive/massive_delete_alerts.php index d680eaa354..d0f9df750d 100644 --- a/pandora_console/godmode/agentes/massive_delete_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_alerts.php @@ -111,7 +111,7 @@ $agents_alerts = get_agents_with_alert_template ($id_alert_template, $id_group, $table->data[2][1] = print_select (index_array ($agents_alerts, 'id_agente', 'nombre'), 'id_agents[]', '', '', '', '', true, true, true, '', $id_alert_template == 0); -echo ''; +echo ''; print_table ($table); echo '
'; @@ -144,7 +144,7 @@ $(document).ready (function () { $("option", $select).remove (); jQuery.post ("ajax.php", - {"page" : "godmode/agentes/massive_delete_alerts", + {"page" : "godmode/massive/massive_delete_alerts", "get_agents" : 1, "id_group" : this.value, "id_alert_template" : $("#id_alert_template").attr ("value") diff --git a/pandora_console/godmode/agentes/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php similarity index 95% rename from pandora_console/godmode/agentes/massive_delete_modules.php rename to pandora_console/godmode/massive/massive_delete_modules.php index dbb02ffed0..6f888c17a1 100644 --- a/pandora_console/godmode/agentes/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -115,7 +115,7 @@ $agents = get_agents_with_module_name ($module_name, $id_group, $table->data[2][1] = print_select (index_array ($agents, 'id_agente', 'nombre'), 'id_agents[]', 0, false, __('None'), 0, true, true, true, '', empty ($module_name)); -echo ''; +echo ''; print_table ($table); echo '
'; @@ -148,7 +148,7 @@ $(document).ready (function () { $("option", $select).remove (); jQuery.post ("ajax.php", - {"page" : "godmode/agentes/massive_delete_modules", + {"page" : "godmode/massive/massive_delete_modules", "get_agents" : 1, "id_group" : this.value, "module_name" : $("#module_name").attr ("value") diff --git a/pandora_console/godmode/agentes/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php similarity index 97% rename from pandora_console/godmode/agentes/massive_edit_modules.php rename to pandora_console/godmode/massive/massive_edit_modules.php index 32b029ca53..396743e650 100644 --- a/pandora_console/godmode/agentes/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -218,7 +218,7 @@ $table->data['edit7'][1] = print_input_text ('min_ff_event', '', '', 5, 15, true $table->data['edit7'][2] = __('Historical data'); $table->data['edit7'][3] = print_select(array('' => '', '1' => __('Yes'), '0' => __('No')),'history_data','','','', '', true); -echo ''; +echo ''; print_table ($table); echo '
'; @@ -248,7 +248,7 @@ $(document).ready (function () { $("#module_name").attr ("disabled", "disabled") $("#module_name option[value!=0]").remove (); jQuery.post ("ajax.php", - {"page" : "operation/agentes/ver_agente", + {"page" : "operation/massive/ver_agente", "get_agent_modules_json" : 1, "filter" : filter, "fields" : "DISTINCT(nombre)", @@ -281,7 +281,7 @@ $(document).ready (function () { $("#groups_select").change ( function () { jQuery.post ("ajax.php", - {"page" : "operation/agentes/ver_agente", + {"page" : "operation/massive/ver_agente", "get_agents_group_json" : 1, "id_group" : this.value, }, diff --git a/pandora_console/godmode/agentes/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php similarity index 79% rename from pandora_console/godmode/agentes/massive_operations.php rename to pandora_console/godmode/massive/massive_operations.php index e9b929e6cf..11e6f3e696 100644 --- a/pandora_console/godmode/agentes/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -27,7 +27,7 @@ require_once ('include/functions_agents.php'); require_once ('include/functions_alerts.php'); require_once ('include/functions_modules.php'); -enterprise_include ('godmode/agentes/massive_operations.php'); +enterprise_include ('godmode/massive/massive_operations.php'); $tab = (string) get_parameter ('tab', 'massive_agents'); $option = (string) get_parameter ('option', ''); @@ -88,16 +88,16 @@ if($option == ''){ $option = array_shift(array_keys($options)); } -$alertstab = array('text' => '' - . print_image ('images/bell.png', true, array ('title' => __('Massive alert actions'))) +$alertstab = array('text' => '' + . print_image ('images/bell.png', true, array ('title' => __('Alerts operations'))) . '', 'active' => $tab == 'massive_alerts'); -$agentstab = array('text' => '' - . print_image ('images/bricks.png', true, array ('title' => __('Massive agent actions'))) +$agentstab = array('text' => '' + . print_image ('images/bricks.png', true, array ('title' => __('Agents operations'))) . '', 'active' => $tab == 'massive_agents'); -$modulestab = array('text' => '' - . print_image ('images/brick.png', true, array ('title' => __('Massive module actions'))) +$modulestab = array('text' => '' + . print_image ('images/brick.png', true, array ('title' => __('Modules operations'))) . '', 'active' => $tab == 'massive_modules'); /* Collection */ @@ -112,7 +112,7 @@ $onheader = array('massive_agents' => $agentstab, 'massive_modules' => $modulest print_page_header (__('Agent configuration'). ' » '. $options[$option], "images/god1.png", false, "", true, $onheader); -echo ''; +echo ''; echo '
'; echo '

'.__('Massive options').':

'; echo '
'; @@ -122,32 +122,32 @@ echo ''; switch ($option) { case 'delete_alerts': - require_once ('godmode/agentes/massive_delete_alerts.php'); + require_once ('godmode/massive/massive_delete_alerts.php'); break; case 'add_alerts': - require_once ('godmode/agentes/massive_add_alerts.php'); + require_once ('godmode/massive/massive_add_alerts.php'); break; case 'delete_action_alerts': - require_once ('godmode/agentes/massive_delete_action_alerts.php'); + require_once ('godmode/massive/massive_delete_action_alerts.php'); break; case 'add_action_alerts': - require_once ('godmode/agentes/massive_add_action_alerts.php'); + require_once ('godmode/massive/massive_add_action_alerts.php'); break; case 'delete_agents': - require_once ('godmode/agentes/massive_delete_agents.php'); + require_once ('godmode/massive/massive_delete_agents.php'); break; case 'delete_modules': - require_once ('godmode/agentes/massive_delete_modules.php'); + require_once ('godmode/massive/massive_delete_modules.php'); break; case 'edit_modules': - require_once ('godmode/agentes/massive_edit_modules.php'); + require_once ('godmode/massive/massive_edit_modules.php'); break; case 'copy_modules': - require_once ('godmode/agentes/massive_copy_modules.php'); + require_once ('godmode/massive/massive_copy_modules.php'); break; default: if (!enterprise_hook('massive_operations', array($option))) { - require_once ('godmode/agentes/massive_config.php'); + require_once ('godmode/massive/massive_config.php'); } break; } diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index a5b62f24c5..1aa2bddc6f 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -28,9 +28,7 @@ if (give_acl ($config['id_user'], 0, "AW")) { $menu["gagente"]["sec2"] = "godmode/agentes/modificar_agente"; $menu["gagente"]["id"] = "god-agents"; - $sub = array (); - $sub["godmode/agentes/massive_operations"]["text"] = __('Massive operations'); - + $sub = array (); $sub["godmode/agentes/manage_config_remote"]["text"] = __('Duplicate config'); if (give_acl ($config["id_user"], 0, "PM")) { @@ -44,6 +42,23 @@ if (give_acl ($config['id_user'], 0, "AW")) { $menu["gagente"]["sub"] = $sub; } +if (give_acl ($config['id_user'], 0, "AW")) { + $menu["gmassive"]["text"] = __('Massive operations'); + $menu["gmassive"]["sec2"] = "godmode/massive/massive_operations"; + $menu["gmassive"]["id"] = "god-massive"; + + $sub = array (); + $sub["godmode/massive/massive_operations&tab=massive_agents"]["text"] = __('Agents operations'); + + $sub["godmode/massive/massive_operations&tab=massive_modules"]["text"] = __('Modules operations'); + + $sub["godmode/massive/massive_operations&tab=massive_alerts"]["text"] = __('Alerts operations'); + + enterprise_hook('massivepolicies_submenu'); + + $menu["gmassive"]["sub"] = $sub; +} + if (give_acl ($config['id_user'], 0, "AW")) { enterprise_hook ('services_godmenu'); }