2010-08-20 Sergio Martin <sergio.martin@artica.es>
* 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3164 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f3eb7a3ae3
commit
08ee02d9bb
|
@ -1,3 +1,28 @@
|
|||
2010-08-20 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* 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 <sergio.martin@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.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] .= '</span>';
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=add_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/massive/massive_operations&option=add_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
|
@ -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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=add_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/massive/massive_operations&option=add_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -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
|
||||
},
|
|
@ -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)
|
||||
// . '<a href="#" class="tip"> <span>' . __("Type two chars at least for search") . '</span></a>';
|
||||
|
||||
echo '<form action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=copy_modules" id="manage_config_form" method="post">';
|
||||
echo '<form action="index.php?sec=gagente&sec2=godmode/massive/massive_operations&option=copy_modules" id="manage_config_form" method="post">';
|
||||
|
||||
echo '<fieldset id="fieldset_source">';
|
||||
echo '<legend><span>'.__('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",
|
|
@ -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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=delete_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/massive/massive_operations&option=delete_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
|
@ -90,7 +90,7 @@ $table->data[1][0] .= '</span>';
|
|||
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"),
|
||||
'id_agents[]', 0, false, '', '', true, true);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=delete_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/massive/massive_operations&option=delete_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
|
@ -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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=delete_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -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")
|
|
@ -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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=delete_modules" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -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")
|
|
@ -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 '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&option=edit_modules" id="form_edit" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
|
||||
print_table ($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -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,
|
||||
},
|
|
@ -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' => '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=massive_alerts">'
|
||||
. print_image ('images/bell.png', true, array ('title' => __('Massive alert actions')))
|
||||
$alertstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts">'
|
||||
. print_image ('images/bell.png', true, array ('title' => __('Alerts operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_alerts');
|
||||
|
||||
$agentstab = array('text' => '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=massive_agents">'
|
||||
. print_image ('images/bricks.png', true, array ('title' => __('Massive agent actions')))
|
||||
$agentstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_agents">'
|
||||
. print_image ('images/bricks.png', true, array ('title' => __('Agents operations')))
|
||||
. '</a>', 'active' => $tab == 'massive_agents');
|
||||
|
||||
$modulestab = array('text' => '<a href="index.php?sec=gagente&sec2=godmode/agentes/massive_operations&tab=massive_modules">'
|
||||
. print_image ('images/brick.png', true, array ('title' => __('Massive module actions')))
|
||||
$modulestab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">'
|
||||
. print_image ('images/brick.png', true, array ('title' => __('Modules operations')))
|
||||
. '</a>', '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 '<form method="post" id="form_options" action="index.php?sec=gagente&sec2=godmode/agentes/massive_operations">';
|
||||
echo '<form method="post" id="form_options" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations">';
|
||||
echo '<table border="0"><tr><td>';
|
||||
echo '<h3>'.__('Massive options').':</h3>';
|
||||
echo '</td><td>';
|
||||
|
@ -122,32 +122,32 @@ echo '</form>';
|
|||
|
||||
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;
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue