2019-01-30 16:18:44 +01:00
|
|
|
<?php
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2021-11-04 16:28:15 +01:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
2009-06-08 20:21:21 +02:00
|
|
|
// ==================================================
|
2020-11-27 13:52:35 +01:00
|
|
|
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
2009-06-08 20:21:21 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
2019-05-03 13:54:39 +02:00
|
|
|
// Load global vars.
|
2010-03-02 Sancho Lerena <slerena@artica.es>
* include/functions_reporting.php: Solved issue with several undefined
vars.
* include/functions_servers.php: Solved issue with several undefined
vars.
* include/functions_config.php: Added metaconsola witch to readconfig.
* include/config_process.php: Update build.. is YYMMDD !
* include/functions_ui.php: Removed deprecated call to split and replaced
by preg_split.
* index.php: Activated developer mode.
* operation/agentes/estado_monitores.php: Solved small problem with modules
without history, filling missing column in table. Added headers
* godmode/alerts/configure_alert_compound.php,
operation/agentes/status_monitor.php
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php,
godmode/alerts/alert_commands.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php: Removed deprecated call to include
config.php and in some cases, added new header style.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2444 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-03-02 15:13:00 +01:00
|
|
|
global $config;
|
2015-03-09 16:17:57 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once $config['homedir'].'/include/functions_alerts.php';
|
|
|
|
enterprise_include_once('meta/include/functions_alerts_meta.php');
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
check_login();
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2015-03-06 12:28:05 +01:00
|
|
|
enterprise_hook('open_meta_frame');
|
|
|
|
|
2021-03-01 13:58:04 +01:00
|
|
|
if (! check_acl($config['id_user'], 0, 'PM')) {
|
2019-01-30 16:18:44 +01:00
|
|
|
db_pandora_audit(
|
2022-01-20 10:55:23 +01:00
|
|
|
AUDIT_LOG_ACL_VIOLATION,
|
2019-01-30 16:18:44 +01:00
|
|
|
'Trying to access Alert Management'
|
|
|
|
);
|
|
|
|
include 'general/noaccess.php';
|
|
|
|
exit;
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$update_command = (bool) get_parameter('update_command');
|
|
|
|
$id = (int) get_parameter('id');
|
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_command.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/agentes/agent_template.php,
godmode/snmpconsole/snmp_alert.php, index.php,
operation/search_users.php,
operation/integria_incidents/incident.php,
operation/reporting/reporting_xml.php,
operation/agentes/exportdata.csv.php: cleaned source code style.
* general/login_help_dialog.php, general/login_page.php: fixed the
set to hidden window of info.
Fixes: #3604645
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7680 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2013-02-19 12:27:57 +01:00
|
|
|
$pure = get_parameter('pure', 0);
|
2019-05-07 17:47:47 +02:00
|
|
|
$alert = [];
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2019-05-03 13:54:39 +02:00
|
|
|
// Header.
|
2020-07-13 12:23:46 +02:00
|
|
|
if (is_metaconsole() === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
alerts_meta_print_header();
|
|
|
|
} else {
|
|
|
|
ui_print_page_header(
|
|
|
|
__('Alerts').' » '.__('Configure alert command'),
|
|
|
|
'images/gm_alerts.png',
|
|
|
|
false,
|
2020-05-29 11:37:06 +02:00
|
|
|
'',
|
2019-01-30 16:18:44 +01:00
|
|
|
true
|
|
|
|
);
|
|
|
|
}
|
2015-03-09 16:17:57 +01:00
|
|
|
|
2021-01-20 18:22:43 +01:00
|
|
|
if ($id > 0) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$alert = alerts_get_alert_command($id);
|
2021-01-20 18:22:43 +01:00
|
|
|
|
2021-03-01 13:58:04 +01:00
|
|
|
if ($alert['internal'] || !check_acl_restricted_all($config['id_user'], $alert['id_group'], 'PM')) {
|
2022-02-01 13:39:18 +01:00
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_ACL_VIOLATION,
|
|
|
|
'Trying to access Alert Management'
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
include 'general/noaccess.php';
|
|
|
|
exit;
|
|
|
|
}
|
2021-01-20 18:22:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($update_command) {
|
|
|
|
$alert = alerts_get_alert_command($id);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$name = (string) get_parameter('name');
|
|
|
|
$command = (string) get_parameter('command');
|
|
|
|
$description = (string) get_parameter('description');
|
|
|
|
$id_group = (string) get_parameter('id_group', 0);
|
|
|
|
|
|
|
|
$fields_descriptions = [];
|
|
|
|
$fields_values = [];
|
2019-05-03 13:46:52 +02:00
|
|
|
$fields_hidden = [];
|
2019-01-30 16:18:44 +01:00
|
|
|
$info_fields = '';
|
|
|
|
$values = [];
|
|
|
|
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
|
|
|
|
$fields_descriptions[] = (string) get_parameter('field'.$i.'_description');
|
|
|
|
$fields_values[] = (string) get_parameter('field'.$i.'_values');
|
2019-05-03 13:46:52 +02:00
|
|
|
$fields_hidden[] = get_parameter('field'.$i.'_hide');
|
2019-01-30 16:18:44 +01:00
|
|
|
$info_fields .= ' Field'.$i.': '.$fields_values[($i - 1)];
|
|
|
|
}
|
|
|
|
|
|
|
|
$values['fields_values'] = io_json_mb_encode($fields_values);
|
|
|
|
$values['fields_descriptions'] = io_json_mb_encode($fields_descriptions);
|
2019-05-03 13:46:52 +02:00
|
|
|
$values['fields_hidden'] = io_json_mb_encode($fields_hidden);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$values['name'] = $name;
|
|
|
|
$values['command'] = $command;
|
|
|
|
$values['description'] = $description;
|
|
|
|
$values['id_group'] = $id_group;
|
2020-07-07 11:05:19 +02:00
|
|
|
// Only for Metaconsole. Save the previous name for synchronizing.
|
|
|
|
if (is_metaconsole()) {
|
|
|
|
$values['previous_name'] = db_get_value('name', 'talert_commands', 'id', $id);
|
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
// Check it the new name is used in the other command.
|
|
|
|
$id_check = db_get_value('id', 'talert_commands', 'name', $name);
|
|
|
|
if (($id_check != $id) && (!empty($id_check))) {
|
|
|
|
$result = '';
|
|
|
|
} else {
|
|
|
|
$result = alerts_update_alert_command($id, $values);
|
2019-05-07 17:47:47 +02:00
|
|
|
if ($result) {
|
|
|
|
$info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description.' '.$info_fields.'"}';
|
|
|
|
$alert['fields_values'] = io_json_mb_encode($fields_values);
|
|
|
|
$alert['fields_descriptions'] = io_json_mb_encode($fields_descriptions);
|
|
|
|
$alert['name'] = $name;
|
|
|
|
$alert['command'] = $command;
|
|
|
|
$alert['description'] = $description;
|
|
|
|
$alert['id_group'] = $id_group;
|
2021-05-28 14:29:53 +02:00
|
|
|
$alert['fields_hidden'] = io_json_mb_encode($fields_hidden);
|
2019-05-07 17:47:47 +02:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($result) {
|
2022-02-01 13:39:18 +01:00
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_COMMAND_MANAGEMENT,
|
|
|
|
'Update alert command #'.$id,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
$info
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
} else {
|
2022-02-01 13:39:18 +01:00
|
|
|
db_pandora_audit(
|
|
|
|
AUDIT_LOG_COMMAND_MANAGEMENT,
|
|
|
|
'Fail to update alert command #'.$id,
|
|
|
|
false,
|
|
|
|
false
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ui_print_result_message(
|
|
|
|
$result,
|
|
|
|
__('Successfully updated'),
|
|
|
|
__('Could not be updated')
|
|
|
|
);
|
2015-03-09 16:17:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
$name = '';
|
|
|
|
$command = '';
|
|
|
|
$description = '';
|
2012-10-29 09:45:06 +01:00
|
|
|
$fields_descriptions = '';
|
|
|
|
$fields_values = '';
|
2018-10-19 13:14:00 +02:00
|
|
|
$id_group = 0;
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
if ($id) {
|
2019-05-07 17:47:47 +02:00
|
|
|
if (!$result) {
|
|
|
|
$alert = alerts_get_alert_command($id);
|
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$name = $alert['name'];
|
|
|
|
$command = $alert['command'];
|
|
|
|
$description = $alert['description'];
|
|
|
|
$id_group = $alert['id_group'];
|
|
|
|
$fields_descriptions = $alert['fields_descriptions'];
|
|
|
|
$fields_values = $alert['fields_values'];
|
2019-05-03 13:46:52 +02:00
|
|
|
$fields_hidden = $alert['fields_hidden'];
|
2012-10-29 09:45:06 +01:00
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_descriptions) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$fields_descriptions = json_decode($fields_descriptions, true);
|
2012-10-29 09:45:06 +01:00
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_values) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$fields_values = json_decode($fields_values, true);
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_hidden) === false) {
|
2019-05-03 13:46:52 +02:00
|
|
|
$fields_hidden = json_decode($fields_hidden, true);
|
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
|
2021-06-03 10:16:29 +02:00
|
|
|
$is_management_allowed = is_management_allowed();
|
2020-07-13 12:23:46 +02:00
|
|
|
|
2021-06-03 10:16:29 +02:00
|
|
|
if ($is_management_allowed === false) {
|
2021-09-23 11:16:48 +02:00
|
|
|
if (is_metaconsole() === false) {
|
|
|
|
$url = '<a target="_blank" href="'.ui_get_meta_url(
|
|
|
|
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
|
|
|
|
).'">'.__('metaconsole').'</a>';
|
|
|
|
} else {
|
|
|
|
$url = __('any node');
|
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
ui_print_warning_message(
|
2021-06-24 19:48:07 +02:00
|
|
|
__(
|
|
|
|
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
|
2021-09-23 11:16:48 +02:00
|
|
|
$url
|
2021-06-24 19:48:07 +02:00
|
|
|
)
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-06-25 10:07:53 +02:00
|
|
|
$table = new stdClass();
|
2015-06-16 16:09:50 +02:00
|
|
|
$table->width = '100%';
|
|
|
|
$table->class = 'databox filters';
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (is_metaconsole() === true) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->head[0] = ($id) ? __('Update Command') : __('Create Command');
|
|
|
|
$table->head_colspan[0] = 4;
|
|
|
|
$table->headstyle[0] = 'text-align: center';
|
2015-03-06 12:28:05 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$table->style = [];
|
2020-07-13 12:23:46 +02:00
|
|
|
if (is_metaconsole() === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->style[0] = 'font-weight: bold';
|
|
|
|
$table->style[2] = 'font-weight: bold';
|
2019-05-03 13:46:52 +02:00
|
|
|
$table->style[4] = 'font-weight: bold';
|
2015-03-06 12:28:05 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
$table->size = [];
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
$table->size[0] = '20%';
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data = [];
|
2012-10-29 09:45:06 +01:00
|
|
|
|
2018-10-19 13:14:00 +02:00
|
|
|
$table->colspan['name'][1] = 3;
|
|
|
|
$table->data['name'][0] = __('Name');
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['name'][2] = html_print_input_text(
|
|
|
|
'name',
|
|
|
|
$name,
|
|
|
|
'',
|
|
|
|
35,
|
|
|
|
255,
|
|
|
|
true,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
2018-10-19 13:14:00 +02:00
|
|
|
|
|
|
|
$table->colspan['command'][1] = 3;
|
|
|
|
$table->data['command'][0] = __('Command');
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['command'][1] = html_print_textarea(
|
|
|
|
'command',
|
|
|
|
8,
|
|
|
|
30,
|
|
|
|
$command,
|
|
|
|
'',
|
|
|
|
true,
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
2018-10-19 13:14:00 +02:00
|
|
|
|
2021-01-20 18:22:43 +01:00
|
|
|
$return_all_group = false;
|
|
|
|
|
|
|
|
if (users_can_manage_group_all('LM') === true) {
|
|
|
|
$return_all_group = true;
|
|
|
|
}
|
|
|
|
|
2018-10-19 13:14:00 +02:00
|
|
|
$table->colspan['group'][1] = 3;
|
|
|
|
$table->data['group'][0] = __('Group');
|
2020-09-28 18:04:46 +02:00
|
|
|
$table->data['group'][1] = '<div class="w250px inline">'.html_print_select_groups(
|
2019-01-30 16:18:44 +01:00
|
|
|
false,
|
|
|
|
'LM',
|
2021-01-20 18:22:43 +01:00
|
|
|
$return_all_group,
|
2019-01-30 16:18:44 +01:00
|
|
|
'id_group',
|
|
|
|
$id_group,
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
0,
|
2020-07-13 12:23:46 +02:00
|
|
|
true,
|
|
|
|
false,
|
|
|
|
true,
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-09-28 18:04:46 +02:00
|
|
|
).'</div>';
|
2012-10-29 09:45:06 +01:00
|
|
|
|
2018-10-19 13:14:00 +02:00
|
|
|
$table->colspan['description'][1] = 3;
|
|
|
|
$table->data['description'][0] = __('Description');
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['description'][1] = html_print_textarea(
|
|
|
|
'description',
|
|
|
|
10,
|
|
|
|
30,
|
|
|
|
$description,
|
|
|
|
'',
|
|
|
|
true,
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
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
|
|
|
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2017-02-06 16:20:39 +01:00
|
|
|
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->data['field'.$i][0] = sprintf(__('Field %s description'), $i);
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_descriptions) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$field_description = $fields_descriptions[($i - 1)];
|
|
|
|
} else {
|
|
|
|
$field_description = '';
|
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['field'.$i][1] = html_print_input_text(
|
|
|
|
'field'.$i.'_description',
|
|
|
|
$field_description,
|
|
|
|
'',
|
|
|
|
30,
|
|
|
|
255,
|
|
|
|
true,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['field'.$i][2] = sprintf(__('Field %s values'), $i);
|
|
|
|
$table->data['field'.$i][2] .= ui_print_help_tip(
|
|
|
|
__('value1,tag1;value2,tag2;value3,tag3'),
|
|
|
|
true
|
|
|
|
);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_values) === false) {
|
2019-01-30 16:18:44 +01:00
|
|
|
$field_values = $fields_values[($i - 1)];
|
|
|
|
} else {
|
|
|
|
$field_values = '';
|
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
if (empty($fields_hidden) === false) {
|
2019-05-03 13:46:52 +02:00
|
|
|
$selected = (bool) $fields_hidden[($i - 1)];
|
|
|
|
} else {
|
|
|
|
$selected = false;
|
|
|
|
}
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['field'.$i][3] = html_print_input_text(
|
|
|
|
'field'.$i.'_values',
|
|
|
|
$field_values,
|
|
|
|
'',
|
|
|
|
55,
|
|
|
|
255,
|
|
|
|
true,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'field_value',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'',
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed
|
2020-07-13 12:23:46 +02:00
|
|
|
);
|
2019-05-03 13:46:52 +02:00
|
|
|
|
|
|
|
$table->data['field'.$i][4] = __('Hide');
|
|
|
|
|
2020-07-13 12:23:46 +02:00
|
|
|
$table->data['field'.$i][5] = html_print_checkbox_extended(
|
|
|
|
'field'.$i.'_hide',
|
|
|
|
1,
|
|
|
|
$selected,
|
2021-06-03 10:16:29 +02:00
|
|
|
!$is_management_allowed,
|
2020-07-13 12:23:46 +02:00
|
|
|
'cursor: \'pointer\'',
|
|
|
|
'class="hide_inputs"',
|
|
|
|
true
|
|
|
|
);
|
2012-10-29 09:45:06 +01:00
|
|
|
}
|
|
|
|
|
2012-12-12 20:37:35 +01:00
|
|
|
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&pure='.$pure.'">';
|
2019-01-30 16:18:44 +01:00
|
|
|
html_print_table($table);
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
|
2021-06-03 10:16:29 +02:00
|
|
|
if ($is_management_allowed === true) {
|
2020-07-13 12:23:46 +02:00
|
|
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|
|
|
if ($id) {
|
|
|
|
html_print_input_hidden('id', $id);
|
|
|
|
html_print_input_hidden('update_command', 1);
|
|
|
|
html_print_submit_button(__('Update'), 'create', false, 'class="sub upd"');
|
|
|
|
} else {
|
|
|
|
html_print_input_hidden('create_command', 1);
|
|
|
|
html_print_submit_button(__('Create'), 'create', false, 'class="sub wand"');
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '</div>';
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
}
|
2019-01-30 16:18:44 +01:00
|
|
|
|
2009-01-12 Esteban Sanchez <estebans@artica.es>
* godmode/agentes/alert_manager.php: Complete rewritten of the alert
system when assigned alerts to an agent.
* pandoradb.sql: New tables for alert system. These are:
talert_commands, talert_actions, talert_templates,
talert_template_modules, talert_template_module_actions. No migration
tool is available yet.
* godmode/alerts/configure_alert_template.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php: Added to repository. Administration
interface to new alert system.
* godmode/alerts/modify_alert.php: Deleted from repository.
* godmode/setup/setup.php: Added an example of the date format. Main
table has now percentage width.
* godmode/menu.php, operation/menu.php: Added new alert options.
Removed refr value when it's not neccesary.
* include/styles/pandora.css: Added width to textarea elements. Style
correction and cleanup. Tables doesn't have a odd-even pattern, but
the hovered row now changes its colour. New styles for alert pages.
* include/functions_custom_graphs.php: Added to repository. custom
graphs functions moved here.
* include/functions_incidents.php, include/functions_events.php: Moved
to LGPL. Style comment corrections.
* include/functions_html.php: Documentation style correction. Added
print_input_file() and print_label().
* include/functions_ui.php: Doc style correction.
* operation/reporting/graph_viewer.php: Include new function file with
custom graphs. Use generic functions.
* index.php: Unset pass from POST and REQUEST arrays.
* include/functions_db.php: Some documentation updated to new format.
Added format_array_to_update_sql() to generate SQL sentences for
updates. Style correction.
* godmode/agentes/configurar_agente.php: Variables renamed to have a
meaning.
* extensions/update_manager/main.php: Mark an string translatable.
* extensions/update_manager/lib/libupdate_manager_client.php,
godmode/alerts/configure_alert.php, include/functions.php,
godmode/agentes/module_manager.php, operation/agentes/networkmap.php,
operation/reporting/reporting_viewer.php,
godmode/agentes/manage_config.php: Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1331 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 15:31:01 +01:00
|
|
|
echo '</form>';
|
2013-05-20 10:42:02 +02:00
|
|
|
|
|
|
|
enterprise_hook('close_meta_frame');
|
2019-05-03 13:46:52 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready (function () {
|
|
|
|
|
|
|
|
$(".hide_inputs").each(function(index) {
|
|
|
|
var $input_in_row = $(this).closest('tr').find('.field_value');
|
2020-07-13 12:23:46 +02:00
|
|
|
if($(this).is(':checked')) {
|
2019-05-03 13:46:52 +02:00
|
|
|
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
2020-07-13 12:23:46 +02:00
|
|
|
} else {
|
2019-05-03 13:46:52 +02:00
|
|
|
$input_in_row.prop('style', '');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".hide_inputs").click(function() {
|
|
|
|
var $input_in_row = $(this).closest('tr').find('.field_value');
|
2020-07-13 12:23:46 +02:00
|
|
|
if($(this).is(':checked')) {
|
2019-05-03 13:46:52 +02:00
|
|
|
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
2020-07-13 12:23:46 +02:00
|
|
|
} else {
|
2019-05-03 13:46:52 +02:00
|
|
|
$input_in_row.prop('style', '');
|
2020-07-13 12:23:46 +02:00
|
|
|
}
|
2019-05-03 13:46:52 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|