pandorafms/pandora_console/godmode/events/events.php

168 lines
4.8 KiB
PHP
Raw Normal View History

<?php
2023-02-09 16:13:30 +01:00
/**
* Event configuration.
*
* @category Events
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* 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.
* ============================================================================
*/
2023-02-09 16:13:30 +01:00
// Load global vars.
global $config;
check_login();
2023-02-28 17:47:49 +01:00
2015-03-06 12:28:05 +01:00
if (!check_acl($config['id_user'], 0, 'EW') && !check_acl($config['id_user'], 0, 'EM') && ! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
2022-01-20 10:55:23 +01:00
AUDIT_LOG_ACL_VIOLATION,
'Trying to access event manage'
);
include 'general/noaccess.php';
return;
}
// Gets section to jump to another section
$section = (string) get_parameter('section', 'filter');
// Draws header
if (check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM')) {
$buttons['view'] = [
'active' => false,
'text' => '<a href="index.php?sec=eventos&sec2=operation/events/events&amp;pure='.$config['pure'].'">'.html_print_image(
2023-02-09 16:13:30 +01:00
'images/event.svg',
true,
[
'title' => __('Event list'),
2023-02-09 16:13:30 +01:00
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
'operation' => true,
];
$buttons['filter'] = [
'active' => false,
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&amp;section=filter&amp;pure='.$config['pure'].'">'.html_print_image(
2023-02-09 16:13:30 +01:00
'images/filters@svg.svg',
true,
[
'title' => __('Filter list'),
2023-02-09 16:13:30 +01:00
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
];
2016-09-08 16:06:12 +02:00
}
2012-12-28 Sergio Martin <sergio.martin@artica.es> * pandoradb_data.sql include/functions_users.php include/functions_visual_map.php include/ajax/skins.ajax.php include/ajax/events.php include/functions_custom_graphs.php include/functions.php include/functions_agents.php include/functions_graph.php include/functions_events.php include/functions_reporting.php include/functions_config.php include/functions_reports.php operation/visual_console/render_view.php operation/agentes/exportdata.php operation/menu.php operation/events/event_statistics.php operation/events/events_rss.php operation/events/export_csv.php operation/events/sound_events.php operation/events/events_list.php operation/events/events_marquee.php operation/events/events.php operation/reporting/reporting_viewer.php pandoradb.data.postgreSQL.sql pandoradb.data.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql general/main_menu.php godmode/menu.php godmode/events/event_edit_filter.php godmode/events/events.php godmode/events/event_filter.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/graph_builder.main.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/visual_console_builder.editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Change all the event and reporting acl control to new flags ER,EW,EM,RR,RW,RM git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7342 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-28 18:06:17 +01:00
if (check_acl($config['id_user'], 0, 'PM')) {
$buttons['responses'] = [
'active' => false,
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&amp;section=responses&amp;pure='.$config['pure'].'">'.html_print_image(
2023-02-09 16:13:30 +01:00
'images/responses.svg',
true,
[
'title' => __('Event responses'),
2023-02-09 16:13:30 +01:00
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
];
2019-06-20 19:23:13 +02:00
$buttons['fields'] = [
'active' => false,
'text' => '<a href="index.php?sec=eventos&sec2=godmode/events/events&amp;section=fields&amp;pure='.$config['pure'].'">'.html_print_image(
2023-02-09 16:13:30 +01:00
'images/edit_columns@svg.svg',
true,
[
2022-06-03 12:26:15 +02:00
'title' => __('Custom columns'),
2023-02-09 16:13:30 +01:00
'class' => 'invert_filter main_menu_icon',
]
).'</a>',
2019-06-20 19:23:13 +02:00
];
2012-12-28 Sergio Martin <sergio.martin@artica.es> * pandoradb_data.sql include/functions_users.php include/functions_visual_map.php include/ajax/skins.ajax.php include/ajax/events.php include/functions_custom_graphs.php include/functions.php include/functions_agents.php include/functions_graph.php include/functions_events.php include/functions_reporting.php include/functions_config.php include/functions_reports.php operation/visual_console/render_view.php operation/agentes/exportdata.php operation/menu.php operation/events/event_statistics.php operation/events/events_rss.php operation/events/export_csv.php operation/events/sound_events.php operation/events/events_list.php operation/events/events_marquee.php operation/events/events.php operation/reporting/reporting_viewer.php pandoradb.data.postgreSQL.sql pandoradb.data.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql general/main_menu.php godmode/menu.php godmode/events/event_edit_filter.php godmode/events/events.php godmode/events/event_filter.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/graph_builder.main.php godmode/reporting/visual_console_builder.wizard.php godmode/reporting/visual_console_builder.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.php godmode/reporting/visual_console_builder.editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Change all the event and reporting acl control to new flags ER,EW,EM,RR,RW,RM git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7342 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-12-28 18:06:17 +01:00
}
2012-07-10 Miguel de Dios <miguel.dedios@artica.es> * install.php, operation/reporting/reporting_xml.php, operation/netflow/nf_live_view.php, operation/netflow/nf_view.php, operation/tree.php, operation/agentes/gis_view.php, operation/agentes/estado_monitores.php, operation/agentes/networkmap.php, operation/agentes/datos_agente.php, operation/agentes/alerts_status.php, operation/menu.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php, godmode/agentes/module_manager_editor_prediction.php, godmode/servers/manage_recontask.php, godmode/alerts/alert_compounds.php, godmode/alerts/configure_alert_template.php, godmode/alerts/alert_special_days.php, godmode/setup/links.php, godmode/setup/os.php, godmode/users/configure_profile.php, godmode/events/events.php, godmode/massive/massive_delete_modules.php, godmode/massive/massive_edit_modules.php, godmode/massive/massive_standby_alerts.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_operations.php, godmode/massive/massive_delete_profiles.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/graph_builder.php, godmode/reporting/reporting_builder.item_editor.php, include/functions_menu.php, include/functions_visual_map.php, include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
switch ($section) {
case 'filter':
$buttons['filter']['active'] = true;
2022-06-03 12:26:15 +02:00
$subpage = __('Filters');
break;
case 'fields':
$buttons['fields']['active'] = true;
2022-06-03 12:26:15 +02:00
$subpage = __('Custom columns');
break;
case 'responses':
$buttons['responses']['active'] = true;
2022-06-03 12:26:15 +02:00
$subpage = __('Responses');
break;
case 'view':
$buttons['view']['active'] = true;
break;
default:
$buttons['filter']['active'] = true;
2022-06-03 12:26:15 +02:00
$subpage = __('Filters');
break;
2012-07-10 Miguel de Dios <miguel.dedios@artica.es> * install.php, operation/reporting/reporting_xml.php, operation/netflow/nf_live_view.php, operation/netflow/nf_view.php, operation/tree.php, operation/agentes/gis_view.php, operation/agentes/estado_monitores.php, operation/agentes/networkmap.php, operation/agentes/datos_agente.php, operation/agentes/alerts_status.php, operation/menu.php, operation/snmpconsole/snmp_view.php, operation/users/user_edit.php, godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php, godmode/agentes/module_manager_editor_prediction.php, godmode/servers/manage_recontask.php, godmode/alerts/alert_compounds.php, godmode/alerts/configure_alert_template.php, godmode/alerts/alert_special_days.php, godmode/setup/links.php, godmode/setup/os.php, godmode/users/configure_profile.php, godmode/events/events.php, godmode/massive/massive_delete_modules.php, godmode/massive/massive_edit_modules.php, godmode/massive/massive_standby_alerts.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_operations.php, godmode/massive/massive_delete_profiles.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/graph_builder.php, godmode/reporting/reporting_builder.item_editor.php, include/functions_menu.php, include/functions_visual_map.php, include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6759 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-07-10 12:38:02 +02:00
}
2023-02-28 17:47:49 +01:00
ui_print_standard_header(
$subpage,
'images/gm_events.png',
false,
'',
true,
(array) $buttons,
[
2022-06-03 12:26:15 +02:00
[
2023-02-28 17:47:49 +01:00
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Events'),
],
]
);
require_once $config['homedir'].'/include/functions_events.php';
switch ($section) {
case 'edit_filter':
include_once $config['homedir'].'/godmode/events/event_edit_filter.php';
break;
case 'filter':
include_once $config['homedir'].'/godmode/events/event_filter.php';
break;
case 'fields':
include_once $config['homedir'].'/godmode/events/custom_events.php';
break;
case 'responses':
include_once $config['homedir'].'/godmode/events/event_responses.php';
break;
}