Fix merge

This commit is contained in:
Jose Gonzalez 2021-11-04 16:00:05 +01:00
commit c0abe5edb9
197 changed files with 301310 additions and 623776 deletions
extras/deploy-scripts
index.pot
pandora_agents
pandora_console

View File

@ -4,7 +4,7 @@
# define variables
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2021012801'
S_VERSION='2021100601'
LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log"
# Ansi color code variables
@ -83,6 +83,7 @@ execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define e
OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"')
[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS
[[ $OS == 'fedora' ]] && OS_RELEASE=$OS
[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS
[[ $OS == 'debian' ]] && OS_RELEASE=$OS

108147
index.pot

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, AIX version
# Version 7.0NG.758, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, FreeBSD Version
# Version 7.0NG.758, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, HP-UX Version
# Version 7.0NG.758, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, GNU/Linux
# Version 7.0NG.758, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, GNU/Linux
# Version 7.0NG.758, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, Solaris Version
# Version 7.0NG.758, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas
# Version 7.0NG.757
# Version 7.0NG.758
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.757, AIX version
# Version 7.0NG.758, AIX version
# General Parameters
# ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.757
# Version 7.0NG.758
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.757, HPUX Version
# Version 7.0NG.758, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757
# Version 7.0NG.758
# Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757
# Version 7.0NG.758
# Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757
# Version 7.0NG.758
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.757, Solaris version
# Version 7.0NG.758, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, AIX version
# Version 7.0NG.758, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.757-211004
Version: 7.0NG.758-211104
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.757-211004"
pandora_version="7.0NG.758-211104"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -31,7 +31,7 @@ fi
if [ "$#" -ge 2 ]; then
VERSION="$2"
else
VERSION="7.0NG.757"
VERSION="7.0NG.758"
fi
# Path for the generated DMG file

View File

@ -19,11 +19,11 @@
<choice id="com.pandorafms.pandorafms_src" visible="false">
<pkg-ref id="com.pandorafms.pandorafms_src"/>
</choice>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.757" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.758" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
</choice>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.757" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.758" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<!-- <installation-check script="check()" />
<script>
<![CDATA[

View File

@ -5,9 +5,9 @@
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
<key>CFBundleVersion</key> <string>7.0NG.757</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.757 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.757</string>
<key>CFBundleVersion</key> <string>7.0NG.758</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.758 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.758</string>
<key>NSPrincipalClass</key><string>NSApplication</string>
<key>NSMainNibFile</key><string>MainMenu</string>

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, GNU/Linux
# Version 7.0NG.758, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, FreeBSD Version
# Version 7.0NG.758, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, HP-UX Version
# Version 7.0NG.758, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, GNU/Linux
# Version 7.0NG.758, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, GNU/Linux
# Version 7.0NG.758, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, NetBSD Version
# Version 7.0NG.758, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.757, Solaris Version
# Version 7.0NG.758, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1014,8 +1014,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.757';
use constant AGENT_BUILD => '211004';
use constant AGENT_VERSION => '7.0NG.758';
use constant AGENT_BUILD => '211104';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.757
%define release 211004
%define version 7.0NG.758
%define release 211104
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.757
%define release 211004
%define version 7.0NG.758
%define release 211104
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.757"
PI_BUILD="211004"
PI_VERSION="7.0NG.758"
PI_BUILD="211104"
OS_NAME=`uname -s`
FORCE=0

View File

@ -21,7 +21,6 @@
use strict;
use constant TSTAMP_FILE => '/tmp/pandora_inventory.tstamp';
use Scalar::Util qw(looks_like_number);
use Data::Dumper;
# Set environment language to English
$ENV{"LANG"} = "en_US";

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas
# Version 7.0NG.757
# Version 7.0NG.758
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
# Foundation; either version 2 of the Licence or any later version

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
{Pandora FMS Windows Agent v7.0NG.757}
{Pandora FMS Windows Agent v7.0NG.758}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{211004}
{211104}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.757 Build 211004")
#define PANDORA_VERSION ("7.0NG.758 Build 211104")
string pandora_path;
string pandora_dir;

View File

@ -2047,16 +2047,15 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
this->pandora_init ();
}
this->checkCollections ();
}
/* Execute omnishell commands */
omnishell_path = '"'+Pandora::getPandoraInstallDir ();
omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\"";
if (getPandoraDebug () != false) {
pandoraLog ("Omnishell: Running");
/* Execute omnishell commands */
omnishell_path = '"'+Pandora::getPandoraInstallDir ();
omnishell_path += "util\\omnishell_client.exe\" \"" + conf_file+"\"";
if (getPandoraDebug () != false) {
pandoraLog ("Omnishell: Running");
}
omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000);
}
omnishell_output = getValueFromCmdExec(omnishell_path.c_str(), 6000000);
server_addr = conf->getValue ("server_ip");

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.757(Build 211004))"
VALUE "ProductVersion", "(7.0NG.758(Build 211104))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.757-211004
Version: 7.0NG.758-211104
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.757-211004"
pandora_version="7.0NG.758-211104"
package_pear=0
package_pandora=1

View File

@ -331,6 +331,10 @@ function mainAgentsModules()
$offset = (int) get_parameter('offset', 0);
$hor_offset = (int) get_parameter('hor_offset', 0);
$block = $config['block_size'];
if (intval($block) > 15) {
$block = '15';
}
if (get_parameter('modulegroup') != null) {
$agents_id = (array) get_parameter('id_agents2', null);
}
@ -543,7 +547,7 @@ function mainAgentsModules()
if ($config['pure'] != 1) {
$show_filters = '<form method="post" action="'.ui_get_url_refresh(['offset' => $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">';
$show_filters .= '<table class="white_table w100p no-border" cellpadding="0" cellspacing="0" border="0">';
$show_filters .= '<table class="w100p no-border" cellpadding="0" cellspacing="0" border="0">';
$show_filters .= '<tr>';
$show_filters .= '<td>'.$filter_groups_label.'</td>';
$show_filters .= '<td>'.$filter_groups.'&nbsp;&nbsp;&nbsp;'.$filter_recursion_label.$filter_recursion.'</td>';
@ -561,7 +565,7 @@ function mainAgentsModules()
$show_filters .= '<td>'.$filter_modules.'</td>';
$show_filters .= '</tr>';
$show_filters .= '<tr>';
$show_filters .= "<td colspan=6 ><span class='right pdd_r_20px'>".$filter_update.'</span></td>';
$show_filters .= "<td colspan=6 ><span class='right pdd_r_35px mrgn_top_25px'>".$filter_update.'</span></td>';
$show_filters .= '</tr>';
$show_filters .= '</table>';
$show_filters .= '</form>';
@ -660,7 +664,7 @@ function mainAgentsModules()
$name = $module;
$modules_by_name[$cont]['name'] = $name;
$modules_by_name[$cont]['id'][] = $key;
$cont ++;
$cont++;
}
}

View File

@ -1081,12 +1081,18 @@ function resource_registration_extension_main()
}
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/policymanager'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. Go to %s to create a policy.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/policymanager'
).'">'.__('metaconsole').'</a>'
$url
)
);

View File

