resolved conflict
This commit is contained in:
commit
e408b4258b
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.763-220808
|
||||
Version: 7.0NG.763-220810
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.763-220808"
|
||||
pandora_version="7.0NG.763-220810"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.763';
|
||||
use constant AGENT_BUILD => '220808';
|
||||
use constant AGENT_BUILD => '220810';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.763"
|
||||
PI_BUILD="220808"
|
||||
PI_BUILD="220810"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{220808}
|
||||
{220810}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.763 Build 220808")
|
||||
#define PANDORA_VERSION ("7.0NG.763 Build 220810")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.763(Build 220808))"
|
||||
VALUE "ProductVersion", "(7.0NG.763(Build 220810))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.763-220808
|
||||
Version: 7.0NG.763-220810
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.763-220808"
|
||||
pandora_version="7.0NG.763-220810"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -38,6 +38,10 @@ ALTER TABLE `tautoconfig` ADD COLUMN `executed` TINYINT UNSIGNED NOT NULL DEFAUL
|
|||
|
||||
ALTER TABLE `tusuario` DROP COLUMN `metaconsole_assigned_server`;
|
||||
|
||||
ALTER TABLE `tipam_network` DROP FOREIGN KEY `tipam_network_ibfk_1`;
|
||||
ALTER TABLE `tipam_network` MODIFY COLUMN `id_recon_task` INT UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE `tipam_network` ADD CONSTRAINT `tipam_network_ibfk_1` FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `tevent_filter` ADD COLUMN `search_secondary_groups` INT NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -436,9 +436,22 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
);
|
||||
$header_logout .= '</a></div>';
|
||||
|
||||
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
||||
if (is_reporting_console_node() === true) {
|
||||
echo '<div class="header_left">';
|
||||
echo '<span class="header_title">';
|
||||
echo $config['custom_title_header'];
|
||||
echo '</span>';
|
||||
echo '<span class="header_subtitle">';
|
||||
echo $config['custom_subtitle_header'];
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
echo '<div class="header_center"></div>';
|
||||
echo '<div class="header_right">'.$header_support, $header_docu, $header_user, $header_logout.'</div>';
|
||||
} else {
|
||||
echo '<div class="header_left"><span class="header_title">'.$config['custom_title_header'].'</span><span class="header_subtitle">'.$config['custom_subtitle_header'].'</span></div>
|
||||
<div class="header_center">'.$header_searchbar.'</div>
|
||||
<div class="header_right">'.$header_autorefresh, $header_autorefresh_counter, $header_discovery, $servers_list, $header_feedback, $header_support, $header_docu, $header_user, $header_logout.'</div>';
|
||||
}
|
||||
?>
|
||||
</div> <!-- Closes #table_header_inner -->
|
||||
</div> <!-- Closes #table_header -->
|
||||
|
|
|
@ -58,6 +58,10 @@ if (isset($config['autohidden_menu']) === true && (bool) $config['autohidden_men
|
|||
|
||||
// Start of full lateral menu.
|
||||
echo sprintf('<div id="menu_full" class="menu_full_%s">', $menuTypeClass);
|
||||
$url_logo = ui_get_full_url('index.php');
|
||||
if (is_reporting_console_node() === true) {
|
||||
$url_logo = 'index.php?logged=1&sec=discovery&sec2=godmode/servers/discovery&wiz=tasklist';
|
||||
}
|
||||
|
||||
// Header logo.
|
||||
html_print_div(
|
||||
|
@ -65,7 +69,7 @@ html_print_div(
|
|||
'class' => 'logo_green',
|
||||
'content' => html_print_anchor(
|
||||
[
|
||||
'href' => ui_get_full_url('index.php'),
|
||||
'href' => $url_logo,
|
||||
'content' => html_print_header_logo_image(
|
||||
$menuCollapsed,
|
||||
true
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
/**
|
||||
* Static page to lock access to console but console reporting
|
||||
*
|
||||
* @category Reporting
|
||||
* @package Pandora FMS
|
||||
* @subpackage Applications
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
||||
// Begin.
|
||||
echo ui_require_css_file('maintenance', 'include/styles/', true);
|
||||
|
||||
$data = [];
|
||||
$data['id_node'] = $config['metaconsole_node_id'];
|
||||
$data['check_ver'] = $config['current_package'];
|
||||
$data['check_mr'] = $config['MR'];
|
||||
$data['collection_max_size'] = $config['collection_max_size'];
|
||||
$data['check_post_max_size'] = ini_get('post_max_size');
|
||||
$data['check_upload_max_filesize'] = ini_get('upload_max_filesize');
|
||||
$data['check_memory_limit'] = ini_get('memory_limit');
|
||||
$data['check_php_version'] = phpversion();
|
||||
|
||||
?>
|
||||
<html>
|
||||
<body class="responsive-height">
|
||||
<div class="responsive center padding-6">
|
||||
<p><?php echo __('Console only reporting node'); ?></p>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
html_print_image(
|
||||
'images/maintenance.png',
|
||||
false,
|
||||
[
|
||||
'class' => 'responsive',
|
||||
'width' => 800,
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<p><?php echo __('Info'); ?></p>
|
||||
<ul class="container-list">
|
||||
<li>
|
||||
<span class=title>
|
||||
<?php echo __('Version'); ?>:
|
||||
</span>
|
||||
<span>
|
||||
<?php echo $config['current_package']; ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class=title>
|
||||
<?php echo __('Mr'); ?>:
|
||||
</span>
|
||||
<span>
|
||||
<?php echo $config['MR']; ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class=title>
|
||||
<?php echo __('Memory limit'); ?>:
|
||||
</span>
|
||||
<span>
|
||||
<?php echo ini_get('memory_limit'); ?>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class=title>
|
||||
<?php echo __('Php version'); ?>:
|
||||
</span>
|
||||
<span>
|
||||
<?php echo phpversion(); ?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -797,13 +797,29 @@ $table = new StdClass();
|
|||
$table->class = 'databox filters';
|
||||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->size[0] = '25%';
|
||||
|
||||
$table->data[0][0] = __('Group filter');
|
||||
$table->data[0][1] = html_print_select_groups(false, $access, $return_all_group, 'filter_group', $filter_group, '', '', '', true, false, true, '', false, 'min-width:180px;margin-right:15px;');
|
||||
$table->data[0][1] = html_print_select_groups(
|
||||
false,
|
||||
$access,
|
||||
$return_all_group,
|
||||
'filter_group',
|
||||
$filter_group,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'min-width:180px;margin-right:15px;'
|
||||
);
|
||||
$table->data[0][2] = __('Recursion').'  '.html_print_checkbox('recursion', 1, $recursion, true, false, '');
|
||||
|
||||
$table->data[1][0] = __('Available agents');
|
||||
$table->data[1][1] = html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, true, true, true, '', false, 'width: 180px;');
|
||||
$table->data[1][1] = html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, true, true, true, '', false, 'min-width: 250px;width: 70%;');
|
||||
|
||||
|
||||
if ($type_downtime != 'quiet') {
|
||||
|
@ -855,7 +871,7 @@ $table->data[3][1] = html_print_select(
|
|||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 180px;'
|
||||
'min-width: 250px;width: 70%;'
|
||||
);
|
||||
echo '</div>';
|
||||
|
||||
|
|
|
@ -28,15 +28,18 @@
|
|||
|
||||
// Begin.
|
||||
require_once 'include/config.php';
|
||||
require_once 'include/functions_menu.php';
|
||||
|
||||
check_login();
|
||||
|
||||
enterprise_include('godmode/menu.php');
|
||||
require_once 'include/functions_menu.php';
|
||||
|
||||
$access_console_node = !is_reporting_console_node();
|
||||
$menu_godmode = [];
|
||||
$menu_godmode['class'] = 'godmode';
|
||||
|
||||
if ($access_console_node === true) {
|
||||
enterprise_include('godmode/menu.php');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'AW') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'RR') === true
|
||||
|
@ -46,32 +49,35 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||
$sub = [];
|
||||
$sub['godmode/servers/discovery&wiz=main']['text'] = __('Start');
|
||||
$sub['godmode/servers/discovery&wiz=main']['id'] = 'Discovery';
|
||||
|
||||
$sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list');
|
||||
$sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist';
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
|
||||
) {
|
||||
if ($access_console_node === true) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'PM') === true
|
||||
) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub2 = [];
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan');
|
||||
enterprise_hook('hostdevices_submenu');
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
|
||||
}
|
||||
|
||||
$sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices');
|
||||
$sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd';
|
||||
$sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub2 = [];
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan');
|
||||
enterprise_hook('hostdevices_submenu');
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan');
|
||||
enterprise_hook('applications_menu');
|
||||
enterprise_hook('cloud_menu');
|
||||
enterprise_hook('console_task_menu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts');
|
||||
}
|
||||
|
||||
$sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices');
|
||||
$sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd';
|
||||
$sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
enterprise_hook('applications_menu');
|
||||
enterprise_hook('cloud_menu');
|
||||
enterprise_hook('console_task_menu');
|
||||
}
|
||||
|
||||
// Add to menu.
|
||||
|
@ -81,309 +87,311 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
|||
$menu_godmode['discovery']['sub'] = $sub;
|
||||
}
|
||||
|
||||
|
||||
$sub = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'AD') === true) {
|
||||
$sub['godmode/agentes/modificar_agente']['text'] = __('Manage agents');
|
||||
$sub['godmode/agentes/modificar_agente']['id'] = 'Manage agents';
|
||||
$sub['godmode/agentes/modificar_agente']['subsecs'] = ['godmode/agentes/configurar_agente'];
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['godmode/agentes/fields_manager']['text'] = __('Custom fields');
|
||||
$sub['godmode/agentes/fields_manager']['id'] = 'Custom fields';
|
||||
|
||||
$sub['godmode/modules/manage_nc_groups']['text'] = __('Component groups');
|
||||
$sub['godmode/modules/manage_nc_groups']['id'] = 'Component groups';
|
||||
// Category.
|
||||
$sub['godmode/category/category']['text'] = __('Module categories');
|
||||
$sub['godmode/category/category']['id'] = 'Module categories';
|
||||
$sub['godmode/category/category']['subsecs'] = 'godmode/category/edit_category';
|
||||
|
||||
$sub['godmode/modules/module_list']['text'] = __('Module types');
|
||||
$sub['godmode/modules/module_list']['id'] = 'Module types';
|
||||
|
||||
$sub['godmode/groups/modu_group_list']['text'] = __('Module groups');
|
||||
$sub['godmode/groups/modu_group_list']['id'] = 'Module groups';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
// Netflow.
|
||||
if ((bool) $config['activate_netflow'] === true) {
|
||||
$sub['godmode/netflow/nf_edit']['text'] = __('Netflow filters');
|
||||
$sub['godmode/netflow/nf_edit']['id'] = 'Netflow filters';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gagente']['text'] = __('Resources');
|
||||
$menu_godmode['gagente']['sec2'] = 'godmode/agentes/modificar_agente';
|
||||
$menu_godmode['gagente']['id'] = 'god-resources';
|
||||
$menu_godmode['gagente']['sub'] = $sub;
|
||||
}
|
||||
|
||||
$sub = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['godmode/groups/group_list']['text'] = __('Manage agents groups');
|
||||
$sub['godmode/groups/group_list']['id'] = 'Manage agents groups';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Tag.
|
||||
$sub['godmode/tag/tag']['text'] = __('Module tags');
|
||||
$sub['godmode/tag/tag']['id'] = 'Module tags';
|
||||
$sub['godmode/tag/tag']['subsecs'] = 'godmode/tag/edit_tag';
|
||||
|
||||
enterprise_hook('enterprise_acl_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub['godmode/users/user_list']['text'] = __('Users management');
|
||||
$sub['godmode/users/user_list']['id'] = 'Users management';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['godmode/users/profile_list']['text'] = __('Profile management');
|
||||
$sub['godmode/users/profile_list']['id'] = 'Profile management';
|
||||
}
|
||||
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gusuarios']['sub'] = $sub;
|
||||
$menu_godmode['gusuarios']['text'] = __('Profiles');
|
||||
$menu_godmode['gusuarios']['sec2'] = 'godmode/users/user_list';
|
||||
$menu_godmode['gusuarios']['id'] = 'god-users';
|
||||
}
|
||||
|
||||
$sub = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['templates']['text'] = __('Templates');
|
||||
$sub['templates']['id'] = 'Templates';
|
||||
$sub['templates']['type'] = 'direct';
|
||||
$sub['templates']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
|
||||
$sub2['godmode/modules/manage_module_templates']['id'] = 'Module templates';
|
||||
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
|
||||
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'Private Enterprise Numbers';
|
||||
$sub2['enterprise/godmode/modules/local_components']['text'] = __('Local components');
|
||||
$sub2['enterprise/godmode/modules/local_components']['id'] = 'Local components';
|
||||
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
|
||||
$sub2['godmode/modules/manage_network_components']['id'] = 'Network components';
|
||||
$sub['templates']['sub2'] = $sub2;
|
||||
|
||||
enterprise_hook('inventory_submenu');
|
||||
enterprise_hook('autoconfiguration_menu');
|
||||
enterprise_hook('agent_repository_menu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
enterprise_hook('policies_menu');
|
||||
enterprise_hook('agents_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'NW') === true) {
|
||||
enterprise_hook('agents_ncm_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub['gmassive']['text'] = __('Bulk operations');
|
||||
$sub['gmassive']['id'] = 'Bulk operations';
|
||||
$sub['gmassive']['type'] = 'direct';
|
||||
$sub['gmassive']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_agents']['text'] = __('Agents operations');
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_modules']['text'] = __('Modules operations');
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_plugins']['text'] = __('Plugins operations');
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_users']['text'] = __('Users operations');
|
||||
}
|
||||
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_alerts']['text'] = __('Alerts operations');
|
||||
enterprise_hook('massivepolicies_submenu');
|
||||
enterprise_hook('massivesnmp_submenu');
|
||||
enterprise_hook('massivesatellite_submenu');
|
||||
enterprise_hook('massiveservices_submenu');
|
||||
|
||||
$sub['gmassive']['sub2'] = $sub2;
|
||||
$sub2 = [];
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub['godmode/groups/group_list&tab=credbox']['text'] = __('Credential store');
|
||||
$sub['godmode/groups/group_list&tab=credbox']['id'] = 'credential store';
|
||||
}
|
||||
|
||||
// Manage events.
|
||||
$sub2 = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'EW') === true || (bool) check_acl($config['id_user'], 0, 'EM') === true) {
|
||||
// Custom event fields.
|
||||
$sub2['godmode/events/events§ion=filter']['text'] = __('Event filters');
|
||||
$sub2['godmode/events/events§ion=filter']['id'] = 'Event filters';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub2['godmode/events/events§ion=fields']['text'] = __('Custom columns');
|
||||
$sub2['godmode/events/events§ion=fields']['id'] = 'Custom events';
|
||||
$sub2['godmode/events/events§ion=responses']['text'] = __('Event responses');
|
||||
$sub2['godmode/events/events§ion=responses']['id'] = 'Event responses';
|
||||
}
|
||||
|
||||
if (empty($sub2) === false) {
|
||||
$sub['geventos']['text'] = __('Events');
|
||||
$sub['geventos']['id'] = 'events';
|
||||
$sub['geventos']['sec2'] = 'godmode/events/events§ion=filter';
|
||||
$sub['geventos']['type'] = 'direct';
|
||||
$sub['geventos']['subtype'] = 'nolink';
|
||||
$sub['geventos']['sub2'] = $sub2;
|
||||
}
|
||||
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gmodules']['text'] = __('Configuration');
|
||||
$menu_godmode['gmodules']['sec2'] = 'godmode/modules/manage_network_templates';
|
||||
$menu_godmode['gmodules']['id'] = 'god-configuration';
|
||||
$menu_godmode['gmodules']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'LW') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'LM') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'AD') === true
|
||||
) {
|
||||
$menu_godmode['galertas']['text'] = __('Alerts');
|
||||
$menu_godmode['galertas']['sec2'] = 'godmode/alerts/alert_list';
|
||||
$menu_godmode['galertas']['id'] = 'god-alerts';
|
||||
|
||||
if ($access_console_node === true) {
|
||||
$sub = [];
|
||||
$sub['godmode/alerts/alert_list']['text'] = __('List of Alerts');
|
||||
$sub['godmode/alerts/alert_list']['id'] = 'List of Alerts';
|
||||
$sub['godmode/alerts/alert_list']['pages'] = ['godmode/alerts/alert_view'];
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
|
||||
$sub['godmode/alerts/alert_templates']['text'] = __('Templates');
|
||||
$sub['godmode/alerts/alert_templates']['id'] = 'Templates';
|
||||
$sub['godmode/alerts/alert_templates']['pages'] = ['godmode/alerts/configure_alert_template'];
|
||||
|
||||
$sub['godmode/alerts/alert_actions']['text'] = __('Actions');
|
||||
$sub['godmode/alerts/alert_actions']['id'] = 'Actions';
|
||||
$sub['godmode/alerts/alert_actions']['pages'] = ['godmode/alerts/configure_alert_action'];
|
||||
$sub['godmode/alerts/alert_commands']['text'] = __('Commands');
|
||||
$sub['godmode/alerts/alert_commands']['id'] = 'Commands';
|
||||
$sub['godmode/alerts/alert_commands']['pages'] = ['godmode/alerts/configure_alert_command'];
|
||||
$sub['godmode/alerts/alert_special_days']['text'] = __('Special days list');
|
||||
$sub['godmode/alerts/alert_special_days']['id'] = __('Special days list');
|
||||
$sub['godmode/alerts/alert_special_days']['pages'] = ['godmode/alerts/configure_alert_special_days'];
|
||||
|
||||
enterprise_hook('eventalerts_submenu');
|
||||
$sub['godmode/snmpconsole/snmp_alert']['text'] = __('SNMP alerts');
|
||||
$sub['godmode/snmpconsole/snmp_alert']['id'] = 'SNMP alerts';
|
||||
enterprise_hook('alert_inventory_submenu');
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'AD') === true) {
|
||||
$sub['godmode/agentes/modificar_agente']['text'] = __('Manage agents');
|
||||
$sub['godmode/agentes/modificar_agente']['id'] = 'Manage agents';
|
||||
$sub['godmode/agentes/modificar_agente']['subsecs'] = ['godmode/agentes/configurar_agente'];
|
||||
}
|
||||
|
||||
$menu_godmode['galertas']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Servers.
|
||||
$menu_godmode['gservers']['text'] = __('Servers');
|
||||
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
|
||||
$menu_godmode['gservers']['id'] = 'god-servers';
|
||||
|
||||
$sub = [];
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
|
||||
$sub['godmode/servers/modificar_server']['id'] = 'Manage servers';
|
||||
}
|
||||
|
||||
// This subtabs are only for Pandora Admin.
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
enterprise_hook('ha_cluster');
|
||||
$sub['godmode/agentes/fields_manager']['text'] = __('Custom fields');
|
||||
$sub['godmode/agentes/fields_manager']['id'] = 'Custom fields';
|
||||
|
||||
$sub['godmode/servers/plugin']['text'] = __('Plugins');
|
||||
$sub['godmode/servers/plugin']['id'] = 'Plugins';
|
||||
$sub['godmode/modules/manage_nc_groups']['text'] = __('Component groups');
|
||||
$sub['godmode/modules/manage_nc_groups']['id'] = 'Component groups';
|
||||
// Category.
|
||||
$sub['godmode/category/category']['text'] = __('Module categories');
|
||||
$sub['godmode/category/category']['id'] = 'Module categories';
|
||||
$sub['godmode/category/category']['subsecs'] = 'godmode/category/edit_category';
|
||||
|
||||
$sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin');
|
||||
$sub['godmode/servers/plugin_registration']['id'] = 'register_plugin';
|
||||
$sub['godmode/modules/module_list']['text'] = __('Module types');
|
||||
$sub['godmode/modules/module_list']['id'] = 'Module types';
|
||||
|
||||
enterprise_hook('export_target_submenu');
|
||||
|
||||
enterprise_hook('manage_satellite_submenu');
|
||||
$sub['godmode/groups/modu_group_list']['text'] = __('Module groups');
|
||||
$sub['godmode/groups/modu_group_list']['id'] = 'Module groups';
|
||||
}
|
||||
|
||||
$menu_godmode['gservers']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Setup.
|
||||
$menu_godmode['gsetup']['text'] = __('Setup');
|
||||
$menu_godmode['gsetup']['sec2'] = 'general';
|
||||
$menu_godmode['gsetup']['id'] = 'god-setup';
|
||||
|
||||
$sub = [];
|
||||
|
||||
// Options Setup.
|
||||
$sub['general']['text'] = __('Setup');
|
||||
$sub['general']['id'] = 'Setup';
|
||||
$sub['general']['type'] = 'direct';
|
||||
$sub['general']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
|
||||
$sub2['godmode/setup/setup§ion=general']['text'] = __('General Setup');
|
||||
$sub2['godmode/setup/setup§ion=general']['id'] = 'General Setup';
|
||||
$sub2['godmode/setup/setup§ion=general']['refr'] = 0;
|
||||
|
||||
enterprise_hook('password_submenu');
|
||||
enterprise_hook('enterprise_submenu');
|
||||
enterprise_hook('historydb_submenu');
|
||||
enterprise_hook('log_collector_submenu');
|
||||
|
||||
$sub2['godmode/setup/setup§ion=auth']['text'] = __('Authentication');
|
||||
$sub2['godmode/setup/setup§ion=auth']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=perf']['text'] = __('Performance');
|
||||
$sub2['godmode/setup/setup§ion=perf']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=vis']['text'] = __('Visual styles');
|
||||
$sub2['godmode/setup/setup§ion=vis']['refr'] = 0;
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
// Netflow.
|
||||
if ((bool) $config['activate_netflow'] === true) {
|
||||
$sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow');
|
||||
$sub2['godmode/setup/setup§ion=net']['refr'] = 0;
|
||||
$sub['godmode/netflow/nf_edit']['text'] = __('Netflow filters');
|
||||
$sub['godmode/netflow/nf_edit']['id'] = 'Netflow filters';
|
||||
}
|
||||
}
|
||||
|
||||
$sub2['godmode/setup/setup§ion=ehorus']['text'] = __('eHorus');
|
||||
$sub2['godmode/setup/setup§ion=ehorus']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=integria']['text'] = __('Integria IMS');
|
||||
$sub2['godmode/setup/setup§ion=integria']['refr'] = 0;
|
||||
|
||||
enterprise_hook('module_library_submenu');
|
||||
|
||||
$sub2['godmode/setup/setup§ion=notifications']['text'] = __('Notifications');
|
||||
$sub2['godmode/setup/setup§ion=notifications']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=websocket_engine']['text'] = __('Websocket Engine');
|
||||
$sub2['godmode/setup/setup§ion=websocket_engine']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=external_tools']['text'] = __('External Tools');
|
||||
$sub2['godmode/setup/setup§ion=external_tools']['refr'] = 0;
|
||||
|
||||
if ((bool) $config['activate_gis'] === true) {
|
||||
$sub2['godmode/setup/setup§ion=gis']['text'] = __('Map conections GIS');
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gagente']['text'] = __('Resources');
|
||||
$menu_godmode['gagente']['sec2'] = 'godmode/agentes/modificar_agente';
|
||||
$menu_godmode['gagente']['id'] = 'god-resources';
|
||||
$menu_godmode['gagente']['sub'] = $sub;
|
||||
}
|
||||
|
||||
$sub['general']['sub2'] = $sub2;
|
||||
$sub['godmode/setup/os']['text'] = __('Edit OS');
|
||||
$sub['godmode/setup/os']['id'] = 'Edit OS';
|
||||
$sub['godmode/setup/license']['text'] = __('License');
|
||||
$sub['godmode/setup/license']['id'] = 'License';
|
||||
$sub = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['godmode/groups/group_list']['text'] = __('Manage agents groups');
|
||||
$sub['godmode/groups/group_list']['id'] = 'Manage agents groups';
|
||||
}
|
||||
|
||||
enterprise_hook('skins_submenu');
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Tag.
|
||||
$sub['godmode/tag/tag']['text'] = __('Module tags');
|
||||
$sub['godmode/tag/tag']['id'] = 'Module tags';
|
||||
$sub['godmode/tag/tag']['subsecs'] = 'godmode/tag/edit_tag';
|
||||
|
||||
$menu_godmode['gsetup']['sub'] = $sub;
|
||||
enterprise_hook('enterprise_acl_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub['godmode/users/user_list']['text'] = __('Users management');
|
||||
$sub['godmode/users/user_list']['id'] = 'Users management';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['godmode/users/profile_list']['text'] = __('Profile management');
|
||||
$sub['godmode/users/profile_list']['id'] = 'Profile management';
|
||||
}
|
||||
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gusuarios']['sub'] = $sub;
|
||||
$menu_godmode['gusuarios']['text'] = __('Profiles');
|
||||
$menu_godmode['gusuarios']['sec2'] = 'godmode/users/user_list';
|
||||
$menu_godmode['gusuarios']['id'] = 'god-users';
|
||||
}
|
||||
|
||||
$sub = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub['templates']['text'] = __('Templates');
|
||||
$sub['templates']['id'] = 'Templates';
|
||||
$sub['templates']['type'] = 'direct';
|
||||
$sub['templates']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
$sub2['godmode/modules/manage_module_templates']['text'] = __('Module templates');
|
||||
$sub2['godmode/modules/manage_module_templates']['id'] = 'Module templates';
|
||||
$sub2['godmode/modules/private_enterprise_numbers']['text'] = __('Private Enterprise Numbers');
|
||||
$sub2['godmode/modules/private_enterprise_numbers']['id'] = 'Private Enterprise Numbers';
|
||||
$sub2['enterprise/godmode/modules/local_components']['text'] = __('Local components');
|
||||
$sub2['enterprise/godmode/modules/local_components']['id'] = 'Local components';
|
||||
$sub2['godmode/modules/manage_network_components']['text'] = __('Remote components');
|
||||
$sub2['godmode/modules/manage_network_components']['id'] = 'Network components';
|
||||
$sub['templates']['sub2'] = $sub2;
|
||||
|
||||
enterprise_hook('inventory_submenu');
|
||||
enterprise_hook('autoconfiguration_menu');
|
||||
enterprise_hook('agent_repository_menu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
enterprise_hook('policies_menu');
|
||||
enterprise_hook('agents_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'NW') === true) {
|
||||
enterprise_hook('agents_ncm_submenu');
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub['gmassive']['text'] = __('Bulk operations');
|
||||
$sub['gmassive']['id'] = 'Bulk operations';
|
||||
$sub['gmassive']['type'] = 'direct';
|
||||
$sub['gmassive']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_agents']['text'] = __('Agents operations');
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_modules']['text'] = __('Modules operations');
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_plugins']['text'] = __('Plugins operations');
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_users']['text'] = __('Users operations');
|
||||
}
|
||||
|
||||
$sub2['godmode/massive/massive_operations&tab=massive_alerts']['text'] = __('Alerts operations');
|
||||
enterprise_hook('massivepolicies_submenu');
|
||||
enterprise_hook('massivesnmp_submenu');
|
||||
enterprise_hook('massivesatellite_submenu');
|
||||
enterprise_hook('massiveservices_submenu');
|
||||
|
||||
$sub['gmassive']['sub2'] = $sub2;
|
||||
$sub2 = [];
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'UM') === true) {
|
||||
$sub['godmode/groups/group_list&tab=credbox']['text'] = __('Credential store');
|
||||
$sub['godmode/groups/group_list&tab=credbox']['id'] = 'credential store';
|
||||
}
|
||||
|
||||
// Manage events.
|
||||
$sub2 = [];
|
||||
if ((bool) check_acl($config['id_user'], 0, 'EW') === true || (bool) check_acl($config['id_user'], 0, 'EM') === true) {
|
||||
// Custom event fields.
|
||||
$sub2['godmode/events/events§ion=filter']['text'] = __('Event filters');
|
||||
$sub2['godmode/events/events§ion=filter']['id'] = 'Event filters';
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
$sub2['godmode/events/events§ion=fields']['text'] = __('Custom columns');
|
||||
$sub2['godmode/events/events§ion=fields']['id'] = 'Custom events';
|
||||
$sub2['godmode/events/events§ion=responses']['text'] = __('Event responses');
|
||||
$sub2['godmode/events/events§ion=responses']['id'] = 'Event responses';
|
||||
}
|
||||
|
||||
if (empty($sub2) === false) {
|
||||
$sub['geventos']['text'] = __('Events');
|
||||
$sub['geventos']['id'] = 'events';
|
||||
$sub['geventos']['sec2'] = 'godmode/events/events§ion=filter';
|
||||
$sub['geventos']['type'] = 'direct';
|
||||
$sub['geventos']['subtype'] = 'nolink';
|
||||
$sub['geventos']['sub2'] = $sub2;
|
||||
}
|
||||
|
||||
if (empty($sub) === false) {
|
||||
$menu_godmode['gmodules']['text'] = __('Configuration');
|
||||
$menu_godmode['gmodules']['sec2'] = 'godmode/modules/manage_network_templates';
|
||||
$menu_godmode['gmodules']['id'] = 'god-configuration';
|
||||
$menu_godmode['gmodules']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'LW') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'LM') === true
|
||||
|| (bool) check_acl($config['id_user'], 0, 'AD') === true
|
||||
) {
|
||||
$menu_godmode['galertas']['text'] = __('Alerts');
|
||||
$menu_godmode['galertas']['sec2'] = 'godmode/alerts/alert_list';
|
||||
$menu_godmode['galertas']['id'] = 'god-alerts';
|
||||
|
||||
$sub = [];
|
||||
$sub['godmode/alerts/alert_list']['text'] = __('List of Alerts');
|
||||
$sub['godmode/alerts/alert_list']['id'] = 'List of Alerts';
|
||||
$sub['godmode/alerts/alert_list']['pages'] = ['godmode/alerts/alert_view'];
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
|
||||
$sub['godmode/alerts/alert_templates']['text'] = __('Templates');
|
||||
$sub['godmode/alerts/alert_templates']['id'] = 'Templates';
|
||||
$sub['godmode/alerts/alert_templates']['pages'] = ['godmode/alerts/configure_alert_template'];
|
||||
|
||||
$sub['godmode/alerts/alert_actions']['text'] = __('Actions');
|
||||
$sub['godmode/alerts/alert_actions']['id'] = 'Actions';
|
||||
$sub['godmode/alerts/alert_actions']['pages'] = ['godmode/alerts/configure_alert_action'];
|
||||
$sub['godmode/alerts/alert_commands']['text'] = __('Commands');
|
||||
$sub['godmode/alerts/alert_commands']['id'] = 'Commands';
|
||||
$sub['godmode/alerts/alert_commands']['pages'] = ['godmode/alerts/configure_alert_command'];
|
||||
$sub['godmode/alerts/alert_special_days']['text'] = __('Special days list');
|
||||
$sub['godmode/alerts/alert_special_days']['id'] = __('Special days list');
|
||||
$sub['godmode/alerts/alert_special_days']['pages'] = ['godmode/alerts/configure_alert_special_days'];
|
||||
|
||||
enterprise_hook('eventalerts_submenu');
|
||||
$sub['godmode/snmpconsole/snmp_alert']['text'] = __('SNMP alerts');
|
||||
$sub['godmode/snmpconsole/snmp_alert']['id'] = 'SNMP alerts';
|
||||
enterprise_hook('alert_inventory_submenu');
|
||||
}
|
||||
|
||||
$menu_godmode['galertas']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Servers.
|
||||
$menu_godmode['gservers']['text'] = __('Servers');
|
||||
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
|
||||
$menu_godmode['gservers']['id'] = 'god-servers';
|
||||
|
||||
$sub = [];
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
$sub['godmode/servers/modificar_server']['text'] = __('Manage servers');
|
||||
$sub['godmode/servers/modificar_server']['id'] = 'Manage servers';
|
||||
}
|
||||
|
||||
// This subtabs are only for Pandora Admin.
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
enterprise_hook('ha_cluster');
|
||||
|
||||
$sub['godmode/servers/plugin']['text'] = __('Plugins');
|
||||
$sub['godmode/servers/plugin']['id'] = 'Plugins';
|
||||
|
||||
$sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin');
|
||||
$sub['godmode/servers/plugin_registration']['id'] = 'register_plugin';
|
||||
|
||||
enterprise_hook('export_target_submenu');
|
||||
|
||||
enterprise_hook('manage_satellite_submenu');
|
||||
}
|
||||
|
||||
$menu_godmode['gservers']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Setup.
|
||||
$menu_godmode['gsetup']['text'] = __('Setup');
|
||||
$menu_godmode['gsetup']['sec2'] = 'general';
|
||||
$menu_godmode['gsetup']['id'] = 'god-setup';
|
||||
|
||||
$sub = [];
|
||||
|
||||
// Options Setup.
|
||||
$sub['general']['text'] = __('Setup');
|
||||
$sub['general']['id'] = 'Setup';
|
||||
$sub['general']['type'] = 'direct';
|
||||
$sub['general']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
|
||||
$sub2['godmode/setup/setup§ion=general']['text'] = __('General Setup');
|
||||
$sub2['godmode/setup/setup§ion=general']['id'] = 'General Setup';
|
||||
$sub2['godmode/setup/setup§ion=general']['refr'] = 0;
|
||||
|
||||
enterprise_hook('password_submenu');
|
||||
enterprise_hook('enterprise_submenu');
|
||||
enterprise_hook('historydb_submenu');
|
||||
enterprise_hook('log_collector_submenu');
|
||||
|
||||
$sub2['godmode/setup/setup§ion=auth']['text'] = __('Authentication');
|
||||
$sub2['godmode/setup/setup§ion=auth']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=perf']['text'] = __('Performance');
|
||||
$sub2['godmode/setup/setup§ion=perf']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=vis']['text'] = __('Visual styles');
|
||||
$sub2['godmode/setup/setup§ion=vis']['refr'] = 0;
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||
if ((bool) $config['activate_netflow'] === true) {
|
||||
$sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow');
|
||||
$sub2['godmode/setup/setup§ion=net']['refr'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sub2['godmode/setup/setup§ion=ehorus']['text'] = __('eHorus');
|
||||
$sub2['godmode/setup/setup§ion=ehorus']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=integria']['text'] = __('Integria IMS');
|
||||
$sub2['godmode/setup/setup§ion=integria']['refr'] = 0;
|
||||
|
||||
enterprise_hook('module_library_submenu');
|
||||
|
||||
$sub2['godmode/setup/setup§ion=notifications']['text'] = __('Notifications');
|
||||
$sub2['godmode/setup/setup§ion=notifications']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=websocket_engine']['text'] = __('Websocket Engine');
|
||||
$sub2['godmode/setup/setup§ion=websocket_engine']['refr'] = 0;
|
||||
|
||||
$sub2['godmode/setup/setup§ion=external_tools']['text'] = __('External Tools');
|
||||
$sub2['godmode/setup/setup§ion=external_tools']['refr'] = 0;
|
||||
|
||||
if ((bool) $config['activate_gis'] === true) {
|
||||
$sub2['godmode/setup/setup§ion=gis']['text'] = __('Map conections GIS');
|
||||
}
|
||||
|
||||
$sub['general']['sub2'] = $sub2;
|
||||
$sub['godmode/setup/os']['text'] = __('Edit OS');
|
||||
$sub['godmode/setup/os']['id'] = 'Edit OS';
|
||||
$sub['godmode/setup/license']['text'] = __('License');
|
||||
$sub['godmode/setup/license']['id'] = 'License';
|
||||
|
||||
enterprise_hook('skins_submenu');
|
||||
|
||||
$menu_godmode['gsetup']['sub'] = $sub;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($config['id_user'], 0, 'DM') === true) {
|
||||
$menu_godmode['gextensions']['text'] = __('Admin tools');
|
||||
$menu_godmode['gextensions']['sec2'] = 'godmode/extensions';
|
||||
|
@ -392,142 +400,148 @@ if ((bool) check_acl($config['id_user'], 0, 'PM') === true || (bool) check_acl($
|
|||
$sub = [];
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub['godmode/audit_log']['text'] = __('System audit log');
|
||||
$sub['godmode/audit_log']['id'] = 'System audit log';
|
||||
$sub['godmode/setup/links']['text'] = __('Links');
|
||||
$sub['godmode/setup/links']['id'] = 'Links';
|
||||
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
|
||||
$sub['tools/diagnostics']['id'] = 'Diagnostic info';
|
||||
enterprise_hook('omnishell');
|
||||
enterprise_hook('ipam_submenu');
|
||||
if ($access_console_node === true) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub['godmode/audit_log']['text'] = __('System audit log');
|
||||
$sub['godmode/audit_log']['id'] = 'System audit log';
|
||||
$sub['godmode/setup/links']['text'] = __('Links');
|
||||
$sub['godmode/setup/links']['id'] = 'Links';
|
||||
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
|
||||
$sub['tools/diagnostics']['id'] = 'Diagnostic info';
|
||||
enterprise_hook('omnishell');
|
||||
enterprise_hook('ipam_submenu');
|
||||
|
||||
$sub['godmode/setup/news']['text'] = __('Site news');
|
||||
$sub['godmode/setup/news']['id'] = 'Site news';
|
||||
}
|
||||
|
||||
$sub['godmode/setup/news']['text'] = __('Site news');
|
||||
$sub['godmode/setup/news']['id'] = 'Site news';
|
||||
$sub['godmode/setup/file_manager']['text'] = __('File manager');
|
||||
$sub['godmode/setup/file_manager']['id'] = 'File manager';
|
||||
|
||||
if (is_user_admin($config['id_user']) === true) {
|
||||
$sub['extensions/db_status']['text'] = __('DB Schema Check');
|
||||
$sub['extensions/db_status']['id'] = 'DB Schema Check';
|
||||
$sub['extensions/db_status']['sec'] = 'gbman';
|
||||
$sub['extensions/dbmanager']['text'] = __('DB Interface');
|
||||
$sub['extensions/dbmanager']['id'] = 'DB Interface';
|
||||
$sub['extensions/dbmanager']['sec'] = 'gbman';
|
||||
enterprise_hook('dbBackupManager');
|
||||
enterprise_hook('elasticsearch_interface_menu');
|
||||
if ($access_console_node === true) {
|
||||
if (is_user_admin($config['id_user']) === true) {
|
||||
$sub['extensions/db_status']['text'] = __('DB Schema Check');
|
||||
$sub['extensions/db_status']['id'] = 'DB Schema Check';
|
||||
$sub['extensions/db_status']['sec'] = 'gbman';
|
||||
$sub['extensions/dbmanager']['text'] = __('DB Interface');
|
||||
$sub['extensions/dbmanager']['id'] = 'DB Interface';
|
||||
$sub['extensions/dbmanager']['sec'] = 'gbman';
|
||||
enterprise_hook('dbBackupManager');
|
||||
enterprise_hook('elasticsearch_interface_menu');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$menu_godmode['gextensions']['sub'] = $sub;
|
||||
}
|
||||
|
||||
if (is_array($config['extensions']) === true) {
|
||||
$sub = [];
|
||||
$sub2 = [];
|
||||
if ($access_console_node === true) {
|
||||
if (is_array($config['extensions']) === true) {
|
||||
$sub = [];
|
||||
$sub2 = [];
|
||||
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
// If no godmode_menu is a operation extension.
|
||||
if (empty($extension['godmode_menu']) === true) {
|
||||
continue;
|
||||
}
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
// If no godmode_menu is a operation extension.
|
||||
if (empty($extension['godmode_menu']) === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($extension['godmode_menu']['name'] === 'System Info') {
|
||||
continue;
|
||||
}
|
||||
if ($extension['godmode_menu']['name'] === 'System Info') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($extension['godmode_menu']['name'] !== __('DB Schema check') && $extension['godmode_menu']['name'] !== __('DB interface')) {
|
||||
$extmenu = $extension['godmode_menu'];
|
||||
}
|
||||
if ($extension['godmode_menu']['name'] !== __('DB Schema check') && $extension['godmode_menu']['name'] !== __('DB interface')) {
|
||||
$extmenu = $extension['godmode_menu'];
|
||||
}
|
||||
|
||||
// Check the ACL for this user.
|
||||
if ((bool) check_acl($config['id_user'], 0, $extmenu['acl']) === false) {
|
||||
continue;
|
||||
}
|
||||
// Check the ACL for this user.
|
||||
if ((bool) check_acl($config['id_user'], 0, $extmenu['acl']) === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if was displayed inside other menu.
|
||||
if (empty($extension['godmode_menu']['fatherId']) === true) {
|
||||
$sub2[$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$sub2[$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$sub2[$extmenu['sec2']]['refr'] = 0;
|
||||
} else {
|
||||
if (is_array($extmenu) === true && array_key_exists('fatherId', $extmenu) === true) {
|
||||
if (strlen($extmenu['fatherId']) > 0) {
|
||||
if (array_key_exists('subfatherId', $extmenu) === true) {
|
||||
if (strlen($extmenu['subfatherId']) > 0) {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['sec'] = 'extensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['extension'] = true;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
||||
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
// Check if was displayed inside other menu.
|
||||
if (empty($extension['godmode_menu']['fatherId']) === true) {
|
||||
$sub2[$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$sub2[$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$sub2[$extmenu['sec2']]['refr'] = 0;
|
||||
} else {
|
||||
if (is_array($extmenu) === true && array_key_exists('fatherId', $extmenu) === true) {
|
||||
if (strlen($extmenu['fatherId']) > 0) {
|
||||
if (array_key_exists('subfatherId', $extmenu) === true) {
|
||||
if (strlen($extmenu['subfatherId']) > 0) {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['sec'] = 'extensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['extension'] = true;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
||||
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
} else {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
||||
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
}
|
||||
} else {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = $extmenu['fatherId'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'gextensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
||||
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
}
|
||||
} else {
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['text'] = __($extmenu['name']);
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['id'] = $extmenu['name'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['refr'] = 0;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['icon'] = $extmenu['icon'];
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['sec'] = 'gextensions';
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['extension'] = true;
|
||||
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]['enterprise'] = $extension['enterprise'];
|
||||
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Complete the submenu.
|
||||
$extension_view = [];
|
||||
$extension_view['godmode/extensions']['id'] = 'Extension manager view';
|
||||
$extension_view['godmode/extensions']['text'] = __('Extension manager view');
|
||||
$extension_submenu = array_merge($extension_view, $sub2);
|
||||
// Complete the submenu.
|
||||
$extension_view = [];
|
||||
$extension_view['godmode/extensions']['id'] = 'Extension manager view';
|
||||
$extension_view['godmode/extensions']['text'] = __('Extension manager view');
|
||||
$extension_submenu = array_merge($extension_view, $sub2);
|
||||
|
||||
$sub['godmode/extensions']['sub2'] = $extension_submenu;
|
||||
$sub['godmode/extensions']['text'] = __('Extension manager');
|
||||
$sub['godmode/extensions']['id'] = 'Extension manager';
|
||||
$sub['godmode/extensions']['type'] = 'direct';
|
||||
$sub['godmode/extensions']['subtype'] = 'nolink';
|
||||
$sub['godmode/extensions']['sub2'] = $extension_submenu;
|
||||
$sub['godmode/extensions']['text'] = __('Extension manager');
|
||||
$sub['godmode/extensions']['id'] = 'Extension manager';
|
||||
$sub['godmode/extensions']['type'] = 'direct';
|
||||
$sub['godmode/extensions']['subtype'] = 'nolink';
|
||||
|
||||
if (is_array($menu_godmode['gextensions']['sub']) === true) {
|
||||
$submenu = array_merge($menu_godmode['gextensions']['sub'], $sub);
|
||||
if ($menu_godmode['gextensions']['sub'] != null) {
|
||||
$menu_godmode['gextensions']['sub'] = $submenu;
|
||||
if (is_array($menu_godmode['gextensions']['sub']) === true) {
|
||||
$submenu = array_merge($menu_godmode['gextensions']['sub'], $sub);
|
||||
if ($menu_godmode['gextensions']['sub'] != null) {
|
||||
$menu_godmode['gextensions']['sub'] = $submenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$menu_godmode['links']['text'] = __('Links');
|
||||
$menu_godmode['links']['sec2'] = '';
|
||||
$menu_godmode['links']['id'] = 'god-links';
|
||||
|
||||
$sub = [];
|
||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||
foreach ($rows as $row) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub[$row['link']]['text'] = $row['name'];
|
||||
$sub[$row['link']]['id'] = $row['name'];
|
||||
$sub[$row['link']]['type'] = 'direct';
|
||||
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||
}
|
||||
|
||||
$menu_godmode['links']['sub'] = $sub;
|
||||
}
|
||||
|
||||
$menu_godmode['links']['text'] = __('Links');
|
||||
$menu_godmode['links']['sec2'] = '';
|
||||
$menu_godmode['links']['id'] = 'god-links';
|
||||
|
||||
$sub = [];
|
||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||
foreach ($rows as $row) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub[$row['link']]['text'] = $row['name'];
|
||||
$sub[$row['link']]['id'] = $row['name'];
|
||||
$sub[$row['link']]['type'] = 'direct';
|
||||
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||
}
|
||||
|
||||
$menu_godmode['links']['sub'] = $sub;
|
||||
|
||||
// Warp Manager.
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['enable_update_manager'] === true) {
|
||||
$menu_godmode['messages']['text'] = __('Warp Update');
|
||||
;
|
||||
$menu_godmode['messages']['id'] = 'god-um_messages';
|
||||
$menu_godmode['messages']['sec2'] = '';
|
||||
|
||||
|
@ -547,19 +561,21 @@ if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['en
|
|||
$menu_godmode['messages']['sub'] = $sub;
|
||||
}
|
||||
|
||||
// Module library.
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === true) {
|
||||
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
||||
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
||||
if ($access_console_node === true) {
|
||||
// Module library.
|
||||
if ((bool) check_acl($config['id_user'], 0, 'AR') === true) {
|
||||
$menu_godmode['gmodule_library']['text'] = __('Module library');
|
||||
$menu_godmode['gmodule_library']['id'] = 'god-module_library';
|
||||
|
||||
$sub = [];
|
||||
$sub['godmode/module_library/module_library_view']['text'] = __('View');
|
||||
$sub['godmode/module_library/module_library_view']['id'] = 'View';
|
||||
$sub = [];
|
||||
$sub['godmode/module_library/module_library_view']['text'] = __('View');
|
||||
$sub['godmode/module_library/module_library_view']['id'] = 'View';
|
||||
|
||||
$sub['godmode/module_library/module_library_view&tab=categories']['text'] = __('Categories');
|
||||
$sub['godmode/module_library/module_library_view&tab=categories']['id'] = 'categories';
|
||||
$sub['godmode/module_library/module_library_view&tab=categories']['text'] = __('Categories');
|
||||
$sub['godmode/module_library/module_library_view&tab=categories']['id'] = 'categories';
|
||||
|
||||
$menu_godmode['gmodule_library']['sub'] = $sub;
|
||||
$menu_godmode['gmodule_library']['sub'] = $sub;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bool) $config['pure'] === false) {
|
||||
|
|
|
@ -158,6 +158,12 @@ if ($classname_selected === null) {
|
|||
// Load classes and print selector.
|
||||
$wiz_data = [];
|
||||
foreach ($classes as $classpath) {
|
||||
if (is_reporting_console_node() === true) {
|
||||
if ($classpath !== '/var/www/html/pandora_console/godmode/wizards/DiscoveryTaskList.class.php') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$classname = basename($classpath, '.class.php');
|
||||
$obj = new $classname();
|
||||
|
||||
|
|
|
@ -122,26 +122,44 @@ if (isset($_GET['server'])) {
|
|||
|
||||
$buttons = '';
|
||||
|
||||
if ($server_type !== 13) {
|
||||
// Buttons.
|
||||
$buttons = [
|
||||
'standard_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
|
||||
],
|
||||
'advanced_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
|
||||
],
|
||||
];
|
||||
// Buttons.
|
||||
$buttons = [
|
||||
'standard_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
|
||||
],
|
||||
'advanced_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
|
||||
],
|
||||
];
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
if ($server_type === SERVER_TYPE_ENTERPRISE_SATELLITE) {
|
||||
$buttons['agent_editor'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=agent_editor&pure='.$pure.'">'.html_print_image('images/agent.png', true, ['title' => __('Advanced editor')]).'</a>',
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
ui_print_page_header(__('Remote Configuration'), 'images/gm_servers.png', false, 'servers', true, $buttons);
|
||||
|
||||
if ($server_type !== 13 && $tab == 'standard_editor') {
|
||||
if ($tab === 'standard_editor') {
|
||||
$advanced_editor = false;
|
||||
|
||||
if ($server_type === 13) {
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox filters font_bold margin-bottom-10' width='100%'>
|
||||
<tr>";
|
||||
echo '<td class="w100p">';
|
||||
echo __('Dynamic search').' ';
|
||||
html_print_input_text('search_config_token', $search, '', 12);
|
||||
echo '</td>';
|
||||
echo '</tr></table>';
|
||||
}
|
||||
} else if ($tab === 'agent_editor' && $server_type === SERVER_TYPE_ENTERPRISE_SATELLITE) {
|
||||
$advanced_editor = 'agent_editor';
|
||||
}
|
||||
|
||||
enterprise_include('godmode/servers/server_disk_conf_editor.php');
|
||||
|
|
|
@ -497,6 +497,17 @@ $table->data[$i++][1] = html_print_checkbox_switch(
|
|||
true
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Enable console report').ui_print_help_tip(
|
||||
__('Enable console report'),
|
||||
true
|
||||
);
|
||||
$table->data[$i++][1] = html_print_checkbox_switch(
|
||||
'reporting_console_enable',
|
||||
1,
|
||||
$config['reporting_console_enable'],
|
||||
true
|
||||
);
|
||||
|
||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||
|
||||
echo '<fieldset>';
|
||||
|
|
|
@ -162,7 +162,9 @@ class DiscoveryTaskList extends HTML
|
|||
$ret = false;
|
||||
}
|
||||
|
||||
$ret2 = $this->showList();
|
||||
if (is_reporting_console_node() === false) {
|
||||
$ret2 = $this->showList();
|
||||
}
|
||||
|
||||
if ($ret === false && $ret2 === false) {
|
||||
include_once $config['homedir'].'/general/first_task/recon_view.php';
|
||||
|
|
|
@ -0,0 +1,768 @@
|
|||
<?php
|
||||
// phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||
/**
|
||||
* Controller for Audit Logs
|
||||
*
|
||||
* @category Controller
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2022 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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
use Mpdf\Tag\Address;
|
||||
use PandoraFMS\Agent as PandoraFMSAgent;
|
||||
use PandoraFMS\Enterprise\Agent;
|
||||
|
||||
use function Composer\Autoload\includeFile;
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
// Necessary classes for extends.
|
||||
require_once $config['homedir'].'/include/class/HTML.class.php';
|
||||
require_once $config['homedir'].'/include/functions_servers.php';
|
||||
enterprise_include_once('include/functions_satellite.php');
|
||||
|
||||
/**
|
||||
* Class SatelliteAgent
|
||||
*/
|
||||
class SatelliteAgent extends HTML
|
||||
{
|
||||
|
||||
/**
|
||||
* Allowed methods to be called using AJAX request.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $AJAXMethods = [
|
||||
'draw',
|
||||
'addAgent',
|
||||
'deleteAgent',
|
||||
'loadModal',
|
||||
];
|
||||
|
||||
/**
|
||||
* Ajax page.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $ajaxController;
|
||||
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param string $ajaxController Ajax controller.
|
||||
*/
|
||||
public function __construct(string $ajaxController)
|
||||
{
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'PM') === false
|
||||
&& is_user_admin($config['id_user']) === true
|
||||
) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Satellite agents'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the ajax controller.
|
||||
$this->ajaxController = $ajaxController;
|
||||
// Capture all parameters before start.
|
||||
$this->satellite_server = (int) get_parameter('server_remote');
|
||||
if ($this->satellite_server !== 0) {
|
||||
$this->satellite_name = servers_get_name($this->satellite_server);
|
||||
$this->satellite_config = (array) config_satellite_get_config_file($this->satellite_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run view
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Javascript.
|
||||
ui_require_jquery_file('pandora');
|
||||
// CSS.
|
||||
ui_require_css_file('wizard');
|
||||
ui_require_css_file('discovery');
|
||||
|
||||
global $config;
|
||||
// Datatables list.
|
||||
try {
|
||||
$columns = [
|
||||
'name',
|
||||
'address',
|
||||
'actions',
|
||||
];
|
||||
|
||||
$column_names = [
|
||||
__('Agent Name'),
|
||||
__('IP Adrress'),
|
||||
__('Actions'),
|
||||
];
|
||||
|
||||
$this->tableId = 'satellite_agents';
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
// Only in case of Metaconsole, format the frame.
|
||||
open_meta_frame();
|
||||
}
|
||||
|
||||
// Load datatables user interface.
|
||||
ui_print_datatable(
|
||||
[
|
||||
'id' => $this->tableId,
|
||||
'class' => 'info_table',
|
||||
'style' => 'width: 100%',
|
||||
'columns' => $columns,
|
||||
'column_names' => $column_names,
|
||||
'ajax_url' => $this->ajaxController,
|
||||
'ajax_data' => [
|
||||
'method' => 'draw',
|
||||
'server_remote' => $this->satellite_server,
|
||||
],
|
||||
'ajax_postprocces' => 'process_datatables_item(item)',
|
||||
'no_sortable_columns' => [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
],
|
||||
'search_button_class' => 'sub filter float-right',
|
||||
'form' => [
|
||||
'inputs' => [
|
||||
[
|
||||
'label' => __('Search').ui_print_help_tip(
|
||||
__('Search filter by alias, name, description, IP address or custom fields content'),
|
||||
true
|
||||
),
|
||||
'type' => 'text',
|
||||
'name' => 'filter_search',
|
||||
'size' => 12,
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
// Close the frame.
|
||||
close_meta_frame();
|
||||
}
|
||||
|
||||
// Auxiliar div.
|
||||
$modal = '<div id="modal" class="invisible"></div>';
|
||||
$msg = '<div id="msg" class="invisible"></div>';
|
||||
$aux = '<div id="aux" class="invisible"></div>';
|
||||
|
||||
echo $modal.$msg.$aux;
|
||||
|
||||
// Create button.
|
||||
echo '<div class="w100p flex-content-right">';
|
||||
html_print_submit_button(
|
||||
__('Add host'),
|
||||
'create',
|
||||
false,
|
||||
'class="sub next"'
|
||||
);
|
||||
|
||||
echo '</div>';
|
||||
// Load own javascript file.
|
||||
echo $this->loadJS();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the data for draw the table.
|
||||
*
|
||||
* @return void.
|
||||
*/
|
||||
public function draw()
|
||||
{
|
||||
global $config;
|
||||
// Initialice filter.
|
||||
$filter = '1=1';
|
||||
// Init data.
|
||||
$data = [];
|
||||
// Count of total records.
|
||||
$count = 0;
|
||||
// Catch post parameters.
|
||||
$start = get_parameter('start', 0);
|
||||
$length = get_parameter('length', $config['block_size']);
|
||||
$order = get_datatable_order(true);
|
||||
$filters = get_parameter('filter', []);
|
||||
|
||||
try {
|
||||
ob_start();
|
||||
$data = [];
|
||||
|
||||
foreach ($this->satellite_config as $line) {
|
||||
$re = '/^#*add_host \b(\S+) (\S*)$/m';
|
||||
|
||||
if (preg_match($re, $line, $matches, PREG_OFFSET_CAPTURE, 0) > 0) {
|
||||
$agent['address'] = $matches[1][0];
|
||||
if (isset($matches[2][0]) === false || empty($matches[2][0]) === true) {
|
||||
$agent['name'] = '';
|
||||
} else {
|
||||
$agent['name'] = $matches[2][0];
|
||||
}
|
||||
|
||||
if (empty($filters['filter_search']) === false) {
|
||||
if (empty(preg_grep('/'.$filters['filter_search'].'?/mi', array_values($agent))) === true) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
array_push($data, $agent);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($data) === false) {
|
||||
$data = array_reduce(
|
||||
$data,
|
||||
function ($carry, $item) {
|
||||
global $config;
|
||||
// Transforms array of arrays $data into an array
|
||||
// of objects, making a post-process of certain fields.
|
||||
$tmp = (object) $item;
|
||||
|
||||
$tmp->actions .= html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'class' => 'action_button_img invert_filter',
|
||||
'onclick' => 'delete_agent(\''.$tmp->address.'\',\''.$tmp->name.'\')',
|
||||
]
|
||||
);
|
||||
|
||||
$carry[] = $tmp;
|
||||
return $carry;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$data = array_slice($data, $start, $length, true);
|
||||
$total = count($data);
|
||||
|
||||
echo json_encode(
|
||||
[
|
||||
'data' => $data,
|
||||
'recordsTotal' => $total,
|
||||
'recordsFiltered' => $total,
|
||||
]
|
||||
);
|
||||
// Capture output.
|
||||
$response = ob_get_clean();
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['error' => $e->getMessage()]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// If not valid, show error with issue.
|
||||
json_decode($response);
|
||||
if (json_last_error() == JSON_ERROR_NONE) {
|
||||
// If valid dump.
|
||||
echo $response;
|
||||
} else {
|
||||
echo json_encode(
|
||||
['error' => $response]
|
||||
);
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints inputs for modal "Add agent".
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadModal()
|
||||
{
|
||||
$values['address'] = get_parameter('address', null);
|
||||
$values['name'] = get_parameter('name', null);
|
||||
|
||||
echo $this->printInputs($values);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates inputs for new/update agents.
|
||||
*
|
||||
* @param array $values Values or null.
|
||||
*
|
||||
* @return string Inputs.
|
||||
*/
|
||||
public function printInputs($values=null)
|
||||
{
|
||||
if (!is_array($values)) {
|
||||
$values = [];
|
||||
}
|
||||
|
||||
$return_all_group = false;
|
||||
|
||||
if (users_can_manage_group_all('AR') === true) {
|
||||
$return_all_group = true;
|
||||
}
|
||||
|
||||
$form = [
|
||||
'action' => '#',
|
||||
'id' => 'modal_form',
|
||||
'onsubmit' => 'return false;',
|
||||
'class' => 'modal',
|
||||
];
|
||||
|
||||
$inputs = [];
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Agent address'),
|
||||
'id' => 'div-identifier',
|
||||
'arguments' => [
|
||||
'name' => 'address',
|
||||
'type' => 'text',
|
||||
'value' => $values['address'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Agent name'),
|
||||
'id' => 'div-identifier',
|
||||
'arguments' => [
|
||||
'name' => 'name',
|
||||
'type' => 'text',
|
||||
'value' => $values['name'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
return $this->printForm(
|
||||
[
|
||||
'form' => $form,
|
||||
'inputs' => $inputs,
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add agent to satellite conf.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addAgent()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$values['address'] = get_parameter('address');
|
||||
$values['name'] = get_parameter('name');
|
||||
|
||||
if ($this->parseSatelliteConf('save', $values) === false) {
|
||||
$this->ajaxMsg('error', __('Error saving agent'));
|
||||
} else {
|
||||
$this->ajaxMsg('result', _('Host '.$values['addres'].' added.'));
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete agent from satellite conf.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleteAgent()
|
||||
{
|
||||
$values['address'] = get_parameter('address', '');
|
||||
$values['name'] = get_parameter('name', '');
|
||||
|
||||
if ($this->parseSatelliteConf('delete', $values) === false) {
|
||||
$this->ajaxMsg('error', __('Error saving agent'));
|
||||
} else {
|
||||
$this->ajaxMsg('result', _('Host '.$values['addres'].' added.'));
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse satellite configuration .
|
||||
*
|
||||
* @param string $action Action to perform (save, delete).
|
||||
* @param array $values.
|
||||
* @return void
|
||||
*/
|
||||
private function parseSatelliteConf(string $action, array $values)
|
||||
{
|
||||
switch ($action) {
|
||||
case 'save':
|
||||
if (isset($values['address']) === true && empty($values['address']) === false) {
|
||||
$string_hosts = 'add_host '.$values['address'].' '.$values['name']."\n";
|
||||
|
||||
// Add host to conf
|
||||
array_push($this->satellite_config, $string_hosts);
|
||||
|
||||
// Check config.
|
||||
if (empty($this->satellite_config)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$conf = implode('', $this->satellite_config);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$conf = implode('', $this->satellite_config);
|
||||
// Find agent to mark for deletion.
|
||||
$pattern = io_safe_expreg($values['address'].' '.$values['name']);
|
||||
$re = "/add_host ($pattern)/m";
|
||||
$subst = 'delete_host $1';
|
||||
$conf = preg_replace($re, $subst, $conf);
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ajaxMsg('error', __('Error'));
|
||||
exit;
|
||||
}
|
||||
|
||||
return $this->saveAgent($conf);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves agent to satellite cofiguration file.
|
||||
*
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
private function saveAgent(string $new_conf)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (empty($new_conf)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_SYSTEM,
|
||||
'Update remote config for server '.$this->satellite_name
|
||||
);
|
||||
|
||||
// Convert to config file encoding.
|
||||
$encoding = config_satellite_get_encoding($new_conf);
|
||||
if ($encoding !== false) {
|
||||
$converted_server_config = mb_convert_encoding($new_conf, $encoding, 'UTF-8');
|
||||
if ($converted_server_config !== false) {
|
||||
$new_conf = $converted_server_config;
|
||||
}
|
||||
}
|
||||
|
||||
// Get filenames.
|
||||
if ($this->satellite_server !== false) {
|
||||
$files = config_satellite_get_satellite_config_filenames($this->satellite_name);
|
||||
} else {
|
||||
$files = [];
|
||||
$files['conf'] = $config['remote_config'].'/conf/'.md5($this->satellite_name).'.srv.conf';
|
||||
$files['md5'] = $config['remote_config'].'/md5/'.md5($this->satellite_name).'.srv.md5';
|
||||
}
|
||||
|
||||
// Save configuration
|
||||
$result = file_put_contents($files['conf'], $new_conf);
|
||||
|
||||
if ($result === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Save configuration md5
|
||||
$result = file_put_contents($files['md5'], md5($new_conf));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if target method is available to be called using AJAX.
|
||||
*
|
||||
* @param string $method Target method.
|
||||
*
|
||||
* @return boolean True allowed, false not.
|
||||
*/
|
||||
public function ajaxMethod(string $method)
|
||||
{
|
||||
return in_array($method, $this->AJAXMethods);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Minor function to dump json message as ajax response.
|
||||
*
|
||||
* @param string $type Type: result || error.
|
||||
* @param string $msg Message.
|
||||
* @param boolean $delete Deletion messages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function ajaxMsg($type, $msg, $delete=false)
|
||||
{
|
||||
$msg_err = 'Failed while saving: %s';
|
||||
$msg_ok = 'Successfully saved agent ';
|
||||
|
||||
if ($delete) {
|
||||
$msg_err = 'Failed while removing: %s';
|
||||
$msg_ok = 'Successfully deleted ';
|
||||
}
|
||||
|
||||
if ($type == 'error') {
|
||||
echo json_encode(
|
||||
[
|
||||
$type => ui_print_error_message(
|
||||
__(
|
||||
$msg_err,
|
||||
$msg
|
||||
),
|
||||
'',
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
echo json_encode(
|
||||
[
|
||||
$type => ui_print_success_message(
|
||||
__(
|
||||
$msg_ok,
|
||||
$msg
|
||||
),
|
||||
'',
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load Javascript code.
|
||||
*
|
||||
* @return string.
|
||||
*/
|
||||
public function loadJS()
|
||||
{
|
||||
// Nothing for this moment.
|
||||
ob_start();
|
||||
|
||||
// Javascript content.
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
/**
|
||||
* Cleanup current dom entries.
|
||||
*/
|
||||
function cleanupDOM() {
|
||||
$('#div-address').empty();
|
||||
$('#div-name').empty();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Process ajax responses and shows a dialog with results.
|
||||
*/
|
||||
function showMsg(data) {
|
||||
var title = "<?php echo __('Success'); ?>";
|
||||
var dt_satellite_agents = $("#satellite_agents").DataTable();
|
||||
|
||||
var text = '';
|
||||
var failed = 0;
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
text = data['result'];
|
||||
} catch (err) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = err.message;
|
||||
failed = 1;
|
||||
}
|
||||
if (!failed && data['error'] != undefined) {
|
||||
title = "<?php echo __('Failed'); ?>";
|
||||
text = data['error'];
|
||||
failed = 1;
|
||||
}
|
||||
if (data['report'] != undefined) {
|
||||
data['report'].forEach(function (item){
|
||||
text += '<br>'+item;
|
||||
});
|
||||
}
|
||||
|
||||
$('#msg').empty();
|
||||
$('#msg').html(text);
|
||||
$('#msg').dialog({
|
||||
width: 450,
|
||||
position: {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
of: window,
|
||||
collision: 'fit'
|
||||
},
|
||||
title: title,
|
||||
buttons: [
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: 'OK',
|
||||
click: function(e) {
|
||||
if (!failed) {
|
||||
$(".ui-dialog-content").dialog("close");
|
||||
$('.info').hide();
|
||||
cleanupDOM();
|
||||
dt_<?php echo $this->tableId; ?>.draw(false);
|
||||
} else {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads modal from AJAX to add a new agent.
|
||||
*/
|
||||
|
||||
function show_form(address) {
|
||||
var btn_ok_text = '<?php echo __('OK'); ?>';
|
||||
var btn_cancel_text = '<?php echo __('Cancel'); ?>';
|
||||
var title = '<?php echo __('Add agent to satellite'); ?>';
|
||||
var method = 'addAgent';
|
||||
|
||||
|
||||
load_modal({
|
||||
target: $('#modal'),
|
||||
form: 'modal_form',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
ajax_callback: showMsg,
|
||||
cleanup: cleanupDOM,
|
||||
modal: {
|
||||
title: title,
|
||||
ok: btn_ok_text,
|
||||
cancel: btn_cancel_text,
|
||||
},
|
||||
extradata: [
|
||||
{
|
||||
name: 'server_remote',
|
||||
value: <?php echo $this->satellite_server; ?>,
|
||||
}
|
||||
],
|
||||
onshow: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: 'loadModal'
|
||||
},
|
||||
onsubmit: {
|
||||
page: '<?php echo $this->ajaxController; ?>',
|
||||
method: method
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete selected agent
|
||||
*/
|
||||
function delete_agent(address, name) {
|
||||
$('#aux').empty();
|
||||
$('#aux').text('<?php echo __('Are you sure?'); ?>');
|
||||
$('#aux').dialog({
|
||||
title: '<?php echo __('Delete'); ?> ' + address,
|
||||
buttons: [
|
||||
{
|
||||
class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel',
|
||||
text: '<?php echo __('Cancel'); ?>',
|
||||
click: function(e) {
|
||||
$(this).dialog('close');
|
||||
cleanupDOM();
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Delete',
|
||||
class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next',
|
||||
click: function(e) {
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
|
||||
data: {
|
||||
page: 'enterprise/godmode/servers/agents_satellite',
|
||||
method: 'deleteAgent',
|
||||
address: address,
|
||||
name: name,
|
||||
server_remote: <?php echo $this->satellite_server; ?>,
|
||||
},
|
||||
datatype: "json",
|
||||
success: function (data) {
|
||||
showMsg(data);
|
||||
},
|
||||
error: function(e) {
|
||||
showMsg(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#submit-create").on('click', function(){
|
||||
show_form();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<?php
|
||||
// EOF Javascript content.
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC220808';
|
||||
$build_version = 'PC220810';
|
||||
$pandora_version = 'v7.0NG.763';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -5996,6 +5996,26 @@ function send_test_email(
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check ip is valid into network
|
||||
*
|
||||
* @param string $ip Ip XXX.XXX.XXX.XXX.
|
||||
* @param string $cidr Network XXX.XXX.XXX.XXX/XX.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function cidr_match($ip, $cidr)
|
||||
{
|
||||
list($subnet, $mask) = explode('/', $cidr);
|
||||
|
||||
if ((ip2long($ip) & ~((1 << (32 - $mask)) - 1) ) == ip2long($subnet)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Microtime float number.
|
||||
*
|
||||
|
@ -6077,3 +6097,123 @@ if (function_exists('str_contains') === false) {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is reporting console node.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function is_reporting_console_node()
|
||||
{
|
||||
global $config;
|
||||
if (isset($config['reporting_console_enable']) === true
|
||||
&& (bool) $config['reporting_console_enable'] === true
|
||||
&& isset($config['reporting_console_node']) === true
|
||||
&& (bool) $config['reporting_console_node'] === true
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Acl reporting console node.
|
||||
*
|
||||
* @param string $path Path.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function acl_reporting_console_node($path, $tab='')
|
||||
{
|
||||
global $config;
|
||||
if (is_reporting_console_node() === false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
if ($path === 'advanced/metasetup') {
|
||||
switch ($tab) {
|
||||
case 'update_manager_online':
|
||||
case 'update_manager_offline':
|
||||
case 'update_manager_history':
|
||||
case 'update_manager_setup':
|
||||
case 'file_manager':
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($path === 'advanced/users_setup') {
|
||||
switch ($tab) {
|
||||
case 'user_edit':
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($path === $config['homedir'].'/godmode/users/configure_user'
|
||||
|| $path === 'advanced/links'
|
||||
|| $path === $config['homedir'].'/enterprise/extensions/cron'
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if ($path === 'godmode/servers/discovery') {
|
||||
switch ($tab) {
|
||||
case 'main':
|
||||
case 'tasklist':
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($path === 'operation/users/user_edit'
|
||||
|| $path === 'operation/users/user_edit_notifications'
|
||||
|| $path === 'godmode/setup/file_manager'
|
||||
|| $path === 'godmode/update_manager/update_manager'
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Necessary checks for the reporting console.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function notify_reporting_console_node()
|
||||
{
|
||||
$return = '';
|
||||
|
||||
// Check php memory limit.
|
||||
$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit'));
|
||||
if ($PHPmemory_limit !== -1) {
|
||||
$url = 'http://php.net/manual/en/ini.core.php#ini.memory-limit';
|
||||
if ($config['language'] == 'es') {
|
||||
$url = 'http://php.net/manual/es/ini.core.php#ini.memory-limit';
|
||||
}
|
||||
|
||||
$msg = __("Not recommended '%s' value in PHP configuration", $PHPmemory_limit);
|
||||
$msg .= '<br>'.__('Recommended value is: -1');
|
||||
$msg .= '<br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator');
|
||||
$msg .= '<br><a href="'.$url.'" target="_blank">'.__('Documentation').'</a>';
|
||||
|
||||
$return = ui_print_error_message($msg, '', true);
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -358,6 +358,10 @@ function config_update_config()
|
|||
$error_update[] = __('Module Custom ID read only');
|
||||
}
|
||||
|
||||
if (config_update_value('reporting_console_enable', get_parameter('reporting_console_enable'), true) === false) {
|
||||
$error_update[] = __('Enable console report');
|
||||
}
|
||||
|
||||
if (config_update_value('unique_ip', get_parameter('unique_ip'), true) === false) {
|
||||
$error_update[] = __('Unique IP');
|
||||
}
|
||||
|
@ -2193,6 +2197,10 @@ function config_process_config()
|
|||
config_update_value('module_custom_id_ro', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['reporting_console_enable'])) {
|
||||
config_update_value('reporting_console_enable', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['elasticsearch_ip'])) {
|
||||
config_update_value('elasticsearch_ip', '');
|
||||
}
|
||||
|
|
|
@ -422,11 +422,37 @@ function cron_list_table()
|
|||
array_keys(users_get_groups())
|
||||
);
|
||||
|
||||
$defined_tasks = db_get_all_rows_filter(
|
||||
'tuser_task_scheduled',
|
||||
'id_grupo IN ('.$user_groups.')'
|
||||
$filter = '';
|
||||
if (is_reporting_console_node() === true) {
|
||||
$write_perms = false;
|
||||
$manage_perms = false;
|
||||
$manage_pandora = false;
|
||||
|
||||
$filter .= sprintf(
|
||||
' AND (
|
||||
tuser_task.function_name = "cron_task_generate_report"
|
||||
OR tuser_task.function_name = "cron_task_generate_report_by_template"
|
||||
OR tuser_task.function_name = "cron_task_save_report_to_disk"
|
||||
)'
|
||||
);
|
||||
}
|
||||
|
||||
// Admin.
|
||||
$sql = sprintf(
|
||||
'SELECT tuser_task_scheduled.*
|
||||
FROM tuser_task_scheduled
|
||||
INNER JOIN tuser_task
|
||||
ON tuser_task_scheduled.id_user_task = tuser_task.id
|
||||
WHERE
|
||||
id_grupo IN (%s)
|
||||
%s
|
||||
',
|
||||
$user_groups,
|
||||
$filter
|
||||
);
|
||||
|
||||
$defined_tasks = db_get_all_rows_sql($sql);
|
||||
|
||||
if (!check_acl($config['id_user'], 0, 'PM')) {
|
||||
$read_tasks = [];
|
||||
foreach ($defined_tasks as $task) {
|
||||
|
@ -466,7 +492,10 @@ function cron_list_table()
|
|||
$table->head[4] = __('Next execution');
|
||||
$table->head[5] = __('Last run');
|
||||
$table->head[6] = __('Group');
|
||||
$table->head[7] = __('Actions');
|
||||
if ($manage_perms || $manage_pandora) {
|
||||
$table->head[7] = __('Actions');
|
||||
}
|
||||
|
||||
$table->align[7] = 'left';
|
||||
|
||||
foreach ($defined_tasks as $task) {
|
||||
|
@ -521,7 +550,7 @@ function cron_list_table()
|
|||
break;
|
||||
|
||||
case 'cron_task_generate_report':
|
||||
if ((bool) $task['enabled'] === true && ($write_perms === true || $manage_pandora === true)) {
|
||||
if ((bool) $task['enabled'] === true) {
|
||||
$data[0] = html_print_anchor(
|
||||
[
|
||||
'href' => sprintf(
|
||||
|
@ -576,7 +605,7 @@ function cron_list_table()
|
|||
break;
|
||||
|
||||
case 'cron_task_generate_report_by_template':
|
||||
if ((bool) $task['enabled'] === true && ($write_perms === true || $manage_pandora === true)) {
|
||||
if ((bool) $task['enabled'] === true) {
|
||||
$data[0] = html_print_anchor(
|
||||
[
|
||||
'href' => sprintf(
|
||||
|
@ -928,25 +957,27 @@ function cron_list_table()
|
|||
}
|
||||
}
|
||||
|
||||
$data[7] .= html_print_anchor(
|
||||
[
|
||||
'href' => sprintf(
|
||||
'%stoggle_console_task=%s&id_user_task=%s',
|
||||
$url,
|
||||
((bool) $task['enabled'] === true) ? '0' : '1',
|
||||
$task['id']
|
||||
),
|
||||
'content' => html_print_image(
|
||||
((bool) $task['enabled'] === true) ? 'images/lightbulb.png' : 'images/lightbulb_off.png',
|
||||
true,
|
||||
[
|
||||
'title' => ((bool) $task['enabled'] === true) ? __('Disable task') : __('Enable task'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
if ($manage_perms || $manage_pandora) {
|
||||
$data[7] .= html_print_anchor(
|
||||
[
|
||||
'href' => sprintf(
|
||||
'%stoggle_console_task=%s&id_user_task=%s',
|
||||
$url,
|
||||
((bool) $task['enabled'] === true) ? '0' : '1',
|
||||
$task['id']
|
||||
),
|
||||
'content' => html_print_image(
|
||||
((bool) $task['enabled'] === true) ? 'images/lightbulb.png' : 'images/lightbulb_off.png',
|
||||
true,
|
||||
[
|
||||
'title' => ((bool) $task['enabled'] === true) ? __('Disable task') : __('Enable task'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -539,7 +539,7 @@ class BlockHistogram extends Widget
|
|||
25,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
break;
|
||||
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
height: auto;
|
||||
}
|
||||
|
||||
.responsive-height {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 18px;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||
|
@ -58,3 +66,13 @@ a:hover {
|
|||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.container-list {
|
||||
list-style: none;
|
||||
width: 20%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: space-around;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
|
|
@ -605,6 +605,13 @@ if (isset($config['id_user']) === false) {
|
|||
}
|
||||
}
|
||||
|
||||
if (is_reporting_console_node() === true) {
|
||||
$_GET['sec'] = 'discovery';
|
||||
$_GET['sec2'] = 'godmode/servers/discovery';
|
||||
$_GET['wiz'] = 'tasklist';
|
||||
$home_page = '';
|
||||
}
|
||||
|
||||
db_logon($nick_in_db, $_SERVER['REMOTE_ADDR']);
|
||||
$_SESSION['id_usuario'] = $nick_in_db;
|
||||
$config['id_user'] = $nick_in_db;
|
||||
|
@ -624,8 +631,6 @@ if (isset($config['id_user']) === false) {
|
|||
config_prepare_session();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ==========================================================
|
||||
// -------- SET THE CUSTOM CONFIGS OF USER ------------------
|
||||
config_user_set_custom_config();
|
||||
|
@ -1042,6 +1047,13 @@ if ((bool) ($config['maintenance_mode'] ?? false) === true
|
|||
exit('</html>');
|
||||
}
|
||||
|
||||
if (is_reporting_console_node() === true
|
||||
&& (bool) users_is_admin() === false
|
||||
) {
|
||||
include 'general/reporting_console_node.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* EXTENSIONS
|
||||
|
@ -1199,6 +1211,10 @@ if ($config['pure'] == 0) {
|
|||
echo '<div id="main">';
|
||||
}
|
||||
|
||||
if (is_reporting_console_node() === true) {
|
||||
echo notify_reporting_console_node();
|
||||
}
|
||||
|
||||
// Page loader / selector.
|
||||
if ($searchPage) {
|
||||
include 'operation/search_results.php';
|
||||
|
@ -1224,6 +1240,17 @@ if ($searchPage) {
|
|||
$sec2 = '';
|
||||
}
|
||||
|
||||
$tab = get_parameter('tab', '');
|
||||
if (empty($tab) === true) {
|
||||
$tab = get_parameter('wiz', '');
|
||||
}
|
||||
|
||||
$acl_reporting_console_node = acl_reporting_console_node($page, $tab);
|
||||
if ($acl_reporting_console_node === false) {
|
||||
include 'general/reporting_console_node.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$page .= '.php';
|
||||
|
||||
// Enterprise ACL check.
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.763';
|
||||
$build = '220808';
|
||||
$build = '220810';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -3889,7 +3889,7 @@ CREATE TABLE IF NOT EXISTS `tipam_network` (
|
|||
`name_network` VARCHAR(255) DEFAULT '',
|
||||
`description` TEXT,
|
||||
`location` INT UNSIGNED NULL,
|
||||
`id_recon_task` INT UNSIGNED NOT NULL,
|
||||
`id_recon_task` INT UNSIGNED DEFAULT 0,
|
||||
`scan_interval` TINYINT DEFAULT 1,
|
||||
`monitoring` TINYINT DEFAULT 0,
|
||||
`id_group` MEDIUMINT UNSIGNED NULL DEFAULT 0,
|
||||
|
@ -3898,7 +3898,7 @@ CREATE TABLE IF NOT EXISTS `tipam_network` (
|
|||
`id_site` BIGINT UNSIGNED,
|
||||
`vrf` INT UNSIGNED,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
FOREIGN KEY (`location`) REFERENCES `tipam_network_location`(`id`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`id_site`) REFERENCES `tipam_sites`(`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
FOREIGN KEY (`vrf`) REFERENCES `tagente`(`id_agente`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.763-220808
|
||||
Version: 7.0NG.763-220810
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.763-220808"
|
||||
pandora_version="7.0NG.763-220810"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.763";
|
||||
my $pandora_build = "220808";
|
||||
my $pandora_build = "220810";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.763";
|
||||
my $pandora_build = "220808";
|
||||
my $pandora_build = "220810";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.763
|
||||
%define release 220808
|
||||
%define release 220810
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.763"
|
||||
PI_BUILD="220808"
|
||||
PI_BUILD="220810"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.763 Build 220808";
|
||||
my $version = "7.0NG.763 Build 220810";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.763 Build 220808";
|
||||
my $version = "7.0NG.763 Build 220810";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue