mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 03:19:05 +02:00
#13557 Merge branch develop into ent-13557-Black-Theme-Resultado-del-Item-NCM-Configuration-Changes-no-se-lee-correctamente-en-HTML
This commit is contained in:
commit
01115186b7
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.776-240423
|
Version: 7.0NG.776-240426
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.776-240423"
|
pandora_version="7.0NG.776-240426"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.776';
|
use constant AGENT_VERSION => '7.0NG.776';
|
||||||
use constant AGENT_BUILD => '240423';
|
use constant AGENT_BUILD => '240426';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
%define name pandorafms_agent_linux_bin
|
%define name pandorafms_agent_linux_bin
|
||||||
%define source_name pandorafms_agent_linux
|
%define source_name pandorafms_agent_linux
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, binary version
|
Summary: Pandora FMS Linux agent, binary version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_agent_linux
|
%define name pandorafms_agent_linux
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.776"
|
PI_VERSION="7.0NG.776"
|
||||||
PI_BUILD="240423"
|
PI_BUILD="240426"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{240423}
|
{240426}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.776 Build 240423")
|
#define PANDORA_VERSION ("7.0NG.776 Build 240426")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Pandora FMS"
|
VALUE "LegalCopyright", "Pandora FMS"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.776(Build 240423))"
|
VALUE "ProductVersion", "(7.0NG.776(Build 240426))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.776-240423
|
Version: 7.0NG.776-240426
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.776-240423"
|
pandora_version="7.0NG.776-240426"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -27,7 +27,7 @@ switch ($graph) {
|
|||||||
if ($os == 'windows') {
|
if ($os == 'windows') {
|
||||||
$data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" ');
|
$data = exec('wmic cpu get loadpercentage|find /I /V "Loadpercentage" | findstr /r "[0-9]" ');
|
||||||
} else {
|
} else {
|
||||||
$data = exec("top -bn 2 -d 0.01 | grep '^Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
|
$data = exec("top -bn 2 -d 0.01 | grep 'Cpu' | tail -n 1 | awk '{ print $2+$4+$6 }'");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -55,7 +55,8 @@ switch ($graph) {
|
|||||||
if ($os == 'windows') {
|
if ($os == 'windows') {
|
||||||
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
|
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(httpd)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
|
||||||
} else {
|
} else {
|
||||||
$data = exec("ps aux | grep apache2 | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
|
$apache = exec('ps aux | grep apache2 | grep -v safe | grep -v grep && echo 1 || echo 0') == 1 ? 'apache2' : 'apache';
|
||||||
|
$data = exec("ps aux | grep $apache | grep -v safe | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ switch ($graph) {
|
|||||||
if ($os == 'windows') {
|
if ($os == 'windows') {
|
||||||
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
|
$data = exec('(FOR /F "skip=2 tokens=2 delims=\," %P IN (\'typeperf "\\Process(pandora_server)\\% processor time" -sc 1\') DO @echo %P)|find /V /I "..."');
|
||||||
} else {
|
} else {
|
||||||
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ print $3 }'");
|
$data = exec("ps aux | grep pandora_server | grep -v grep | awk '{ sum+=$3 } END { print sum }'");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -7754,4 +7754,9 @@ ALTER TABLE `tdeployment_hosts` DROP COLUMN `arch`;
|
|||||||
-- Update all deployment recon tasks port
|
-- Update all deployment recon tasks port
|
||||||
UPDATE `trecon_task` SET `field4` = 41121 WHERE `type` = 9;
|
UPDATE `trecon_task` SET `field4` = 41121 WHERE `type` = 9;
|
||||||
|
|
||||||
|
-- Update execution in proxmox discovery plugin
|
||||||
|
SET @short_name = 'pandorafms.proxmox';
|
||||||
|
SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_name;
|
||||||
|
UPDATE `tdiscovery_apps_executions` SET `execution` = ''_exec1_' --conf '_tempfileProxmox_'' WHERE `id_app` = @id_app;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
@ -52,7 +52,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ======= Servers List ===============================================
|
// ======= Servers List ===============================================
|
||||||
if ((bool) check_acl($config['id_user'], 0, 'AW') !== false) {
|
if ((bool) check_acl($config['id_user'], 0, 'PM') !== false) {
|
||||||
$servers = [];
|
$servers = [];
|
||||||
$servers_info = servers_get_info();
|
$servers_info = servers_get_info();
|
||||||
|
|
||||||
|
@ -473,6 +473,13 @@ if ($access_console_node === true) {
|
|||||||
enterprise_hook('translate_string_submenu');
|
enterprise_hook('translate_string_submenu');
|
||||||
|
|
||||||
$menu_godmode['gsetup']['sub'] = $sub;
|
$menu_godmode['gsetup']['sub'] = $sub;
|
||||||
|
} else if ((bool) check_acl($config['id_user'], 0, 'AW') === true) {
|
||||||
|
$menu_godmode['gservers']['text'] = __('Servers');
|
||||||
|
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';
|
||||||
|
$menu_godmode['gservers']['id'] = 'god-servers';
|
||||||
|
$sub = [];
|
||||||
|
enterprise_hook('manage_satellite_submenu');
|
||||||
|
$menu_godmode['gservers']['sub'] = $sub;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2426,7 +2426,7 @@ switch ($action) {
|
|||||||
$values['top_n_value'] = get_parameter('max_items');
|
$values['top_n_value'] = get_parameter('max_items');
|
||||||
$values['server_name'] = get_parameter('combo_server_sql');
|
$values['server_name'] = get_parameter('combo_server_sql');
|
||||||
|
|
||||||
if ($sql !== '') {
|
if ($sql !== '' && $sql !== null) {
|
||||||
// Replaces possible macros to check the validity of the query
|
// Replaces possible macros to check the validity of the query
|
||||||
$macros_sql = $sql;
|
$macros_sql = $sql;
|
||||||
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
||||||
@ -3376,7 +3376,7 @@ switch ($action) {
|
|||||||
$values['server_name'] = get_parameter('combo_server_sql');
|
$values['server_name'] = get_parameter('combo_server_sql');
|
||||||
|
|
||||||
|
|
||||||
if ($sql !== '') {
|
if ($sql !== '' && $sql !== null) {
|
||||||
// Replaces possible macros to check the validity of the query
|
// Replaces possible macros to check the validity of the query
|
||||||
$macros_sql = $sql;
|
$macros_sql = $sql;
|
||||||
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
||||||
|
@ -34,7 +34,7 @@ require_once $config['homedir'].'/include/functions_graph.php';
|
|||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
if (! check_acl($config['id_user'], 0, 'PM')) {
|
if (! check_acl($config['id_user'], 0, 'PM') && ((bool) check_acl($config['id_user'], 0, 'AW') === true && $_GET['server_remote'] === null)) {
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_ACL_VIOLATION,
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
'Trying to access Server Management'
|
'Trying to access Server Management'
|
||||||
@ -286,19 +286,21 @@ if (isset($_GET['server']) === true) {
|
|||||||
$id_server
|
$id_server
|
||||||
);
|
);
|
||||||
|
|
||||||
$buttons = '';
|
$buttons = [];
|
||||||
|
|
||||||
// Buttons.
|
// Buttons.
|
||||||
$buttons = [
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
||||||
'standard_editor' => [
|
$buttons = [
|
||||||
'active' => false,
|
'standard_editor' => [
|
||||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
|
'active' => false,
|
||||||
],
|
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=standard_editor&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('Standard editor')]).'</a>',
|
||||||
'advanced_editor' => [
|
],
|
||||||
'active' => false,
|
'advanced_editor' => [
|
||||||
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
|
'active' => false,
|
||||||
],
|
'text' => '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$id_server.'&ext='.$ext.'&tab=advanced_editor&pure='.$pure.'">'.html_print_image('images/pen.png', true, ['title' => __('Advanced editor')]).'</a>',
|
||||||
];
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
if ($server_type === SERVER_TYPE_ENTERPRISE_SATELLITE) {
|
if ($server_type === SERVER_TYPE_ENTERPRISE_SATELLITE) {
|
||||||
$buttons['agent_editor'] = [
|
$buttons['agent_editor'] = [
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
|
|
||||||
// Begin.
|
// Begin.
|
||||||
require_once 'include/functions_clippy.php';
|
require_once 'include/functions_clippy.php';
|
||||||
require_once 'pending_alerts_list.php';
|
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
|
||||||
|
include 'pending_alerts_list.php';
|
||||||
|
}
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -234,18 +234,18 @@ class ExtensionsDiscovery extends Wizard
|
|||||||
url_str = `<a target="_blank" class="link-important" href="${url}">'.__('here').'</a>`;
|
url_str = `<a target="_blank" class="link-important" href="${url}">'.__('here').'</a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
var markup = "<ul class=\'\'>";
|
var markup = "<ul class=\'\' style=\'padding: 15px 0px 0px 25px;\'>";
|
||||||
|
|
||||||
if (msgs_json.includes('.NOT_FOUND_MSG.')) {
|
if (msgs_json.includes('.NOT_FOUND_MSG.')) {
|
||||||
markup += "<li> '.__('The required files for the application were not found.').'</li>";
|
markup += \'<li class="lato font_10pt bolder"> '.__('The required files for the application were not found.').'</li>\';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgs_json.includes('.ENTERPRISE_MSG.')) {
|
if (msgs_json.includes('.ENTERPRISE_MSG.')) {
|
||||||
markup += "<li> '.__('This discovery application is for Enterprise customers only.').'</li>";
|
markup += \'<li class="lato font_10pt bolder"> '.__('This discovery application is for Enterprise customers only.').'</li>\';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgs_json.includes('.URL_MSG.')) {
|
if (msgs_json.includes('.URL_MSG.')) {
|
||||||
markup += \'<li> '.__('You can download this application from').' \'+url_str+\'.</li>\';
|
markup += \'<li class="lato font_10pt bolder"> '.__('You can download this application from').' \'+url_str+\'.</li>\';
|
||||||
}
|
}
|
||||||
|
|
||||||
markup += "</ul>";
|
markup += "</ul>";
|
||||||
|
@ -553,7 +553,6 @@ class SatelliteCollection extends HTML
|
|||||||
},
|
},
|
||||||
datatype: "json",
|
datatype: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
console.log(data);
|
|
||||||
showMsg(data);
|
showMsg(data);
|
||||||
},
|
},
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
@ -596,7 +595,6 @@ class SatelliteCollection extends HTML
|
|||||||
},
|
},
|
||||||
datatype: "json",
|
datatype: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
console.log(data);
|
|
||||||
showMsg(data);
|
showMsg(data);
|
||||||
},
|
},
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
@ -615,7 +613,7 @@ class SatelliteCollection extends HTML
|
|||||||
function showMsg(data) {
|
function showMsg(data) {
|
||||||
var title = "<?php echo __('Success'); ?>";
|
var title = "<?php echo __('Success'); ?>";
|
||||||
var dt_satellite_agents = $("#satellite_collections").DataTable();
|
var dt_satellite_agents = $("#satellite_collections").DataTable();
|
||||||
dt_<?php echo $this->tableId; ?>.draw(false);
|
dt_satellite_agents.draw(false);
|
||||||
|
|
||||||
var text = '';
|
var text = '';
|
||||||
var failed = 0;
|
var failed = 0;
|
||||||
|
@ -554,6 +554,10 @@ class SnmpConsole extends HTML
|
|||||||
$filters = get_parameter('filter', []);
|
$filters = get_parameter('filter', []);
|
||||||
|
|
||||||
// Build ranges.
|
// Build ranges.
|
||||||
|
if (empty($filters['filter_hours_ago']) === true) {
|
||||||
|
$filters['filter_hours_ago'] = 8;
|
||||||
|
}
|
||||||
|
|
||||||
$now_timestamp = time();
|
$now_timestamp = time();
|
||||||
$interval_seconds = ($filters['filter_hours_ago'] * 3600);
|
$interval_seconds = ($filters['filter_hours_ago'] * 3600);
|
||||||
$ago_timestamp = ($now_timestamp - $interval_seconds);
|
$ago_timestamp = ($now_timestamp - $interval_seconds);
|
||||||
@ -637,42 +641,25 @@ class SnmpConsole extends HTML
|
|||||||
$whereSubquery .= ' AND alerted = '.$filters['filter_alert'];
|
$whereSubquery .= ' AND alerted = '.$filters['filter_alert'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filters['filter_severity'] = (int) $filters['filter_severity'];
|
||||||
if ($filters['filter_severity'] != -1) {
|
if ($filters['filter_severity'] != -1) {
|
||||||
// There are two special severity values aimed to match two different trap standard severities
|
// There are two special severity values aimed to match two different trap standard severities
|
||||||
// in database: warning/critical and critical/normal.
|
// in database: warning/critical and critical/normal.
|
||||||
if ($filters['filter_severity'] != EVENT_CRIT_OR_NORMAL
|
if ($filters['filter_severity'] !== EVENT_CRIT_OR_NORMAL
|
||||||
&& $filters['filter_severity'] != EVENT_CRIT_WARNING_OR_CRITICAL
|
&& $filters['filter_severity'] !== EVENT_CRIT_WARNING_OR_CRITICAL
|
||||||
|
&& $filters['filter_severity'] !== EVENT_CRIT_NOT_NORMAL
|
||||||
) {
|
) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND severity = '.$filters['filter_severity'];
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND severity = '.$filters['filter_severity'].') OR
|
|
||||||
(alerted = 1 AND priority = '.$filters['filter_severity'].'))';
|
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND 1 = '.$filters['filter_severity'].') OR
|
|
||||||
(alerted = 1 AND priority = '.$filters['filter_severity'].'))';
|
|
||||||
}
|
|
||||||
} else if ($filters['filter_severity'] === EVENT_CRIT_WARNING_OR_CRITICAL) {
|
} else if ($filters['filter_severity'] === EVENT_CRIT_WARNING_OR_CRITICAL) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_WARNING_OR_CRITICAL.')';
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
}
|
|
||||||
} else if ($filters['filter_severity'] === EVENT_CRIT_OR_NORMAL) {
|
} else if ($filters['filter_severity'] === EVENT_CRIT_OR_NORMAL) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_OR_NORMAL.')';
|
||||||
$whereSubquery .= ' AND (
|
} else if ($filters['filter_severity'] === EVENT_CRIT_NOT_NORMAL) {
|
||||||
(alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_NOT_NORMAL.')';
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1142,42 +1129,25 @@ class SnmpConsole extends HTML
|
|||||||
$whereSubquery .= ' AND alerted = '.$$alert;
|
$whereSubquery .= ' AND alerted = '.$$alert;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($severity != -1) {
|
$severity = (int) $severity;
|
||||||
|
if ($severity !== -1) {
|
||||||
// There are two special severity values aimed to match two different trap standard severities
|
// There are two special severity values aimed to match two different trap standard severities
|
||||||
// in database: warning/critical and critical/normal.
|
// in database: warning/critical and critical/normal.
|
||||||
if ($severity != EVENT_CRIT_OR_NORMAL
|
if ($severity !== EVENT_CRIT_OR_NORMAL
|
||||||
&& $severity != EVENT_CRIT_WARNING_OR_CRITICAL
|
&& $severity !== EVENT_CRIT_WARNING_OR_CRITICAL
|
||||||
|
&& $severity !== EVENT_CRIT_NOT_NORMAL
|
||||||
) {
|
) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND severity = '.$severity;
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND severity = '.$severity.') OR
|
|
||||||
(alerted = 1 AND priority = '.$severity.'))';
|
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND 1 = '.$severity.') OR
|
|
||||||
(alerted = 1 AND priority = '.$severity.'))';
|
|
||||||
}
|
|
||||||
} else if ($severity === EVENT_CRIT_WARNING_OR_CRITICAL) {
|
} else if ($severity === EVENT_CRIT_WARNING_OR_CRITICAL) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_WARNING_OR_CRITICAL.')';
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 0 AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_WARNING.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
}
|
|
||||||
} else if ($severity === EVENT_CRIT_OR_NORMAL) {
|
} else if ($severity === EVENT_CRIT_OR_NORMAL) {
|
||||||
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
if ($config['enterprise_installed']) {
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_OR_NORMAL.')';
|
||||||
$whereSubquery .= ' AND (
|
} else if ($severity === EVENT_CRIT_NOT_NORMAL) {
|
||||||
(alerted = 0 AND (severity = '.EVENT_CRIT_NORMAL.' OR severity = '.EVENT_CRIT_CRITICAL.')) OR
|
// Test if enterprise is installed to search oid in text or oid field in ttrap.
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
$whereSubquery .= ' AND (severity = '.EVENT_CRIT_WARNING.' OR severity = '.EVENT_CRIT_CRITICAL.' OR severity = '.EVENT_CRIT_NOT_NORMAL.')';
|
||||||
} else {
|
|
||||||
$whereSubquery .= ' AND (
|
|
||||||
(alerted = 1 AND (priority = '.EVENT_CRIT_NORMAL.' OR priority = '.EVENT_CRIT_CRITICAL.')))';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ use DI\ContainerBuilder;
|
|||||||
/*
|
/*
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC240423';
|
$build_version = 'PC240426';
|
||||||
$pandora_version = 'v7.0NG.776';
|
$pandora_version = 'v7.0NG.776';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -1119,11 +1119,13 @@ function events_get_all(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$ER_groups = users_get_groups($config['id_user'], 'ER', true);
|
|
||||||
$EM_groups = users_get_groups($config['id_user'], 'EM', true, true);
|
$EM_groups = users_get_groups($config['id_user'], 'EM', true, true);
|
||||||
$EW_groups = users_get_groups($config['id_user'], 'EW', true, true);
|
$EW_groups = users_get_groups($config['id_user'], 'EW', true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
||||||
|
$ER_groups = users_get_groups($config['id_user'], 'ER', true);
|
||||||
// Get groups where user have ER grants.
|
// Get groups where user have ER grants.
|
||||||
if ((bool) $filter['search_secondary_groups'] === true) {
|
if ((bool) $filter['search_secondary_groups'] === true) {
|
||||||
$sql_filters[] = sprintf(
|
$sql_filters[] = sprintf(
|
||||||
@ -1155,7 +1157,7 @@ function events_get_all(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Free search.
|
// Free search.
|
||||||
if (empty($filter['search']) === false && (bool) $filter['regex'] === false) {
|
if (empty($filter['search']) === false) {
|
||||||
if (isset($config['dbconnection']->server_version) === true
|
if (isset($config['dbconnection']->server_version) === true
|
||||||
&& $config['dbconnection']->server_version > 50600
|
&& $config['dbconnection']->server_version > 50600
|
||||||
) {
|
) {
|
||||||
@ -1185,23 +1187,39 @@ function events_get_all(
|
|||||||
$array_search[] = 'lower(ta.alias)';
|
$array_search[] = 'lower(ta.alias)';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disregard repeated whitespaces when searching.
|
if ((bool) $filter['regex'] === true) {
|
||||||
$collapsed_spaces_search = preg_replace('/( )+/', ' ', $filter['search']);
|
$sql_search = ' AND (';
|
||||||
|
foreach ($array_search as $key => $field) {
|
||||||
|
$sql_search .= sprintf(
|
||||||
|
'%s %s %s REGEXP "%s" ',
|
||||||
|
($key === 0) ? '' : $nexo,
|
||||||
|
$field,
|
||||||
|
$not_search,
|
||||||
|
preg_replace('/(?<!\\\\)"/', '', io_safe_output($filter['search'])),
|
||||||
|
);
|
||||||
|
$sql_search .= ' ';
|
||||||
|
}
|
||||||
|
|
||||||
$sql_search = ' AND (';
|
$sql_search .= ' )';
|
||||||
foreach ($array_search as $key => $field) {
|
} else {
|
||||||
$sql_search .= sprintf(
|
// Disregard repeated whitespaces when searching.
|
||||||
'%s LOWER(REGEXP_REPLACE(%s, "( )+", " ")) %s like LOWER("%%%s%%")',
|
$collapsed_spaces_search = preg_replace('/( )+/', ' ', $filter['search']);
|
||||||
($key === 0) ? '' : $nexo,
|
|
||||||
$field,
|
$sql_search = ' AND (';
|
||||||
$not_search,
|
foreach ($array_search as $key => $field) {
|
||||||
$collapsed_spaces_search
|
$sql_search .= sprintf(
|
||||||
);
|
'%s LOWER(REGEXP_REPLACE(%s, "( )+", " ")) %s like LOWER("%%%s%%")',
|
||||||
$sql_search .= ' ';
|
($key === 0) ? '' : $nexo,
|
||||||
|
$field,
|
||||||
|
$not_search,
|
||||||
|
$collapsed_spaces_search
|
||||||
|
);
|
||||||
|
$sql_search .= ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_search .= ' )';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_search .= ' )';
|
|
||||||
|
|
||||||
$sql_filters[] = $sql_search;
|
$sql_filters[] = $sql_search;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1674,7 +1692,7 @@ function events_get_all(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$exists_id_grupo = false;
|
$exists_id_grupo = false;
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if (str_contains($field, 'te.id_grupo') === true || str_contains($field, 'te.*') === true) {
|
if (str_contains($field, 'te.id_grupo') === true || str_contains($field, 'te.*') === true) {
|
||||||
@ -1798,7 +1816,7 @@ function events_get_all(
|
|||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$can_manage = '0 as user_can_manage';
|
$can_manage = '0 as user_can_manage';
|
||||||
if (empty($EM_groups) === false) {
|
if (empty($EM_groups) === false) {
|
||||||
$can_manage = sprintf(
|
$can_manage = sprintf(
|
||||||
@ -5928,17 +5946,30 @@ function events_get_instructions($event, $max_text_length=300)
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$event_name = ui_print_truncate_text(
|
||||||
|
io_safe_output($event['evento']),
|
||||||
|
GENERIC_SIZE_TEXT,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
'...'
|
||||||
|
);
|
||||||
|
|
||||||
|
$over_event_name = base64_encode($event_name);
|
||||||
$output = '<div id="hidden_event_instructions_'.$event['id_evento'].'"';
|
$output = '<div id="hidden_event_instructions_'.$event['id_evento'].'"';
|
||||||
$output .= ' class="event_instruction">';
|
$output .= ' class="event_instruction">';
|
||||||
$output .= $value;
|
$output .= $value;
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
$output .= '<span id="value_event_'.$event['id_evento'].'" class="nowrap">';
|
$output .= '<span id="value_event_'.$event['id_evento'].'" class="nowrap">';
|
||||||
$output .= '<span id="value_event_text_'.$event['id_evento'].'"></span>';
|
$output .= '<span id="value_event_text_'.$event['id_evento'].'"></span>';
|
||||||
$output .= '<a href="javascript:show_instructions('.$event['id_evento'].')">';
|
$output .= '<a href="javascript:show_instructions('.$event['id_evento'].',\''.$over_event_name.'\')">';
|
||||||
$output .= html_print_image(
|
$output .= html_print_image(
|
||||||
'images/default_list.png',
|
'images/default_list.png',
|
||||||
true,
|
true,
|
||||||
['title' => $over_text]
|
[
|
||||||
|
'title' => $over_text,
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
).'</a></span>';
|
).'</a></span>';
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
@ -3308,7 +3308,8 @@ function graph_custom_sql_graph(
|
|||||||
$only_image=false,
|
$only_image=false,
|
||||||
$homeurl='',
|
$homeurl='',
|
||||||
$ttl=1,
|
$ttl=1,
|
||||||
$max_num_elements=8
|
$max_num_elements=8,
|
||||||
|
$layout=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -3509,6 +3510,10 @@ function graph_custom_sql_graph(
|
|||||||
|
|
||||||
if ((int) $ttl === 2) {
|
if ((int) $ttl === 2) {
|
||||||
$options['dataLabel'] = ['display' => 'auto'];
|
$options['dataLabel'] = ['display' => 'auto'];
|
||||||
|
|
||||||
|
if ($layout !== false && is_array($layout) === true) {
|
||||||
|
$options['layout'] = $layout;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= vbar_graph(
|
$output .= vbar_graph(
|
||||||
|
@ -2505,7 +2505,8 @@ function html_print_extended_select_for_time(
|
|||||||
$no_change=false,
|
$no_change=false,
|
||||||
$allow_zero=0,
|
$allow_zero=0,
|
||||||
$units=null,
|
$units=null,
|
||||||
$script_input=''
|
$script_input='',
|
||||||
|
$units_select2=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
$admin = is_user_admin($config['id_user']);
|
$admin = is_user_admin($config['id_user']);
|
||||||
@ -2595,7 +2596,19 @@ function html_print_extended_select_for_time(
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div id="'.$uniq_name.'_manual" class="inline_flex">';
|
echo '<div id="'.$uniq_name.'_manual" class="inline_flex">';
|
||||||
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class, $script_input);
|
html_print_input_text(
|
||||||
|
$uniq_name.'_text',
|
||||||
|
$selected,
|
||||||
|
'',
|
||||||
|
$size,
|
||||||
|
255,
|
||||||
|
false,
|
||||||
|
$readonly,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
$class.(($units_select2 === true) ? ' w100p' : ''),
|
||||||
|
$script_input
|
||||||
|
);
|
||||||
|
|
||||||
html_print_input_hidden($name, $selected, false, $uniq_name);
|
html_print_input_hidden($name, $selected, false, $uniq_name);
|
||||||
html_print_select(
|
html_print_select(
|
||||||
@ -2619,7 +2632,7 @@ function html_print_extended_select_for_time(
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false
|
$units_select2
|
||||||
);
|
);
|
||||||
echo '  <a href="javascript:">'.html_print_image(
|
echo '  <a href="javascript:">'.html_print_image(
|
||||||
'images/logs@svg.svg',
|
'images/logs@svg.svg',
|
||||||
@ -2632,6 +2645,7 @@ function html_print_extended_select_for_time(
|
|||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo "<script type='text/javascript'>
|
echo "<script type='text/javascript'>
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
period_select_init('".$uniq_name."', ".(($allow_zero) ? 1 : 0).");
|
period_select_init('".$uniq_name."', ".(($allow_zero) ? 1 : 0).");
|
||||||
@ -2652,6 +2666,18 @@ function html_print_extended_select_for_time(
|
|||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
</script>";
|
</script>";
|
||||||
|
|
||||||
|
if ($units_select2 === true) {
|
||||||
|
echo '
|
||||||
|
<script>
|
||||||
|
$(document).ready (function () {
|
||||||
|
$("#'.$uniq_name.'_units").select2();
|
||||||
|
$("#'.$uniq_name.'_units").data("select2").$container.addClass("mrgn_lft_10px_imp");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
|
||||||
$returnString = ob_get_clean();
|
$returnString = ob_get_clean();
|
||||||
|
|
||||||
if ($return) {
|
if ($return) {
|
||||||
@ -3535,7 +3561,8 @@ function html_print_input_text(
|
|||||||
$disabled=false,
|
$disabled=false,
|
||||||
$list='',
|
$list='',
|
||||||
$placeholder=null,
|
$placeholder=null,
|
||||||
$pattern=null
|
$pattern=null,
|
||||||
|
$id=false
|
||||||
) {
|
) {
|
||||||
if ($maxlength == 0) {
|
if ($maxlength == 0) {
|
||||||
$maxlength = 255;
|
$maxlength = 255;
|
||||||
@ -3593,7 +3620,7 @@ function html_print_input_text(
|
|||||||
return html_print_input_text_extended(
|
return html_print_input_text_extended(
|
||||||
$name,
|
$name,
|
||||||
$value,
|
$value,
|
||||||
'text-'.$name,
|
(($id === false) ? 'text-'.$name : $id),
|
||||||
$alt,
|
$alt,
|
||||||
$size,
|
$size,
|
||||||
$maxlength,
|
$maxlength,
|
||||||
@ -6334,7 +6361,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||||||
((isset($data['no_change']) === true) ? $data['no_change'] : ''),
|
((isset($data['no_change']) === true) ? $data['no_change'] : ''),
|
||||||
((isset($data['allow_zero']) === true) ? $data['allow_zero'] : ''),
|
((isset($data['allow_zero']) === true) ? $data['allow_zero'] : ''),
|
||||||
((isset($data['units']) === true) ? $data['units'] : null),
|
((isset($data['units']) === true) ? $data['units'] : null),
|
||||||
((isset($data['script_input']) === true) ? $data['script_input'] : '')
|
((isset($data['script_input']) === true) ? $data['script_input'] : ''),
|
||||||
|
((isset($data['units_select2']) === true) ? $data['units_select2'] : '')
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -6861,6 +6889,11 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||||||
(isset($data['time_end']) === true) ? $data['time_end'] : '',
|
(isset($data['time_end']) === true) ? $data['time_end'] : '',
|
||||||
(isset($data['date_text']) === true) ? $data['date_text'] : SECONDS_1DAY,
|
(isset($data['date_text']) === true) ? $data['date_text'] : SECONDS_1DAY,
|
||||||
(isset($data['class']) === true) ? $data['class'] : 'w100p',
|
(isset($data['class']) === true) ? $data['class'] : 'w100p',
|
||||||
|
(isset($data['date_format_php']) === true) ? $data['date_format_php'] : 'Y/m/d',
|
||||||
|
(isset($data['time_format_php']) === true) ? $data['time_format_php'] : 'H:i:s',
|
||||||
|
(isset($data['date_format_js']) === true) ? $data['date_format_js'] : 'yy/mm/dd',
|
||||||
|
(isset($data['time_format_js']) === true) ? $data['time_format_js'] : 'HH/mm/ss',
|
||||||
|
(isset($data['id']) === true) ? $data['id'] : '',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -7843,7 +7876,8 @@ function html_print_select_date_range(
|
|||||||
$date_format_php='Y/m/d',
|
$date_format_php='Y/m/d',
|
||||||
$time_format_php='H:i:s',
|
$time_format_php='H:i:s',
|
||||||
$date_format_js='yy/mm/dd',
|
$date_format_js='yy/mm/dd',
|
||||||
$time_format_js='HH:mm:ss'
|
$time_format_js='HH:mm:ss',
|
||||||
|
$id='',
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -7894,7 +7928,7 @@ function html_print_select_date_range(
|
|||||||
$fields['chose_range'] = __('Chose start/end date period');
|
$fields['chose_range'] = __('Chose start/end date period');
|
||||||
$fields['none'] = __('None');
|
$fields['none'] = __('None');
|
||||||
|
|
||||||
$output = html_print_input_hidden('custom_date', $custom_date, true);
|
$output = html_print_input_hidden('custom_date', $custom_date, true, false, false, 'hidden-custom_date'.$id);
|
||||||
$output .= '<div id="'.$name.'_default" class="wauto inline_flex" '.$display_default.'>';
|
$output .= '<div id="'.$name.'_default" class="wauto inline_flex" '.$display_default.'>';
|
||||||
$output .= html_print_select(
|
$output .= html_print_select(
|
||||||
$fields,
|
$fields,
|
||||||
@ -7914,13 +7948,101 @@ function html_print_select_date_range(
|
|||||||
$table->data = [];
|
$table->data = [];
|
||||||
$table->class = 'table-adv-filter';
|
$table->class = 'table-adv-filter';
|
||||||
$table->data[0][0] = '<div><div><div><span class="font-title-font">'.__('From').':</span></div>';
|
$table->data[0][0] = '<div><div><div><span class="font-title-font">'.__('From').':</span></div>';
|
||||||
$table->data[0][0] .= html_print_input_text('date_init', $date_init, '', 12, 10, true).' ';
|
$table->data[0][0] .= html_print_input_text(
|
||||||
$table->data[0][0] .= html_print_input_text('time_init', $time_init, '', 10, 7, true).' ';
|
'date_init',
|
||||||
|
$date_init,
|
||||||
|
'',
|
||||||
|
12,
|
||||||
|
10,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'off',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
(empty($id) === false) ? 'text-date_init'.$id : false,
|
||||||
|
).' ';
|
||||||
|
$table->data[0][0] .= html_print_input_text(
|
||||||
|
'time_init',
|
||||||
|
$time_init,
|
||||||
|
'',
|
||||||
|
10,
|
||||||
|
7,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'off',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
(empty($id) === false) ? 'text-time_init'.$id : false,
|
||||||
|
).' ';
|
||||||
$table->data[0][0] .= '</div>';
|
$table->data[0][0] .= '</div>';
|
||||||
$table->data[0][0] .= '<div><div><span class="font-title-font">'.__('to').':</span></div>';
|
$table->data[0][0] .= '<div><div><span class="font-title-font">'.__('to').':</span></div>';
|
||||||
$table->data[0][0] .= html_print_input_text('date_end', $date_end, '', 12, 10, true).' ';
|
$table->data[0][0] .= html_print_input_text(
|
||||||
|
'date_end',
|
||||||
|
$date_end,
|
||||||
|
'',
|
||||||
|
12,
|
||||||
|
10,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'off',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
(empty($id) === false) ? 'text-date_end'.$id : false,
|
||||||
|
).' ';
|
||||||
$table->data[0][0] .= '<div id="'.$name.'_manual" class="w100p inline_line">';
|
$table->data[0][0] .= '<div id="'.$name.'_manual" class="w100p inline_line">';
|
||||||
$table->data[0][0] .= html_print_input_text('time_end', $time_end, '', 10, 7, true).' ';
|
$table->data[0][0] .= html_print_input_text(
|
||||||
|
'time_end',
|
||||||
|
$time_end,
|
||||||
|
'',
|
||||||
|
10,
|
||||||
|
7,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'off',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
(empty($id) === false) ? 'text-time_end'.$id : false,
|
||||||
|
).' ';
|
||||||
$table->data[0][0] .= ' <a href="javascript:">'.html_print_image(
|
$table->data[0][0] .= ' <a href="javascript:">'.html_print_image(
|
||||||
'images/logs@svg.svg',
|
'images/logs@svg.svg',
|
||||||
true,
|
true,
|
||||||
@ -7991,13 +8113,13 @@ function html_print_select_date_range(
|
|||||||
$('#".$name."_range').show();
|
$('#".$name."_range').show();
|
||||||
$('#".$name."_default').hide();
|
$('#".$name."_default').hide();
|
||||||
$('#".$name."_extend').hide();
|
$('#".$name."_extend').hide();
|
||||||
$('#hidden-custom_date').val('1');
|
$('#hidden-custom_date".$id."').val('1');
|
||||||
$('.filter_label_position_before').addClass('filter_label_position_after');
|
$('.filter_label_position_before').addClass('filter_label_position_after');
|
||||||
} else if ($(this).val() === 'custom') {
|
} else if ($(this).val() === 'custom') {
|
||||||
$('#".$name."_range').hide();
|
$('#".$name."_range').hide();
|
||||||
$('#".$name."_default').hide();
|
$('#".$name."_default').hide();
|
||||||
$('#".$name."_extend').show();
|
$('#".$name."_extend').show();
|
||||||
$('#hidden-custom_date').val('2');
|
$('#hidden-custom_date".$id."').val('2');
|
||||||
$('.filter_label_position_before').removeClass('filter_label_position_after');
|
$('.filter_label_position_before').removeClass('filter_label_position_after');
|
||||||
} else {
|
} else {
|
||||||
$('.filter_label_position_before').removeClass('filter_label_position_after');
|
$('.filter_label_position_before').removeClass('filter_label_position_after');
|
||||||
@ -8015,8 +8137,8 @@ function html_print_select_date_range(
|
|||||||
$('#".$name."_range').show();
|
$('#".$name."_range').show();
|
||||||
$('#".$name."_default').hide();
|
$('#".$name."_default').hide();
|
||||||
$('#".$name."_extend').hide();
|
$('#".$name."_extend').hide();
|
||||||
position_top_init = $('#text-date_init').offset().top + $('#text-date_init').outerHeight();
|
position_top_init = $('[id^=text-date_init".$id."]').offset().top + $('[id^=text-date_init".$id."]').outerHeight();
|
||||||
position_top_end = $('#text-date_end').offset().top + $('#text-date_end').outerHeight();
|
position_top_end = $('[id^=text-date_end".$id."]').offset().top + $('[id^=text-date_end".$id."]').outerHeight();
|
||||||
if(def_state_range){
|
if(def_state_range){
|
||||||
$('#".$name."_range').show();
|
$('#".$name."_range').show();
|
||||||
} else {
|
} else {
|
||||||
@ -8042,7 +8164,7 @@ function html_print_select_date_range(
|
|||||||
$('#".$name."_range').hide();
|
$('#".$name."_range').hide();
|
||||||
$('#".$name."_extend').hide();
|
$('#".$name."_extend').hide();
|
||||||
$('#".$name."').val('".SECONDS_1DAY."').trigger('change');
|
$('#".$name."').val('".SECONDS_1DAY."').trigger('change');
|
||||||
$('#hidden-custom_date').val('0');
|
$('#hidden-custom_date".$id."').val('0');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#text-date').datepicker({
|
$('#text-date').datepicker({
|
||||||
@ -8052,7 +8174,7 @@ function html_print_select_date_range(
|
|||||||
showAnim: 'slideDown'
|
showAnim: 'slideDown'
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=text-time_init]').timepicker({
|
$('[id^=text-time_init".$id."]').timepicker({
|
||||||
showSecond: true,
|
showSecond: true,
|
||||||
timeFormat: '".$time_format_js."',
|
timeFormat: '".$time_format_js."',
|
||||||
timeOnlyTitle: '".__('Choose time')."',
|
timeOnlyTitle: '".__('Choose time')."',
|
||||||
@ -8064,7 +8186,7 @@ function html_print_select_date_range(
|
|||||||
closeText: '".__('Close')."'
|
closeText: '".__('Close')."'
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=text-date_init]').datepicker ({
|
$('[id^=text-date_init".$id."]').datepicker ({
|
||||||
dateFormat: '".$date_format_js."',
|
dateFormat: '".$date_format_js."',
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
@ -8073,9 +8195,9 @@ function html_print_select_date_range(
|
|||||||
beforeShowDay: function (date) {
|
beforeShowDay: function (date) {
|
||||||
show_datepicker = 'date_init';
|
show_datepicker = 'date_init';
|
||||||
var date_now = date.getTime();
|
var date_now = date.getTime();
|
||||||
var date_ini_split = $('[id^=text-date_init]').val().split('/');
|
var date_ini_split = $('[id^=text-date_init".$id."]').val().split('/');
|
||||||
var date_ini = new Date(date_ini_split[1]+'/'+date_ini_split[2]+'/'+date_ini_split[0]).getTime();
|
var date_ini = new Date(date_ini_split[1]+'/'+date_ini_split[2]+'/'+date_ini_split[0]).getTime();
|
||||||
var date_end_split = $('[id^=text-date_end]').val().split('/');
|
var date_end_split = $('[id^=text-date_end".$id."]').val().split('/');
|
||||||
var date_end = new Date(date_end_split[1]+'/'+date_end_split[2]+'/'+date_end_split[0]).getTime();
|
var date_end = new Date(date_end_split[1]+'/'+date_end_split[2]+'/'+date_end_split[0]).getTime();
|
||||||
if (date_now > date_ini && date_now < date_end) {
|
if (date_now > date_ini && date_now < date_end) {
|
||||||
return [true, 'ui-date-range-in', 'prueba'];
|
return [true, 'ui-date-range-in', 'prueba'];
|
||||||
@ -8086,7 +8208,7 @@ function html_print_select_date_range(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=text-date_end]').datepicker ({
|
$('[id^=text-date_end".$id."]').datepicker ({
|
||||||
dateFormat: '".$date_format_js."',
|
dateFormat: '".$date_format_js."',
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
@ -8095,9 +8217,9 @@ function html_print_select_date_range(
|
|||||||
beforeShowDay: function (date) {
|
beforeShowDay: function (date) {
|
||||||
show_datepicker = 'date_end';
|
show_datepicker = 'date_end';
|
||||||
var date_now = date.getTime();
|
var date_now = date.getTime();
|
||||||
var date_ini_split = $('[id^=text-date_init]').val().split('/');
|
var date_ini_split = $('[id^=text-date_init".$id."]').val().split('/');
|
||||||
var date_ini = new Date(date_ini_split[1]+'/'+date_ini_split[2]+'/'+date_ini_split[0]).getTime();
|
var date_ini = new Date(date_ini_split[1]+'/'+date_ini_split[2]+'/'+date_ini_split[0]).getTime();
|
||||||
var date_end_split = $('[id^=text-date_end]').val().split('/');
|
var date_end_split = $('[id^=text-date_end".$id."]').val().split('/');
|
||||||
var date_end = new Date(date_end_split[1]+'/'+date_end_split[2]+'/'+date_end_split[0]).getTime();
|
var date_end = new Date(date_end_split[1]+'/'+date_end_split[2]+'/'+date_end_split[0]).getTime();
|
||||||
if (date_now > date_ini && date_now < date_end) {
|
if (date_now > date_ini && date_now < date_end) {
|
||||||
return [true, 'ui-date-range-in', 'prueba'];
|
return [true, 'ui-date-range-in', 'prueba'];
|
||||||
@ -8105,10 +8227,10 @@ function html_print_select_date_range(
|
|||||||
return [true, 'ui-datepicker-current-day', ''];
|
return [true, 'ui-datepicker-current-day', ''];
|
||||||
}
|
}
|
||||||
return [true, '', ''];
|
return [true, '', ''];
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[id^=text-time_end]').timepicker({
|
$('[id^=text-time_end".$id."]').timepicker({
|
||||||
showSecond: true,
|
showSecond: true,
|
||||||
timeFormat: '".$time_format_js."',
|
timeFormat: '".$time_format_js."',
|
||||||
timeOnlyTitle: '".__('Choose time')."',
|
timeOnlyTitle: '".__('Choose time')."',
|
||||||
|
@ -169,6 +169,10 @@ function menu_print_menu(&$menu)
|
|||||||
$sec2 = 'godmode/users/profile_list';
|
$sec2 = 'godmode/users/profile_list';
|
||||||
} else if ($sec2 === 'godmode/users/configure_token') {
|
} else if ($sec2 === 'godmode/users/configure_token') {
|
||||||
$sec2 = 'godmode/users/token_list';
|
$sec2 = 'godmode/users/token_list';
|
||||||
|
} else if ($sec2 === 'godmode/servers/modificar_server' && check_acl($config['id_user'], 0, 'AW') && (bool) check_acl($config['id_user'], 0, 'PM') === false) {
|
||||||
|
$sec2 = 'enterprise/godmode/servers/list_satellite';
|
||||||
|
} else if ($sec2 === 'enterprise/godmode/snmpconsole/snmp_trap_editor_form') {
|
||||||
|
$sec2 = 'enterprise/godmode/snmpconsole/snmp_trap_editor';
|
||||||
} else {
|
} else {
|
||||||
$sec2 = (string) get_parameter('sec2');
|
$sec2 = (string) get_parameter('sec2');
|
||||||
}
|
}
|
||||||
|
@ -1389,6 +1389,7 @@ function netflow_draw_item(
|
|||||||
$show_summary=true,
|
$show_summary=true,
|
||||||
$show_table=true
|
$show_table=true
|
||||||
) {
|
) {
|
||||||
|
global $config;
|
||||||
$aggregate = $filter['aggregate'];
|
$aggregate = $filter['aggregate'];
|
||||||
$interval = ($end_date - $start_date);
|
$interval = ($end_date - $start_date);
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
@ -1568,13 +1569,20 @@ function netflow_draw_item(
|
|||||||
$data_top_n
|
$data_top_n
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Theme.
|
||||||
|
$theme = $config['style'];
|
||||||
|
$text_color = ($theme !== 'pandora_black') ? '#333' : '#fff';
|
||||||
|
|
||||||
$graph_output = pie_graph(
|
$graph_output = pie_graph(
|
||||||
$pie_data,
|
$pie_data,
|
||||||
[
|
[
|
||||||
'width' => 200,
|
'width' => 200,
|
||||||
'height' => 200,
|
'height' => 200,
|
||||||
'ttl' => ($output === 'PDF') ? 2 : 1,
|
'ttl' => ($output === 'PDF') ? 2 : 1,
|
||||||
'dataLabel' => ['display' => 'auto'],
|
'dataLabel' => [
|
||||||
|
'display' => 'auto',
|
||||||
|
'color' => $text_color,
|
||||||
|
],
|
||||||
'layout' => [
|
'layout' => [
|
||||||
'padding' => [
|
'padding' => [
|
||||||
'top' => 15,
|
'top' => 15,
|
||||||
|
@ -2736,7 +2736,8 @@ function reporting_event_report_module(
|
|||||||
$ttl,
|
$ttl,
|
||||||
$id_server,
|
$id_server,
|
||||||
$metaconsole_dbtable,
|
$metaconsole_dbtable,
|
||||||
$filter_event_filter_exclude
|
$filter_event_filter_exclude,
|
||||||
|
$content['id_agent_module']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
@ -6686,6 +6687,7 @@ function reporting_sql_graph(
|
|||||||
$type_sql_graph
|
$type_sql_graph
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
$layout = false;
|
||||||
|
|
||||||
switch ($type_sql_graph) {
|
switch ($type_sql_graph) {
|
||||||
case 'sql_graph_hbar':
|
case 'sql_graph_hbar':
|
||||||
@ -6694,6 +6696,7 @@ function reporting_sql_graph(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'sql_graph_vbar':
|
case 'sql_graph_vbar':
|
||||||
|
$layout = ['padding' => ['top' => '40']];
|
||||||
$return['type'] = 'sql_graph_vbar';
|
$return['type'] = 'sql_graph_vbar';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -6768,7 +6771,8 @@ function reporting_sql_graph(
|
|||||||
$only_image,
|
$only_image,
|
||||||
ui_get_full_url(false, false, false, false),
|
ui_get_full_url(false, false, false, false),
|
||||||
$ttl,
|
$ttl,
|
||||||
$content['top_n_value']
|
$content['top_n_value'],
|
||||||
|
$layout
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -11725,7 +11729,8 @@ function reporting_get_module_detailed_event(
|
|||||||
$ttl=1,
|
$ttl=1,
|
||||||
$id_server=false,
|
$id_server=false,
|
||||||
$metaconsole_dbtable=false,
|
$metaconsole_dbtable=false,
|
||||||
$filter_event_filter_exclude=false
|
$filter_event_filter_exclude=false,
|
||||||
|
$id_agent=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -11748,7 +11753,7 @@ function reporting_get_module_detailed_event(
|
|||||||
|
|
||||||
foreach ($id_modules as $id_module) {
|
foreach ($id_modules as $id_module) {
|
||||||
$event['data'] = events_get_agent(
|
$event['data'] = events_get_agent(
|
||||||
false,
|
$id_agent,
|
||||||
(int) $period,
|
(int) $period,
|
||||||
(int) $date,
|
(int) $date,
|
||||||
$history,
|
$history,
|
||||||
|
@ -112,8 +112,8 @@ function reporting_html_header(
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data[] = $title.$sizhfin;
|
$data[] = $title.$sizhfin;
|
||||||
$data[] = $sizh.$subtitle.$sizhfin;
|
$data[] = $sizh.__('Group').': '.$subtitle.$sizhfin;
|
||||||
$data[] = "<div class='right'>".$sizh.$date_text.$sizhfin.'</div>';
|
$data[] = '<div class="flex-content-right flex-items-center">'.$sizh.__('Data time').': '.$sizhfin."<div class='right mrgn_lft_15px'>".$sizh.$date_text.$sizhfin.'</div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
@ -194,6 +194,9 @@ function reporting_html_print_report($report, $mini=false, $report_info=1, $cust
|
|||||||
$table->head = [];
|
$table->head = [];
|
||||||
$table->colspan = [];
|
$table->colspan = [];
|
||||||
$table->rowstyle = ['background-color: #686868'];
|
$table->rowstyle = ['background-color: #686868'];
|
||||||
|
$table->size[0] = '33%';
|
||||||
|
$table->size[1] = '33%';
|
||||||
|
$table->size[2] = '33%';
|
||||||
|
|
||||||
if (isset($item['label']) && $item['label'] != '') {
|
if (isset($item['label']) && $item['label'] != '') {
|
||||||
$id_agent = $item['id_agent'];
|
$id_agent = $item['id_agent'];
|
||||||
@ -3606,7 +3609,7 @@ function reporting_html_group_report($table, $item, $pdf=0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$graph_width = 280;
|
$graph_width = 280;
|
||||||
$graph_height = 250;
|
$graph_height = 300;
|
||||||
|
|
||||||
$out = '<table width="100%" class="info_table">';
|
$out = '<table width="100%" class="info_table">';
|
||||||
$out .= '<tbody>';
|
$out .= '<tbody>';
|
||||||
@ -3688,7 +3691,7 @@ function reporting_html_group_report($table, $item, $pdf=0)
|
|||||||
|
|
||||||
$out .= '<div id="events_per_agent_pie" style="height: '.$graph_height.'px">';
|
$out .= '<div id="events_per_agent_pie" style="height: '.$graph_height.'px">';
|
||||||
if ((int) $ttl === 2) {
|
if ((int) $ttl === 2) {
|
||||||
$out .= '<img src="data:image/png;base64,';
|
$out .= '<img width="350" src="data:image/png;base64,';
|
||||||
} else {
|
} else {
|
||||||
$out .= '<div id="status_pie" style="margin: auto;">';
|
$out .= '<div id="status_pie" style="margin: auto;">';
|
||||||
}
|
}
|
||||||
@ -3730,7 +3733,7 @@ function reporting_html_group_report($table, $item, $pdf=0)
|
|||||||
|
|
||||||
$out .= '<div id="group_os_pie" style="height: '.$graph_height.'px">';
|
$out .= '<div id="group_os_pie" style="height: '.$graph_height.'px">';
|
||||||
if ((int) $ttl === 2) {
|
if ((int) $ttl === 2) {
|
||||||
$out .= '<img src="data:image/png;base64,';
|
$out .= '<img width="350" src="data:image/png;base64,';
|
||||||
} else {
|
} else {
|
||||||
$out .= '<div id="status_pie" style="margin: auto;">';
|
$out .= '<div id="status_pie" style="margin: auto;">';
|
||||||
}
|
}
|
||||||
|
@ -301,8 +301,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
|
|||||||
|
|
||||||
if (empty($message['no_close']) === false) {
|
if (empty($message['no_close']) === false) {
|
||||||
// Workaround.
|
// Workaround.
|
||||||
$no_close_bool = false;
|
$no_close_bool = (bool) $message['no_close'];
|
||||||
// $no_close_bool = (bool) $message['no_close'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($message['force_style']) === false) {
|
if (empty($message['force_style']) === false) {
|
||||||
|
@ -547,6 +547,7 @@ function line_graph(
|
|||||||
function get_build_setup_charts($type, $options, $data)
|
function get_build_setup_charts($type, $options, $data)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
$user_info = get_user_info($config['id_user']);
|
||||||
|
|
||||||
$factory = new Factory();
|
$factory = new Factory();
|
||||||
|
|
||||||
@ -1294,6 +1295,10 @@ function get_build_setup_charts($type, $options, $data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($user_info['id_skin']) === true) {
|
||||||
|
$chart->options()->setTheme($user_info['id_skin']);
|
||||||
|
}
|
||||||
|
|
||||||
// Add Datasets.
|
// Add Datasets.
|
||||||
$setData = $chart->createDataSet();
|
$setData = $chart->createDataSet();
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
@ -2566,19 +2566,13 @@ function menuActionButtonResizing() {
|
|||||||
|
|
||||||
function check_period_warning(time, title, message) {
|
function check_period_warning(time, title, message) {
|
||||||
var period = time.value;
|
var period = time.value;
|
||||||
var times = 0;
|
|
||||||
if (period >= 2592000 && period < 7776000) {
|
if (period >= 2592000 && period < 7776000) {
|
||||||
WarningPeriodicityModal(title, message);
|
WarningPeriodicityModal(title, message);
|
||||||
} else if (period >= 7776000 && period < 15552000) {
|
} else if (period >= 7776000 && period < 15552000) {
|
||||||
do {
|
WarningPeriodicityModal(title, message);
|
||||||
WarningPeriodicityModal(title, message);
|
|
||||||
times = times + 1;
|
|
||||||
} while (times < 2);
|
|
||||||
} else if (period >= 15552000) {
|
} else if (period >= 15552000) {
|
||||||
do {
|
WarningPeriodicityModal(title, message);
|
||||||
WarningPeriodicityModal(title, message);
|
|
||||||
times = times + 1;
|
|
||||||
} while (times < 3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,12 +24,6 @@ function show_option_dialog(settings) {
|
|||||||
method: "updateDashboard",
|
method: "updateDashboard",
|
||||||
dataType: "json"
|
dataType: "json"
|
||||||
},
|
},
|
||||||
oncancel: {
|
|
||||||
reload: true
|
|
||||||
},
|
|
||||||
onclose: {
|
|
||||||
reload: true
|
|
||||||
},
|
|
||||||
ajax_callback: update_dashboard
|
ajax_callback: update_dashboard
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -483,10 +477,6 @@ function initialiceLayout(data) {
|
|||||||
function configurationWidget(cellId, widgetId, size) {
|
function configurationWidget(cellId, widgetId, size) {
|
||||||
var reload = 0;
|
var reload = 0;
|
||||||
var overlay = false;
|
var overlay = false;
|
||||||
if (widgetId == 46) {
|
|
||||||
reload = 1;
|
|
||||||
overlay = true;
|
|
||||||
}
|
|
||||||
title = $("#hidden-widget_name_" + cellId).val();
|
title = $("#hidden-widget_name_" + cellId).val();
|
||||||
load_modal({
|
load_modal({
|
||||||
target: $("#modal-config-widget"),
|
target: $("#modal-config-widget"),
|
||||||
|
@ -1338,7 +1338,6 @@ function listen_event_sound(settings) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let sound_listener;
|
|
||||||
function check_event_sound(settings) {
|
function check_event_sound(settings) {
|
||||||
// Update elements time.
|
// Update elements time.
|
||||||
$(".elements-discovered-alerts ul li").each(function() {
|
$(".elements-discovered-alerts ul li").each(function() {
|
||||||
@ -1382,7 +1381,7 @@ function check_event_sound(settings) {
|
|||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
if (data != false) {
|
if (data != false) {
|
||||||
clearTimeout(sound_listener);
|
clearTimeout(window.sound_listener);
|
||||||
// Hide empty.
|
// Hide empty.
|
||||||
$("#tabs-sound-modal .empty-discovered-alerts").addClass(
|
$("#tabs-sound-modal .empty-discovered-alerts").addClass(
|
||||||
"invisible_important"
|
"invisible_important"
|
||||||
@ -1434,7 +1433,7 @@ function check_event_sound(settings) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// -100 delay sound.
|
// -100 delay sound.
|
||||||
sound_listener = setTimeout(
|
window.sound_listener = setTimeout(
|
||||||
remove_audio,
|
remove_audio,
|
||||||
parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100
|
parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100
|
||||||
);
|
);
|
||||||
|
@ -625,6 +625,10 @@ var TreeController = {
|
|||||||
$("#fixed-bottom-box-head-title").html(
|
$("#fixed-bottom-box-head-title").html(
|
||||||
$("#fixedBottomHeadTitle").html()
|
$("#fixedBottomHeadTitle").html()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$("#fixed-bottom-box-head-title")
|
||||||
|
.closest(".fixed-bottom-box")
|
||||||
|
.addClass("tree-view-bottom-modal");
|
||||||
},
|
},
|
||||||
error: function(xhr, textStatus, errorThrown) {
|
error: function(xhr, textStatus, errorThrown) {
|
||||||
callback(errorThrown);
|
callback(errorThrown);
|
||||||
@ -1543,7 +1547,7 @@ var TreeController = {
|
|||||||
} else if (controller.tree.length == 0) {
|
} else if (controller.tree.length == 0) {
|
||||||
controller.recipient.empty();
|
controller.recipient.empty();
|
||||||
controller.recipient.html(
|
controller.recipient.html(
|
||||||
"<div>" + controller.emptyMessage + "</div>"
|
"<div class='recipent'>" + controller.emptyMessage + "</div>"
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -411,6 +411,33 @@ class Manager implements PublicLogin
|
|||||||
$config['public_dashboard'] = true;
|
$config['public_dashboard'] = true;
|
||||||
$config['force_instant_logout'] = true;
|
$config['force_instant_logout'] = true;
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
$dashboards = self::getDashboards();
|
||||||
|
$dashboards = array_reduce(
|
||||||
|
$dashboards,
|
||||||
|
function ($carry, $item) {
|
||||||
|
$carry[$item['id']] = $item['name'];
|
||||||
|
return $carry;
|
||||||
|
},
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($dashboards as $key => $layout) {
|
||||||
|
$hash_compare = self::generatePublicHash($key);
|
||||||
|
if (hash_equals($hash, $hash_compare)) {
|
||||||
|
// "Log" user in.
|
||||||
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['id_usuario'] = get_parameter('id_user');
|
||||||
|
session_write_close();
|
||||||
|
|
||||||
|
$config['public_dashboard'] = true;
|
||||||
|
$config['force_instant_logout'] = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove id user from config array if authentication has failed.
|
// Remove id user from config array if authentication has failed.
|
||||||
|
@ -423,6 +423,7 @@ class BasicChart extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -306,6 +306,7 @@ class BlockHistogram extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -317,6 +317,7 @@ class DataMatrix extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -335,6 +336,7 @@ class DataMatrix extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'slice\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'slice\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -394,6 +394,7 @@ class CustomGraphWidget extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -373,6 +373,7 @@ class GraphModuleHistogramWidget extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -207,6 +207,7 @@ class Netflow extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$chart_types = netflow_get_chart_types();
|
$chart_types = netflow_get_chart_types();
|
||||||
@ -366,8 +367,8 @@ class Netflow extends Widget
|
|||||||
'',
|
'',
|
||||||
'HTML',
|
'HTML',
|
||||||
0,
|
0,
|
||||||
($size['width'] - 50),
|
($size['width'] + 120),
|
||||||
($size['height'] - 20),
|
($size['height'] + 120),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -462,7 +463,7 @@ class Netflow extends Widget
|
|||||||
public function getSizeModalConfiguration(): array
|
public function getSizeModalConfiguration(): array
|
||||||
{
|
{
|
||||||
$size = [
|
$size = [
|
||||||
'width' => 400,
|
'width' => 600,
|
||||||
'height' => 530,
|
'height' => 530,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -270,8 +270,8 @@ class SecurityHardening extends Widget
|
|||||||
'id' => 'row_date',
|
'id' => 'row_date',
|
||||||
'class' => 'row_input',
|
'class' => 'row_input',
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'id' => 'range',
|
'id' => '_range_vulnerability',
|
||||||
'name' => 'range',
|
'name' => 'range_vulnerability',
|
||||||
'type' => 'date_range',
|
'type' => 'date_range',
|
||||||
'selected' => 'chose_range',
|
'selected' => 'chose_range',
|
||||||
'date_init' => date('Y/m/d', $values['date_init']),
|
'date_init' => date('Y/m/d', $values['date_init']),
|
||||||
@ -301,7 +301,7 @@ class SecurityHardening extends Widget
|
|||||||
$values['limit'] = \get_parameter('limit', 10);
|
$values['limit'] = \get_parameter('limit', 10);
|
||||||
$values['category'] = \get_parameter('category', 6);
|
$values['category'] = \get_parameter('category', 6);
|
||||||
$values['ignore_skipped'] = \get_parameter_switch('ignore_skipped', 0);
|
$values['ignore_skipped'] = \get_parameter_switch('ignore_skipped', 0);
|
||||||
$date = $this->getDateParameter();
|
$date = \get_parameter_date('range_vulnerability', '', 'U');
|
||||||
$values['date_init'] = $date['date_init'];
|
$values['date_init'] = $date['date_init'];
|
||||||
$values['date_end'] = $date['date_end'];
|
$values['date_end'] = $date['date_end'];
|
||||||
return $values;
|
return $values;
|
||||||
@ -366,75 +366,6 @@ class SecurityHardening extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the date in an object obtained by parameter.
|
|
||||||
*
|
|
||||||
* @return object Object with date_init, date_end and period.
|
|
||||||
*/
|
|
||||||
private function getDateParameter()
|
|
||||||
{
|
|
||||||
$date_end = get_parameter('date_end', 0);
|
|
||||||
$time_end = get_parameter('time_end');
|
|
||||||
$datetime_end = strtotime($date_end.' '.$time_end);
|
|
||||||
|
|
||||||
$custom_date = get_parameter('custom_date', 0);
|
|
||||||
$range = get_parameter('range', SECONDS_1DAY);
|
|
||||||
$date_text = get_parameter('range_text', SECONDS_1DAY);
|
|
||||||
$date_init_less = (strtotime(date('Y/m/d')) - SECONDS_1DAY);
|
|
||||||
$date_init = get_parameter('date_init', date(DATE_FORMAT, $date_init_less));
|
|
||||||
$time_init = get_parameter('time_init', date(TIME_FORMAT, $date_init_less));
|
|
||||||
$datetime_init = strtotime($date_init.' '.$time_init);
|
|
||||||
if ($custom_date === '1') {
|
|
||||||
if ($datetime_init >= $datetime_end) {
|
|
||||||
$datetime_init = $date_init_less;
|
|
||||||
}
|
|
||||||
|
|
||||||
$date_init = date('Y/m/d H:i:s', $datetime_init);
|
|
||||||
$date_end = date('Y/m/d H:i:s', $datetime_end);
|
|
||||||
$period = ($datetime_end - $datetime_init);
|
|
||||||
} else if ($custom_date === '2') {
|
|
||||||
$date_units = get_parameter('range_units');
|
|
||||||
$date_end = date('Y/m/d H:i:s');
|
|
||||||
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - ((int) $date_text * (int) $date_units)));
|
|
||||||
$period = (strtotime($date_end) - strtotime($date_init));
|
|
||||||
} else if (in_array($range, ['this_week', 'this_month', 'past_week', 'past_month'])) {
|
|
||||||
if ($range === 'this_week') {
|
|
||||||
$monday = date('Y/m/d', strtotime('last monday'));
|
|
||||||
|
|
||||||
$sunday = date('Y/m/d', strtotime($monday.' +6 days'));
|
|
||||||
$period = (strtotime($sunday) - strtotime($monday));
|
|
||||||
$date_init = $monday;
|
|
||||||
$date_end = $sunday;
|
|
||||||
} else if ($range === 'this_month') {
|
|
||||||
$date_end = date('Y/m/d', strtotime('last day of this month'));
|
|
||||||
$first_of_month = date('Y/m/d', strtotime('first day of this month'));
|
|
||||||
$date_init = $first_of_month;
|
|
||||||
$period = (strtotime($date_end) - strtotime($first_of_month));
|
|
||||||
} else if ($range === 'past_month') {
|
|
||||||
$date_end = date('Y/m/d', strtotime('last day of previous month'));
|
|
||||||
$first_of_month = date('Y/m/d', strtotime('first day of previous month'));
|
|
||||||
$date_init = $first_of_month;
|
|
||||||
$period = (strtotime($date_end) - strtotime($first_of_month));
|
|
||||||
} else if ($range === 'past_week') {
|
|
||||||
$date_end = date('Y/m/d', strtotime('sunday', strtotime('last week')));
|
|
||||||
$first_of_week = date('Y/m/d', strtotime('monday', strtotime('last week')));
|
|
||||||
$date_init = $first_of_week;
|
|
||||||
$period = (strtotime($date_end) - strtotime($first_of_week));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$date_end = date('Y/m/d H:i:s');
|
|
||||||
$date_init = date('Y/m/d H:i:s', (strtotime($date_end) - $range));
|
|
||||||
$period = (strtotime($date_end) - strtotime($date_init));
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
'date_init' => strtotime($date_init),
|
|
||||||
'date_end' => strtotime($date_end),
|
|
||||||
'period' => $period,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check user's acl using group.
|
* Check user's acl using group.
|
||||||
*
|
*
|
||||||
@ -692,6 +623,7 @@ class SecurityHardening extends Widget
|
|||||||
*/
|
*/
|
||||||
private function vulnerabilitiesByCategory($group, $category, $ignore_skipped=true)
|
private function vulnerabilitiesByCategory($group, $category, $ignore_skipped=true)
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
$labels = [
|
$labels = [
|
||||||
__('Passed'),
|
__('Passed'),
|
||||||
__('Failed'),
|
__('Failed'),
|
||||||
@ -749,7 +681,7 @@ class SecurityHardening extends Widget
|
|||||||
|
|
||||||
$total = (count($vulnerabilities['pass']) + count($vulnerabilities['fail']));
|
$total = (count($vulnerabilities['pass']) + count($vulnerabilities['fail']));
|
||||||
|
|
||||||
if ($ignore_skipped === false) {
|
if ($ignore_skipped === false && isset($vulnerabilities['skipped']) === true) {
|
||||||
$data[] = count($vulnerabilities['skipped']);
|
$data[] = count($vulnerabilities['skipped']);
|
||||||
$total += count($vulnerabilities['skipped']);
|
$total += count($vulnerabilities['skipped']);
|
||||||
$labels[] = __('Skipped');
|
$labels[] = __('Skipped');
|
||||||
@ -763,18 +695,19 @@ class SecurityHardening extends Widget
|
|||||||
'display' => true,
|
'display' => true,
|
||||||
'position' => 'right',
|
'position' => 'right',
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
|
'fonts' => [ 'size' => '12' ],
|
||||||
],
|
],
|
||||||
'elements' => [
|
'elements' => [
|
||||||
'center' => [
|
'center' => [
|
||||||
'text' => $total,
|
'text' => $total,
|
||||||
'color' => '#2c3e50',
|
'color' => ($config['style'] === 'pandora_black') ? '#ffffff' : '#2c3e50',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'labels' => $labels,
|
'labels' => $labels,
|
||||||
'colors' => [
|
'colors' => [
|
||||||
'#82b92e',
|
'#82b92e',
|
||||||
'#e63c52',
|
'#e63c52',
|
||||||
'#E4E4E4',
|
($config['style'] === 'pandora_black') ? '#666' : '#E4E4E4',
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -449,6 +449,7 @@ class SingleGraphWidget extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -527,99 +528,101 @@ class SingleGraphWidget extends Widget
|
|||||||
'id' => 'div_projection_period',
|
'id' => 'div_projection_period',
|
||||||
'style' => $display_projection,
|
'style' => $display_projection,
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'name' => 'period_projection',
|
'name' => 'period_projection',
|
||||||
'type' => 'interval',
|
|
||||||
'value' => $values['period_projection'],
|
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
|
||||||
'label' => __('Maximum'),
|
|
||||||
'id' => 'div_period_maximum',
|
|
||||||
'style' => $display_periodicity_chart,
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'period_maximum',
|
|
||||||
'id' => 'period_maximum',
|
|
||||||
'type' => 'switch',
|
|
||||||
'value' => $values['period_maximum'],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
|
||||||
'label' => __('Minimum'),
|
|
||||||
'id' => 'div_period_minimum',
|
|
||||||
'style' => $display_periodicity_chart,
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'period_minimum',
|
|
||||||
'id' => 'period_minimum',
|
|
||||||
'type' => 'switch',
|
|
||||||
'value' => $values['period_minimum'],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
|
||||||
'label' => __('Average'),
|
|
||||||
'id' => 'div_period_average',
|
|
||||||
'style' => $display_periodicity_chart,
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'period_average',
|
|
||||||
'id' => 'period_average',
|
|
||||||
'type' => 'switch',
|
|
||||||
'value' => $values['period_average'],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
|
||||||
'label' => __('Summatory'),
|
|
||||||
'id' => 'div_period_summatory',
|
|
||||||
'style' => $display_periodicity_chart,
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'period_summatory',
|
|
||||||
'id' => 'period_summatory',
|
|
||||||
'type' => 'switch',
|
|
||||||
'value' => $values['period_summatory'],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
|
||||||
'label' => __('Slice period'),
|
|
||||||
'id' => 'div_period_slice_chart',
|
|
||||||
'style' => $display_periodicity_chart,
|
|
||||||
'arguments' => [
|
|
||||||
'name' => 'period_slice_chart',
|
|
||||||
'type' => 'interval',
|
'type' => 'interval',
|
||||||
'value' => (string) $values['period_slice_chart'],
|
'value' => $values['period_projection'],
|
||||||
'custom_fields' => [
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
SECONDS_1HOUR => __('1 hour'),
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
SECONDS_1DAY => __('1 day'),
|
'units_select2' => true,
|
||||||
SECONDS_1WEEK => __('1 week'),
|
],
|
||||||
SECONDS_1MONTH => __('1 month'),
|
];
|
||||||
|
|
||||||
|
$inputs['inputs']['row2'][] = [
|
||||||
|
'label' => __('Maximum'),
|
||||||
|
'id' => 'div_period_maximum',
|
||||||
|
'style' => $display_periodicity_chart,
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'period_maximum',
|
||||||
|
'id' => 'period_maximum',
|
||||||
|
'type' => 'switch',
|
||||||
|
'value' => $values['period_maximum'],
|
||||||
],
|
],
|
||||||
],
|
];
|
||||||
];
|
|
||||||
|
|
||||||
$options_period_mode = [
|
$inputs['inputs']['row2'][] = [
|
||||||
CUSTOM_GRAPH_AREA => __('Area'),
|
'label' => __('Minimum'),
|
||||||
CUSTOM_GRAPH_LINE => __('Line'),
|
'id' => 'div_period_minimum',
|
||||||
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
'style' => $display_periodicity_chart,
|
||||||
];
|
'arguments' => [
|
||||||
|
'name' => 'period_minimum',
|
||||||
|
'id' => 'period_minimum',
|
||||||
|
'type' => 'switch',
|
||||||
|
'value' => $values['period_minimum'],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
$inputs['inputs']['row2'][] = [
|
$inputs['inputs']['row2'][] = [
|
||||||
'label' => __('Type chart'),
|
'label' => __('Average'),
|
||||||
'id' => 'div_period_mode',
|
'id' => 'div_period_average',
|
||||||
'style' => $display_periodicity_chart,
|
'style' => $display_periodicity_chart,
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'type' => 'select',
|
'name' => 'period_average',
|
||||||
'fields' => $options_period_mode,
|
'id' => 'period_average',
|
||||||
'name' => 'period_mode',
|
'type' => 'switch',
|
||||||
'selected' => $values['period_mode'],
|
'value' => $values['period_average'],
|
||||||
'return' => true,
|
],
|
||||||
],
|
];
|
||||||
];
|
|
||||||
|
|
||||||
return $inputs;
|
$inputs['inputs']['row2'][] = [
|
||||||
|
'label' => __('Summatory'),
|
||||||
|
'id' => 'div_period_summatory',
|
||||||
|
'style' => $display_periodicity_chart,
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'period_summatory',
|
||||||
|
'id' => 'period_summatory',
|
||||||
|
'type' => 'switch',
|
||||||
|
'value' => $values['period_summatory'],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs['inputs']['row2'][] = [
|
||||||
|
'label' => __('Slice period'),
|
||||||
|
'id' => 'div_period_slice_chart',
|
||||||
|
'style' => $display_periodicity_chart,
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'period_slice_chart',
|
||||||
|
'type' => 'interval',
|
||||||
|
'value' => (string) $values['period_slice_chart'],
|
||||||
|
'custom_fields' => [
|
||||||
|
SECONDS_1HOUR => __('1 hour'),
|
||||||
|
SECONDS_1DAY => __('1 day'),
|
||||||
|
SECONDS_1WEEK => __('1 week'),
|
||||||
|
SECONDS_1MONTH => __('1 month'),
|
||||||
|
],
|
||||||
|
'units_select2' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$options_period_mode = [
|
||||||
|
CUSTOM_GRAPH_AREA => __('Area'),
|
||||||
|
CUSTOM_GRAPH_LINE => __('Line'),
|
||||||
|
CUSTOM_GRAPH_VBARS => __('Vertical bars'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs['inputs']['row2'][] = [
|
||||||
|
'label' => __('Type chart'),
|
||||||
|
'id' => 'div_period_mode',
|
||||||
|
'style' => $display_periodicity_chart,
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $options_period_mode,
|
||||||
|
'name' => 'period_mode',
|
||||||
|
'selected' => $values['period_mode'],
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -383,6 +383,7 @@ class SLAPercentWidget extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -262,6 +262,7 @@ class TopNWidget extends Widget
|
|||||||
'style_icon' => 'flex-grow: 0',
|
'style_icon' => 'flex-grow: 0',
|
||||||
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script' => 'check_period_warning(this, \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
'script_input' => 'check_period_warning_manual(\'period\', \''.__('Warning').'\', \''.__('Displaying items with extended historical data can have an impact on system performance. We do not recommend that you use intervals longer than 30 days, especially if you combine several of them in a report, dashboard or visual console.').'\')',
|
||||||
|
'units_select2' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ class TreeViewWidget extends Widget
|
|||||||
'dateFormat' => DATE_FORMAT_JS,
|
'dateFormat' => DATE_FORMAT_JS,
|
||||||
'userLanguage' => get_user_language(),
|
'userLanguage' => get_user_language(),
|
||||||
'translate' => [
|
'translate' => [
|
||||||
'emptyMessage' => __('No data found'),
|
'emptyMessage' => ui_print_info_message(['no_close' => true, 'message' => __('No data found.')], '', true),
|
||||||
'foundMessage' => $foundMessage,
|
'foundMessage' => $foundMessage,
|
||||||
'total' => [
|
'total' => [
|
||||||
'agents' => __('Total agents'),
|
'agents' => __('Total agents'),
|
||||||
|
@ -230,7 +230,7 @@ class User extends Entity implements PublicLogin
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$str = $config['dbpass'];
|
$str = $config['dbpass'];
|
||||||
$str .= $config['id_user'];
|
$str .= ($config['id_user'] ?? get_parameter('id_user'));
|
||||||
$str .= $other_secret;
|
$str .= $other_secret;
|
||||||
return hash('sha256', $str);
|
return hash('sha256', $str);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ class View extends \HTML
|
|||||||
});
|
});
|
||||||
ui.jqXHR.fail(function () {
|
ui.jqXHR.fail(function () {
|
||||||
ui.panel.html(
|
ui.panel.html(
|
||||||
"Couldn\'t load Data. Plz Reload Page or Try Again Later."
|
"'.__('The data could not be loaded. Please reload the page or try again later.').'"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -954,6 +954,7 @@ input.resize_button {
|
|||||||
right: 6%;
|
right: 6%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recipent > div > table,
|
||||||
.new-widget-message > div > table,
|
.new-widget-message > div > table,
|
||||||
.container-center > div > table {
|
.container-center > div > table {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -961,6 +962,7 @@ input.resize_button {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recipent > div > table tr td > div,
|
||||||
.new-widget-message > div > table tr td > div,
|
.new-widget-message > div > table tr td > div,
|
||||||
.container-center > div > table tr td > div {
|
.container-center > div > table tr td > div {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -1017,3 +1019,16 @@ ul.select2-selection__rendered > li.select2-selection__choice {
|
|||||||
.select2-results__option {
|
.select2-results__option {
|
||||||
line-break: anywhere;
|
line-break: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#period_manual > input[type="text"] {
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recipent {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
@ -7273,6 +7273,10 @@ div.graph div.legend table {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mrgn_lft_10px_imp {
|
||||||
|
margin-left: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.mrgn_lft_15px {
|
.mrgn_lft_15px {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
@ -14268,3 +14272,8 @@ table.filter-table-adv td > div.row-flex label.custom_checkbox {
|
|||||||
table.filter-table-adv td > div.row-flex input {
|
table.filter-table-adv td > div.row-flex input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.fixed-bottom-box.tree-view-bottom-modal {
|
||||||
|
z-index: 1;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
@ -814,7 +814,7 @@ form ul.form_flex {
|
|||||||
|
|
||||||
.container-layout {
|
.container-layout {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 3px dashed #fff;
|
border: 3px dashed var(--border-color);
|
||||||
background: #222;
|
background: #222;
|
||||||
padding: 10px 0px 10px 0px;
|
padding: 10px 0px 10px 0px;
|
||||||
}
|
}
|
||||||
@ -1585,7 +1585,7 @@ a.autorefresh_txt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.grid-stack-item-content {
|
.grid-stack-item-content {
|
||||||
box-shadow: 0px 0px 15px -10px #888;
|
box-shadow: 0px 0px 7px 1px #8888882b;
|
||||||
border-radius: 0px 0px 0px 0px;
|
border-radius: 0px 0px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2100,3 +2100,15 @@ select option:checked {
|
|||||||
.d2h-file-collapse {
|
.d2h-file-collapse {
|
||||||
color: #333 !important;
|
color: #333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid-stack-item-content {
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#result_order .show_result_interpreter #result_items li.active {
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.color_666 {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
<div style='padding-bottom: 50px'>
|
<div style='padding-bottom: 50px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.776';
|
$version = '7.0NG.776';
|
||||||
$build = '240423';
|
$build = '240426';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
||||||
|
@ -1026,11 +1026,18 @@ if (is_ajax() === true) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = networkmap_refresh_holding_area($networkmap_id, $x, $y);
|
$filter = db_get_value('filter', 'tmap', 'id', $networkmap_id);
|
||||||
|
$filter = json_decode($filter, true);
|
||||||
|
|
||||||
if (!empty($data)) {
|
if (isset($filter['empty_map']) === false
|
||||||
$return['correct'] = true;
|
|| (isset($filter['empty_map']) === true && $filter['empty_map'] !== 1)
|
||||||
$return['holding_area'] = $data;
|
) {
|
||||||
|
$data = networkmap_refresh_holding_area($networkmap_id, $x, $y);
|
||||||
|
|
||||||
|
if (!empty($data)) {
|
||||||
|
$return['correct'] = true;
|
||||||
|
$return['holding_area'] = $data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
@ -38,6 +38,13 @@ ob_start();
|
|||||||
// Fullscreen by default.
|
// Fullscreen by default.
|
||||||
$config['pure'] = get_parameter('pure', 1);
|
$config['pure'] = get_parameter('pure', 1);
|
||||||
|
|
||||||
|
$dashboardId = get_parameter('dashboardId', null);
|
||||||
|
if ($dashboardId !== null) {
|
||||||
|
include 'general/noaccess.php';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once 'dashboard.php';
|
require_once 'dashboard.php';
|
||||||
|
|
||||||
// Clean session to avoid direct access.
|
// Clean session to avoid direct access.
|
||||||
|
@ -1249,27 +1249,7 @@ if (is_ajax() === true) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$regex_validation = false;
|
$carry[] = $tmp;
|
||||||
if (empty($tmp) === false && $regex !== '') {
|
|
||||||
foreach (json_decode(json_encode($tmp), true) as $key => $field) {
|
|
||||||
if ($key === 'b64') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$field = strip_tags($field);
|
|
||||||
|
|
||||||
if (preg_match('/'.io_safe_output($regex).'/', $field)) {
|
|
||||||
$regex_validation = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($regex_validation === true) {
|
|
||||||
$carry[] = $tmp;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$carry[] = $tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $carry;
|
return $carry;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -1289,11 +1269,10 @@ if (is_ajax() === true) {
|
|||||||
// RecordsTotal && recordsfiltered resultados totales.
|
// RecordsTotal && recordsfiltered resultados totales.
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
[
|
[
|
||||||
'data' => ($data ?? []),
|
'data' => ($data ?? []),
|
||||||
'buffers' => $buffers,
|
'buffers' => $buffers,
|
||||||
'recordsTotal' => $count,
|
'recordsTotal' => $count,
|
||||||
'recordsFiltered' => $count,
|
'recordsFiltered' => $count,
|
||||||
'showAlwaysPagination' => (empty($regex) === false) ? true : false,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@ -2666,20 +2645,22 @@ try {
|
|||||||
|
|
||||||
|
|
||||||
// Always add options column.
|
// Always add options column.
|
||||||
$fields = array_merge(
|
if ((bool) check_acl($config['id_user'], 0, 'EW') === true) {
|
||||||
$fields,
|
$fields = array_merge(
|
||||||
[
|
$fields,
|
||||||
[
|
[
|
||||||
'text' => 'options',
|
[
|
||||||
'class' => 'table_action_buttons mw100px',
|
'text' => 'options',
|
||||||
],
|
'class' => 'table_action_buttons mw100px',
|
||||||
[
|
],
|
||||||
'text' => 'm',
|
[
|
||||||
'extra' => $checkbox_all,
|
'text' => 'm',
|
||||||
'class' => 'w20px no-text-imp',
|
'extra' => $checkbox_all,
|
||||||
],
|
'class' => 'w20px no-text-imp',
|
||||||
]
|
],
|
||||||
);
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Get column names.
|
// Get column names.
|
||||||
$column_names = events_get_column_names($fields, true);
|
$column_names = events_get_column_names($fields, true);
|
||||||
@ -2890,8 +2871,8 @@ try {
|
|||||||
'column_names' => $column_names,
|
'column_names' => $column_names,
|
||||||
'columns' => $fields,
|
'columns' => $fields,
|
||||||
'no_sortable_columns' => [
|
'no_sortable_columns' => [
|
||||||
-1,
|
'options',
|
||||||
-2,
|
'm',
|
||||||
'column-instructions',
|
'column-instructions',
|
||||||
'user_comment',
|
'user_comment',
|
||||||
],
|
],
|
||||||
@ -3715,11 +3696,19 @@ function datetime_picker_callback() {
|
|||||||
|
|
||||||
datetime_picker_callback();
|
datetime_picker_callback();
|
||||||
|
|
||||||
function show_instructions(id){
|
function show_instructions(id, title_event){
|
||||||
title = "<?php echo __('Instructions'); ?>";
|
title = "<?php echo __('Instructions'); ?>";
|
||||||
$('#hidden_event_instructions_' + id).dialog({
|
$('#hidden_event_instructions_' + id).dialog({
|
||||||
title: title,
|
title: `${title+' '+atob(title_event)}`,
|
||||||
width: 600
|
width: 650,
|
||||||
|
draggable: true,
|
||||||
|
modal: true,
|
||||||
|
closeOnEscape: true,
|
||||||
|
open: function(){
|
||||||
|
$('.ui-widget-overlay').bind('click',function(){
|
||||||
|
$('#hidden_event_instructions_' + id).dialog('close');
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,8 @@ $time_start = date('H:i:s', $date_params['date_init']);
|
|||||||
$date_init = date('Y/m/d', $date_params['date_init']);
|
$date_init = date('Y/m/d', $date_params['date_init']);
|
||||||
$time_init = date('H:i:s', $date_params['date_init']);
|
$time_init = date('H:i:s', $date_params['date_init']);
|
||||||
|
|
||||||
|
$time = $time_end;
|
||||||
|
|
||||||
$custom_date_end = date('Y/m/d H:i:s', $date_params['date_end']);
|
$custom_date_end = date('Y/m/d H:i:s', $date_params['date_end']);
|
||||||
|
|
||||||
$period = $date_params['period'];
|
$period = $date_params['period'];
|
||||||
@ -94,6 +96,9 @@ if (empty($schedule_report) === false) {
|
|||||||
echo '<br>';
|
echo '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($time) === true) {
|
||||||
|
$time = date(TIME_FORMAT);
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------- INIT HEADER --------------------------------------
|
// ------------------- INIT HEADER --------------------------------------
|
||||||
$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure";
|
$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure";
|
||||||
|
@ -133,16 +133,16 @@ $table->data[0][3] = "<a href='index.php?search_category=modules&keywords=".$con
|
|||||||
// ~ $table->data[0][5] = "<a href='index.php?search_category=alerts&keywords=" . $config['search_keywords'] . "&head_search_keywords=Search'>" .
|
// ~ $table->data[0][5] = "<a href='index.php?search_category=alerts&keywords=" . $config['search_keywords'] . "&head_search_keywords=Search'>" .
|
||||||
// ~ sprintf(__("%s Found"), $totalAlerts) . "</a>";
|
// ~ sprintf(__("%s Found"), $totalAlerts) . "</a>";
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found'), 'class' => 'invert_filter']);
|
$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found')]);
|
||||||
$table->data[0][7] = "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalUsers).'</a>';
|
$table->data[0][7] = "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalUsers).'</a>';
|
||||||
$table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' => __('Graphs found'), 'class' => 'invert_filter']);
|
$table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' => __('Graphs found'), 'class' => 'invert_filter']);
|
||||||
$table->data[0][9] = "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalGraphs).'</a>';
|
$table->data[0][9] = "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalGraphs).'</a>';
|
||||||
$table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found'), 'class' => 'invert_filter']);
|
$table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found'), 'class' => 'invert_filter']);
|
||||||
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
|
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
|
||||||
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles')]);
|
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles'), 'class' => 'main_menu_icon invert_filter']);
|
||||||
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
|
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$table->data[0][14] = html_print_image('images/policy@svg.svg', true, ['title' => __('Policies'), 'class' => 'main_menu_icon']);
|
$table->data[0][14] = html_print_image('images/policy@svg.svg', true, ['title' => __('Policies'), 'class' => 'main_menu_icon invert_filter']);
|
||||||
$table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
|
$table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,10 @@ if ($searchMain) {
|
|||||||
'text' => "<a href='index.php?search_category=main&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=main&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/zoom_mc.png',
|
'images/zoom_mc.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Global search')]
|
[
|
||||||
|
'title' => __('Global search'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'main',
|
'active' => $searchTab == 'main',
|
||||||
];
|
];
|
||||||
@ -79,7 +82,10 @@ if ($searchAgents) {
|
|||||||
'text' => "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/op_monitoring.png',
|
'images/op_monitoring.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Agents')]
|
[
|
||||||
|
'title' => __('Agents'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'agents',
|
'active' => $searchTab == 'agents',
|
||||||
];
|
];
|
||||||
@ -92,7 +98,10 @@ if ($searchUsers) {
|
|||||||
'text' => "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/op_workspace.png',
|
'images/op_workspace.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Users')]
|
[
|
||||||
|
'title' => __('Users'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'users',
|
'active' => $searchTab == 'users',
|
||||||
];
|
];
|
||||||
@ -105,7 +114,10 @@ if ($searchAlerts) {
|
|||||||
'text' => "<a href='index.php?search_category=alerts&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=alerts&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/op_alerts.png',
|
'images/op_alerts.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Alerts')]
|
[
|
||||||
|
'title' => __('Alerts'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'alerts',
|
'active' => $searchTab == 'alerts',
|
||||||
];
|
];
|
||||||
@ -118,7 +130,10 @@ if ($searchGraphs) {
|
|||||||
'text' => "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/chart.png',
|
'images/chart.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Graphs')]
|
[
|
||||||
|
'title' => __('Graphs'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'graphs',
|
'active' => $searchTab == 'graphs',
|
||||||
];
|
];
|
||||||
@ -131,7 +146,10 @@ if ($searchReports) {
|
|||||||
'text' => "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/op_reporting.png',
|
'images/op_reporting.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Reports')]
|
[
|
||||||
|
'title' => __('Reports'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'reports',
|
'active' => $searchTab == 'reports',
|
||||||
];
|
];
|
||||||
@ -144,7 +162,10 @@ if ($searchMaps) {
|
|||||||
'text' => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/visual_console.png',
|
'images/visual_console.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Visual consoles')]
|
[
|
||||||
|
'title' => __('Visual consoles'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'maps',
|
'active' => $searchTab == 'maps',
|
||||||
];
|
];
|
||||||
@ -157,7 +178,10 @@ if ($searchModules) {
|
|||||||
'text' => "<a href='index.php?search_category=modules&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
'text' => "<a href='index.php?search_category=modules&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
|
||||||
'images/brick.png',
|
'images/brick.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Modules')]
|
[
|
||||||
|
'title' => __('Modules'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'modules',
|
'active' => $searchTab == 'modules',
|
||||||
];
|
];
|
||||||
@ -172,7 +196,7 @@ if ($searchPolicies) {
|
|||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Policies'),
|
'title' => __('Policies'),
|
||||||
'class' => 'main_menu_icon',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
'active' => $searchTab == 'policies',
|
'active' => $searchTab == 'policies',
|
||||||
|
@ -13,6 +13,12 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
require_once '../../include/config.php';
|
require_once '../../include/config.php';
|
||||||
|
|
||||||
|
$id_layout = get_parameter('id_layout', null);
|
||||||
|
if ($id_layout !== null) {
|
||||||
|
include '../../general/noaccess.php';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
use PandoraFMS\User;
|
use PandoraFMS\User;
|
||||||
|
|
||||||
// Set root on homedir, as defined in setup.
|
// Set root on homedir, as defined in setup.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -2947,7 +2947,7 @@ SELECT @id_app := `id_app` FROM `tdiscovery_apps` WHERE `short_name` = @short_na
|
|||||||
INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_proxmox');
|
INSERT IGNORE INTO `tdiscovery_apps_scripts` (`id_app`, `macro`, `value`) VALUES (@id_app, '_exec1_', 'bin/pandora_proxmox');
|
||||||
|
|
||||||
-- Insert into tdiscovery_apps_executions
|
-- Insert into tdiscovery_apps_executions
|
||||||
INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' -g '__taskGroup__' --host '_host_' --port '_port_' --user '_user_' --password '_password_' --vm '_scanVM_' --lxc '_scanLXC_' --backups '_scanBackups_' --nodes '_scanNodes_' --transfer_mode tentacle --tentacle_address '_tentacleIP_' --tentacle_port '_tentaclePort_' --as_discovery_plugin 1');
|
INSERT IGNORE INTO `tdiscovery_apps_executions` (`id`, `id_app`, `execution`) VALUES (1, @id_app, ''_exec1_' --conf '_tempfileProxmox_'');
|
||||||
|
|
||||||
-- Insert new SAP APP
|
-- Insert new SAP APP
|
||||||
SET @short_name = 'pandorafms.sap.deset';
|
SET @short_name = 'pandorafms.sap.deset';
|
||||||
|
@ -92,6 +92,11 @@ class Options implements ChartOwnedInterface, ArraySerializableInterface, JsonSe
|
|||||||
*/
|
*/
|
||||||
protected $indexAxis;
|
protected $indexAxis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $theme;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Layout
|
* @return Layout
|
||||||
@ -194,7 +199,7 @@ class Options implements ChartOwnedInterface, ArraySerializableInterface, JsonSe
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function disableAnimation()
|
public function disableAnimation()
|
||||||
{
|
{
|
||||||
@ -323,6 +328,32 @@ class Options implements ChartOwnedInterface, ArraySerializableInterface, JsonSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get font color.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTheme()
|
||||||
|
{
|
||||||
|
return $this->theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set font color.
|
||||||
|
*
|
||||||
|
* @param string $Theme Global font color.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setTheme($theme)
|
||||||
|
{
|
||||||
|
$this->theme = $theme;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ class JavaScript extends Renderer
|
|||||||
|
|
||||||
// Watermark.
|
// Watermark.
|
||||||
if (empty($this->chart->defaults()->getWatermark()) === false) {
|
if (empty($this->chart->defaults()->getWatermark()) === false) {
|
||||||
$script[] = 'const chart_watermark_'.$this->chart->getId().' = {
|
$script[] = 'const chart_watermark_'.$this->chart->getId().' = {
|
||||||
id: "chart_watermark_'.$this->chart->getId().'",
|
id: "chart_watermark_'.$this->chart->getId().'",
|
||||||
beforeDraw: (chart) => {
|
beforeDraw: (chart) => {
|
||||||
if (Object.prototype.hasOwnProperty.call(chart, "config") &&
|
if (Object.prototype.hasOwnProperty.call(chart, "config") &&
|
||||||
@ -128,11 +128,9 @@ class JavaScript extends Renderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};';
|
};';
|
||||||
$script[] = 'Chart.register(chart_watermark_'.$this->chart->getId().');';
|
$script[] = 'Chart.register(chart_watermark_'.$this->chart->getId().');';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create chart.
|
// Create chart.
|
||||||
$script[] = 'try {';
|
$script[] = 'try {';
|
||||||
$script[] = " var chart = new Chart( ctx, {$json} );";
|
$script[] = " var chart = new Chart( ctx, {$json} );";
|
||||||
@ -143,6 +141,32 @@ class JavaScript extends Renderer
|
|||||||
$script[] = ' Chart.defaults.font.style = "'.($this->chart->defaults()->getFonts()->getStyle() ?? 'normal').'";';
|
$script[] = ' Chart.defaults.font.style = "'.($this->chart->defaults()->getFonts()->getStyle() ?? 'normal').'";';
|
||||||
$script[] = ' Chart.defaults.font.weight = "'.($this->chart->defaults()->getFonts()->getWeight() ?? '').'";';
|
$script[] = ' Chart.defaults.font.weight = "'.($this->chart->defaults()->getFonts()->getWeight() ?? '').'";';
|
||||||
|
|
||||||
|
if ($this->chart->options()->getTheme() !== null) {
|
||||||
|
if ((int) $this->chart->options()->getTheme() === 2) {
|
||||||
|
$script[] = ' Chart.defaults.color = "#ffffff";';
|
||||||
|
|
||||||
|
$script[] = '
|
||||||
|
if (chart.config.options.scales !== undefined
|
||||||
|
&& chart.config.options.scales.x !== undefined
|
||||||
|
&& chart.config.options.scales.x.ticks !== undefined
|
||||||
|
) {
|
||||||
|
chart.config.options.scales.x.ticks.color = "#ffffff";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chart.config.options.scales !== undefined &&
|
||||||
|
chart.config.options.scales.y !== undefined &&
|
||||||
|
chart.config.options.scales.y.ticks !== undefined
|
||||||
|
) {
|
||||||
|
chart.config.options.scales.y.ticks.color = "#ffffff";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chart.config.options.title !== undefined ) {
|
||||||
|
chart.config.options.title.fontColor = "#ffffff";
|
||||||
|
}
|
||||||
|
';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$script[] = '} catch (error) {';
|
$script[] = '} catch (error) {';
|
||||||
$script[] = ' console.error(error);';
|
$script[] = ' console.error(error);';
|
||||||
$script[] = '}';
|
$script[] = '}';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.776-240423
|
Version: 7.0NG.776-240426
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.776-240423"
|
pandora_version="7.0NG.776-240426"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.776";
|
my $pandora_version = "7.0NG.776";
|
||||||
my $pandora_build = "240423";
|
my $pandora_build = "240426";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -7010,8 +7010,21 @@ Returns 1 if this server is the current master, 0 otherwise.
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
##########################################################################
|
##########################################################################
|
||||||
sub pandora_is_master ($) {
|
sub pandora_is_master ($;$) {
|
||||||
my ($pa_config) = @_;
|
my ($pa_config, $dbh) = @_;
|
||||||
|
|
||||||
|
# When multiprocess is enabled the variable $Master is not shared between
|
||||||
|
# servers.
|
||||||
|
if (defined($dbh) && $pa_config->{'multiprocess'} == 1) {
|
||||||
|
my $current_master = get_db_value_limit ($dbh, 'SELECT name FROM tserver
|
||||||
|
WHERE master <> 0 AND status = 1
|
||||||
|
ORDER BY master DESC', 1);
|
||||||
|
if (defined($current_master) && $current_master eq $pa_config->{'servername'}) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ($Master eq $pa_config->{'servername'}) {
|
if ($Master eq $pa_config->{'servername'}) {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -143,7 +143,7 @@ sub data_producer ($) {
|
|||||||
# By default, after create a tasks it takes the utimestamp to 0
|
# By default, after create a tasks it takes the utimestamp to 0
|
||||||
# Status -1 means "done".
|
# Status -1 means "done".
|
||||||
my @rows;
|
my @rows;
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
|
@rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
|
||||||
WHERE id_recon_server = ?
|
WHERE id_recon_server = ?
|
||||||
AND disabled = 0
|
AND disabled = 0
|
||||||
|
@ -83,7 +83,7 @@ sub data_producer ($) {
|
|||||||
my @tasks;
|
my @tasks;
|
||||||
my @rows;
|
my @rows;
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
if ($pa_config->{'dbengine'} ne 'oracle') {
|
if ($pa_config->{'dbengine'} ne 'oracle') {
|
||||||
@rows = get_db_rows ($dbh,
|
@rows = get_db_rows ($dbh,
|
||||||
'SELECT tagent_module_inventory.id_agent_module_inventory, tagent_module_inventory.flag, tagent_module_inventory.timestamp
|
'SELECT tagent_module_inventory.id_agent_module_inventory, tagent_module_inventory.flag, tagent_module_inventory.timestamp
|
||||||
|
@ -96,7 +96,7 @@ sub data_producer ($) {
|
|||||||
my @rows;
|
my @rows;
|
||||||
my $network_filter = enterprise_hook ('get_network_filter', [$pa_config]);
|
my $network_filter = enterprise_hook ('get_network_filter', [$pa_config]);
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
WHERE server_name = ?
|
WHERE server_name = ?
|
||||||
|
@ -96,7 +96,7 @@ sub data_producer ($) {
|
|||||||
my @tasks;
|
my @tasks;
|
||||||
my @rows;
|
my @rows;
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
WHERE server_name = ?
|
WHERE server_name = ?
|
||||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.776";
|
my $pandora_version = "7.0NG.776";
|
||||||
my $pandora_build = "240423";
|
my $pandora_build = "240426";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -93,7 +93,7 @@ sub data_producer ($) {
|
|||||||
my @tasks;
|
my @tasks;
|
||||||
my @rows;
|
my @rows;
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo,
|
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo,
|
||||||
tagente_modulo.flag, last_execution_try
|
tagente_modulo.flag, last_execution_try
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
|
@ -94,7 +94,7 @@ sub data_producer ($) {
|
|||||||
my @tasks;
|
my @tasks;
|
||||||
my @rows;
|
my @rows;
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
WHERE server_name = ?
|
WHERE server_name = ?
|
||||||
|
@ -124,7 +124,7 @@ sub data_producer ($) {
|
|||||||
my @tasks;
|
my @tasks;
|
||||||
my @rows;
|
my @rows;
|
||||||
|
|
||||||
if (pandora_is_master($pa_config) == 0) {
|
if (pandora_is_master($pa_config, $dbh) == 0) {
|
||||||
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
@rows = get_db_rows ($dbh, 'SELECT tagente_modulo.id_agente_modulo, tagente_modulo.flag, tagente_estado.current_interval + tagente_estado.last_execution_try AS time_left, last_execution_try
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
WHERE server_name = ?
|
WHERE server_name = ?
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%global __os_install_post %{nil}
|
%global __os_install_post %{nil}
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.776
|
%define version 7.0NG.776
|
||||||
%define release 240423
|
%define release 240426
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.776"
|
PI_VERSION="7.0NG.776"
|
||||||
PI_BUILD="240423"
|
PI_BUILD="240426"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -38,7 +38,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.776 Build 240423";
|
my $version = "7.0NG.776 Build 240426";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.776 Build 240423";
|
my $version = "7.0NG.776 Build 240426";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
@ -165,7 +165,7 @@ sub prepare_tree {
|
|||||||
} else {
|
} else {
|
||||||
$snmp_call{'oid'} = $config->{'oid_base'} . $config->{'x86_indexes'}{'__idx__'}.$ifIndex;
|
$snmp_call{'oid'} = $config->{'oid_base'} . $config->{'x86_indexes'}{'__idx__'}.$ifIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $raw = snmp_walk(\%snmp_call);
|
my $raw = snmp_walk(\%snmp_call);
|
||||||
return $raw if (ref($raw) eq "HASH");
|
return $raw if (ref($raw) eq "HASH");
|
||||||
|
|
||||||
@ -518,6 +518,9 @@ $filename =~ tr/./_/;
|
|||||||
$config->{'tmp_file'} = $filename.'.idx' if empty($config->{'tmp_file'});
|
$config->{'tmp_file'} = $filename.'.idx' if empty($config->{'tmp_file'});
|
||||||
$config->{'log'} = $filename.'.log' if empty($config->{'log'});
|
$config->{'log'} = $filename.'.log' if empty($config->{'log'});
|
||||||
|
|
||||||
|
# Escape special characters
|
||||||
|
$config->{'community'} =~ s/([^\/\w])/\\$1/g;
|
||||||
|
|
||||||
# Check snmp connectivity
|
# Check snmp connectivity
|
||||||
my $sysobjectid = snmp_get({%{$config}, 'oid' => '.1.3.6.1.2.1.1.2.0'});
|
my $sysobjectid = snmp_get({%{$config}, 'oid' => '.1.3.6.1.2.1.1.2.0'});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user