@ -27,14 +27,15 @@ CREATE TABLE IF NOT EXISTS `tsync_queue` (
UPDATE `tlink` SET `link` = 'https://barivion.com/manual/' WHERE `id_link` = 0000000001;
UPDATE `tuser_task`
SET parameters='a:7:{i:0;a:7:{s:11:"description";s:30:"Template pending to be created";s:5:"table";s:16:"treport_template";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:8:"required";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:7:{s:11:"description";s:6:"Agents";s:5:"table";s:7:"tagente";s:8:"field_id";s:9:"id_agente";s:10:"field_name";s:6:"nombre";s:8:"multiple";b:1;s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_grupo";}i:2;a:2:{s:11:"description";s:16:"Report per agent";s:10:"select_two";b:1;}i:3;a:2:{s:11:"description";s:11:"Report name";s:4:"type";s:6:"string";}i:4;a:2:{s:11:"description";s:47:"Send to e-mail addresses (separated by a comma)";s:4:"type";s:4:"text";}i:5;a:2:{s:11:"description";s:7:"Subject";s:8:"optional";i:1;}i:6;a:3:{s:11:"description";s:7:"Message";s:4:"type";s:4:"text";s:8:"optional";i:1;}}i:7;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}'
WHERE id=2;
UPDATE `tuser_task_scheduled` SET
`args` = REPLACE (`args`, 'a:8', 'a:9'),
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:7;s:3:"PDF";s:15:"first_execution"')
WHERE `id_user_task` = 2;
UPDATE `tuser_task_scheduled` SET
`args`= REPLACE(`args`, 's:15:"first_execution"', 'i:8;s:3:"PDF";s:15:"first_execution"'),
`args` = REPLACE (`args`, 'a:8', 'a:10'),
`args` = REPLACE (`args`, 'i:6', 'i:7'),
`args` = REPLACE (`args`, 'i:5', 'i:6'),
`args` = REPLACE (`args`, 'i:4', 'i:5'),
`args` = REPLACE (`args`, 'i:3', 'i:4'),
`args` = REPLACE (`args`, 'i:2', 'i:2;s:0:"";i:3')
WHERE `id_user_task` IN (SELECT id from tuser_task WHERE function_name = 'cron_task_generate_report_by_template');
UPDATE `tconfig` SET `value` = 0 WHERE `token` = 'centralized_management';

View File

@ -14,9 +14,117 @@ ALTER TABLE `treport_content_template` ADD COLUMN `time_in_warning_status` TINYI
ALTER TABLE `treport_content_template` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
ALTER TABLE `treport_content` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
ALTER TABLE `treport_content` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
ALTER TABLE `tlayout_template` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
INSERT INTO `treport_content` (id_report, id_gs, id_agent_module, type, period, `order`, name, description, id_agent, `text`, external_source, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, style, server_name, time_in_warning_status, checks_in_warning_status, failover_mode) SELECT id_report, 0, id_agent_module, 'availability', period, `order`, name, description, id_agent, NULL, NULL, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, '{&quot;show_in_same_row&quot;:0,&quot;hide_notinit_agents&quot;:0,&quot;priority_mode&quot;:1,&quot;dyn_height&quot;:&quot;230&quot;}', server_name, 1, 1, 0 FROM treport_content WHERE type = 'histogram_data';
INSERT INTO `treport_content_item` (id_report_content, id_agent_module, id_agent_module_failover, operation, server_name) SELECT id_rc, id_agent_module, 0, '', server_name FROM treport_content WHERE type = 'availability' AND id_agent <> 0 AND id_agent_module <> 0;
DELETE FROM `treport_content` WHERE type = 'histogram_data';
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS `tncm_vendor` (
`id` serial,
`name` varchar(255) UNIQUE,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_model` (
`id` serial,
`id_vendor` bigint(20) unsigned NOT NULL,
`name` varchar(255) UNIQUE,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_template` (
`id` serial,
`name` text,
`vendors` text,
`models` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_script` (
`id` serial,
`type` int unsigned not null default 0,
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
`id` serial,
`id_template` bigint(20) unsigned NOT NULL,
`id_script` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_agent` (
`id_agent` int(10) unsigned NOT NULL,
`id_vendor` bigint(20) unsigned,
`id_model` bigint(20) unsigned,
`protocol` int unsigned not null default 0,
`cred_key` varchar(100),
`adv_key` varchar(100),
`port` int(4) unsigned default 22,
`status` int(4) NOT NULL default 5,
`updated_at` bigint(20) NOT NULL default 0,
`config_backup_id` bigint(20) UNSIGNED DEFAULT NULL,
`id_template` bigint(20) unsigned,
`execute_type` int(2) UNSIGNED NOT NULL default 0,
`execute` int(2) UNSIGNED NOT NULL default 0,
`last_error` text,
PRIMARY KEY (`id_agent`),
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (`id_model`) REFERENCES `tncm_model`(`id`) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
`id` serial,
`id_agent` int(10) unsigned NOT NULL,
`script_type` int unsigned not null,
`data` LONGBLOB,
`status` int(4) NOT NULL default 5,
`updated_at` bigint(20) NOT NULL default 0,
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT IGNORE INTO `tncm_vendor` VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
(6, 'Allied Telesis, Inc.'),
(7, 'Frogfoot Networks'),
(8, 'IBM'),
(9, 'Dell Inc.'),
(10, 'Hitachi Communication Technologies, Ltd.'),
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
INSERT IGNORE INTO `tncm_model` VALUES (1,1,'7200');
INSERT IGNORE INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT IGNORE INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;');
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
COMMIT;

View File

@ -712,6 +712,8 @@ ALTER TABLE `tevent_alert` MODIFY COLUMN `time_threshold` int(10) NOT NULL defau
ALTER TABLE `tevent_alert` ADD COLUMN `disable_event` tinyint(1) DEFAULT 0;
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_conditions` int(10) unsigned NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `id_template_fields` int(10) unsigned NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `last_evaluation` bigint(20) NOT NULL default 0;
ALTER TABLE `tevent_alert` ADD COLUMN `pool_occurrences` int unsigned not null default 0;
-- -----------------------------------------------------
-- Table `tevent_alert_action`
@ -1448,13 +1450,13 @@ ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 49);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 50);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 757);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package', 758);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
@ -2229,6 +2231,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template` (
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL;
ALTER TABLE `tlayout` ADD COLUMN `auto_adjust` INTEGER UNSIGNED NOT NULL default 0;
-- ---------------------------------------------------------------------
-- Table `tlayout_template_data`
@ -4078,6 +4081,10 @@ ALTER TABLE `tperfil` DROP COLUMN `incident_view`;
ALTER TABLE `tperfil` DROP COLUMN `incident_edit`;
ALTER TABLE `tperfil` DROP COLUMN `incident_management`;
ALTER TABLE `tperfil` ADD COLUMN `network_config_view`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_edit`tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `tperfil` ADD COLUMN `network_config_management`tinyint(1) NOT NULL DEFAULT 0;
-- -----------------------------------------------------
-- Table `talert_execution_queue`
-- -----------------------------------------------------
@ -4091,4 +4098,126 @@ CREATE TABLE IF NOT EXISTS `talert_execution_queue` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';
UPDATE `tlanguage` SET `name` = 'Deutsch' WHERE `id_language` = 'de';
-- ----------------------------------------------------------------------
-- Table `tncm_vendor`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_vendor` (
`id` serial,
`name` varchar(255) UNIQUE,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_model`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_model` (
`id` serial,
`id_vendor` bigint(20) unsigned NOT NULL,
`name` varchar(255) UNIQUE,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_template`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_template` (
`id` serial,
`name` text,
`vendors` text,
`models` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_script`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_script` (
`id` serial,
`type` int unsigned not null default 0,
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_template_scripts`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
`id` serial,
`id_template` bigint(20) unsigned NOT NULL,
`id_script` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_agent`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent` (
`id_agent` int(10) unsigned NOT NULL,
`id_vendor` bigint(20) unsigned,
`id_model` bigint(20) unsigned,
`protocol` int unsigned not null default 0,
`cred_key` varchar(100),
`adv_key` varchar(100),
`port` int(4) unsigned default 22,
`status` int(4) NOT NULL default 5,
`updated_at` bigint(20) NOT NULL default 0,
`config_backup_id` bigint(20) UNSIGNED DEFAULT NULL,
`id_template` bigint(20) unsigned,
`execute_type` int(2) UNSIGNED NOT NULL default 0,
`execute` int(2) UNSIGNED NOT NULL default 0,
`last_error` text,
PRIMARY KEY (`id_agent`),
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_vendor`) REFERENCES `tncm_vendor`(`id`) ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (`id_model`) REFERENCES `tncm_model`(`id`) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_agent_data`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent_data` (
`id` serial,
`id_agent` int(10) unsigned NOT NULL,
`script_type` int unsigned not null,
`data` LONGBLOB,
`status` int(4) NOT NULL default 5,
`updated_at` bigint(20) NOT NULL default 0,
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tncm_vendor` VALUES
(1,'Cisco'),
(2, 'D-Link Systems, Inc.'),
(3, 'MikroTik'),
(4, 'Alcatel-Lucent Enterprise'),
(5, 'Ubiquiti Networks, Inc.'),
(6, 'Allied Telesis, Inc.'),
(7, 'Frogfoot Networks'),
(8, 'IBM'),
(9, 'Dell Inc.'),
(10, 'Hitachi Communication Technologies, Ltd.'),
(11, 'Netlink'),
(12, 'Ascom'),
(13, 'Synology Inc.'),
(14, 'Fujitsu Network Communications, Inc.');
INSERT INTO `tncm_model` VALUES (1,1,'7200');
INSERT INTO `tncm_template` VALUES (1,'cisco-base','[\"1\"]','[\"1\"]');
INSERT INTO `tncm_script` VALUES
(1,0,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;exit'),
(2,1,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;running-config&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(3,2,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;terminal&#x0d;&#x0a;_applyconfigbackup_&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(4,3,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;capture:show&#x20;version&#x20;|&#x20;i&#x20;IOS&#x20;Software&#x0d;&#x0a;exit&#x0d;&#x0a;'),
(5,5,'enable&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#x0d;&#x0a;term&#x20;length&#x20;0&#x0d;&#x0a;config&#x20;term&#x0d;&#x0a;end&#x0d;&#x0a;end&#x0d;&#x0a;exit&#x0d;&#x0a;');
INSERT INTO `tncm_template_scripts`(`id_template`, `id_script`) VALUES (1,1),(1,2),(1,3),(1,4),(1,5);

View File

@ -46,11 +46,11 @@ ui_require_css_file('first_task');
ui_print_info_message(['no_close' => true, 'message' => __('There are no clusters defined yet.') ]);
?>
<div class="new_task_cluster">
<div class="image_task_cluster">
<div class="new_task">
<div class="image_task">
<?php echo html_print_image('images/first_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
</div>
<div class="text_task_cluster">
<div class="text_task">
<h3> <?php echo __('Create Cluster'); ?></h3>
<p id="description_task">
<?php

View File

@ -485,6 +485,13 @@ if ($id_agente) {
$collectiontab = '';
}
// NetworkConfigManager tab.
$ncm_tab = enterprise_hook('networkconfigmanager_tab');
if ($ncm_tab === ENTERPRISE_NOT_HOOK) {
$ncm_tab = '';
}
// Group tab.
$grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.html_print_image(
'images/group.png',
@ -616,6 +623,7 @@ if ($id_agente) {
'main' => $maintab,
'remote_configuration' => $remote_configuration_tab,
'module' => $moduletab,
'ncm' => $ncm_tab,
'alert' => $alerttab,
'template' => $templatetab,
'inventory' => $inventorytab,
@ -631,6 +639,7 @@ if ($id_agente) {
'separator' => '',
'main' => $maintab,
'module' => $moduletab,
'ncm' => $ncm_tab,
'alert' => $alerttab,
'template' => $templatetab,
'inventory' => $inventorytab,
@ -699,6 +708,11 @@ if ($id_agente) {
$tab_name = 'Collection';
break;
case 'ncm':
$tab_description = '- '.__('Network config manager');
$tab_name = 'Network config manager';
break;
case 'inventory':
$tab_description = '- '.__('Inventory');
$help_header = 'inventory_tab';
@ -2313,6 +2327,10 @@ switch ($tab) {
include 'agent_incidents.php';
break;
case 'ncm':
enterprise_hook('ncm_agent_tab', [$id_agente]);
break;
case 'remote_configuration':
enterprise_include('godmode/agentes/agent_disk_conf_editor.php');
break;

View File

@ -111,12 +111,18 @@ ui_print_standard_header(
);
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. Go to %s to delete an agent',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
).'">'.__('metaconsole').'</a>'
$url
)
);
}
@ -904,7 +910,7 @@ if ($agents !== false) {
echo ' onClick="if (!confirm(\' '.__('You are going to enable a cluster agent. Are you sure?').'\')) return false;">';
}
echo html_print_image('images/lightbulb_off.png', true, ['alt' => __('Enable agent'), 'title' => __('Enable agent')]).'</a>';
echo html_print_image('images/lightbulb_off.png', true, ['alt' => __('Enable agent'), 'title' => __('Enable agent'), 'class' => 'filter_none']).'</a>';
} else {
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
disable_agent=".$agent['id_agente']."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";

View File

@ -1130,6 +1130,7 @@ foreach ($modules as $module) {
[
'alt' => __('Enable module'),
'title' => __('Enable module'),
'class' => 'filter_none',
]
).'</a>';
} else {
@ -1139,7 +1140,6 @@ foreach ($modules as $module) {
[
'alt' => __('Disable module'),
'title' => __('Disable module'),
'class' => 'invert_filter',
]
).'</a>';
}

View File

@ -139,7 +139,7 @@ function add_component_selection($id_network_component_type)
true,
'',
false,
'width: 460px; '
'width: 350px; '
);
$data[1] .= '</span>';
$data[1] .= ' <span id="component_loading" class="invisible">';

View File

@ -215,12 +215,18 @@ if ($delete_action) {
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_actions&tab=action&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -616,12 +616,18 @@ if ($copy_command) {
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_commands&tab=command&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -811,7 +811,7 @@ foreach ($simple_alerts as $alert) {
1,
'padding:0px',
true,
['class' => 'invert_filter']
['class' => 'filter_none']
);
$data[4] .= html_print_input_hidden('enable_alert', 1, true);
} else {
@ -998,7 +998,7 @@ if (! $id_agente) {
echo '"'.html_print_image(
'images/lightbulb_off.png',
true,
false,
['class' => 'filter_none'],
true
).'"';
?>
@ -1037,7 +1037,7 @@ if (! $id_agente) {
echo '"'.html_print_image(
'images/lightbulb_off.png',
true,
false,
['class' => 'filter_none'],
true
).'"';
?>

View File

@ -260,12 +260,18 @@ if ($delete_template) {
}
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alert templates information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/alert_templates&tab=template'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -104,12 +104,18 @@ if (!$is_in_group && $al_action['id_group'] != 0) {
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alert actions information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_action&tab=action&pure=0&id='.$id
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -159,12 +159,18 @@ if (empty($fields_hidden) === false) {
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alert commands information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_command&pure=0&id='.$id
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -373,12 +373,18 @@ function update_template($step)
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All alerts templates information is read only. Go to Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/alerts/configure_alert_template&pure=0&id='.$id.'&step='.$step
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -92,12 +92,18 @@ if (is_metaconsole() === true) {
$is_management_allowed = true;
if (is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All categories information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -254,7 +254,7 @@ foreach ($extensions as $file => $extension) {
if ($file != 'update_manager.php') {
$table->cellclass[][10] = 'action_buttons';
if (!$extension['enabled']) {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true).'</a>';
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).'</a>';
} else {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>';
}

View File

@ -382,12 +382,18 @@ if (is_metaconsole() === true) {
$is_management_allowed = true;
if (is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All groups information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/groups/group_list&tab=groups'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -79,12 +79,18 @@ if (is_metaconsole() === false) {
$is_management_allowed = true;
if (is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -39,12 +39,18 @@ if (!check_acl($config['id_user'], 0, 'UM')) {
}
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
@ -79,7 +85,7 @@ if ($create_profiles) {
);
$return = profile_create_user_profile($user, $profile, $group);
if ($return !== false) {
$n_added ++;
$n_added++;
}
}
}

View File

@ -39,12 +39,18 @@ if (! check_acl($config['id_user'], 0, 'UM')) {
}
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All profiles user information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);

View File

@ -219,7 +219,8 @@ $alertstab = [
'title' => __('Alerts operations'),
'class' => 'invert_filter',
]
).'</a>', 'active' => $tab == 'massive_alerts',
).'</a>',
'active' => $tab == 'massive_alerts',
];
$userstab = [
@ -230,7 +231,8 @@ $userstab = [
'title' => __('Users operations'),
'class' => 'invert_filter',
]
).'</a>', 'active' => $tab == 'massive_users',
).'</a>',
'active' => $tab == 'massive_users',
];
$agentstab = [
@ -241,7 +243,8 @@ $agentstab = [
'title' => __('Agents operations'),
'class' => 'invert_filter',
]
).'</a>', 'active' => $tab == 'massive_agents',
).'</a>',
'active' => $tab == 'massive_agents',
];
$modulestab = [
@ -252,7 +255,8 @@ $agentstab = [
'title' => __('Modules operations'),
'class' => 'invert_filter',
]
).'</a>', 'active' => $tab == 'massive_modules',
).'</a>',
'active' => $tab == 'massive_modules',
];
$pluginstab = [
@ -263,7 +267,8 @@ $agentstab = [
'title' => __('Plugins operations'),
'class' => 'invert_filter',
]
).'</a>', 'active' => $tab == 'massive_plugins',
).'</a>',
'active' => $tab == 'massive_plugins',
];
$policiestab = enterprise_hook('massive_policies_tab');
@ -334,12 +339,18 @@ $agentstab = [
}
if ($tab == 'massive_policies' && is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/policymanager'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All policies information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/policymanager'
).'">'.__('metaconsole').'</a>'
$url
)
);
return;
@ -401,12 +412,18 @@ $agentstab = [
<?php
if (is_management_allowed() === false && $option == 'delete_agents') {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. To delete agents go to %s',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -175,6 +175,10 @@ if (check_acl($config['id_user'], 0, 'AW')) {
enterprise_hook('agents_submenu');
}
if (check_acl($config['id_user'], 0, 'NW')) {
enterprise_hook('agents_ncm_submenu');
}
if (check_acl($config['id_user'], 0, 'AW')) {
$sub['gmassive']['text'] = __('Bulk operations');
$sub['gmassive']['id'] = 'Bulk operations';

View File

@ -271,12 +271,18 @@ foreach ($groups as $group) {
}
if (is_management_allowed() === false && is_metaconsole() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. Component groups are read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -297,12 +297,18 @@ if (is_metaconsole() === true) {
}
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All remote components are read only. Go to %s to manage them.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=godmode/modules/manage_network_components&tab=network&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -1251,16 +1251,7 @@ switch ($action) {
array_push($table->data, $data);
}
if ($columnview) {
$count = 0;
foreach ($table->data as $datos) {
if (!isset($datos[9])) {
$table->data[$count][9] = '';
}
$count++;
}
}
html_print_table($table);
ui_pagination(

View File

@ -231,8 +231,8 @@ if (isset($_GET['server'])) {
<script language="javascript" type="text/javascript">
$(document).ready (function () {
var id_server = <?php echo $id_server; ?>;
var server_type = <?php echo $row['server_type']; ?>;
var id_server = '<?php echo $id_server; ?>';
var server_type = '<?php echo $row['server_type']; ?>';
$("#check_exec_server img").on("click", function () {
$("#check_exec_server img").attr("src", "images/spinner.gif");

View File

@ -40,12 +40,18 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
$is_management_allowed = true;
if (is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=list&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -571,7 +571,7 @@ $table_remote->data['integria_test'] = $row;
// Print.
echo '<div class="center pdd_b_20px">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">';
html_print_image('images/integria_logo.png');
html_print_image('images/integria_logo.svg');
echo '</a>';
echo '<br />';
echo '<div clsas="integria_title">';

View File

@ -97,7 +97,7 @@ $table->data['editor'] = [
'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true),
'description' => html_print_input_text('description_editor', '', '', 40, 255, true),
'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true),
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
'op' => '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_save_snmp" href="javascript: save_translation();">'.html_print_image('images/save_mc.png', true, ['title' => __('Save'), 'class' => 'invert_filter']).'</a>'.'<a class="button_update_snmp invisible" href="javascript: update_snmp();">'.html_print_image('images/update.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a class="cancel_button_snmp invisible" href="javascript: cancel_snmp();">'.html_print_image('images/cancel.png', true, ['title' => __('Cancel')]).'</a>',
];

View File

@ -171,12 +171,18 @@ if ($delete !== 0) {
$is_management_allowed = is_management_allowed();
if ($is_management_allowed === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All tags information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management'
).'">'.__('metaconsole').'</a>'
$url
)
);
}

View File

@ -1270,12 +1270,13 @@ class Client
}
$content = file_get_contents($delete_files_txt);
$files = explode('\n', $content);
$files = explode("\n", $content);
$processed = [];
foreach ($files as $file) {
$file = trim(str_replace("\0", '', $this->productPath.'/'.$file));
if (file_exists($file) === true
&& is_file($delete_files_txt) === true
&& is_dir($file) === false
) {
unlink($file);
$processed[$file] = 'removed';
@ -1674,7 +1675,7 @@ class Client
);
$this->updateMR(
$this->extract_to.'/extras/mr/'.$mr,
$extract_to.'/extras/mr/'.$mr,
$this->dbhHistory,
$historical_MR
);

View File

@ -183,7 +183,7 @@ class ClientTest extends \PHPUnit\Framework\TestCase
try {
$this->conf = new \Config('client/conf/test.ini');
} catch (\Exception $e) {
$this->fail($e->xdebug_message);
$this->fail($e->getMessage());
}
// Verify endpoint has all needed stuff, like licenses and OUM packages.
@ -510,7 +510,12 @@ class ClientTest extends \PHPUnit\Framework\TestCase
$this->assertEquals(0, $umc_enterprise->getMR());
$umc_enterprise->updateLastVersion();
try {
$umc_enterprise->updateLastVersion();
} catch (\Exception $e) {
echo $e->getTraceAsString();
$this->fail('Failed while updating: '.$e->getMessage());
}
$this->assertEquals(
4,

View File

@ -123,6 +123,11 @@ if ($id_profile || $new_profile) {
$vconsole_edit = 0;
$vconsole_management = 0;
// NCM.
$network_config_view = 0;
$network_config_edit = 0;
$network_config_management = 0;
$page_title = __('Create profile');
} else {
$profile = db_get_row('tperfil', 'id_perfil', $id_profile);
@ -181,13 +186,41 @@ if ($id_profile || $new_profile) {
$vconsole_edit = (bool) $profile['vconsole_edit'];
$vconsole_management = (bool) $profile['vconsole_management'];
// NCM.
$network_config_management = (bool) $profile['network_config_management'];
$network_config_view = (bool) $profile['network_config_view'] || $network_config_management;
$network_config_edit = (bool) $profile['network_config_edit'] || $network_config_management;
$id_audit = db_pandora_audit(
'User management',
'Edit profile '.io_safe_output($name)
);
enterprise_include_once('include/functions_audit.php');
$info = 'Name: '.$name.' Agent view: '.$agent_view.' Agent edit: '.$agent_edit.' Agent disable: '.$agent_disable.' Alert edit: '.$alert_edit.' Alert management: '.$alert_management.' User management: '.$user_management.' DB management: '.$db_management.' Event view: '.$event_view.' Event edit: '.$event_edit.' Event management: '.$event_management.' Report view: '.$report_view.' Report edit: '.$report_edit.' Report management: '.$report_management.' Network map view: '.$map_view.' Network map edit: '.$map_edit.' Network map management: '.$map_management.' Visual console view: '.$vconsole_view.' Visual console edit: '.$vconsole_edit.' Visual console management: '.$vconsole_management.' '.get_product_name().' Management: '.$pandora_management;
$info = 'Name: '.$name;
$info .= ' Agent view: '.$agent_view;
$info .= ' Agent edit: '.$agent_edit;
$info .= ' Agent disable: '.$agent_disable;
$info .= ' Alert edit: '.$alert_edit;
$info .= ' Alert management: '.$alert_management;
$info .= ' User management: '.$user_management;
$info .= ' DB management: '.$db_management;
$info .= ' Event view: '.$event_view;
$info .= ' Event edit: '.$event_edit;
$info .= ' Event management: '.$event_management;
$info .= ' Report view: '.$report_view;
$info .= ' Report edit: '.$report_edit;
$info .= ' Report management: '.$report_management;
$info .= ' Network map view: '.$map_view;
$info .= ' Network map edit: '.$map_edit;
$info .= ' Network map management: '.$map_management;
$info .= ' Visual console view: '.$vconsole_view;
$info .= ' Visual console edit: '.$vconsole_edit;
$info .= ' Visual console management: '.$vconsole_management;
$info .= ' Network config view: '.$network_config_view;
$info .= ' Network config write: '.$network_config_write;
$info .= ' Network config management: '.$network_config_management;
$info .= ' '.get_product_name().' Management: '.$pandora_management;
enterprise_hook('audit_pandora_enterprise', [$id_audit, $info]);
@ -314,6 +347,21 @@ if ($id_profile || $new_profile) {
$disable_option = '';
}
// NCM
$row = [];
$row['name'] = __('View NCM data');
$row['input'] = html_print_checkbox('network_config_view', 1, $network_config_view, true);
$table->data['VR'] = $row;
$row = [];
$row['name'] = __('Operate NCM');
$row['input'] = html_print_checkbox('network_config_edit', 1, $network_config_edit, true, false, 'autoclick_profile_users(\'network_config_edit\', \'network_config_view\', \'false\')');
$table->data['VW'] = $row;
$row = [];
$row['name'] = __('Manage NCM');
$row['input'] = html_print_checkbox('network_config_management', 1, $network_config_management, true, false, 'autoclick_profile_users(\'network_config_management\', \'network_config_view\', \'network_config_edit\')');
$table->data['VM'] = $row;
$table->data[] = '<hr>';
// Users
$row = [];
$row['name'] = __('Manage users');

View File

@ -721,6 +721,7 @@ if ($update_user) {
);
}
if ($values['strict_acl']) {
$count_groups = 0;
$count_tags = 0;
@ -1226,7 +1227,10 @@ $session_time .= html_print_input_text(
'class="input_line_small"'
).'</div>';
$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter');
$user_groups = implode(',', array_keys((users_get_groups($id, 'AR', $display_all_group))));
$event_filter_data = db_get_all_rows_sql('SELECT id_name, id_filter FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')');
if ($event_filter_data === false) {
$event_filter_data = [];
}
@ -1317,6 +1321,8 @@ if (isset($double_authentication)) {
if ($meta) {
enterprise_include_once('include/functions_metaconsole.php');
$access_node = db_get_value('metaconsole_access_node', 'tusuario', 'id_user', $id);
$metaconsole_agents_manager = '<div class="label_select_simple" id="metaconsole_agents_manager_div"><p class="edit_user_labels">'.__('Enable agents managment').'</p>';
$metaconsole_agents_manager .= html_print_checkbox_switch(
'metaconsole_agents_manager',
@ -1338,7 +1344,7 @@ if ($meta) {
$metaconsole_access_node .= html_print_checkbox(
'metaconsole_access_node',
1,
$user_info['metaconsole_access_node'],
$access_node,
true
).'</div>';
}

View File

@ -102,12 +102,18 @@ $id_profile = (int) get_parameter('id');
$is_management_allowed = true;
if (is_metaconsole() === false && is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All profiles information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=profile&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}
@ -172,28 +178,36 @@ if ($is_management_allowed === true && ($create_profile === true || $update_prof
$vconsole_edit = (bool) get_parameter('vconsole_edit');
$vconsole_management = (bool) get_parameter('vconsole_management');
// NCM.
$network_config_view = (bool) get_parameter('network_config_view');
$network_config_edit = (bool) get_parameter('network_config_edit');
$network_config_management = (bool) get_parameter('network_config_management');
$values = [
'name' => $name,
'agent_view' => $agent_view,
'agent_edit' => $agent_edit,
'agent_disable' => $agent_disable,
'alert_edit' => $alert_edit,
'alert_management' => $alert_management,
'user_management' => $user_management,
'db_management' => $db_management,
'event_view' => $event_view,
'event_edit' => $event_edit,
'event_management' => $event_management,
'report_view' => $report_view,
'report_edit' => $report_edit,
'report_management' => $report_management,
'map_view' => $map_view,
'map_edit' => $map_edit,
'map_management' => $map_management,
'vconsole_view' => $vconsole_view,
'vconsole_edit' => $vconsole_edit,
'vconsole_management' => $vconsole_management,
'pandora_management' => $pandora_management,
'name' => $name,
'agent_view' => $agent_view,
'agent_edit' => $agent_edit,
'agent_disable' => $agent_disable,
'alert_edit' => $alert_edit,
'alert_management' => $alert_management,
'user_management' => $user_management,
'db_management' => $db_management,
'event_view' => $event_view,
'event_edit' => $event_edit,
'event_management' => $event_management,
'report_view' => $report_view,
'report_edit' => $report_edit,
'report_management' => $report_management,
'map_view' => $map_view,
'map_edit' => $map_edit,
'map_management' => $map_management,
'vconsole_view' => $vconsole_view,
'vconsole_edit' => $vconsole_edit,
'vconsole_management' => $vconsole_management,
'network_config_view' => $network_config_view,
'network_config_edit' => $network_config_edit,
'network_config_management' => $network_config_management,
'pandora_management' => $pandora_management,
];
}
@ -222,6 +236,9 @@ if ($is_management_allowed === true && $update_profile === true) {
"Visual console view":"'.$vconsole_view.'",
"Visual console edit":"'.$vconsole_edit.'",
"Visual console management":"'.$vconsole_management.'",
"NCM view":"'.$network_config_view.'",
"NCM edit":"'.$network_config_edit.'",
"NCM management":"'.$network_config_management.'",
"'.get_product_name().' Management":"'.$pandora_management.'"}';
db_pandora_audit(
@ -270,6 +287,9 @@ if ($is_management_allowed === true && $create_profile === true) {
"Visual console view":"'.$vconsole_view.'",
"Visual console edit":"'.$vconsole_edit.'",
"Visual console management":"'.$vconsole_management.'",
"NCM view":"'.$network_config_view.'",
"NCM edit":"'.$network_config_edit.'",
"NCM management":"'.$network_config_management.'",
"'.get_product_name().' Management":"'.$pandora_management.'"}';
db_pandora_audit(
@ -321,6 +341,9 @@ $table->head['MM'] = 'MM';
$table->head['VR'] = 'VR';
$table->head['VW'] = 'VW';
$table->head['VM'] = 'VM';
$table->head['NR'] = 'NR';
$table->head['NW'] = 'NW';
$table->head['NM'] = 'NM';
$table->head['PM'] = 'PM';
if ($is_management_allowed === true) {
$table->head['operations'] = '<span title="Operations">'.__('Op.').'</span>';
@ -348,6 +371,9 @@ $table->size['MM'] = '10px';
$table->size['VR'] = '10px';
$table->size['VW'] = '10px';
$table->size['VM'] = '10px';
$table->size['NR'] = '10px';
$table->size['NW'] = '10px';
$table->size['NM'] = '10px';
$table->size['PM'] = '10px';
if ($is_management_allowed === true) {
$table->size['operations'] = '5%';
@ -395,6 +421,9 @@ foreach ($profiles as $profile) {
$data['VR'] = (empty($profile['vconsole_view']) === false) ? $img : '';
$data['VW'] = (empty($profile['vconsole_edit']) === false) ? $img : '';
$data['VM'] = (empty($profile['vconsole_management']) === false) ? $img : '';
$data['NR'] = (empty($profile['network_config_view']) === false) ? $img : '';
$data['NW'] = (empty($profile['network_config_edit']) === false) ? $img : '';
$data['NM'] = (empty($profile['network_config_management']) === false) ? $img : '';
$data['PM'] = (empty($profile['pandora_management']) === false) ? $img : '';
$table->cellclass[]['operations'] = 'action_buttons';
if ($is_management_allowed === true) {

View File

@ -397,12 +397,18 @@ $table->data[0][4] = html_print_submit_button(
$is_management_allowed = true;
if (is_metaconsole() === false && is_management_allowed() === false) {
$is_management_allowed = false;
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure='.(int) $config['pure']
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');
}
ui_print_warning_message(
__(
'This node is configured with centralized mode. All users information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/users_setup&tab=user&pure=0'
).'">'.__('metaconsole').'</a>'
$url
)
);
}
@ -710,10 +716,12 @@ foreach ($info as $user_id => $user_info) {
$toDoString = __('Disable');
$toDoAction = '1';
$toDoImage = 'images/lightbulb.png';
$toDoClass = '';
} else {
$toDoString = __('Enable');
$toDoAction = '0';
$toDoImage = 'images/lightbulb_off.png';
$toDoClass = 'filter_none';
}
$data[6] = '<form method="POST" action="index.php?sec='.$sec.'&amp;sec2=godmode/users/user_list&amp;pure='.$pure.'" class="inline">';
@ -736,7 +744,7 @@ foreach ($info as $user_id => $user_info) {
[
'data-title' => $toDoString,
'data-use_title_for_force_title' => '1',
'class' => 'forced_title no-padding',
'class' => 'forced_title no-padding '.$toDoClass,
]
);
$data[6] .= '</form>';

View File

@ -178,7 +178,8 @@ class DiscoveryTaskList extends HTML
'attributes' => 'class="sub cancel"',
'return' => true,
],
],[
],
[
'class' => 'action-buttons rule-builder-actions',
'arguments' => [
'name' => 'refresh',
@ -961,7 +962,10 @@ class DiscoveryTaskList extends HTML
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/lightbulb_off.png',
true,
['title' => __('enable task')]
[
'title' => __('enable task'),
'class' => 'filter_none',
]
).'</a>';
} else if ($task['disabled'] == 0) {
$data[9] .= '<a href="'.ui_get_full_url(
@ -1652,9 +1656,9 @@ class DiscoveryTaskList extends HTML
$license = enterprise_hook('license_get_info');
if (is_array($license) === true
&& $n_agents > ($license['limit'] - $license['count'])
&& $n_agents > ($license['limit'] - $license['count_enabled'])
) {
$limit = ($license['limit'] - $license['count']);
$limit = ($license['limit'] - $license['count_enabled']);
echo json_encode(
[
'error' => __(

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="748px" height="142px" viewBox="0 0 748 142" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Integria IMS</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Integria-IMS" fill-rule="nonzero">
<path d="M71.81,-2.81979301e-15 C43.0949491,-0.325771451 17.0111429,16.6781107 5.72147618,43.0827259 C-5.56819051,69.4873411 0.159601761,100.092722 20.23398,120.627561 C40.3083582,141.1624 70.7759943,147.582689 97.4298109,136.894643 C124.083628,126.206596 141.674581,100.515055 142,71.8 C142.444347,32.5906412 111.019353,0.444829018 71.81,-2.81979301e-15 Z" id="Path" fill="#F65803"></path>
<circle id="Oval" fill="#FFFFFF" cx="43.51" cy="49.89" r="13.76"></circle>
<path d="M43.51,71.66 L43.26,71.66 C41.5736669,71.6393594 39.8955597,71.4212055 38.26,71.01 L38,98.36 C37.9839995,99.6878244 38.4968596,100.967474 39.4254669,101.916717 C40.3540742,102.86596 41.6221446,103.406817 42.95,103.42 L43,103.42 C44.3260824,103.42 45.597852,102.893216 46.5355339,101.955534 C47.4732158,101.017852 48,99.7460824 48,98.42 L48.31,71.06 C46.7379912,71.4417108 45.1275989,71.6430099 43.51,71.66 L43.51,71.66 Z" id="Path" fill="#FFFFFF"></path>
<path d="M94.41,48.12 C88.3631135,41.9016532 80.0832535,38.3557132 71.41,38.27 C68.4333361,38.2395201 65.4662912,38.6129237 62.59,39.38 C64.2200628,42.3331841 65.1313519,45.6288987 65.25,49 C67.208565,48.4885287 69.2257979,48.2363746 71.25,48.25 C77.2810939,48.3159047 83.0384799,50.7772152 87.2533639,55.0915157 C91.468248,59.4058163 93.7946914,65.2190086 93.72,71.25 L93.42,99 C93.4039912,100.326111 93.9154828,101.604257 94.841933,102.553212 C95.7683831,103.502167 97.0338871,104.044182 98.36,104.06 L98.42,104.06 C101.181424,104.06 103.42,101.821424 103.42,99.06 L103.74,71.33 C103.850133,62.6586006 100.491174,54.3026057 94.41,48.12 Z" id="Path" fill="#FFFFFF"></path>
<path d="M171.72,67.81 L171.84,21.08 C171.8139,20.1443474 172.175822,19.2395415 172.84,18.58 C173.507689,17.9157505 174.418525,17.5543075 175.36,17.58 L182.36,17.58 C183.315282,17.5557708 184.239991,17.9176872 184.925039,18.583915 C185.610086,19.2501428 185.997615,20.1644142 186,21.12 L185.88,67.77 C185.889979,68.7136623 185.501469,69.6177631 184.81,70.26 C184.132306,70.9151221 183.222463,71.2747439 182.28,71.26 L175.28,71.26 C174.343006,71.2771853 173.438469,70.9168123 172.77,70.26 C172.079224,69.6357031 171.69568,68.7407667 171.72,67.81 L171.72,67.81 Z" id="Path" fill="#282828"></path>
<path d="M196.6,67.79 L196.72,21.15 C196.703942,20.2132116 197.064148,19.3090953 197.72,18.64 C198.367817,17.9706027 199.269041,17.6072059 200.2,17.64 L211.2,17.64 C212.220464,17.6786713 213.201721,18.0431383 214,18.68 C214.954333,19.3581671 215.769164,20.2137401 216.4,21.2 L238.94,56.06 L239,21.18 C238.972558,20.2529263 239.335335,19.3568684 240,18.71 C240.660878,18.0478442 241.564774,17.6862858 242.5,17.71 L249,17.71 C249.930306,17.697074 250.827049,18.0572118 251.49,18.71 C252.168239,19.3808021 252.531442,20.3069699 252.49,21.26 L252.37,67.91 C252.393322,68.8422107 252.031614,69.7428638 251.37,70.4 C250.707806,71.0601595 249.804802,71.4213611 248.87,71.4 L236.43,71.4 C235.352189,71.3759533 234.306677,71.0274494 233.43,70.4 C232.448952,69.7519451 231.61994,68.8990519 231,67.9 L210.36,35.7 L210.28,67.85 C210.302135,68.7819962 209.940608,69.6821976 209.28,70.34 C208.624212,71.0036445 207.722642,71.3657208 206.79,71.34 L200.2,71.34 C199.262799,71.3583203 198.357839,70.9977785 197.69,70.34 C196.973178,69.6889199 196.575278,68.758054 196.6,67.79 Z" id="Path" fill="#282828"></path>
<path d="M258.64,24.83 L258.64,21.31 C258.611761,20.3566005 258.979489,19.4340518 259.655831,18.7614981 C260.332174,18.0889444 261.256774,17.7264056 262.21,17.76 L309.75,17.88 C310.703399,17.8517613 311.625948,18.2194887 312.298502,18.8958315 C312.971056,19.5721742 313.333594,20.4967742 313.3,21.45 L313.3,25 C313.332066,25.9455402 312.969867,26.8619037 312.3,27.53 C311.623087,28.1989008 310.701164,28.5604392 309.75,28.53 L293.04,28.53 L292.93,68.21 C292.958015,69.1313139 292.594703,70.0214284 291.93,70.66 C291.264603,71.3152777 290.363755,71.675617 289.43,71.6604873 L282.35,71.6604873 C281.420522,71.668505 280.52541,71.3090224 279.86,70.66 C279.197933,70.0155113 278.835379,69.1236302 278.86,68.2 L278.96,28.52 L262.25,28.52 C261.299851,28.544612 260.38013,28.1839373 259.7,27.52 C258.965201,26.8249172 258.576895,25.8394983 258.64,24.83 L258.64,24.83 Z" id="Path" fill="#282828"></path>
<path d="M319.3,68 L319.42,21.35 C319.400371,20.4122847 319.78681,19.5118088 320.48,18.88 C321.149716,18.2251023 322.053417,17.8650622 322.99,17.8795531 L366.19,17.99 C367.130438,17.9859488 368.031045,18.3693397 368.68,19.05 C369.337779,19.717839 369.69832,20.6227989 369.68,21.56 L369.68,25.09 C369.677352,26.0235632 369.303953,26.9178376 368.641949,27.5760911 C367.979945,28.2343446 367.083563,28.6026559 366.15,28.6 L333.52,28.51 L333.52,39.42 L361.62,39.49 C362.553563,39.4926484 363.447838,39.8660468 364.106091,40.528051 C364.764345,41.1900553 365.132656,42.0864368 365.13,43.02 L365.13,46.54 C365.156933,47.4728584 364.79467,48.3748937 364.13,49.03 C363.469788,49.6931635 362.565439,50.054903 361.63,50.03 L333.47,50 L333.47,61.06 L366.03,61.14 C366.94651,61.1221856 367.829599,61.4841076 368.47,62.14 C369.129526,62.7903112 369.491355,63.6840288 369.47,64.61 L369.47,68.21 C369.482675,69.150132 369.102026,70.0528141 368.42,70.7 C367.748458,71.3583482 366.840234,71.7187547 365.9,71.7 L322.9,71.59 C321.962384,71.6106136 321.056564,71.2497292 320.39,70.59 C319.672391,69.9226941 319.2755,68.9796223 319.3,68 L319.3,68 Z" id="Path" fill="#282828"></path>
<path d="M380.06,65.38 C375.64,60.9 373.44,54.0566667 373.459865,44.85 C373.48,35.6433333 375.813333,28.83 380.46,24.41 C385.126667,19.99 392.08,17.7933333 401.32,17.82 L409.68,17.82 C414.926078,17.759622 420.087688,19.1434315 424.6,21.82 C429.026667,24.4866667 431.233333,27.7833333 431.22,31.71 C431.335739,32.9177383 430.840442,34.1034513 429.9,34.87 C429.175254,35.4543658 428.280429,35.7877321 427.35,35.82 L422.9,35.82 C420.76,35.82 419.053333,34.59 417.78,32.13 C416.506667,29.67 413.363333,28.44 408.35,28.44 L401.68,28.44 C396.206667,28.44 392.493333,29.6033333 390.54,31.93 C388.54,34.28 387.6,38.59 387.54,44.93 C387.48,51.27 388.38,55.58 390.13,57.99 C391.88,60.4 394.99,61.62 399.48,61.63 L407.17,61.63 C411.17,61.63 414.043333,60.87 415.79,59.35 C417.596876,57.6376908 418.574219,55.2271554 418.47,52.74 L410,52.74 C409.064789,52.7427064 408.167392,52.3710205 407.507977,51.7078475 C406.848561,51.0446746 406.48198,50.1451807 406.49,49.21 L406.49,46.23 C406.472533,45.2988546 406.833351,44.400416 407.49,43.74 C408.146465,43.0773742 409.047574,42.7154829 409.98,42.74 L428.79,42.79 C429.722858,42.763067 430.624894,43.1253302 431.28,43.79 C431.943164,44.4502124 432.304903,45.354561 432.28,46.29 L432.28,50.44 C432.28,57.44 430.17,62.8133333 425.95,66.56 C421.73,70.3066667 415.566667,72.17 407.46,72.1501593 L399.03,72.1501593 C390.803333,72.1233333 384.48,69.8666667 380.06,65.38 Z" id="Path" fill="#282828"></path>
<path d="M495.8,70.48 C495.8,71.55 495.16,72.09 493.89,72.0801364 L484.89,72.0801364 C483.778533,72.0359158 482.700008,71.6902348 481.77,71.08 C480.713597,70.4696085 479.821334,69.6116631 479.17,68.58 L472.83,58.58 C470.223333,54.48 467.056667,52.4233333 463.33,52.41 L454.18,52.41 L454.18,68.52 C454.203322,69.4522107 453.841614,70.3528638 453.18,71.01 C452.517806,71.6701595 451.614802,72.0313611 450.68,72.01 L443.68,72.01 C442.743006,72.0271853 441.838469,71.6668123 441.17,71.01 C440.503774,70.351816 440.141481,69.446082 440.17,68.51 L440.29,21.86 C440.269803,20.9254087 440.630829,20.0228444 441.29,19.36 C441.927395,18.6758743 442.825092,18.2942622 443.76,18.3095318 L474.67,18.39 C480.39,18.39 485.076667,19.94 488.73,23.04 C492.383333,26.14 494.203333,30.29 494.19,35.49 C494.063333,42.7033333 489.3,47.2066667 479.9,49 C481.484067,49.6135252 482.904514,50.5855906 484.05,51.84 C485.674847,53.654962 487.137133,55.6091383 488.42,57.68 L495.21,68.52 C495.577221,69.1093518 495.780866,69.7858671 495.8,70.48 L495.8,70.48 Z M454.21,41.74 L470.21,41.74 C472.559199,41.8094724 474.88989,41.3048899 477,40.27 C478.881403,39.380915 480.044647,37.4487472 479.95,35.37 C480.055656,33.2834473 478.890265,31.3398116 477,30.45 C474.897868,29.3847581 472.566149,28.8524806 470.21,28.9 L454.21,28.9 L454.21,41.74 Z" id="Shape" fill="#282828"></path>
<path d="M502,68.66 L502.12,21.93 C502.106969,20.9868821 502.48745,20.0809738 503.17,19.43 C503.826139,18.7489431 504.734359,18.3690106 505.68,18.3797664 L512.68,18.3797664 C513.640691,18.3689866 514.564824,18.7478276 515.241347,19.4300041 C515.91787,20.1121806 516.289008,21.039434 516.27,22 L516.15,68.65 C516.159979,69.5936623 515.771469,70.4977631 515.08,71.14 C514.402306,71.7951221 513.492463,72.1547439 512.55,72.14 L505.55,72.14 C504.613006,72.1571853 503.708469,71.7968123 503.04,71.14 C502.344797,70.5069922 501.964251,69.5995358 502,68.66 Z" id="Path" fill="#282828"></path>
<path d="M522.48,68.71 L532,33.06 C534.566667,23.3466667 542.87,18.5 556.91,18.5199384 L577.11,18.57 C577.996001,18.5541891 578.841559,18.9402048 579.41,19.62 C580.006346,20.2917863 580.330809,21.1617749 580.320262,22.06 L580.2,68.86 C580.23056,69.7817714 579.866841,70.6728823 579.2,71.31 C578.525984,71.9645342 577.619419,72.3242822 576.68,72.31 L569.68,72.31 C568.735914,72.3337643 567.822711,71.9728143 567.15,71.31 C566.480133,70.6419037 566.117934,69.7255402 566.15,68.78 L566.15,59.33 L539.51,59.27 L536.98,68.7 C536.727496,69.7139708 536.129991,70.6084614 535.29,71.23 C534.499985,71.8626048 533.521963,72.214411 532.51,72.23 L525.13,72.23 C524.459988,72.2878818 523.794912,72.0733836 523.284971,71.6349475 C522.775031,71.1965113 522.463235,70.571116 522.42,69.9 C522.400467,69.5023251 522.420566,69.1036934 522.48,68.71 Z M542.24,48.64 L566.11,48.7 L566.11,29.14 L555.43,29.14 C550.779549,29.0158892 546.663838,32.130706 545.52,36.64 L542.24,48.64 Z" id="Shape" fill="#282828"></path>
<path d="M590.9,68.88 L591,22.16 C590.986969,21.2168821 591.36745,20.3109738 592.05,19.66 C592.709218,18.9774003 593.621131,18.5974368 594.57,18.6096981 L601.57,18.6096981 C602.520183,18.6019547 603.433929,18.9751711 604.106773,19.6461353 C604.779617,20.3170996 605.155387,21.2297986 605.150057,22.18 L605,68.85 C605.028154,69.7830757 604.665702,70.6855811 604,71.34 C603.323524,71.9970099 602.412865,72.3569544 601.47,72.34 L594.47,72.34 C593.533006,72.3571853 592.628469,71.9968123 591.96,71.34 C591.263951,70.7144482 590.876621,69.8155493 590.9,68.88 Z" id="Path" fill="#F65803"></path>
<path d="M615.78,68.8 L615.9,22.3 C615.875203,21.340928 616.235317,20.4118317 616.9,19.72 C617.547817,19.0506027 618.449041,18.6872059 619.38,18.72 L634.63,18.72 C635.64758,18.7359883 636.627509,19.1074416 637.4,19.77 C638.233003,20.4058524 638.845164,21.2873645 639.15,22.29 L650.15,54.29 L661.29,22.29 C661.608719,21.2943995 662.226826,20.4213666 663.06,19.79 C663.836411,19.140258 664.817595,18.7860398 665.83,18.79 L681.08,18.79 C682.009485,18.7723021 682.901791,19.1547191 683.53,19.84 C684.192419,20.5373141 684.551934,21.4684571 684.53,22.43 L684.38,69 C684.412024,69.9543928 684.050454,70.8800124 683.38,71.56 C682.723535,72.2226258 681.822426,72.5845171 680.89,72.56 L674.1,72.56 C673.168855,72.5774675 672.270416,72.2166488 671.61,71.56 C670.941001,70.8749956 670.579921,69.9470191 670.61,68.99 L670.7,32.39 L657.36,69.13 C656.988416,70.0838348 656.349536,70.9102123 655.52,71.51 C654.734577,72.1438986 653.759218,72.4960135 652.75,72.51 L647.39,72.51 C646.387527,72.4923334 645.419667,72.140384 644.64,71.51 C643.818452,70.8953887 643.179069,70.0693751 642.79,69.12 L629.7,32.23 L629.6,68.83 C629.634802,69.787823 629.273023,70.7175951 628.6,71.4 C627.944212,72.0636445 627.042642,72.4257208 626.11,72.4 L619.37,72.4 C618.432799,72.4183203 617.527839,72.0577785 616.86,71.4 C616.143427,70.7285743 615.750037,69.7815254 615.78,68.8 L615.78,68.8 Z" id="Path" fill="#F65803"></path>
<path d="M692.08,58.84 C691.973218,57.6336327 692.466829,56.4519567 693.4,55.68 C694.12014,55.0807712 695.014494,54.7300443 695.95,54.68 L700.41,54.68 C702.663333,54.68 704.373333,55.91 705.54,58.37 C706.7,60.82 709.34,62.05 713.43,62.06 L726.55,62.35 C730.943333,62.35 733.143333,60.92 733.15,58.06 C733.15,55.8933333 730.483333,54.1766667 725.15,52.91 C722.75,52.33 720.15,51.75 717.21,51.18 C714.27,50.61 711.44,49.9 708.58,49.05 C705.87988,48.2547647 703.245348,47.2517704 700.7,46.05 C698.399488,44.9682289 696.403219,43.3327311 694.89,41.29 C693.392835,39.2306421 692.616105,36.7352654 692.68,34.19 C692.68,29.17 694.473333,25.3066667 698.06,22.6 C701.646667,19.8933333 707.796667,18.56 716.51,18.6 L726.02,18.85 C730.924684,18.8052317 735.735418,20.1956173 739.86,22.85 C743.96,25.5166667 746.003333,28.8133333 745.99,32.74 C746.104216,33.9511338 745.614157,35.1407428 744.68,35.92 C743.972856,36.5214361 743.087125,36.8729163 742.16,36.92 L737.7,36.92 C735.46,36.92 733.75,35.68 732.58,33.22 C731.41,30.76 728.78,29.52 724.68,29.51 L713.41,29.25 C709.01,29.25 706.806667,30.68 706.8,33.54 C706.8,35.12 708.19,36.41 710.97,37.41 C714.24125,38.5440576 717.594334,39.426624 721,40.05 C725,40.8233333 729,41.7533333 733,42.84 C736.752403,43.796252 740.228609,45.6182636 743.15,48.16 C745.84998,50.4490644 747.377502,53.8309112 747.31,57.37 C747.31,62.39 745.506667,66.2533333 741.9,68.96 C738.293333,71.6666667 732.153333,73 723.48,72.96 L712.12,72.71 C707.211841,72.7573081 702.397191,71.3667955 698.27,68.71 C694.143333,66.0833333 692.08,62.7933333 692.08,58.84 Z" id="Path" fill="#F65803"></path>
<path d="M176,111.05 L176,123.81 L171.69,123.81 L171.69,92.61 L183.04,92.61 C188.81,92.61 192.68,96.61 192.68,101.85 C192.68,107.09 188.81,111.05 183.04,111.05 L176,111.05 Z M182.25,107.17 C185.99,107.17 188.25,105.1 188.25,101.89 C188.25,98.68 185.96,96.48 182.25,96.48 L176,96.48 L176,107.17 L182.25,107.17 Z" id="Shape" fill="#888888"></path>
<path d="M203.53,111.71 L209.25,110.87 C210.53,110.69 210.88,110.03 210.88,109.28 C210.88,107.22 209.51,105.5 206.3,105.5 C205.094424,105.418003 203.906525,105.824303 203.003696,106.627445 C202.100867,107.430587 201.558975,108.563079 201.5,109.77 L197.5,108.84 C197.94,104.84 201.6,101.98 206.17,101.98 C212.51,101.98 214.98,105.59 214.98,109.72 L214.98,120.33 C214.964645,121.495374 215.051646,122.659846 215.24,123.81 L211.19,123.81 C211.04052,122.881154 210.976918,121.940514 211,121 C209.510823,123.298723 206.916404,124.637778 204.18,124.52 C199.87,124.52 197.09,121.52 197.09,118.18 C197.1,114.35 199.88,112.23 203.53,111.71 Z M210.88,114.71 L210.88,113.71 L204.41,114.71 C202.65,114.98 201.33,115.99 201.33,117.88 C201.363095,118.748086 201.746619,119.565693 202.392987,120.146105 C203.039355,120.726517 203.893369,121.020169 204.76,120.96 C208.15,121 210.88,119.36 210.88,114.74 L210.88,114.71 Z" id="Shape" fill="#888888"></path>
<path d="M227.77,123.81 L223.64,123.81 L223.64,102.64 L227.64,102.64 L227.64,105.64 C228.983384,103.304982 231.507823,101.904226 234.2,102 C239.26,102 241.77,105.66 241.77,110.37 L241.77,123.79 L237.63,123.79 L237.63,111.09 C237.63,108.09 236.4,105.76 232.7,105.76 C229.44,105.76 227.77,108.36 227.77,111.57 L227.77,123.81 Z" id="Path" fill="#888888"></path>
<path d="M265.39,120.59 C264.123446,123.01383 261.57259,124.489821 258.84,124.38 C252.63,124.38 248.84,119.45 248.84,113.16 C248.84,107.16 252.84,102.07 258.84,102.07 C262.58,102.07 264.6,103.92 265.31,105.63 L265.31,92 L269.4,92 L269.4,119.94 C269.393999,121.249913 269.467467,122.558984 269.62,123.86 L265.62,123.86 C265.474248,122.913625 265.400702,121.957533 265.4,121 L265.39,120.59 Z M259.23,120.73 C263.02,120.73 265.35,117.43 265.35,113.07 C265.35,108.71 263.06,105.72 259.28,105.72 C255.5,105.72 253,108.8 253,113.16 C253,117.52 255.27,120.73 259.23,120.73 L259.23,120.73 Z" id="Shape" fill="#888888"></path>
<path d="M298.53,113.2 C298.53,119.67 294.04,124.47 287.7,124.47 C281.36,124.47 276.88,119.67 276.88,113.2 C276.88,106.73 281.36,102 287.7,102 C294.04,102 298.53,106.78 298.53,113.2 Z M294.3,113.2 C294.3,108.32 291.22,105.68 287.7,105.68 C284.18,105.68 281.1,108.32 281.1,113.2 C281.1,118.08 284.18,120.77 287.7,120.77 C291.22,120.77 294.3,118.13 294.3,113.2 L294.3,113.2 Z" id="Shape" fill="#888888"></path>
<path d="M317.75,106.82 C317.153912,106.733389 316.552347,106.689942 315.95,106.69 C312.47,106.69 310.14,108.54 310.14,113.2 L310.14,123.81 L306,123.81 L306,102.64 L310.05,102.64 L310.05,106.34 C311.132122,103.823292 313.652596,102.233087 316.39,102.34 C316.846155,102.34552 317.301059,102.389004 317.75,102.47 L317.75,106.82 Z" id="Path" fill="#888888"></path>
<path d="M329.46,111.71 L335.18,110.87 C336.45,110.69 336.81,110.03 336.81,109.28 C336.81,107.22 335.44,105.5 332.23,105.5 C331.023761,105.415203 329.834309,105.820526 328.930841,106.624236 C328.027373,107.427945 327.486272,108.562094 327.43,109.77 L323.43,108.84 C323.87,104.84 327.52,101.98 332.1,101.98 C338.44,101.98 340.9,105.59 340.9,109.72 L340.9,120.33 C340.886006,121.495732 340.976367,122.660377 341.17,123.81 L337.17,123.81 C337.007383,122.865645 336.933727,121.908116 336.95,120.95 C335.459417,123.247172 332.865953,124.585734 330.13,124.47 C325.81,124.47 323.04,121.47 323.04,118.13 C323,114.35 325.8,112.23 329.46,111.71 Z M336.81,114.71 L336.81,113.71 L330.34,114.71 C328.58,114.98 327.26,115.99 327.26,117.88 C327.293095,118.748086 327.676619,119.565693 328.322987,120.146105 C328.969355,120.726517 329.823369,121.020169 330.69,120.96 C334.08,121 336.81,119.36 336.81,114.74 L336.81,114.71 Z" id="Shape" fill="#888888"></path>
<polygon id="Path" fill="#888888" points="363.2 123.81 363.2 92.61 382.2 92.61 382.2 96.61 367.52 96.61 367.52 106.61 380.81 106.61 380.81 110.61 367.52 110.61 367.52 123.73"></polygon>
<polygon id="Path" fill="#888888" points="419.09 123.81 419.09 99.52 408.44 123.81 404.44 123.81 393.92 99.52 393.92 123.81 389.65 123.81 389.65 92.61 395.5 92.61 406.5 118 417.59 92.61 423.36 92.61 423.36 123.81"></polygon>
<path d="M449.49,101.06 C448.982092,97.8538566 446.131216,95.5515584 442.89,95.73 C439.37,95.73 436.89,98.02 436.89,100.92 C436.89,103.17 438.25,104.92 440.89,105.46 L445.56,106.46 C450.75,107.6 453.66,110.86 453.66,115.22 C453.66,120.06 449.52,124.46 442.87,124.46 C435.35,124.46 431.78,119.62 431.21,115.17 L435.35,113.85 C435.453196,115.729635 436.299659,117.49107 437.702796,118.746015 C439.105932,120.000959 440.950542,120.64638 442.83,120.54 C447.14,120.54 449.26,118.3 449.26,115.54 C449.26,113.29 447.71,111.36 444.59,110.7 L440.15,109.7 C435.7,108.7 432.53,105.83 432.53,101.16 C432.53,96.28 437.07,91.88 442.83,91.88 C449.83,91.88 452.69,96.23 453.39,99.62 L449.49,101.06 Z" id="Path" fill="#888888"></path>
<polygon id="Path" fill="#888888" points="475 123.81 475 92.61 479.4 92.61 479.4 123.81"></polygon>
<polygon id="Path" fill="#888888" points="500.7 96.61 500.7 123.81 496.39 123.81 496.39 96.61 486 96.61 486 92.61 511.17 92.61 511.17 96.61"></polygon>
<path d="M533.75,101.06 C533.242092,97.8538566 530.391216,95.5515584 527.15,95.73 C523.63,95.73 521.15,98.02 521.15,100.92 C521.15,103.17 522.51,104.92 525.15,105.46 L529.82,106.46 C535.01,107.6 537.91,110.86 537.91,115.22 C537.91,120.06 533.78,124.46 527.13,124.46 C519.61,124.46 516.04,119.62 515.47,115.17 L519.61,113.85 C519.713196,115.729635 520.559659,117.49107 521.962796,118.746015 C523.365932,120.000959 525.210542,120.64638 527.09,120.54 C531.4,120.54 533.51,118.3 533.51,115.54 C533.51,113.29 531.97,111.36 528.85,110.7 L524.4,109.7 C519.96,108.7 516.79,105.83 516.79,101.16 C516.79,96.28 521.32,91.88 527.09,91.88 C534.09,91.88 536.95,96.23 537.65,99.62 L533.75,101.06 Z" id="Path" fill="#888888"></path>
<polygon id="Path" fill="#888888" points="575.46 123.81 575.46 99.52 564.81 123.81 560.81 123.81 550.29 99.52 550.29 123.81 546 123.81 546 92.61 551.85 92.61 562.85 118 574 92.61 579.77 92.61 579.77 123.81"></polygon>
</g>
</g>
</svg>

After

(image error) Size: 20 KiB

View File

@ -1378,7 +1378,7 @@ if ($get_extended_event) {
}
// Tabs.
$tabs = "<ul class=''>";
$tabs = "<ul class='event_detail_tab_menu'>";
$tabs .= "<li><a href='#extended_event_general_page' id='link_general'>".html_print_image(
'images/lightning_go.png',
true,
@ -1436,7 +1436,7 @@ if ($get_extended_event) {
).'<span>'.__('Responses').'</span></a></li>';
}
if ($event['custom_data'] != '') {
if (empty($event['custom_data']) === false) {
$tabs .= "<li><a href='#extended_event_custom_data_page' id='link_custom_data'>".html_print_image(
'images/custom_field_col.png',
true,

View File

@ -349,18 +349,24 @@ function process_user_login_remote($login, $pass, $api=false)
return false;
}
$user_info = [
'fullname' => $login,
'comments' => 'Imported from '.$config['auth'],
];
if (is_metaconsole() === true) {
$user_info['metaconsole_access_node'] = $config['ad_adv_user_node'];
}
// Create the user.
if (enterprise_hook(
'prepare_permissions_groups_of_user_ad',
[
$login,
$pass,
[
'fullname' => $login,
'comments' => 'Imported from '.$config['auth'],
],
$user_info,
false,
defined('METACONSOLE'),
defined('METACONSOLE') && is_centralized() === false,
]
) === false
) {
@ -373,6 +379,10 @@ function process_user_login_remote($login, $pass, $api=false)
return false;
}
if (is_metaconsole() === true) {
$user_info['metaconsole_access_node'] = $config['ldap_adv_user_node'];
}
$permissions = fill_permissions_ldap($sr);
if (empty($permissions) === true) {
$config['auth_error'] = __('User not found in database or incorrect password');
@ -387,7 +397,7 @@ function process_user_login_remote($login, $pass, $api=false)
$pass,
$user_info,
$permissions,
is_metaconsole()
is_metaconsole() && is_centralized() === false
);
}
} else {

View File

@ -1042,40 +1042,20 @@ class AgentWizard extends HTML
$oidExplore = '.1.3.6.1.2.1.31.1.1.1.1';
} else {
$this->interfacesx64 = false;
$oidExplore = '1.3.6.1.2.1.2.2.1.2';
$oidExplore = '.1.3.6.1.2.1.2.2.1.2';
}
// Explore interface names.
$oidExplore = '.1.3.6.1.2.1.31.1.1.1.1';
$receivedOid = $this->snmpWalkValues(
$oidExplore,
false,
true
);
} else {
// Get the device PEN.
$oidExplore = '.1.3.6.1.2.1.1.2.0';
}
// Doc Interfaces de red.
// Explore general or interfaces
$receivedOid = $this->snmpWalkValues(
$oidExplore,
false,
false
);
if (empty($receivedOid) || preg_grep('/no.*object/i', $receivedOid)) {
$this->interfacesx64 = false;
$oidExplore = '1.3.6.1.2.1.2.2.1.2';
// Doc Interfaces de red.
$receivedOid = $this->snmpWalkValues(
$oidExplore,
false,
true
);
}
// The snmpwalk return information.
if (empty($receivedOid) === false) {
if ($this->wizardSection === 'snmp_interfaces_explorer') {
@ -1227,7 +1207,7 @@ class AgentWizard extends HTML
$this->idPolicy,
io_safe_input($module['name'])
);
$msgError = __('Module exist in policy');
$msgError = __('Module exists in policy');
} else {
$sql = sprintf(
"SELECT id_agente_modulo
@ -1237,7 +1217,7 @@ class AgentWizard extends HTML
$this->idAgent,
io_safe_input($module['name'])
);
$msgError = __('Module exist in agent');
$msgError = __('Module exists in agent');
}
$existInDb = db_get_value_sql($sql);
@ -1931,7 +1911,7 @@ class AgentWizard extends HTML
// Already defined.
$this->message['type'][] = 'error';
$this->message['message'][] = __(
'Module "%s" exits in this agent',
'Module "%s" exists in this agent',
$candidate['name']
);
$errorflag = true;
@ -3965,7 +3945,7 @@ class AgentWizard extends HTML
$class = '';
if ($activeModules === 1) {
$class = 'alpha50';
$class = 'alpha50 pdd_0px';
}
$table->head[6] = html_print_checkbox_switch_extended(
@ -3997,7 +3977,7 @@ class AgentWizard extends HTML
'',
true,
'',
'alpha50'
'alpha50 pdd_0px'
);
}
@ -4196,7 +4176,9 @@ class AgentWizard extends HTML
false,
'switchBlockControl(event)',
'',
true
true,
'',
'pdd_0px'
);
} else {
// WIP. Current value of this module.
@ -4222,7 +4204,9 @@ class AgentWizard extends HTML
false,
'switchBlockControl(event)',
'form="form-create-modules"',
true
true,
'',
'pdd_0px'
);
}
@ -5681,22 +5665,28 @@ class AgentWizard extends HTML
.parent()
.removeClass("alpha50");
if (selectedBlock.prop("checked")) {
// Set to active the values of fields.
for (i = 0; i<=15; i++) {
document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 1;
}
// Set checked.
// Set all inputs in block to checked.
var blockItems = document.querySelectorAll('[id^="hidden-module-active-'+switchName[2]+'"]');
blockItems.forEach(function(item) {
item.value = 1;
});
// Set block selector to checked.
$("[id*=checkbox-sel_module_" + blockNumber + "]")
.each(function() {
$(this).prop("checked", true);
});
imageInfoModules.removeClass('hidden');
} else {
// Set to inactive the values of fields.
for (i = 0; i<=15; i++) {
document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 0;
}
// Set unchecked.
// Set all inputs in block to unchecked.
var blockItems = document.querySelectorAll('[id^="hidden-module-active-'+switchName[2]+'"]');
blockItems.forEach(function(item) {
item.value = 0;
});
// Set block selector to unchecked.
$("[id*=checkbox-sel_module_" + blockNumber + "]")
.each(function() {
$(this).prop("checked", false);

View File

@ -1394,6 +1394,10 @@ class ConsoleSupervisor
$PHPmemory_limit_min = config_return_in_bytes('800M');
$PHPSerialize_precision = ini_get('serialize_precision');
if (is_metaconsole() === true) {
$PHPmemory_limit_min = config_return_in_bytes('-1');
}
// PhantomJS status.
$phantomjs_dir = io_safe_output($config['phantomjs_bin']);
$result_ejecution = exec($phantomjs_dir.'/phantomjs --version');
@ -1498,6 +1502,11 @@ class ConsoleSupervisor
$url = 'http://php.net/manual/es/ini.core.php#ini.memory-limit';
}
$recommended_memory = '800M';
if (is_metaconsole() === true) {
$recommended_memory = '-1';
}
$this->notify(
[
'type' => 'NOTIF.PHP.MEMORY_LIMIT',
@ -1507,7 +1516,7 @@ class ConsoleSupervisor
),
'message' => sprintf(
__('Recommended value is: %s'),
sprintf(__('%s or greater'), '800M')
sprintf(__('%s or greater'), $recommended_memory)
).'<br><br>'.__('Please, change it on your PHP configuration file (php.ini) or contact with administrator'),
'url' => $url,
]

View File

@ -149,7 +149,7 @@ class CredentialStore extends Wizard
* @param string $ajax_controller Path of ajaxController, is the 'page'
* variable sent in ajax calls.
*
* @return Object
* @return object
*/
public function __construct($ajax_controller)
{
@ -248,7 +248,11 @@ class CredentialStore extends Wizard
);
} else {
$groups = [ $filter['filter_id_group'] ];
$childrens = groups_get_children($id_group, null, true);
$childrens = groups_get_children(
$filter['filter_id_group'],
null,
true
);
if (!empty($childrens)) {
foreach ($childrens as $child) {
$groups[] = (int) $child['id_grupo'];
@ -353,6 +357,10 @@ class CredentialStore extends Wizard
$return = db_get_all_rows_sql($sql);
if ($return === false) {
$return = [];
}
// Filter out those items of group all that cannot be edited by user.
$return = array_filter(
$return,

View File

@ -20,8 +20,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC211004';
$pandora_version = 'v7.0NG.757';
$build_version = 'PC211104';
$pandora_version = 'v7.0NG.758';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -425,6 +425,8 @@ define('SERVER_TYPE_SYSLOG', 18);
define('SERVER_TYPE_AUTOPROVISION', 19);
define('SERVER_TYPE_MIGRATION', 20);
define('SERVER_TYPE_ALERT', 21);
define('SERVER_TYPE_CORRELATION', 22);
define('SERVER_TYPE_NCM', 23);
// REPORTS.
define('REPORT_TOP_N_MAX', 1);

View File

@ -766,7 +766,7 @@ function mysql_db_format_array_where_clause_sql($values, $join='AND', $prefix=fa
if ($value === null) {
$not = (($negative === true) ? 'NOT' : '');
$query .= sprintf('%s IS %s NULL', $field, $negative);
$query .= sprintf('%s IS %s NULL', $field, $not);
} else if (is_int($value) || is_bool($value)) {
$not = (($negative === true) ? '!' : '');
$query .= sprintf('%s %s= %d', $field, $not, $value);
@ -883,7 +883,7 @@ function mysql_db_get_row_sql($sql, $search_history_db=false, $cache=true)
*
* @return mixed Array of the row or false in case of error.
*/
function mysql_db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $historydb=false)
function mysql_db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $historydb=false, $cache=true)
{
if (empty($fields)) {
$fields = '*';
@ -905,7 +905,7 @@ function mysql_db_get_row_filter($table, $filter, $fields=false, $where_join='AN
$sql = sprintf('SELECT %s FROM %s %s', $fields, $table, $filter);
return db_get_row_sql($sql, $historydb);
return db_get_row_sql($sql, $historydb, $cache);
}
@ -1291,23 +1291,6 @@ function mysql_db_process_sql_rollback()
}
/**
* Put quotes if magic_quotes protection
*
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
*/
function mysql_safe_sql_string($string)
{
if (get_magic_quotes_gpc() == 0) {
return $string;
}
global $config;
return mysql_real_escape_string($config['dbconnection'], $string);
}
/**
* Get last error.
*

View File

@ -1041,7 +1041,7 @@ function oracle_db_get_row_sql($sql, $search_history_db=false, $cache=true)
*
* @return mixed Array of the row or false in case of error.
*/
function oracle_db_get_row_filter($table, $filter, $fields=false, $where_join='AND')
function oracle_db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $history_db=false, $cache=true)
{
if (empty($fields)) {
$fields = '*';
@ -1063,7 +1063,7 @@ function oracle_db_get_row_filter($table, $filter, $fields=false, $where_join='A
$sql = sprintf('SELECT %s FROM %s %s', $fields, $table, $filter);
return db_get_row_sql($sql);
return db_get_row_sql($sql, $history_db, $cache);
}
@ -1496,21 +1496,6 @@ function oracle_db_process_sql_rollback()
}
/**
* Put quotes if magic_quotes protection
*
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
*/
function oracle_safe_sql_string($string)
{
if (get_magic_quotes_gpc() == 0) {
return $string;
}
return oracle_escape_string_sql($string);
}
/**
* Get last error.
*

View File

@ -750,7 +750,7 @@ function postgresql_db_get_row_sql($sql, $search_history_db=false, $cache=true)
*
* @return mixed Array of the row or false in case of error.
*/
function postgresql_db_get_row_filter($table, $filter, $fields=false, $where_join='AND')
function postgresql_db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $historydb=false, $cache=true)
{
if (empty($fields)) {
$fields = '*';
@ -772,7 +772,7 @@ function postgresql_db_get_row_filter($table, $filter, $fields=false, $where_joi
$sql = sprintf('SELECT %s FROM %s %s', $fields, $table, $filter);
return db_get_row_sql($sql);
return db_get_row_sql($sql, $historydb, $cache);
}
@ -1098,23 +1098,6 @@ function postgresql_db_process_sql_rollback()
}
/**
* Put quotes if magic_quotes protection
*
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
*/
function postgresql_safe_sql_string($string)
{
if (get_magic_quotes_gpc() == 0) {
return $string;
}
global $config;
return pg_escape_string($config['dbconnection'], $string);
}
/**
* Get last error.
*

View File

@ -1689,32 +1689,6 @@ if (!function_exists('mb_strtoupper')) {
}
/**
* Put quotes if magic_quotes protection
*
* @param string Text string to be protected with quotes if magic_quotes protection is disabled
*/
function safe_sql_string($string)
{
global $config;
switch ($config['dbtype']) {
case 'mysql':
return mysql_safe_sql_string($string);
break;
case 'postgresql':
return postgresql_safe_sql_string($string);
break;
case 'oracle':
return oracle_safe_sql_string($string);
break;
}
}
/**
* Verifies if current Pandora FMS installation is a Metaconsole.
*
@ -1753,9 +1727,14 @@ function has_metaconsole()
*/
function is_management_allowed($hkey='')
{
return ( (is_metaconsole() && is_centrallised())
|| (!is_metaconsole() && !is_centrallised())
|| (!is_metaconsole() && is_centrallised()) && $hkey == generate_hash_to_api());
$nodes = db_get_value('count(*) as n', 'tmetaconsole_setup');
if ($nodes !== false) {
$nodes = (int) $nodes;
}
return ( (is_metaconsole() && (is_centralized() || $nodes === 0))
|| (!is_metaconsole() && !is_centralized())
|| (!is_metaconsole() && is_centralized()) && $hkey == generate_hash_to_api());
}
@ -1764,7 +1743,7 @@ function is_management_allowed($hkey='')
*
* @return boolean
*/
function is_centrallised()
function is_centralized()
{
global $config;
@ -1784,7 +1763,7 @@ function is_centrallised()
*/
function is_central_policies()
{
return is_metaconsole() && is_centrallised();
return is_metaconsole() && is_centralized();
}
@ -2110,8 +2089,14 @@ function get_snmpwalk(
exec($command_str, $output, $rc);
}
// Parse the output of snmpwalk.
$snmpwalk = [];
// Check if OID is available.
if (count($output) == 1 && strpos($output[0], 'No Such Object available on this agent at this OID') !== false) {
return $snmpwalk;
}
// Parse the output of snmpwalk.
foreach ($output as $line) {
// Separate the OID from the value.
if (strpos($format, 'q') === false) {
@ -2467,86 +2452,74 @@ function get_acl_column($access)
case 'AR':
return 'agent_view';
break;
case 'AW':
return 'agent_edit';
break;
case 'AD':
return 'agent_disable';
break;
case 'LW':
return 'alert_edit';
break;
case 'LM':
return 'alert_management';
break;
case 'PM':
return 'pandora_management';
break;
case 'DM':
return 'db_management';
break;
case 'UM':
return 'user_management';
break;
case 'RR':
return 'report_view';
break;
case 'RW':
return 'report_edit';
break;
case 'RM':
return 'report_management';
break;
case 'ER':
return 'event_view';
break;
case 'EW':
return 'event_edit';
break;
case 'EM':
return 'event_management';
break;
case 'MR':
return 'map_view';
break;
case 'MW':
return 'map_edit';
break;
case 'MM':
return 'map_management';
break;
case 'VR':
return 'vconsole_view';
break;
case 'VW':
return 'vconsole_edit';
break;
case 'VM':
return 'vconsole_management';
break;
case 'NR':
return 'network_config_view';
case 'NW':
return 'network_config_edit';
case 'NM':
return 'network_config_management';
default:
return '';
break;
}
}
@ -2580,7 +2553,10 @@ function get_users_acl($id_user)
sum(tperfil.map_management) as map_management,
sum(tperfil.vconsole_view) as vconsole_view,
sum(tperfil.vconsole_edit) as vconsole_edit,
sum(tperfil.vconsole_management) as vconsole_management
sum(tperfil.vconsole_management) as vconsole_management,
sum(tperfil.network_config_view) as network_config_view,
sum(tperfil.network_config_edit) as network_config_edit,
sum(tperfil.network_config_management) as network_config_management
FROM tusuario_perfil, tperfil
WHERE tusuario_perfil.id_perfil = tperfil.id_perfil
AND tusuario_perfil.id_usuario = '%s'",

View File

@ -1162,7 +1162,6 @@ function alerts_duplicate_alert_template($id_alert_template, $id_group)
unset($template['name']);
unset($template['id']);
unset($template['type']);
$template['value'] = safe_sql_string($template['value']);
return alerts_create_alert_template($name, $type, $template);
}

View File

@ -14641,6 +14641,53 @@ function api_set_add_element_service($thrash1, $thrash2, $other, $thrash3)
}
/**
* Example: http://127.0.0.1/pandora_console/include/api.php?op=set&op2=recreate_service_modules&id=1&user=admin&apipass=1234&pass=pandora
* Recreates modules for given service id, if needed.
*
* @param integer $id Id service.
* @param integer|null $id_agent Agent id to allocate service if node env.
* @return void
*/
function api_set_recreate_service_modules($id, $id_agent)
{
global $config;
if (!check_acl($config['id_user'], $service['id_group'], 'AW')) {
returnError('forbidden', 'string');
return;
}
$id_agent = (int) $id_agent;
if (empty($id_agent) === true) {
$id_agent = null;
}
if (is_metaconsole() === true) {
// Force agent recreation in MC if modules are missing.
$id_agent = null;
}
$result = false;
try {
$service = new PandoraFMS\Enterprise\Service($id);
if ($service->migrateModules() !== true) {
$service->addModules($id_agent);
}
$result = true;
} catch (Exception $e) {
$result = false;
$error = $e->getMessage();
}
if ($result === true) {
returnData('string', ['type' => 'string', 'data' => 'OK']);
} else {
returnError('The service modules could not be recreated: '.$error);
}
}
/**
* Update a special day. And return a message with the result of the operation.
*

View File

@ -595,7 +595,7 @@ function cron_list_table()
}
}
$report_type = $args[7];
$report_type = $args[8];
$report_per_agent = $args[3];
$report_name = $args[4];
$email = $args[5];

View File

@ -518,24 +518,25 @@ function db_get_row($table, $field_search, $condition, $fields=false, $cache=tru
* @param mixed Fields of the table to retrieve. Can be an array or a coma
* separated string. All fields are retrieved by default
* @param string Condition to join the filters (AND, OR).
* @param boolean $cache Use cache or not.
*
* @return mixed Array of the row or false in case of error.
*/
function db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $historydb=false)
function db_get_row_filter($table, $filter, $fields=false, $where_join='AND', $historydb=false, $cache=true)
{
global $config;
switch ($config['dbtype']) {
case 'mysql':
return mysql_db_get_row_filter($table, $filter, $fields, $where_join, $historydb);
return mysql_db_get_row_filter($table, $filter, $fields, $where_join, $historydb, $cache);
break;
case 'postgresql':
return postgresql_db_get_row_filter($table, $filter, $fields, $where_join);
return postgresql_db_get_row_filter($table, $filter, $fields, $where_join, $historydb, $cache);
break;
case 'oracle':
return oracle_db_get_row_filter($table, $filter, $fields, $where_join);
return oracle_db_get_row_filter($table, $filter, $fields, $where_join, $historydb, $cache);
break;
}

View File

@ -4662,6 +4662,8 @@ function events_page_custom_data($event)
return '';
}
$table = new stdClass();
$table->width = '100%';
$table->data = [];
$table->head = [];
@ -4669,14 +4671,31 @@ function events_page_custom_data($event)
$json_custom_data = base64_decode($event['custom_data']);
$custom_data = json_decode($json_custom_data);
if ($custom_data === null) {
return '<div id="extended_event_custom_data_page" class="extended_event_pages">'.__('Invalid custom data: %s', $json_custom_data).'</div>';
// Try again because is possible that info not come coded.
$custom_data = json_decode(io_safe_output($event['custom_data']));
if ($custom_data === null) {
return '<div id="extended_event_custom_data_page" class="extended_event_pages">'.__('Invalid custom data: %s', $json_custom_data).'</div>';
}
}
$i = 0;
foreach ($custom_data as $field => $value) {
$table->data[$i][0] = io_safe_output($field);
$table->data[$i][1] = io_safe_output($value);
$table->data[$i][0] = ucfirst(io_safe_output($field));
if (is_array($value) === true) {
$table->data[$i][1] = '<ul>';
foreach ($value as $individualValue) {
$table->data[$i][1] .= sprintf('<li>%s</li>', $individualValue);
}
$table->data[$i][1] .= '</ul>';
} else {
$table->data[$i][1] = io_safe_output($value);
}
$i++;
}

View File

@ -1574,11 +1574,17 @@ function graphic_combined_module(
$date_array['final_date'] = $params['date'];
$date_array['start_date'] = ($params['date'] - $params['period']);
$server_name = metaconsole_get_server_by_id($modules[0]['server']);
if ($params_combined['projection']) {
$output_projection = forecast_projection_graph(
$module_list[0],
$params['period'],
$params_combined['projection']
$params_combined['projection'],
false,
false,
false,
$server_name
);
}

View File

@ -1982,7 +1982,7 @@ function html_print_extended_select_for_time(
html_print_select(
$units,
$uniq_name.'_units',
'60',
'1',
''.$script,
$nothing,
$nothing_value,
@ -2521,7 +2521,8 @@ function html_print_input_text(
$formTo='',
$onKeyUp='',
$disabled=false,
$list=''
$list='',
$placeholder=null
) {
if ($maxlength == 0) {
$maxlength = 255;
@ -2566,6 +2567,10 @@ function html_print_input_text(
$attr['list'] = $list;
}
if ($list !== null) {
$attr['placeholder'] = $placeholder;
}
return html_print_input_text_extended(
$name,
$value,
@ -3747,7 +3752,7 @@ function html_print_checkbox_switch_extended(
$name.($idcounter[$name] ? $idcounter[$name] : '')
);
$output = '<label class="p-switch '.$classParent.'">';
$output = '<label class="p-switch pdd_0px'.$classParent.'">';
$output .= '<input name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
if ($id == '') {
$output .= ' id="checkbox-'.$id_aux.'"';
@ -3971,6 +3976,7 @@ function html_print_image(
'onkeypress',
'onkeydown',
'onkeyup',
'onload',
'pos_tree',
];
@ -4547,7 +4553,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['form']) === true) ? $data['form'] : ''),
((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : ''),
((isset($data['disabled']) === true) ? $data['disabled'] : false),
((isset($data['list']) === true) ? $data['list'] : '')
((isset($data['list']) === true) ? $data['list'] : ''),
((isset($data['placeholder']) === true) ? $data['placeholder'] : '')
);
break;

Some files were not shown because too many files have changed in this diff Show More