Merge branch 'develop' into ent-13324-estado-grupo-erroneo-en-group-view-fenix

This commit is contained in:
Pablo Aragon 2024-04-19 08:07:59 +02:00
commit 8e28fab0ca
54 changed files with 489 additions and 258 deletions

View File

@ -92,12 +92,10 @@ RUN dnf install -y --setopt=tsflags=nodocs \
php-yaml \ php-yaml \
libzstd \ libzstd \
openldap-clients \ openldap-clients \
http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ chromium \
http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \ http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm
RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/ RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/
# Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts # Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts

View File

@ -64,7 +64,7 @@ wget $oconsoleurl
wget $oserverurl wget $oserverurl
if [ "$BASEBUILD" == 1 ] ; then if [ "$BASEBUILD" == 1 ] ; then
docker pull centos:8 docker pull rockylinux:8
# Open Base image # Open Base image
echo "building Base el8 image" echo "building Base el8 image"
cd $DOCKER_PATH/base cd $DOCKER_PATH/base
@ -77,11 +77,11 @@ else
fi fi
if [ "$DBBUILD" == 1 ] ; then if [ "$DBBUILD" == 1 ] ; then
docker pull percona:5.7 docker pull percona:8.0
# Percona image # Percona image
echo "building Percona image" echo "building Percona image"
cd $OPEN/extras/docker/percona cd $OPEN/extras/docker/percona/8.0
docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/Dockerfile $OPEN/extras/docker/percona docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/8.0/Dockerfile $OPEN/extras/docker/percona/8.0/
echo -e ">>>> \n" echo -e ">>>> \n"
fi fi

View File

@ -8,6 +8,8 @@ services:
image: pandorafms/pandorafms-percona-base image: pandorafms/pandorafms-percona-base
restart: always restart: always
#command: ["mysqld", "--innodb-buffer-pool-size=900M"] #command: ["mysqld", "--innodb-buffer-pool-size=900M"]
cap_add:
- SYS_NICE # CAP_SYS_NICE
environment: environment:
MYSQL_ROOT_PASSWORD: pandora MYSQL_ROOT_PASSWORD: pandora
MYSQL_DATABASE: pandora MYSQL_DATABASE: pandora

View File

@ -0,0 +1,11 @@
#docker build -t pandorafms/pandorafms-percona-base:80 .
#docker tag pandorafms/pandorafms-percona-base:80 pandorafms/pandorafms-percona-base:latest
#docker push pandorafms/pandorafms-percona-base:80
FROM percona:8.0
ADD pandora.cnf /etc/my.cnf.d/
USER root
RUN chown mysql:mysql /etc/my.cnf.d/pandora.cnf
USER mysql
EXPOSE 3306

View File

@ -0,0 +1,20 @@
# Use root/example as user/password credentials
# este compose incluye la base de datos en otro docker y levanta aplicacion y DB juntos
version: '3.1'
services:
db:
image: pandorafms/pandorafms-percona-base:80
restart: always
command: ["mysqld", "--innodb-buffer-pool-size=1G"]
cap_add:
- SYS_NICE # CAP_SYS_NICE
environment:
MYSQL_ROOT_PASSWORD: pandora
MYSQL_DATABASE: pandora
MYSQL_USER: pandora
MYSQL_PASSWORD: pandora
networks:
- pandora
networks:
pandora:

View File

@ -0,0 +1,39 @@
# copy this file to /etc/my.cnf.d/pandora.cnf directory inside the container to set the onfiguration
[mysqld]
datadir=/var/lib/mysql
user=mysql
character-set-server=utf8mb4
skip-character-set-client-handshake
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Mysql optimizations for Pandora FMS
# Please check the documentation in http://pandorafms.com for better results
max_allowed_packet = 64M
innodb_lock_wait_timeout = 90
innodb_file_per_table
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_file_size = 64M
innodb_log_buffer_size = 16M
innodb_io_capacity = 300
thread_cache_size = 8
thread_stack = 256K
max_connections = 100
key_buffer_size=4M
read_buffer_size=128K
read_rnd_buffer_size=128K
sort_buffer_size=128K
join_buffer_size=4M
# legacy compatibility
default_authentication_plugin=mysql_native_password
log_error_suppression_list='MY-013360'
skip-log-bin
sql_mode=""

View File

@ -0,0 +1,6 @@
docker run --name pandora-percona \
-e MYSQL_ROOT_PASSWORD=pandora \
-e MYSQL_DATABASE=pandora \
-e MYSQL_USER=pandora \
-e MYSQL_PASSWORD=pandora \
-d pandora_percona:80

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.776-240418 Version: 7.0NG.776-240419
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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-240418" pandora_version="7.0NG.776-240419"
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

View File

@ -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 => '240418'; use constant AGENT_BUILD => '240419';
# 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;

View File

@ -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 240418 %define release 240419
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -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 240418 %define release 240419
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version

View File

@ -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 240418 %define release 240419
%define debug_package %{nil} %define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version

View File

@ -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 240418 %define release 240419
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version
Name: %{name} Name: %{name}

View File

@ -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 240418 %define release 240419
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.776" PI_VERSION="7.0NG.776"
PI_BUILD="240418" PI_BUILD="240419"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{240418} {240419}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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 240418") #define PANDORA_VERSION ("7.0NG.776 Build 240419")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -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 240418))" VALUE "ProductVersion", "(7.0NG.776(Build 240419))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.776-240418 Version: 7.0NG.776-240419
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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-240418" pandora_version="7.0NG.776-240419"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -7712,6 +7712,8 @@ UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id
DELETE FROM tconfig WHERE `token` = 'legacy_database_ha'; DELETE FROM tconfig WHERE `token` = 'legacy_database_ha';
UPDATE tncm_script SET `content` = 'sleep:1
capture:export\n\r 
exit\n\r' where `content` = 'sleep:1
capture:system resource print\n\r 
exit\n\r';
-- Add new columns in tdeployment_hosts -- Add new columns in tdeployment_hosts
ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH'; ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH';
ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22; ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22;
@ -7723,7 +7725,7 @@ UPDATE
SET SET
`tdeployment_hosts`.`deploy_method` = 'HTTP', `tdeployment_hosts`.`deploy_method` = 'HTTP',
`tdeployment_hosts`.`deploy_port` = 5985, `tdeployment_hosts`.`deploy_port` = 5985,
`tdeployment_hosts`.`temp_folder` = 'C:\Widnows\Temp' `tdeployment_hosts`.`temp_folder` = 'C:\Windows\Temp'
WHERE WHERE
`tdeployment_hosts`.`id_os` = `tconfig_os`.`id_os` AND `tconfig_os`.`name` = 'Windows' AND `tdeployment_hosts`.`deployed` = 0; `tdeployment_hosts`.`id_os` = `tconfig_os`.`id_os` AND `tconfig_os`.`name` = 'Windows' AND `tdeployment_hosts`.`deployed` = 0;

View File

@ -114,6 +114,7 @@ foreach ($all_images as $image_file) {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filter-table-adv'; $table->class = 'databox filter-table-adv';
$table->styleTable = 'min-width: 900px; table-layout:fixed;';
$table->head = []; $table->head = [];
$table->head['icon'] = ''; $table->head['icon'] = '';
@ -122,8 +123,7 @@ $table->head[1] = __('Image').'<br>'.__('Module').' / '.__('Custom graph');
$table->head[2] = __('Width x Height<br>Max value'); $table->head[2] = __('Width x Height<br>Max value');
$table->head[3] = __('Position').'<br>'.__('Period'); $table->head[3] = __('Position').'<br>'.__('Period');
$table->head[4] = __('Parent').'<br>'.__('Map linked'); $table->head[4] = __('Parent').'<br>'.__('Map linked');
$table->head[5] = ''; $table->head[5] = html_print_checkbox(
$table->head[5] .= '&nbsp;&nbsp;&nbsp;'.html_print_checkbox(
'head_multiple_delete', 'head_multiple_delete',
'', '',
false, false,
@ -133,41 +133,66 @@ $table->head[5] .= '&nbsp;&nbsp;&nbsp;'.html_print_checkbox(
); );
$table->head[5] .= '&nbsp;&nbsp;&nbsp;<span title="'.__('Action').'">'.__('A.').'</span>'; $table->head[5] .= '&nbsp;&nbsp;&nbsp;<span title="'.__('Action').'">'.__('A.').'</span>';
$table->size = []; $table->headstyle = [];
$table->size['icon'] = '1%'; $table->headstyle['icon'] = 'text-align:left; width: 1%;';
$table->size[0] = '28%'; $table->headstyle[0] = 'text-align:left; width: 19%;';
$table->size[1] = ''; $table->headstyle[1] = 'text-align:left; width: 19%;';
$table->size[2] = '25%'; $table->headstyle[2] = 'text-align:left; width: 19%;';
$table->size[3] = '27%'; $table->headstyle[3] = 'text-align:left; width: 19%;';
$table->size[4] = '7%'; $table->headstyle[4] = 'text-align:left; width: 19%;';
$table->size[5] = '15%'; $table->headstyle[5] = 'text-align:right; width: 4%;';
$table->align = []; $table->align = [];
$table->align[0] = 'left';
if (!defined('METACONSOLE')) { $table->align[1] = 'left';
$table->headstyle[0] = 'text-align:left;'; $table->align[2] = 'left';
$table->headstyle[1] = 'text-align:left'; $table->align[3] = 'left';
$table->headstyle[2] = 'text-align:left'; $table->align[4] = 'left';
$table->headstyle[3] = 'text-align:left'; $table->align[5] = 'right';
$table->headstyle[4] = 'text-align:left';
$table->headstyle[5] = 'text-align:left';
$table->align[0] = 'left';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'left';
$table->align[5] = 'left';
}
$table->data = []; $table->data = [];
// Background // Background.
$table->data[0]['icon'] = ''; $table->data[0]['icon'] = '';
$table->data[0][0] = '<div sclass="invisible">'.__('Background').'</div>'; $table->data[0][0] = '<div>'.__('Background').'</div>';
$table->data[0][1] = '<div sclass="invisible">'.html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 120px;').'</div>'; $table->data[0][1] = '<div>';
$table->data[0][2] = '<div sclass="invisible">'.html_print_input_text('width', $visualConsole['width'], '', 3, 5, true).' x '.html_print_input_text('height', $visualConsole['height'], '', 3, 5, true).'</div>'; $table->data[0][1] .= html_print_select(
$table->data[0][3] = $table->data[0][4] = $table->data[0][5] = ''; $backgrounds_list,
'background',
$visualConsole['background'],
'',
'None',
'',
true,
false,
true,
'',
false,
'width: 100%;'
);
$table->data[0][1] .= '</div>';
$table->data[0][2] = '<div class="row-flex">';
$table->data[0][2] .= html_print_input_text(
'width',
$visualConsole['width'],
'',
3,
5,
true
);
$table->data[0][2] .= '<span class="mrgn_5px">x</span>';
$table->data[0][2] .= html_print_input_text(
'height',
$visualConsole['height'],
'',
3,
5,
true
);
$table->data[0][2] .= '</div>';
$table->data[0][3] = '';
$table->data[0][4] = '';
$table->data[0][5] = '';
$i = 1; $i = 1;
$layoutDatas = db_get_all_rows_field_filter( $layoutDatas = db_get_all_rows_field_filter(
@ -186,7 +211,7 @@ $x = 0;
foreach ($layoutDatas as $layoutData) { foreach ($layoutDatas as $layoutData) {
$idLayoutData = $layoutData['id']; $idLayoutData = $layoutData['id'];
// line between rows // Line between rows.
$table->data[$i][0] = '<hr>'; $table->data[$i][0] = '<hr>';
$table->colspan[$i][0] = '8'; $table->colspan[$i][0] = '8';
@ -208,7 +233,7 @@ foreach ($layoutDatas as $layoutData) {
true, true,
[ [
'title' => __('Percentile Bar'), 'title' => __('Percentile Bar'),
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
break; break;
@ -219,7 +244,7 @@ foreach ($layoutDatas as $layoutData) {
true, true,
[ [
'title' => __('Percentile Bubble'), 'title' => __('Percentile Bubble'),
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
break; break;
@ -231,7 +256,7 @@ foreach ($layoutDatas as $layoutData) {
true, true,
[ [
'title' => __('Percentile'), 'title' => __('Percentile'),
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
break; break;
@ -413,7 +438,7 @@ foreach ($layoutDatas as $layoutData) {
break; break;
default: default:
if (enterprise_installed()) { if (enterprise_installed() === true) {
$table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData); $table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData);
} else { } else {
$table->data[($i + 1)]['icon'] = ''; $table->data[($i + 1)]['icon'] = '';
@ -421,26 +446,27 @@ foreach ($layoutDatas as $layoutData) {
break; break;
} }
// First row // First row
// Label // Label.
switch ($layoutData['type']) { switch ($layoutData['type']) {
case ICON: case ICON:
case BOX_ITEM: case BOX_ITEM:
case NETWORK_LINK: case NETWORK_LINK:
case LINE_ITEM: case LINE_ITEM:
// hasn't the label. // Hasn't the label.
$table->data[($i + 1)][0] = ''; $table->data[($i + 1)][0] = '';
break; break;
default: default:
$table->data[($i + 1)][0] = '<span class="w150px block">'.html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true).'<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">'.__('Edit label').'</a>'.'</span>'; $table->data[($i + 1)][0] = '<span class="w150px block">';
$table->data[($i + 1)][0] .= html_print_input_hidden('label_'.$idLayoutData, $layoutData['label'], true);
$table->data[($i + 1)][0] .= '<a href="javascript: show_dialog_label_editor('.$idLayoutData.');">';
$table->data[($i + 1)][0] .= __('Edit label');
$table->data[($i + 1)][0] .= '</a></span>';
break; break;
} }
// Image.
// Image
switch ($layoutData['type']) { switch ($layoutData['type']) {
case STATIC_GRAPH: case STATIC_GRAPH:
case ICON: case ICON:
@ -458,7 +484,7 @@ foreach ($layoutDatas as $layoutData) {
true, true,
'', '',
false, false,
'width: 120px' 'width: 100%'
); );
break; break;
@ -467,47 +493,102 @@ foreach ($layoutDatas as $layoutData) {
break; break;
} }
// Position.
$readonly = false;
if ($layoutData['type'] == NETWORK_LINK || $layoutData['type'] == LINE_ITEM) {
$readonly = true;
}
// Width and height.
// Width and height
switch ($layoutData['type']) { switch ($layoutData['type']) {
case NETWORK_LINK:
case LINE_ITEM:
// hasn't the width and height.
$table->data[($i + 1)][2] = '';
break;
case COLOR_CLOUD: case COLOR_CLOUD:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true); $table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '<span class="mrgn_5px">x</span>';
$table->data[($i + 1)][2] .= html_print_input_text(
'height_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '</div>';
break; break;
case CIRCULAR_PROGRESS_BAR: case CIRCULAR_PROGRESS_BAR:
case CIRCULAR_INTERIOR_PROGRESS_BAR: case CIRCULAR_INTERIOR_PROGRESS_BAR:
case PERCENTILE_BUBBLE: case PERCENTILE_BUBBLE:
case PERCENTILE_BAR: case PERCENTILE_BAR:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true); $table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true
);
$table->data[($i + 1)][2] .= '</div>';
break; break;
default: default:
$table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true); $table->data[($i + 1)][2] = '<div class="row-flex">';
$table->data[($i + 1)][2] .= html_print_input_text(
'width_'.$idLayoutData,
$layoutData['width'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][2] .= '<span class="mrgn_5px">x</span>';
$table->data[($i + 1)][2] .= html_print_input_text(
'height_'.$idLayoutData,
$layoutData['height'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][2] .= '</div>';
break; break;
} }
// Position $table->data[($i + 1)][3] = '<div class="row-flex">';
switch ($layoutData['type']) { $table->data[($i + 1)][3] .= '<span class="mrgn_5px">(</span>';
case NETWORK_LINK: $table->data[($i + 1)][3] .= html_print_input_text(
case LINE_ITEM: 'left_'.$idLayoutData,
// hasn't the width and height. $layoutData['pos_x'],
$table->data[($i + 1)][3] = ''; '',
break; 2,
5,
true,
$readonly
);
$table->data[($i + 1)][3] .= '<span class="mrgn_5px">,</span>';
$table->data[($i + 1)][3] .= html_print_input_text(
'top_'.$idLayoutData,
$layoutData['pos_y'],
'',
2,
5,
true,
$readonly
);
$table->data[($i + 1)][3] .= '<span class="mrgn_5px">)</span>';
$table->data[($i + 1)][3] .= '</div>';
default: // Parent.
$table->data[($i + 1)][3] = '( '.html_print_input_text('left_'.$idLayoutData, $layoutData['pos_x'], '', 2, 5, true).' , '.html_print_input_text('top_'.$idLayoutData, $layoutData['pos_y'], '', 2, 5, true).' )';
break;
}
// Parent
switch ($layoutData['type']) { switch ($layoutData['type']) {
case BOX_ITEM: case BOX_ITEM:
case NETWORK_LINK: case NETWORK_LINK:
@ -517,39 +598,57 @@ foreach ($layoutDatas as $layoutData) {
break; break;
default: default:
$table->data[($i + 1)][4] = html_print_select( $table->data[($i + 1)][4] = '<div>'.html_print_select(
$parents, $parents,
'parent_'.$idLayoutData, 'parent_'.$idLayoutData,
$layoutData['parent_item'], $layoutData['parent_item'],
'', '',
__('None'), __('None'),
0, 0,
true true,
); false,
true,
'',
false,
'width: 100%;'
).'</div>';
break;
} }
// Delete row button // Delete row button.
if (!defined('METACONSOLE')) { $url_delete = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder';
$url_delete = 'index.php?'.'sec=network&'.'sec2=godmode/reporting/visual_console_builder&'.'tab='.$activeTab.'&'.'action=delete&'.'id_visual_console='.$visualConsole['id'].'&'.'id_element='.$idLayoutData; $url_delete .= '&tab='.$activeTab.'&action=delete';
} else { $url_delete .= '&id_visual_console='.$visualConsole['id'].'&id_element='.$idLayoutData;
$url_delete = 'index.php?'.'operation=edit_visualmap&'.'sec=screen&'.'sec2=screens/screens&'.'action=visualmap&'.'pure='.(int) get_parameter('pure', 0).'&'.'tab=list_elements&'.'action2=delete&'.'id_visual_console='.$visualConsole['id'].'&'.'id_element='.$idLayoutData; if (is_metaconsole() === true) {
$url_delete = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap';
$url_delete .= '&pure='.(int) get_parameter('pure', 0);
$url_delete .= '&tab=list_elements&action2=delete';
$url_delete .= '&id_visual_console='.$visualConsole['id'].'&id_element='.$idLayoutData;
} }
$table->data[($i + 1)][5] = ''; $table->data[($i + 1)][5] = '<div class="row-flex flex-end">';
$table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true); $table->data[($i + 1)][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
$table->data[($i + 1)][5] .= '<a href="'.$url_delete.'"onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'; $table->data[($i + 1)][5] .= '<a href="'.$url_delete.'"onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[($i + 1)][5] .= html_print_image(
'images/delete.svg',
true,
['class' => 'main_menu_icon invert_filter']
);
$table->data[($i + 1)][5] .= '</a>';
$table->data[($i + 1)][5] .= html_print_input_hidden('updated_'.$idLayoutData, '0', true); $table->data[($i + 1)][5] .= html_print_input_hidden('updated_'.$idLayoutData, '0', true);
$table->data[($i + 1)][5] .= html_print_input_hidden('rowtype_'.$idLayoutData, $layoutData['type'], true); $table->data[($i + 1)][5] .= html_print_input_hidden('rowtype_'.$idLayoutData, $layoutData['type'], true);
$table->data[($i + 1)][5] .= '</div>';
// Second row // Second row.
$table->data[($i + 2)]['icon'] = ''; $table->data[($i + 2)]['icon'] = '';
// Agent.
// Agent
switch ($layoutData['type']) { switch ($layoutData['type']) {
case GROUP_ITEM: case GROUP_ITEM:
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'PM')) { if ((bool) $own_info['is_admin'] === false
&& (bool) check_acl($config['id_user'], 0, 'PM') === false
) {
$return_all_group = false; $return_all_group = false;
} else { } else {
$return_all_group = true; $return_all_group = true;
@ -564,7 +663,12 @@ foreach ($layoutDatas as $layoutData) {
'', '',
'', '',
0, 0,
true true,
false,
false,
'',
false,
'width:100%'
); );
break; break;
@ -579,24 +683,25 @@ foreach ($layoutDatas as $layoutData) {
default: default:
$cell_content_enterprise = false; $cell_content_enterprise = false;
if (enterprise_installed()) { if (enterprise_installed() === true) {
$cell_content_enterprise = enterprise_visual_map_print_list_element('agent', $layoutData); $cell_content_enterprise = enterprise_visual_map_print_list_element('agent', $layoutData);
} }
if ($cell_content_enterprise === false) { if ($cell_content_enterprise === false) {
$params = []; $params = [];
$params['return'] = true; $params['return'] = true;
$params['show_helptip'] = true; $params['show_helptip'] = false;
$params['size'] = 20; $params['size'] = 20;
$params['input_name'] = 'agent_'.$idLayoutData; $params['input_name'] = 'agent_'.$idLayoutData;
$params['javascript_is_function_select'] = true; $params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'module_'.$idLayoutData; $params['selectbox_id'] = 'module_'.$idLayoutData;
if (defined('METACONSOLE')) { if (is_metaconsole() === true) {
$params['javascript_ajax_page'] = '../../ajax.php'; $params['javascript_ajax_page'] = '../../ajax.php';
$params['disabled_javascript_on_blur_function'] = true; $params['disabled_javascript_on_blur_function'] = true;
$params['print_input_id_server'] = true; $params['print_input_id_server'] = true;
$params['input_id_server_id'] = $params['input_id_server_name'] = 'id_server_id_'.$idLayoutData; $params['input_id_server_id'] = 'id_server_id_'.$idLayoutData;
$params['input_id_server_name'] = 'id_server_id_'.$idLayoutData;
$params['input_id_server_value'] = $layoutData['id_metaconsole']; $params['input_id_server_value'] = $layoutData['id_metaconsole'];
$params['metaconsole_enabled'] = true; $params['metaconsole_enabled'] = true;
$params['print_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true;
@ -616,7 +721,7 @@ foreach ($layoutDatas as $layoutData) {
$params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']); $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']);
} }
if ($layoutData['id_custom_graph'] != 0) { if ((int) $layoutData['id_custom_graph'] !== 0) {
$table->data[($i + 2)][0] = __('Custom graph'); $table->data[($i + 2)][0] = __('Custom graph');
} else { } else {
$table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params); $table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params);
@ -627,8 +732,7 @@ foreach ($layoutDatas as $layoutData) {
break; break;
} }
// Module.
// Module
switch ($layoutData['type']) { switch ($layoutData['type']) {
case ICON: case ICON:
case LABEL: case LABEL:
@ -642,21 +746,21 @@ foreach ($layoutDatas as $layoutData) {
default: default:
if ($layoutData['id_layout_linked'] != 0) { if ($layoutData['id_layout_linked'] != 0) {
// It is a item that links with other visualmap // It is a item that links with other visualmap.
$table->data[($i + 2)][1] = ''; $table->data[($i + 2)][1] = '';
break; break;
} }
$cell_content_enterprise = false; $cell_content_enterprise = false;
if (enterprise_installed()) { if (enterprise_installed() === true) {
$cell_content_enterprise = enterprise_visual_map_print_list_element('module', $layoutData); $cell_content_enterprise = enterprise_visual_map_print_list_element('module', $layoutData);
} }
if ($cell_content_enterprise === false) { if ($cell_content_enterprise === false) {
if (!defined('METACONSOLE')) { if (is_metaconsole() === false) {
$modules = agents_get_modules($layoutData['id_agent']); $modules = agents_get_modules($layoutData['id_agent']);
} else { } else {
if ($layoutData['id_agent'] != 0) { if ((int) $layoutData['id_agent'] !== 0) {
$server = db_get_row('tmetaconsole_setup', 'id', $layoutData['id_metaconsole']); $server = db_get_row('tmetaconsole_setup', 'id', $layoutData['id_metaconsole']);
if (metaconsole_connect($server) == NOERR) { if (metaconsole_connect($server) == NOERR) {
$modules = agents_get_modules($layoutData['id_agent']); $modules = agents_get_modules($layoutData['id_agent']);
@ -668,7 +772,7 @@ foreach ($layoutDatas as $layoutData) {
$modules = io_safe_output($modules); $modules = io_safe_output($modules);
if ($layoutData['id_custom_graph'] != 0) { if ($layoutData['id_custom_graph'] != 0) {
if (is_metaconsole()) { if (is_metaconsole() === true) {
$graphs = []; $graphs = [];
$graphs = metaconsole_get_custom_graphs(true); $graphs = metaconsole_get_custom_graphs(true);
$table->data[($i + 2)][1] = html_print_select( $table->data[($i + 2)][1] = html_print_select(
@ -678,7 +782,12 @@ foreach ($layoutDatas as $layoutData) {
'', '',
__('None'), __('None'),
0, 0,
true true,
false,
true,
'',
false,
'width:100%'
); );
} else { } else {
$table->data[($i + 2)][1] = html_print_select_from_sql( $table->data[($i + 2)][1] = html_print_select_from_sql(
@ -688,7 +797,11 @@ foreach ($layoutDatas as $layoutData) {
'', '',
__('None'), __('None'),
0, 0,
true true,
false,
true,
false,
'width:100%'
); );
} }
} else { } else {
@ -704,7 +817,7 @@ foreach ($layoutDatas as $layoutData) {
true, true,
'', '',
false, false,
'width: 120px' 'width: 100%'
); );
} }
} else { } else {
@ -713,16 +826,17 @@ foreach ($layoutDatas as $layoutData) {
break; break;
} }
// Empty // Empty.
$table->data[($i + 2)][2] = ''; $table->data[($i + 2)][2] = '';
// Period // Period.
switch ($layoutData['type']) { switch ($layoutData['type']) {
case MODULE_GRAPH: case MODULE_GRAPH:
case SIMPLE_VALUE_MAX: case SIMPLE_VALUE_MAX:
case SIMPLE_VALUE_MIN: case SIMPLE_VALUE_MIN:
case SIMPLE_VALUE_AVG: case SIMPLE_VALUE_AVG:
$table->data[($i + 2)][3] = html_print_extended_select_for_time( $table->data[($i + 2)][3] .= '<div class="row-flex">';
$table->data[($i + 2)][3] .= html_print_extended_select_for_time(
'period_'.$idLayoutData, 'period_'.$idLayoutData,
$layoutData['period'], $layoutData['period'],
'', '',
@ -731,6 +845,7 @@ foreach ($layoutDatas as $layoutData) {
10, 10,
true true
); );
$table->data[($i + 2)][3] .= '</div>';
break; break;
default: default:
@ -738,7 +853,7 @@ foreach ($layoutDatas as $layoutData) {
break; break;
} }
// Map linked // Map linked.
switch ($layoutData['type']) { switch ($layoutData['type']) {
case NETWORK_LINK: case NETWORK_LINK:
case LINE_ITEM: case LINE_ITEM:
@ -761,9 +876,8 @@ foreach ($layoutDatas as $layoutData) {
true, true,
false, false,
true, true,
'',
false, false,
'width: 120px' 'width:100%'
); );
break; break;
} }

View File

@ -786,7 +786,7 @@ if ($create_alert || $update_alert) {
2, 2,
2, 2,
$custom_value, $custom_value,
'class="w100p" required="required"', 'class="w100p"',
true true
) )
); );
@ -806,7 +806,7 @@ if ($create_alert || $update_alert) {
255, 255,
true, true,
false, false,
true false
) )
); );
echo '</td>'; echo '</td>';

View File

@ -331,7 +331,7 @@ if ($show_update_action_menu) {
false, false,
'', '',
false, false,
false true
); );
$data .= '</td>'; $data .= '</td>';
$data .= '</tr>'; $data .= '</tr>';

View File

@ -1929,13 +1929,13 @@ if (check_login()) {
); );
} }
// Search module name.
if (empty($search) === false) { if (empty($search) === false) {
$where .= ' AND tagente_modulo.nombre LIKE "%%'.$search.'%%"'; $where .= ' AND tagente_modulo.nombre LIKE "%%'.io_safe_output($search).'%%"';
} }
if (empty($search_agent) === false) { if (empty($search_agent) === false) {
$where .= ' AND tagente.alias LIKE "%%'.$search_agent.'%%"'; $where .= ' AND tagente.alias LIKE "%%'.io_safe_output($search_agent).'%%"';
} }
if (str_contains($status, '6') === true) { if (str_contains($status, '6') === true) {

View File

@ -22,7 +22,7 @@ use DI\ContainerBuilder;
/* /*
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC240418'; $build_version = 'PC240419';
$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.

View File

@ -4419,7 +4419,18 @@ function generator_chart_to_pdf(
$browserFactory = new BrowserFactory($chromium_dir); $browserFactory = new BrowserFactory($chromium_dir);
// Starts headless chrome. // Starts headless chrome.
$browser = $browserFactory->createBrowser(['noSandbox' => true]); $browser = $browserFactory->createBrowser(
[
'noSandbox' => true,
'customFlags' => [
'--disable-dev-shm-usage',
'--disable-gpu',
'--disable-web-security',
'--font-render-hinting=medium',
],
'ignoreCertificateErrors' => true,
]
);
// Creates a new page. // Creates a new page.
$page = $browser->createPage(); $page = $browser->createPage();

View File

@ -4177,126 +4177,132 @@ function visual_map_create_internal_name_item(
$idData='' $idData=''
) { ) {
$text = ''; $text = '';
switch ($type) {
case 'box_item':
case BOX_ITEM:
$text = __('Box');
break;
if (empty($label)) { case 'module_graph':
switch ($type) { case MODULE_GRAPH:
case 'box_item': $text = __('Module graph');
case BOX_ITEM: break;
$text = __('Box');
break;
case 'module_graph': case 'clock':
case MODULE_GRAPH: case CLOCK:
$text = __('Module graph'); $text = __('Clock');
break; break;
case 'clock': case 'bars_graph':
case CLOCK: case BARS_GRAPH:
$text = __('Clock'); $text = __('Bars graph');
break; break;
case 'bars_graph': case 'auto_sla_graph':
case BARS_GRAPH: case AUTO_SLA_GRAPH:
$text = __('Bars graph'); $text = __('Event history graph');
break; break;
case 'auto_sla_graph': case 'percentile_bar':
case AUTO_SLA_GRAPH: case PERCENTILE_BAR:
$text = __('Event history graph'); $text = __('Percentile bar');
break; break;
case 'percentile_bar': case 'circular_progress_bar':
case PERCENTILE_BAR: case CIRCULAR_PROGRESS_BAR:
$text = __('Percentile bar'); $text = __('Circular progress bar');
break; break;
case 'circular_progress_bar': case 'interior_circular_progress_bar':
case CIRCULAR_PROGRESS_BAR: case CIRCULAR_INTERIOR_PROGRESS_BAR:
$text = __('Circular progress bar'); $text = __('Circular progress bar (interior)');
break; break;
case 'interior_circular_progress_bar': case 'static_graph':
case CIRCULAR_INTERIOR_PROGRESS_BAR: case STATIC_GRAPH:
$text = __('Circular progress bar (interior)'); $text = __('Static Image').' - '.$image;
break; break;
case 'static_graph': case 'simple_value':
case STATIC_GRAPH: case SIMPLE_VALUE:
$text = __('Static Image').' - '.$image; $text = __('Simple Value');
break; break;
case 'simple_value': case 'label':
case SIMPLE_VALUE: case LABEL:
$text = __('Simple Value'); $text = __('Label');
break; break;
case 'label': case GROUP_ITEM:
case LABEL: case 'group_item':
$text = __('Label'); $text = __('Group').' - ';
break; break;
case GROUP_ITEM: case COLOR_CLOUD:
case 'group_item': case 'color_cloud':
$text = __('Group').' - '; $text = __('Color cloud').' - ';
break; break;
case COLOR_CLOUD: case 'icon':
case 'color_cloud': case ICON:
$text = __('Color cloud').' - '; $text = __('Icon').' - '.$image;
break; break;
case 'icon': case BASIC_CHART:
case ICON: $text = __('Basic chart').' - '.$image;
$text = __('Icon').' - '.$image; break;
break;
}
if (!empty($agent)) { case ODOMETER:
$text .= ' ('.ui_print_truncate_text($agent, 'agent_small', false); $text = __('Odometer').' - '.$image;
break;
$moduleName = io_safe_output(db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_module)); default:
if (!empty($moduleName)) { $text = __('Not assigned');
$text .= ' - '.ui_print_truncate_text($moduleName, 'module_small', false); break;
}
$text .= ')';
}
$text .= ' ('.$idData.')';
} else {
$text = $label;
} }
if (!empty($agent)) {
$text .= ' ('.ui_print_truncate_text($agent, 'agent_small', false);
$moduleName = io_safe_output(db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $id_module));
if (!empty($moduleName)) {
$text .= ' - '.ui_print_truncate_text($moduleName, 'module_small', false);
}
$text .= ')';
}
$text .= ' ('.$idData.')';
return io_safe_output($text); return io_safe_output($text);
} }
function visual_map_get_items_parents($idVisual) function visual_map_get_items_parents($idVisual)
{ {
// Avoid the sort by 'label' in the query cause oracle cannot sort by columns with CLOB type
$items = db_get_all_rows_filter('tlayout_data', ['id_layout' => $idVisual]); $items = db_get_all_rows_filter('tlayout_data', ['id_layout' => $idVisual]);
if ($items == false) {
$items = [];
} else {
// Sort by label
sort_by_column($items, 'label');
}
$return = []; $return = [];
foreach ($items as $item) { foreach ($items as $item) {
if ($item['type'] == LINE_ITEM) {
continue;
}
$agent = null; $agent = null;
if ($item['id_agent'] != 0) { if ($item['id_agent'] != 0) {
$agent = io_safe_output(agents_get_alias($item['id_agent'])); $agent = io_safe_output(agents_get_alias($item['id_agent']));
} }
$return[$item['id']] = visual_map_create_internal_name_item( $text = visual_map_create_internal_name_item(
$item['label'], ($item['type'] != COLOR_CLOUD) ? $item['label'] : null,
$item['type'], $item['type'],
$item['image'], $item['image'],
$agent, $agent,
$item['id_agente_modulo'], $item['id_agente_modulo'],
$item['id'] $item['id']
); );
$return[$item['id']] = $text;
} }
return $return; return $return;

View File

@ -1345,7 +1345,7 @@ function check_event_sound(settings) {
let element_time = $(this) let element_time = $(this)
.children(".li-hidden") .children(".li-hidden")
.val(); .val();
let obj_time = new Date(element_time); let obj_time = new Date(element_time * 1000);
let current_dt = new Date(); let current_dt = new Date();
let timestamp = current_dt.getTime() - obj_time.getTime(); let timestamp = current_dt.getTime() - obj_time.getTime();
timestamp = timestamp / 1000; timestamp = timestamp / 1000;
@ -1427,7 +1427,7 @@ function check_event_sound(settings) {
li.insertAdjacentHTML( li.insertAdjacentHTML(
"beforeend", "beforeend",
'<input type="hidden" value="' + '<input type="hidden" value="' +
element.event_timestamp + element.utimestamp +
'" class="li-hidden"/>' '" class="li-hidden"/>'
); );
$("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li); $("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li);

View File

@ -601,7 +601,7 @@ final class Percentile extends Item
$values = parent::getDefaultGeneralValues($values); $values = parent::getDefaultGeneralValues($values);
// Default values. // Default values.
if (isset($values['width']) === false) { if (isset($values['width']) === false || empty($values['width']) === true) {
$values['width'] = 100; $values['width'] = 100;
} }

View File

@ -14250,3 +14250,21 @@ div.tox .tox-editor-header {
.select2-multiselect-text-wrap .select2-selection__choice__remove { .select2-multiselect-text-wrap .select2-selection__choice__remove {
flex-basis: 0% !important; flex-basis: 0% !important;
} }
table.filter-table-adv td > div.row-flex {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
table.filter-table-adv td > div.row-flex.flex-end {
justify-content: flex-end;
}
table.filter-table-adv td > div.row-flex label.custom_checkbox {
margin: 0px;
}
table.filter-table-adv td > div.row-flex input {
width: 100%;
}

View File

@ -12,7 +12,11 @@
} }
.is-maintenance :nth-child(1) { .is-maintenance :nth-child(1) {
display: none; display: none !important;
}
.is-maintenance .vc-item-nl-arrow {
display: none !important;
} }
.visual-console-item { .visual-console-item {

File diff suppressed because one or more lines are too long

View File

@ -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 = '240418'; $build = '240419';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -242,7 +242,7 @@ foreach ($rows as $row) {
if ((bool) $row['block_mode'] === true) { if ((bool) $row['block_mode'] === true) {
$table->head[0] .= '&nbsp;&nbsp;&nbsp;<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'&utimestamp='.$utimestamp.'&id_agent_module_inventory='.$row['id_agent_module_inventory'].'&diff_view=1">'.html_print_image( $table->head[0] .= '&nbsp;&nbsp;&nbsp;<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'&utimestamp='.$utimestamp.'&id_agent_module_inventory='.$row['id_agent_module_inventory'].'&diff_view=1">'.html_print_image(
'images/op_inventory.menu.png', 'images/op_inventory.png',
true, true,
[ [
'alt' => __('Diff view'), 'alt' => __('Diff view'),

View File

@ -31,7 +31,9 @@ global $config;
require_once 'include/functions_agents.php'; require_once 'include/functions_agents.php';
require_once 'include/functions_custom_graphs.php'; require_once 'include/functions_custom_graphs.php';
ui_require_javascript_file('calendar'); ui_require_css_file('datepicker');
ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
if ((bool) check_acl($config['id_user'], $id_grupo, 'AR') === false && (bool) check_acl($config['id_user'], 0, 'AW') === false) { if ((bool) check_acl($config['id_user'], $id_grupo, 'AR') === false && (bool) check_acl($config['id_user'], 0, 'AW') === false) {
db_pandora_audit( db_pandora_audit(
@ -223,13 +225,6 @@ $table->data[0][1] = html_print_label_input_block(
10, 10,
40, 40,
true true
).html_print_image(
'images/calendar_view_day.png',
true,
[
'class' => 'invert_filter',
'onclick' => "scwShow(scwID('text-start_date'),this);",
]
).'</div>' ).'</div>'
); );
@ -472,6 +467,14 @@ echo '</div>';
// Load graphs // Load graphs
$(document).ready(function() { $(document).ready(function() {
$('#text-start_date').datepicker ({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
showAnim: 'slideDown',
firstDay: "<?php echo $config['datepicker_first_day']; ?>",
});
$('#combined').change(function() { $('#combined').change(function() {
if ($('#combined').val() == 1) { if ($('#combined').val() == 1) {
$('#option_type').empty(); $('#option_type').empty();

View File

@ -437,7 +437,7 @@ function check_event_sound() {
let element_time = $(this) let element_time = $(this)
.children(".li-hidden") .children(".li-hidden")
.val(); .val();
let obj_time = new Date(element_time); let obj_time = new Date(element_time * 1000);
let current_dt = new Date(); let current_dt = new Date();
let timestamp = current_dt.getTime() - obj_time.getTime(); let timestamp = current_dt.getTime() - obj_time.getTime();
timestamp = timestamp / 1000; timestamp = timestamp / 1000;
@ -492,13 +492,13 @@ function check_event_sound() {
// Remove audio. // Remove audio.
remove_audio(); remove_audio();
var urlSound = '../../include/sounds/'+$('#sound_id :selected').val(); var urlSound = '../../include/sounds/'+$('#sound_id :selected').val();
console.log(urlSound)
// Apend audio. // Apend audio.
add_audio(urlSound); add_audio(urlSound);
// Add elements. // Add elements.
data.forEach(function(element) { data.forEach(function(element) {
console.log(element);
var li = document.createElement("li"); var li = document.createElement("li");
var b64 = btoa(JSON.stringify(element)); var b64 = btoa(JSON.stringify(element));
li.insertAdjacentHTML( li.insertAdjacentHTML(
@ -519,7 +519,7 @@ function check_event_sound() {
); );
li.insertAdjacentHTML( li.insertAdjacentHTML(
"beforeend", "beforeend",
'<input type="hidden" value="' + element.event_timestamp + '" class="li-hidden"/>' '<input type="hidden" value="' + element.utimestamp + '" class="li-hidden"/>'
); );
$("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li); $("#tabs-sound-modal .elements-discovered-alerts ul").prepend(li);
}); });

View File

@ -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 240418 %define release 240419
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -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 240418 %define release 240419
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.776 %define version 7.0NG.776
%define release 240418 %define release 240419
%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

View File

@ -2594,7 +2594,7 @@ INSERT INTO `tncm_script` VALUES
(47,5,''), (47,5,''),
(48,7,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'), (48,7,'enable&#92;n&#x0d;&#x0a;expect:Password:&#92;s*&#x0d;&#x0a;_enablepass_&#92;n&#x0d;&#x0a;capture:show&#x20;version&#92;n&#x0d;&#x0a;exit&#92;n'),
(49,0,'sleep:1&#x0d;&#x0a;exit&#92;n&#92;r'), (49,0,'sleep:1&#x0d;&#x0a;exit&#92;n&#92;r'),
(50,1,'sleep:1&#x0d;&#x0a;capture:system&#x20;resource&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'), (50,1,'sleep:1&#x0d;&#x0a;capture:export&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'),
(51,2,'sleep:1&#x0d;&#x0a;system&#x20;backup&#x20;load&#x20;name=_nameBackup_&#x20;password=_passwordBackup_&#92;n&#92;r&#x0d;&#x0a;expect:Restore&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'), (51,2,'sleep:1&#x0d;&#x0a;system&#x20;backup&#x20;load&#x20;name=_nameBackup_&#x20;password=_passwordBackup_&#92;n&#92;r&#x0d;&#x0a;expect:Restore&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'),
(52,3,'sleep:1&#x0d;&#x0a;capture:/system&#x20;package&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'), (52,3,'sleep:1&#x0d;&#x0a;capture:/system&#x20;package&#x20;print&#92;n&#92;r&#x20;&#x0d;&#x0a;exit&#92;n&#92;r'),
(53,4,'sleep:1&#x0d;&#x0a;/system&#x20;routerboard&#x20;upgrade&#92;n&#92;r&#x0d;&#x0a;expect:Do&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'), (53,4,'sleep:1&#x0d;&#x0a;/system&#x20;routerboard&#x20;upgrade&#92;n&#92;r&#x0d;&#x0a;expect:Do&#x0d;&#x0a;yes&#92;n&#92;r&#x0d;&#x0a;exit&#92;n&#92;r'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.776-240418 Version: 7.0NG.776-240419
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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-240418" pandora_version="7.0NG.776-240419"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -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 = "240418"; my $pandora_build = "240419";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -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 = "240418"; my $pandora_build = "240419";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -197,13 +197,6 @@ sub exec_prediction_module ($$$$) {
return; return;
} }
# Netflow modules
if ($agent_module->{'prediction_module'} == 4) {
logger ($pa_config, "Executing netflow module " . $agent_module->{'nombre'}, 10);
enterprise_hook ('exec_netflow_module', [$pa_config, $agent_module, $server_id, $dbh]);
return;
}
# Cluster status module. # Cluster status module.
if ($agent_module->{'prediction_module'} == 5) { if ($agent_module->{'prediction_module'} == 5) {
logger ($pa_config, "Executing cluster status module " . $agent_module->{'nombre'}, 10); logger ($pa_config, "Executing cluster status module " . $agent_module->{'nombre'}, 10);

View File

@ -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 240418 %define release 240419
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -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 240418 %define release 240419
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.776" PI_VERSION="7.0NG.776"
PI_BUILD="240418" PI_BUILD="240419"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -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 240418"; my $version = "7.0NG.776 Build 240419";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -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 240418"; my $version = "7.0NG.776 Build 240419";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -12,7 +12,11 @@
} }
.is-maintenance :nth-child(1) { .is-maintenance :nth-child(1) {
display: none; display: none !important;
}
.is-maintenance .vc-item-nl-arrow {
display: none !important;
} }
.visual-console-item { .visual-console-item {