Merge branch 'develop' into 'ent-10908-Fallo-en-el-editor-de-tips'

# Conflicts:
#   pandora_console/extras/mr/63.sql
This commit is contained in:
Alejandro Campos 2023-05-03 07:11:28 +00:00
commit 9e1caceb11
613 changed files with 136496 additions and 11270 deletions

View File

@ -15,7 +15,7 @@ LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$MYVER" ] || MYVER=57
[ "$MYVER" ] || MYVER=80
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
@ -27,6 +27,7 @@ LOGFILE="/tmp/deploy-ext-db-$(date +%F).log"
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
# Ansi color code variables
red="\e[0;91m"
green="\e[0;92m"

View File

@ -11,22 +11,25 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2022050901'
S_VERSION='202304111'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$MYVER" ] || MYVER=80
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
[ "$DBPASS" ] || DBPASS=pandora
[ "$DBPORT" ] || DBPORT=3306
[ "$DBROOTUSER" ] || DBROOTUSER=root
[ "$DBROOTPASS" ] || DBROOTPASS=pandora
[ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0
[ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0
[ "$SKIP_KERNEL_OPTIMIZATIONS" ] || SKIP_KERNEL_OPTIMIZATIONS=0
[ "$POOL_SIZE" ] || POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
[ "$PANDORA_BETA" ] || PANDORA_BETA=0
[ "$PANDORA_LTS" ] || PANDORA_LTS=1
# Ansi color code variables
red="\e[0;91m"
@ -130,7 +133,10 @@ check_root_permissions
[ "$SKIP_PRECHECK" == 1 ] || check_pre_pandora
#advicing BETA PROGRAM
[ "$PANDORA_BETA" -ne '0' ] && echo -e "${red}BETA version enable using nightly PandoraFMS packages${reset}"
INSTALLING_VER="${green}RRR version enable using RRR PandoraFMS packages${reset}"
[ "$PANDORA_LTS" -ne '0' ] && INSTALLING_VER="${green}LTS version enable using LTS PandoraFMS packages${reset}"
[ "$PANDORA_BETA" -ne '0' ] && INSTALLING_VER="${red}BETA version enable using nightly PandoraFMS packages${reset}"
echo -e $INSTALLING_VER
# Connectivity
check_repo_connection
@ -174,7 +180,15 @@ execute_cmd "yum-config-manager --enable remi-php80" "Configuring PHP"
# Install percona Database
#[ -f /etc/my.cnf ] && rm -rf /etc/my.cnf
execute_cmd "yum install -y Percona-Server-server-57" "Installing Percona Server"
if [ "$MYVER" -eq '80' ] ; then
execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module"
execute_cmd "yum install -y percona-server-server percona-xtrabackup-80" "Installing Percona Server 80"
fi
if [ "$MYVER" -ne '80' ] ; then
execute_cmd "yum install -y Percona-Server-server-57 percona-xtrabackup-24" "Installing Percona Server 57"
fi
# Console dependencies
console_dependencies=" \
@ -348,21 +362,32 @@ EO_CONFIG_TMP
#Configuring Database
if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then
execute_cmd "systemctl start mysqld" "Starting database engine"
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
echo """
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!');
UNINSTALL PLUGIN validate_password;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$DBROOTPASS');
""" | mysql --connect-expired-password -uroot &>> "$LOGFILE"
fi
export MYSQL_PWD=$DBROOTPASS
echo -en "${cyan}Creating Pandora FMS database...${reset}"
echo "create database $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
execute_cmd "systemctl start mysqld" "Starting database engine"
export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev)
if [ "$MYVER" -eq '80' ] ; then
echo """
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!';
UNINSTALL COMPONENT 'file://component_validate_password';
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS';
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"
fi
echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST
export MYSQL_PWD=$DBPASS
if [ "$MYVER" -ne '80' ] ; then
echo """
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!');
UNINSTALL PLUGIN validate_password;
SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS');
""" | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE"fi
fi
export MYSQL_PWD=$DBROOTPASS
echo -en "${cyan}Creating Pandora FMS database...${reset}"
echo "create database $DBNAME" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support."
echo "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password BY \"$DBPASS\"" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST
#Generating my.cnf
cat > /etc/my.cnf << EO_CONFIG_F
@ -401,6 +426,8 @@ query_cache_size = 64M
query_cache_min_res_unit = 2k
query_cache_limit = 256K
#skip-log-bin
sql_mode=""
[mysqld_safe]
@ -409,17 +436,35 @@ pid-file=/var/run/mysqld/mysqld.pid
EO_CONFIG_F
execute_cmd "systemctl restart mysqld" "Configuring database engine"
if [ "$MYVER" -eq '80' ] ; then
sed -i -e "/query_cache.*/ s/^#*/#/g" /etc/my.cnf
sed -i -e "s/#skip-log-bin/skip-log-bin/g" /etc/my.cnf
sed -i -e "s/character-set-server=utf8/character-set-server=utf8mb4/g" /etc/my.cnf
fi
execute_cmd "systemctl restart mysqld" "Configuring database engine"
execute_cmd "systemctl enable mysqld --now" "Enabling Database service"
fi
export MYSQL_PWD=$DBPASS
#Define packages
if [ "$PANDORA_BETA" -eq '0' ] ; then
#Define packages
if [ "$PANDORA_LTS" -eq '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/LTS/pandorafms_agent_linux-7.0NG.noarch.rpm"
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
elif [ "$PANDORA_BETA" -ne '0' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://pandorafms.com/community/community-console-rpm-beta/"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# if beta is enable
if [ "$PANDORA_BETA" -eq '1' ] ; then
PANDORA_SERVER_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_server-latest.x86_64.rpm"
PANDORA_CONSOLE_PACKAGE="http://firefly.artica.es/pandora_enterprise_nightlies/pandorafms_console-latest.noarch.rpm"
PANDORA_AGENT_PACKAGE="http://firefly.artica.es/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm"
fi
# Downloading Pandora Packages
@ -526,6 +571,13 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
#check fping
fping_bin=$(which fping)
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
if [ "$fping_bin" != "" ]; then
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
fi
# Enable agent remote config
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF

View File

@ -19,7 +19,7 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$MYVER" ] || MYVER=57
[ "$MYVER" ] || MYVER=80
[ "$PHPVER" ] || PHPVER=8
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
@ -334,8 +334,6 @@ console_dependencies=" \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
server_dependencies=" \
perl \
@ -409,6 +407,7 @@ setenforce 0 &>> "$LOGFILE"
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE"
systemctl disable firewalld --now &>> "$LOGFILE"
# Adding standar cnf for initial setup.
cat > /etc/my.cnf << EO_CONFIG_TMP
[mysqld]
@ -633,6 +632,13 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
#check fping
fping_bin=$(which fping)
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
if [ "$fping_bin" != "" ]; then
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
fi
# Enable agent remote config
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy
S_VERSION='202304111'
S_VERSION='202304181'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start
@ -274,6 +274,7 @@ server_dependencies=" \
cron \
libgeo-ip-perl \
arping \
snmp-mibs-downloader \
openjdk-8-jdk "
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"

View File

@ -2018,7 +2018,7 @@ sub pandora_agent_run () {
$Xml = $xml_header . $Xml . "</agent_data>";
# Save XML data file
my $temp_file = $Conf{'temporal'} . '/' . $Conf{'agent_name'} . '.' . time () . '.data';
my $temp_file = $Conf{'temporal'} . '/' . md5($Conf{'agent_name'}) . '.' . time () . '.data';
if (-l $temp_file && !unlink($temp_file)) {
error ("File '$temp_file' already exists as a symlink and could not be removed: $!");
return 1;

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.770-230413
Version: 7.0NG.770-230503
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230413';
use constant AGENT_BUILD => '230503';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -4377,7 +4377,7 @@ while (1) {
$Xml = $xml_header . $Xml . "</agent_data>";
# Save XML data file
my $temp_file = $Conf{'temporal'} . '/' . $Conf{'agent_name'} . '.' . time () . '.data';
my $temp_file = $Conf{'temporal'} . '/' . md5($Conf{'agent_name'}) . '.' . time () . '.data';
error ("File '$temp_file' already exists as a symlink and could not be removed: $!") if (-l $temp_file && !unlink($temp_file));
open (TEMP_FILE, "> $temp_file") || error ("Could not write XML data file: $!");
print TEMP_FILE $Xml;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230413
%define release 230503
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230413
%define release 230503
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230413"
PI_BUILD="230503"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230413}
{230503}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.770 Build 230413")
#define PANDORA_VERSION ("7.0NG.770 Build 230503")
string pandora_path;
string pandora_dir;

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.770-230413
Version: 7.0NG.770-230503
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -9,15 +9,16 @@
],
"config": {
"platform": {
"php": "8.0.0"
"php": "8.0.2"
}
},
"require": {
"mpdf/mpdf": "^8.0.15",
"swiftmailer/swiftmailer": "^6.0",
"amphp/parallel-functions": "^1.0",
"chrome-php/chrome": "^1.7.1",
"artica/phpchartjs": "^1.0"
"chrome-php/chrome": "^1.8.1",
"artica/phpchartjs": "^1.0",
"tinymce/tinymce": "^6.4"
},
"repositories": {
"phpchartjs": {

File diff suppressed because it is too large Load Diff

View File

@ -3,5 +3,15 @@ START TRANSACTION;
ALTER TABLE tpolicy_group_agents CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE tevent_sound CONVERT TO CHARACTER SET UTF8MB4;
ALTER TABLE tsesion_filter CONVERT TO CHARACTER SET UTF8MB4;
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
`id_filter` INT NOT NULL AUTO_INCREMENT,
`id_name` TEXT NULL,
`text` TEXT NULL,
`period` TEXT NULL,
`ip` TEXT NULL,
`type` TEXT NULL,
`user` TEXT NULL,
PRIMARY KEY (`id_filter`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
COMMIT;

View File

@ -117,12 +117,12 @@ if (empty($config['random_background']) === false) {
unset($random_backgrounds[0], $random_backgrounds[1]);
$random_background = array_rand($random_backgrounds);
$background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background];
$background_100 = 'background-size: 100% 100% !important; ';
$background_100 = 'background-size: cover !important; background-position: center !important; ';
}
if (empty($config['login_background']) === false) {
$background_url = 'images/backgrounds/'.$config['login_background'];
$background_100 = 'background-size: 100% 100% !important; ';
$background_100 = 'background-size: cover !important; background-position: center !important; ';
}
// Support for Internet Explorer and Microsoft Edge browsers

View File

@ -636,7 +636,8 @@ $tableAdvancedAgent->data['secondary_groups'][] = html_print_label_input_block(
__('Secondary groups'),
html_print_select_agent_secondary(
$agent,
$id_agente
$id_agente,
['selected_post' => $secondary_groups]
)
);
@ -759,6 +760,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_ok',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
).html_print_image(
$path_bad,
@ -766,6 +768,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_bad',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
).html_print_image(
$path_warning,
@ -773,6 +776,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_warning',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
)
);

View File

@ -228,7 +228,7 @@ if ($create_agent) {
$cps = (int) get_parameter_switch('cps', -1);
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
$secondary_groups = (string) get_parameter('secondary_hidden', '');
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
$fields = db_get_all_fields_in_table('tagent_custom_fields');
if ($fields === false) {
@ -343,7 +343,7 @@ if ($create_agent) {
'agents_update_secondary_groups',
[
$id_agente,
explode(',', $secondary_groups),
$secondary_groups,
[],
]
);
@ -992,7 +992,7 @@ if ($update_agent) {
$cps = get_parameter_switch('cps', -1);
$old_values = db_get_row('tagente', 'id_agente', $id_agente);
$fields = db_get_all_fields_in_table('tagent_custom_fields');
$secondary_groups = (string) get_parameter('secondary_hidden', '');
$secondary_groups = (array) get_parameter('secondary_groups_selected', '');
$satellite_server = (int) get_parameter('satellite_server', 0);
$fixed_ip = (int) get_parameter_switch('fixed_ip', 0);
@ -1185,13 +1185,27 @@ if ($update_agent) {
"Quiet":"'.(int) $quiet.'",
"Cps":"'.(int) $cps.'"}';
$secondary_groups_selected = enterprise_hook(
'agents_get_secondary_groups',
[$id_agente]
);
$delete_secondary_groups = [];
foreach ($secondary_groups_selected['plain'] as $v_selected) {
if (in_array($v_selected, $secondary_groups) === false) {
array_push($delete_secondary_groups, $v_selected);
}
}
// Create the secondary groups.
enterprise_hook(
'agents_update_secondary_groups',
[
$id_agente,
explode(',', $secondary_groups),
[],
$secondary_groups,
$delete_secondary_groups,
true,
]
);
@ -1505,10 +1519,50 @@ if ($update_module === true || $create_module === true) {
$critical_instructions = (string) get_parameter('critical_instructions');
$warning_instructions = (string) get_parameter('warning_instructions');
$unknown_instructions = (string) get_parameter('unknown_instructions');
$critical_inverse = (int) get_parameter('critical_inverse');
$warning_inverse = (int) get_parameter('warning_inverse');
$percentage_critical = (int) get_parameter('percentage_critical');
$percentage_warning = (int) get_parameter('percentage_warning');
// Warning thresholds.
$warning_threshold_check_type = get_parameter('warning_thresholds_checks');
if ($warning_threshold_check_type === 'normal_warning') {
$percentage_warning = 0;
$warning_inverse = 0;
} else if ($warning_threshold_check_type === 'warning_inverse') {
$warning_inverse = (int) get_parameter('warning_inverse_string_sent');
$percentage_warning = 0;
} else {
$percentage_warning = (int) get_parameter('warning_inverse_string_sent');
$warning_inverse = 0;
}
// Critical thresholds.
$critical_threshold_check_type = get_parameter('critical_thresholds_checks');
if ($critical_threshold_check_type === 'normal_critical') {
$percentage_critical = 0;
$critical_inverse = 0;
} else if ($critical_threshold_check_type === 'critical_inverse') {
$critical_inverse = (int) get_parameter('critical_inverse_string_sent');
$percentage_critical = 0;
} else {
$percentage_critical = (int) get_parameter('critical_inverse_string_sent');
$critical_inverse = 0;
}
// Inverse string checkbox.
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING || $id_module_type === MODULE_TYPE_ASYNC_STRING) {
// Warning inverse string checkbox.
$warning_string_checkbox = get_parameter('warning_inverse_string');
if (!empty($warning_string_checkbox) && $warning_string_checkbox === 'warning_inverse_string') {
$warning_inverse = (int) get_parameter('warning_inverse_string_sent');
} else {
$warning_inverse = 0;
}
// Critial inverse string checkbox.
$critical_string_checkbox = get_parameter('critical_inverse_string');
if (!empty($critical_string_checkbox) && $critical_string_checkbox === 'critical_inverse_string') {
$critical_inverse = (int) get_parameter('critical_inverse_string_sent');
} else {
$critical_inverse = 0;
}
}
$id_category = (int) get_parameter('id_category');
@ -2457,7 +2511,13 @@ switch ($tab) {
}]
});
}
});
});
$("#network_component").change(function (e) {
setTimeout(() => {
$('#snmp_version').trigger("change");
}, 100);
});
});
// Change description when edit port

View File

@ -46,7 +46,7 @@ $custom_fields = array_map(
function ($field) {
$field['secure'] = (bool) $field['secure'];
if ($field['secure']) {
$field['value'] = io_input_password($field['value']);
$field['value'] = io_input_password(io_safe_output($field['value']));
}
return $field;
@ -75,7 +75,7 @@ if ($add_inventory_module) {
'interval' => $interval,
'username' => $username,
'password' => $password,
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '',
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields), JSON_UNESCAPED_UNICODE)) : '',
];
$result = db_process_sql_insert('tagent_module_inventory', $values);
@ -119,7 +119,7 @@ if ($add_inventory_module) {
'interval' => $interval,
'username' => $username,
'password' => $password,
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '',
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields, true), JSON_UNESCAPED_UNICODE)) : '',
];
$result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]);

View File

@ -114,7 +114,7 @@ ui_print_standard_header(
if (is_management_allowed() === false) {
if (is_metaconsole() === false) {
$url = '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=monitoring&sec2=monitoring/wizard/wizard'
'index.php?sec=advanced&sec2=advanced/massive_operations&tab=massive_agents'
).'">'.__('metaconsole').'</a>';
} else {
$url = __('any node');

View File

@ -473,9 +473,9 @@ $tableBasicThresholds->data['warning_threshold'][1] .= html_print_input_text(
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_switch_radio_button(
[
html_print_radio_button_extended('warning_thresholds_checks', 'normal_warning', __('Normal'), ($percentage_warning && $warning_inverse) === false, false, '', '', true, false, '', 'radius-normal_warning'),
html_print_radio_button_extended('warning_thresholds_checks', 'warning_inverse', __('Inverse interval'), $warning_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-warning_inverse'),
html_print_radio_button_extended('warning_thresholds_checks', 'percentage_warning', __('Percentage'), $percentage_warning, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_warning'),
html_print_radio_button_extended('warning_thresholds_checks', 'normal_warning', __('Normal'), ($percentage_warning && $warning_inverse) ? false : 'normal_warning', false, '', '', true, false, '', 'radius-normal_warning'),
html_print_radio_button_extended('warning_thresholds_checks', 'warning_inverse', __('Inverse interval'), ($warning_inverse) ? 'warning_inverse' : false, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-warning_inverse'),
html_print_radio_button_extended('warning_thresholds_checks', 'percentage_warning', __('Percentage'), ($percentage_warning) ? 'percentage_warning' : false, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_warning'),
],
[ 'class' => 'margin-top-10' ],
true
@ -485,7 +485,7 @@ $basicThresholdsIntervalWarning = [];
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
'warning_inverse_string',
1,
'warning_inverse_string',
$warning_inverse,
true,
$disabledBecauseInPolicy
@ -556,9 +556,9 @@ $tableBasicThresholds->data['critical_threshold'][1] .= html_print_input_text(
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_switch_radio_button(
[
html_print_radio_button_extended('critical_thresholds_checks', 'normal_critical', __('Normal'), ($percentage_critical && $critical_inverse) === false, false, '', '', true, false, '', 'radius-normal_critical'),
html_print_radio_button_extended('critical_thresholds_checks', 'critical_inverse', __('Inverse interval'), $critical_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-critical_inverse'),
html_print_radio_button_extended('critical_thresholds_checks', 'percentage_critical', __('Percentage'), $percentage_critical, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_critical'),
html_print_radio_button_extended('critical_thresholds_checks', 'normal_critical', __('Normal'), ($percentage_critical && $critical_inverse) ? false : 'normal_critical', false, '', '', true, false, '', 'radius-normal_critical'),
html_print_radio_button_extended('critical_thresholds_checks', 'critical_inverse', __('Inverse interval'), ($critical_inverse) ? 'critical_inverse' : false, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-critical_inverse'),
html_print_radio_button_extended('critical_thresholds_checks', 'percentage_critical', __('Percentage'), ($percentage_critical) ? 'percentage_critical' : false, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_critical'),
],
[ 'class' => 'margin-top-10' ],
true
@ -569,7 +569,7 @@ $basicThresholdsIntervalCritical = [];
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
'critical_inverse_string',
1,
'critical_inverse_string',
$critical_inverse,
true,
$disabledBecauseInPolicy
@ -694,6 +694,8 @@ if (isset($module['id_policy_module']) === true) {
}
$cps_array[-1] = __('Disabled');
$cps_array[0] = __('Enabled');
if ($cps_module > 0) {
$cps_array[$cps_module] = __('Enabled');
} else {
@ -705,7 +707,9 @@ if ($cps_module > 0) {
}
}
$cps_array[$cps_inc] = __('Enabled');
if ($cps_inc > -1) {
$cps_array[$cps_inc] = __('Enabled');
}
}
// JS Scripts for ff thresholds.
@ -1978,7 +1982,7 @@ $(document).ready (function () {
}
});
});

View File

@ -348,8 +348,8 @@ push_table_simple($data, 'tcp_send_receive');
if ($id_module_type < 8 || $id_module_type > 11) {
// NOT TCP.
$table_simple->rowstyle['tcp_send'] = 'display: none;';
$table_simple->rowstyle['tcp_receive'] = 'display: none;';
$table_simple->rowstyle['caption_tcp_send_receive'] = 'display: none;';
$table_simple->rowstyle['tcp_send_receive'] = 'display: none;';
}
if ($id_module_type < 15 || $id_module_type > 18) {

View File

@ -151,7 +151,7 @@ if (is_ajax()) {
'',
false,
$is_management_allowed,
"removeTinyMCE('textarea_field".$i."_value')",
"UndefineTinyMCE('#textarea_field".$i."_value')",
'',
true
);
@ -163,7 +163,7 @@ if (is_ajax()) {
'',
true,
$is_management_allowed,
"addTinyMCE('textarea_field".$i."_value')",
"defineTinyMCE('#textarea_field".$i."_value')",
'',
true
);
@ -188,7 +188,7 @@ if (is_ajax()) {
'',
false,
$is_management_allowed,
"removeTinyMCE('textarea_field".$i."_recovery_value')",
"UndefineTinyMCE('#textarea_field".$i."_recovery_value')",
'',
true
);
@ -200,7 +200,7 @@ if (is_ajax()) {
'',
true,
$is_management_allowed,
"addTinyMCE('textarea_field".$i."_recovery_value')",
"defineTinyMCE('#textarea_field".$i."_recovery_value')",
'',
true
);
@ -855,16 +855,16 @@ if (users_is_admin() === true) {
});
function dialog_message(message) {
$(message)
$(message)
.css("display", "inline")
.dialog({
modal: true,
width: "400px",
buttons: {
Close: function() {
$(this).dialog("close");
modal: true,
width: "400px",
buttons: {
Close: function() {
$(this).dialog("close");
}
}
}
});
}

View File

@ -903,10 +903,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</div>';
}
$table_alert_list->cellclass[] = [
1 => 'table_action_buttons',
4 => 'table_action_buttons',
];
$table_alert_list->cellclass[] = [4 => 'table_action_buttons'];
$data[4] = '<form class="disable_alert_form display_in" action="'.$url.'" method="post" >';
if ($alert['disabled']) {
$data[4] .= html_print_input_image(

View File

@ -122,24 +122,28 @@ $sec = (is_metaconsole() === true) ? 'advanced' : 'galertas';
// case delete_templete action is performed.
if (!$delete_template) {
// Header.
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
[],
[
if (defined('METACONSOLE')) {
alerts_meta_print_header();
} else {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
[],
[
'link' => '',
'label' => __('Alerts'),
],
[
'link' => '',
'label' => __('Alert templates'),
],
]
);
[
'link' => '',
'label' => __('Alerts'),
],
[
'link' => '',
'label' => __('Alert templates'),
],
]
);
}
}
if ($update_template) {

View File

@ -457,7 +457,7 @@ if ($is_management_allowed === true) {
echo '</form>';
ui_require_javascript_file('pandora_alerts');
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
?>
<script type="text/javascript">
@ -810,18 +810,10 @@ $(document).ready (function () {
$('#field5_value').on('change', function() {
ajax_get_integria_custom_fields($(this).val());
});
});
}
var added_config = {
"selector": "textarea.tiny-mce-editor",
"plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable",
"theme_advanced_buttons1": "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
"theme_advanced_buttons2": "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview,|,forecolor,backcolor",
"valid_children": "+body[style]",
"width": "90%",
}
defineTinyMCE(added_config);
defineTinyMCE('textarea.tiny-mce-editor');
render_command_preview(original_command);
render_command_recovery_preview(original_command);

View File

@ -957,7 +957,7 @@ if ($step == 2) {
'',
false,
(!$is_management_allowed | $disabled),
"removeTinyMCE('textarea_field".$i."')",
"UndefineTinyMCE('#textarea_field".$i."')",
'style="height: 15px !important;"',
true
);
@ -970,7 +970,7 @@ if ($step == 2) {
'',
true,
(!$is_management_allowed | $disabled),
"addTinyMCE('textarea_field".$i."')",
"defineTinyMCE('#textarea_field".$i."')",
'style="height: 15px !important;"',
true
);
@ -1002,7 +1002,7 @@ if ($step == 2) {
'',
false,
(!$is_management_allowed | $disabled),
"removeTinyMCE('textarea_field".$i."_recovery')",
"UndefineTinyMCE('#textarea_field".$i."_recovery')",
'style="height: 15px !important;"',
true
);
@ -1015,7 +1015,7 @@ if ($step == 2) {
'',
true,
(!$is_management_allowed | $disabled),
"addTinyMCE('textarea_field".$i."_recovery')",
"defineTinyMCE('#textarea_field".$i."_recovery')",
'style="height: 15px !important;"',
true
);
@ -1255,7 +1255,7 @@ echo '</form>';
ui_require_javascript_file('pandora_alerts');
ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
ui_require_javascript_file('pandora_fullcalendar');
@ -1626,18 +1626,7 @@ if ($step == 2) {
}
});
var added_config = {
"selector": 'textarea.tiny-mce-editor',
"plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable",
"theme_advanced_buttons1": "bold,italic,underline,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,|,forecolor,backcolor,|,formatselect,fontselect,fontsizeselect",
"theme_advanced_buttons2": "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview",
"force_p_newlines" : false,
"forced_root_block" : '',
"inline_styles": true,
"valid_children": "+body[style]",
}
defineTinyMCE(added_config);
defineTinyMCE('textarea.tiny-mce-editor');
<?php
}

View File

@ -65,7 +65,7 @@ if (is_ajax() === true) {
$group = [
'id_grupo' => 0,
'nombre' => 'None',
'icon' => 'world',
'icon' => 'world@svg.svg',
'parent' => 0,
'disabled' => 0,
'custom_id' => null,

View File

@ -289,6 +289,23 @@ if ($update_agents) {
try {
$node = new Node((int) $array_id[0]);
$node->connect();
$id_agent = (int) $array_id[1];
// Get the id_agente_modulo to update the 'safe_operation_mode' field.
if (isset($values['safe_mode_module']) === true
&& ($values['safe_mode_module'] != '0')
) {
$id_module_safe[$id_agent] = db_get_value_filter(
'id_agente_modulo',
'tagente_modulo',
[
'id_agente' => $id_agent,
'nombre' => $values['safe_mode_module'],
]
);
}
$result[$id_agent] = edit_massive_agent(
(int) $array_id[1],
$values,
@ -477,11 +494,7 @@ function edit_massive_agent(
$agent = new Agent($id_agent);
$disabled_old = $agent->disabled();
foreach ($values as $key => $value) {
$agent->{$key}($value);
}
if (is_metaconsole() === false) {
if (empty($id_module_safe) === false) {
// Get the id_agent_module for this agent to update the 'safe_operation_mode' field.
if (isset($values['safe_mode_module']) === true
&& ($values['safe_mode_module'] != '0')
@ -490,6 +503,10 @@ function edit_massive_agent(
}
}
foreach ($values as $key => $value) {
$agent->{$key}($value);
}
$result['db'] = $agent->save();
if (is_metaconsole() === false) {
@ -1124,37 +1141,36 @@ $table->data[6][1] = html_print_select(
true
);
if (is_metaconsole() === false) {
$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
),
true
);
$table->data[7][1] .= html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'&nbsp;';
$table->data[7][1] .= __('Module').'&nbsp;';
$table->data[7][1] .= html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
);
}
$table->data[7][0] = __('Safe operation mode').': '.ui_print_help_tip(
__(
'This mode allow %s to disable all modules of this agent while the selected module is on CRITICAL status',
get_product_name()
),
true
);
$table->data[7][1] .= html_print_select(
[
1 => __('Enabled'),
0 => __('Disabled'),
],
'safe_mode_change',
-1,
'',
__('No change'),
-1,
true
).'&nbsp;';
$table->data[7][1] .= __('Module').'&nbsp;';
$table->data[7][1] .= html_print_select(
'',
'safe_mode_module',
'',
'',
__('Any'),
-1,
true
);
ui_toggle(html_print_table($table, true), __('Advanced options'));
unset($table);

View File

@ -808,7 +808,7 @@ $table->data['edit1'][1] = '<table width="100%">';
1
);
$table->data['edit3'][2] = __('SMNP community');
$table->data['edit3'][2] = __('SNMP community');
$table->data['edit3'][3] = html_print_input_text(
'snmp_community',
'',

View File

@ -117,6 +117,7 @@ $period = SECONDS_1DAY;
$search = '';
$full_text = 0;
$log_number = 1000;
$inventory_regular_expression = '';
// Added support for projection graphs.
$period_pg = SECONDS_5DAY;
$projection_period = SECONDS_5DAY;
@ -940,6 +941,7 @@ switch ($action) {
$inventory_modules = $es['inventory_modules'];
$id_agents = $es['id_agents'];
$recursion = $item['recursion'];
$inventory_regular_expression = $es['inventory_regular_expression'];
$idAgent = $es['id_agents'];
$idAgentModule = $inventory_modules;
@ -2196,6 +2198,15 @@ $class = 'databox filters';
</td>
</tr>
<tr id="row_regular_expression" class="datos">
<td class="bolder"><?php echo __('Regular expression'); ?></td>
<td>
<?php
html_print_input_text('inventory_regular_expression', $inventory_regular_expression, '', false, 255, false, false, false, '', 'w50p');
?>
</td>
</tr>
<tr id="row_date" class="datos">
<td class="bolder"><?php echo __('Date'); ?></td>
<td class="mx180px">
@ -4271,7 +4282,7 @@ function print_SLA_list($width, $action, $idItem=null)
echo '</td>';
echo '<td class="sla_list_action_col center">';
echo '<a href="javascript: deleteSLARow('.$item['id'].');">';
echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']);
echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']);
echo '</a>';
echo '</td>';
echo '</tr>';
@ -4314,7 +4325,7 @@ function print_SLA_list($width, $action, $idItem=null)
html_print_image(
'images/delete.svg',
false,
['class' => 'invert_filter']
['class' => 'invert_filter main_menu_icon']
);
?>
</a>
@ -4738,7 +4749,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td>
<td>'.printSmallFont($nameModuleFailover).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td>
</tr>';
} else {
@ -4746,7 +4757,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgent).$server_name_element.'</td>
<td>'.printSmallFont($nameModule).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td>
</tr>';
}
@ -4756,7 +4767,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameModule).'</td>
<td>'.printSmallFont($operation[$item['operation']]).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>
</td>
</tr>';
}
@ -4796,7 +4807,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
html_print_image(
'images/delete.svg',
false,
['class' => 'invert_filter']
['class' => 'invert_filter main_menu_icon']
);
?>
</a>
@ -4964,7 +4975,7 @@ ui_require_javascript_file(
ENTERPRISE_DIR.'/include/javascript/'
);
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_javascript_file('pandora');
?>
@ -5203,13 +5214,7 @@ $(document).ready (function () {
});
});
var added_config = {
"elements": "textarea_render_definition",
"plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable",
"theme_advanced_buttons1": "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
"theme_advanced_buttons2": "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview,|,forecolor,backcolor"
}
defineTinyMCE(added_config);
defineTinyMCE('#textarea_render_definition');
$("#checkbox-select_by_group").change(function () {
var select_by_group = $('#checkbox-select_by_group').prop('checked');
@ -6445,6 +6450,7 @@ function chooseType() {
$("#row_date").hide();
$("#row_agent_multi").hide();
$("#row_module_multi").hide();
$('#row_regular_expression').hide();
$("#row_event_graphs").hide();
$("#row_event_graph_by_agent").hide();
$("#row_event_graph_by_user").hide();
@ -7154,6 +7160,7 @@ function chooseType() {
$("#row_group").show();
$("#row_agent_multi").show();
$("#row_module_multi").show();
$('#row_regular_expression').show();
$("#row_date").show();
$("#id_agents")

View File

@ -1756,6 +1756,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter(
'inventory_modules'
);
$es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$description = get_parameter('description');
$values['external_source'] = json_encode($es);
$good_format = true;
@ -2538,6 +2539,7 @@ switch ($action) {
$es['inventory_modules'] = get_parameter(
'inventory_modules'
);
$es['inventory_regular_expression'] = get_parameter('inventory_regular_expression', '');
$values['external_source'] = json_encode($es);
$good_format = true;
break;

View File

@ -191,7 +191,7 @@ ui_require_javascript_file('wz_jsgraphics');
ui_require_javascript_file('pandora_visual_console');
ui_require_javascript_file('visual_console_builder.editor', 'godmode/reporting/');
ui_require_javascript_file_enterprise('functions_visualmap', is_metaconsole() === true);
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
// Javascript file for base 64 encoding of label parameter.
ui_require_javascript_file('encode_decode_base64');
@ -205,22 +205,7 @@ ui_require_javascript_file('encode_decode_base64');
<script type="text/javascript">
id_visual_console = <?php echo $visualConsole['id']; ?>;
visual_map_main();
var added_config = {
"plugins": "noneditable",
"elements": "text-label",
"theme_advanced_buttons1":
"bold,italic,|,justifyleft,justifycenter,justifyright,|,undo,redo,|,image,link,|,fontselect,|,forecolor,fontsizeselect,|,code",
"valid_children": "+body[style]",
"theme_advanced_font_sizes": "true",
"content_css": <?php echo '"'.ui_get_full_url('include/styles/pandora.css', false, false, false).'"'; ?>,
"editor_deselector": "noselected",
"inline_styles": true,
"nowrap": true,
"width": "50%",
"height": "100%",
}
defineTinyMCE(added_config);
defineTinyMCE('#text-label');
$('.item img').each(function(){

View File

@ -859,7 +859,7 @@ ui_require_javascript_file('wz_jsgraphics');
ui_require_javascript_file('pandora_visual_console');
ui_require_jquery_file('ajaxqueue');
ui_require_jquery_file('bgiframe');
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
?>
<script type="text/javascript">
@ -888,23 +888,8 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
return false;
});
var added_config = {
"selector": "#tinyMCE_editor",
"elements": "tinyMCE_editor",
"plugins": "noneditable",
"theme_advanced_buttons1": "bold,italic,|,justifyleft,justifycenter,justifyright,|,undo,redo,|,image,link,|,fontselect,|,forecolor,fontsizeselect,|,code",
"valid_children": "+body[style]",
"theme_advanced_font_sizes": "true",
"content_css": <?php echo '"'.ui_get_full_url('include/styles/pandora.css', false, false, false).'"'; ?>,
"editor_deselector": "noselected",
"inline_styles": true,
"nowrap": true,
"width": "400",
"height": "200",
"body_class": "tinyMCEBody",
}
defineTinyMCE('#tinyMCE_editor');
defineTinyMCE(added_config);
$("#dialog_label_editor").hide ()
.dialog ({
title: "<?php echo __('Edit label'); ?>",

View File

@ -417,8 +417,8 @@ ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
// Include tiny for wysiwyg editor
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
// Include tiny for wysiwyg editor.
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_javascript_file('pandora');
?>
@ -435,9 +435,9 @@ ui_require_javascript_file('pandora');
secondText: '<?php echo __('Second'); ?>',
currentText: '<?php echo __('Now'); ?>',
closeText: '<?php echo __('Close'); ?>'});
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
$("#text-expire_date").datepicker({
dateFormat: "<?php echo DATE_FORMAT_JS; ?>",
changeMonth: true,
@ -445,23 +445,14 @@ ui_require_javascript_file('pandora');
showAnim: "slideDown"}
);
var added_config = {
"elements":"textarea_text",
"plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable",
"theme_advanced_buttons1": "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
"theme_advanced_buttons2": "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview,|,forecolor,backcolor",
"valid_children": "+body[style]",
"width": "90%",
}
defineTinyMCE('#textarea_text');
defineTinyMCE(added_config);
$("#checkbox-expire").click(function() {
check_expire();
});
});
check_expire();
function check_expire() {

View File

@ -431,7 +431,7 @@ $table->data[$i++][] = html_print_label_input_block(
$table->colspan[$i][] = 2;
$table->data[$i++][] = html_print_label_input_block(
__('Timezone setup'),
__('Server timezone setup'),
html_print_div(
[
'class' => '',
@ -704,7 +704,7 @@ $table->data[$i][] = html_print_label_input_block(
)
);
$table->data[$i][] = html_print_label_input_block(
$table->data[$i++][] = html_print_label_input_block(
__('Check conexion interval'),
html_print_input_number(
[
@ -715,6 +715,21 @@ $table->data[$i][] = html_print_label_input_block(
)
);
$help_tip = ui_print_help_tip(
__('If there are any &#x22;In process&#x22; events with a specific Extra ID and a New event with that Extra ID is received, it will be created as &#x22;In process&#x22; instead.'),
true
);
$table->data[$i][] = html_print_label_input_block(
__('Keep In process status for new events with extra ID').$help_tip,
html_print_checkbox_switch(
'keep_in_process_status_extra_id',
1,
$config['keep_in_process_status_extra_id'],
true
)
);
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=general&amp;pure='.$config['pure'].'">';
echo '<fieldset class="margin-bottom-10">';

View File

@ -1421,6 +1421,17 @@ $table_vc->data[$row][] = html_print_label_input_block(
true
)
);
$table_vc->data[$row][] = html_print_label_input_block(
__('Display item frame on alert triggered'),
html_print_checkbox_switch(
'display_item_frame',
1,
(bool) $config['display_item_frame'],
true
)
);
$row++;
@ -2140,8 +2151,7 @@ echo '</form>';
ui_require_css_file('color-picker', 'include/styles/js/');
ui_require_jquery_file('colorpicker');
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_javascript_file('pandora');
?>
@ -2161,6 +2171,10 @@ $(document).ready(function(){
$("#select_csv_divider").attr("src", editIcon);
}
})
defineTinyMCE('#textarea_custom_report_front_header');
defineTinyMCE('#textarea_custom_report_front_footer');
defineTinyMCE('#textarea_custom_report_front_firstpage');
})
// Juanma (07/05/2014) New feature: Custom front page for reports
@ -2216,17 +2230,6 @@ function change_servicetree_nodes_padding () {
}
}
var added_config1 = {
"elements":"textarea_custom_report_front_header, textarea_custom_report_front_footer",
}
defineTinyMCE(added_config1);
var added_config2 = {
"elements":"textarea_custom_report_front_firstpage",
}
defineTinyMCE(added_config2);
$(document).ready (function () {

View File

@ -2206,7 +2206,7 @@ if ($create_alert || $update_alert) {
}
ui_require_javascript_file('pandora', 'include/javascript/', true);
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
?>
<script language="javascript" type="text/javascript">
@ -2328,19 +2328,7 @@ $(document).ready (function () {
}
});
var added_config = {
"selector": "textarea.tiny-mce-editor",
"plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable",
"theme_advanced_buttons1" : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsize,select",
"theme_advanced_buttons2" : "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview,|,forecolor,backcolor",
"force_p_newlines": false,
"forced_root_block": '',
"inline_styles": true,
"valid_children": "+body[style]",
"element_format": "html",
}
defineTinyMCE(added_config);
defineTinyMCE('textarea.tiny-mce-editor');
$('#button-button_back').on('click', function(){
window.location = '<?php echo ui_get_full_url('index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert'); ?>';

View File

@ -56,7 +56,7 @@ ui_print_standard_header(
],
[
'link' => '',
'label' => __('SMNP'),
'label' => __('SNMP'),
],
]
);

View File

@ -48,7 +48,7 @@ ui_print_standard_header(
],
[
'link' => '',
'label' => __('SMNP'),
'label' => __('SNMP'),
],
]
);

View File

@ -344,7 +344,7 @@ if ($new_user === true && (bool) $config['admin_can_add_user'] === true) {
$user_info['metaconsole_access_node'] = 0;
}
if ((bool) $config['ehorus_user_level_conf'] === true) {
if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_user_level_conf'] === true) {
$user_info['ehorus_user_level_user'] = '';
$user_info['ehorus_user_level_pass'] = '';
$user_info['ehorus_user_level_enabled'] = true;
@ -1247,7 +1247,7 @@ $allowedIP .= ui_print_help_tip(__('Add the source IPs that will allow console a
$allowedIP .= html_print_checkbox_switch(
'allowed_ip_active',
0,
$user_info['allowed_ip_active'],
($user_info['allowed_ip_active'] ?? 0),
true
);
$allowedIP .= '</p>';
@ -1255,7 +1255,7 @@ $allowedIP .= html_print_textarea(
'allowed_ip_list',
2,
65,
$user_info['allowed_ip_list'],
($user_info['allowed_ip_list'] ?? 0),
(((bool) $view_mode === true) ? 'readonly="readonly"' : ''),
true
);
@ -1323,20 +1323,6 @@ $home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home
true
).'</p>';
/*
$home_screen .= html_print_select(
$values,
'section',
io_safe_output($user_info['section']),
'show_data_section();',
'',
-1,
true,
false,
false
).'</div>';
*/
$dashboards = Manager::getDashboards(
-1,
-1,
@ -1358,7 +1344,6 @@ $home_screen .= '<div id="show_db" style="display: none; width: 100%;">';
$home_screen .= html_print_select($dashboards_aux, 'dashboard', $user_info['data_section'], '', '', '', true);
$home_screen .= '</div>';
$layouts = visual_map_get_user_layouts($config['id_user'], true);
$layouts_aux = [];
if ($layouts === false) {
@ -1459,7 +1444,7 @@ $default_event_filter = '<div class="label_select"><p class="edit_user_labels">'
$default_event_filter .= html_print_select(
$event_filter,
'default_event_filter',
$user_info['default_event_filter'],
($user_info['default_event_filter'] ?? 0),
'',
'',
__('None'),
@ -1661,14 +1646,12 @@ if ((bool) $config['admin_can_add_user'] === true) {
}
echo '</div>';
if ($new_user === true) {
html_print_input_hidden('json_profile', $json_profile);
}
html_print_input_hidden('json_profile', $json_profile);
echo '</form>';
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === true) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
@ -1720,7 +1703,7 @@ $delete_image = html_print_input_image(
true,
[
'onclick' => 'delete_profile(event, this)',
'class' => 'invert_filter',
'class' => 'invert_filter main_menu_icon',
]
);
@ -1891,7 +1874,7 @@ if (is_metaconsole() === false) {
profile_text = `<a href="index.php?sec2=godmode/users/configure_profile&id=${profile}">${profile_text}</a>`;
group_img = `<img id="img_group_${aux}" src="" data-title="${group_text}" data-use_title_for_force_title="1" class="invert_filter main_menu_icon bot forced_title" alt="${group_text}"/>`;
group_text = `<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=${group}">${group_img}${group_text}</a>`;
group_text = `<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id=${group}">${group_img} ${group_text}</a>`;
$('#table_profiles tr:last').before(
`<tr>
@ -2258,4 +2241,4 @@ if (is_metaconsole() === false) {
/* ]]> */
</script>
</script>

View File

@ -374,7 +374,13 @@ if (users_is_admin() === true) {
);
}
$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch('show_tips_startup', 1, ($user_info['show_tips_startup'] === null) ? true : $user_info['show_tips_startup'], true);
$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch(
'show_tips_startup',
1,
(isset($user_info['show_tips_startup']) === false) ? true : $user_info['show_tips_startup'],
true
);
$userManagementTable->data['show_tips_startup'][1] = '<span>'.__('Show usage tips at startup').'</span>';
// Session time input.
@ -537,7 +543,7 @@ $userManagementTable->data['captions_autorefreshTime'][0] = __('Time for autoref
$userManagementTable->data['fields_autorefreshTime'][0] = html_print_select(
get_refresh_time_array(),
'time_autorefresh',
$user_info['time_autorefresh'],
($user_info['time_autorefresh'] ?? 0),
'',
'',
'',
@ -594,7 +600,7 @@ $userManagementTable->data['captions_blocksize_eventfilter'][1] = __('Event filt
$userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_select(
$event_filter,
'default_event_filter',
$user_info['default_event_filter'],
($user_info['default_event_filter'] ?? 0),
'',
'',
__('None'),
@ -700,7 +706,7 @@ $userManagementTable->data['fields_addSettings'][1] = html_print_div(
'allowed_ip_list',
5,
65,
$user_info['allowed_ip_list'],
($user_info['allowed_ip_list'] ?? ''),
(((bool) $view_mode === true) ? 'readonly="readonly"' : ''),
true
),
@ -720,7 +726,7 @@ $allowAllIpsContent[] = html_print_div(
'content' => html_print_checkbox_switch(
'allowed_ip_active',
0,
$user_info['allowed_ip_active'],
($user_info['allowed_ip_active'] ?? 0),
true
),
],
@ -736,13 +742,15 @@ $userManagementTable->data['fields_addSettings'][1] .= html_print_div(
true
);
// QR Code and API Token advice.
html_print_div(
[
'id' => 'api_qrcode_display',
'content' => $CodeQRTable.$apiTokenContent,
]
);
if (isset($CodeQRTable) === true || isset($apiTokenContent) === true) {
// QR Code and API Token advice.
html_print_div(
[
'id' => 'api_qrcode_display',
'content' => $CodeQRTable.$apiTokenContent,
]
);
}
html_print_table($userManagementTable);

View File

@ -792,7 +792,7 @@ class HostDevices extends Wizard
$form['rows'][0]['columns'][0] = [
'width' => '30%',
'style' => 'padding: 9px;min-width: 250px;',
'style' => 'padding: 9px;min-width: 188px;',
'inputs' => [
'1' => '<div class="height_50p mrgn_btn_35px">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>',
'2' => [
@ -825,12 +825,11 @@ class HostDevices extends Wizard
],
],
];
$form['rows'][0]['columns'][1] = [
'width' => '40%',
'padding-right' => '12%',
'padding-left' => '5%',
'style' => 'min-width: 350px',
'padding-right' => '8%',
'padding-left' => '0%',
'style' => 'min-width: 230px',
'inputs' => [
'0' => [
'label' => '<b>'.__('Task name').':</b>',
@ -926,27 +925,27 @@ class HostDevices extends Wizard
],
];
// Group select (custom for this section).
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
$group_select .= $this->printInput(
[
'name' => 'id_group',
'returnAllGroup' => false,
'privilege' => $this->access,
'type' => 'select_groups',
'selected' => $this->task['id_group'],
'return' => true,
'class' => 'discovery_list_input',
'simple_multiple_options' => true,
'required' => true,
]
);
$form['rows'][0]['columns'][2] = [
'width' => '30%',
'style' => 'min-width: 250px',
'inputs' => ['0' => $group_select],
'width' => '40%',
'padding-right' => '5%',
'padding-left' => '0',
'style' => 'min-width: 144px;',
'inputs' => [
'0' => [
'label' => '<b>'.__('Group').':</b>',
'arguments' => [
'name' => 'id_group',
'returnAllGroup' => false,
'privilege' => $this->access,
'type' => 'select_groups',
'selected' => $this->task['id_group'],
'return' => true,
'class' => 'discovery_list_input',
'simple_multiple_options' => true,
'required' => true,
],
],
],
];
$form['rows'][1]['style'] = 'style de row';
@ -1586,6 +1585,10 @@ class HostDevices extends Wizard
$(function() {
SNMPExtraShow($("#snmp_version").val());
});
$("#id_network_profile").select2({
placeholder: "'.__('Please select...').'"
});
';
if (enterprise_installed()) {

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>96007EC9-FBFB-4CDC-A8D3-39F8126F7269</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -391.974583)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 269.974583)">
<g id="Mobile-agents" transform="translate(15.000000, 0.000000)">
<path d="M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,21.9082784 C30,27.6073092 23.1075582,30 15,30 C6.89244177,30 0,27.6073092 0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 Z M20,5 L11.9967103,5 L11.8651969,5.00868163 C11.6483839,5.03744118 11.4456127,5.13675554 11.2893127,5.29318417 L7.29260239,9.29318417 L7.20945254,9.38742572 C6.90458906,9.77984238 6.93255194,10.347062 7.29318417,10.7073976 L7.38742572,10.7905475 C7.77984238,11.0954109 8.34706198,11.0674481 8.70739761,10.7068158 L12.411,6.999 L19.584,6.999 L22.999,10.414 L22.999,19.585 L19.585,22.999 L12.409,22.999 L8.70541325,19.3135693 L8.61100719,19.2306063 C8.21798744,18.9265207 7.65082434,18.9556071 7.29120374,19.3169523 C6.90161476,19.7084097 6.90312938,20.3415729 7.29458675,20.7311618 L11.291297,24.7087963 L11.390258,24.7951247 C11.5635358,24.9272908 11.7763873,25 11.9967103,25 L20,25 L20.131444,24.9913276 C20.3481451,24.9625983 20.5508265,24.8633871 20.7071068,24.7071068 L24.7071068,20.7071068 L24.7939194,20.6080295 C24.9268355,20.434484 25,20.2210137 25,20 L25,10 L24.9913276,9.86855602 C24.9625983,9.65185492 24.8633871,9.44917353 24.7071068,9.29289322 L20.7071068,5.29289322 L20.6080295,5.20608063 C20.434484,5.07316447 20.2210137,5 20,5 Z M14,12 L6,12 C5.44771525,12 5,12.4477153 5,13 L5,17 C5,17.5522847 5.44771525,18 6,18 L14,18 C14.5522847,18 15,17.5522847 15,17 L15,13 C15,12.4477153 14.5522847,12 14,12 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="10px" height="6px" viewBox="0 0 10 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>E5134209-ED99-4D42-AFFC-E210CA7C75CA@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="1a-Tactical-view---default" transform="translate(-37.000000, -671.000000)" stroke="#95A3BF" stroke-width="2">
<g id="Conmutador" transform="translate(20.000000, 653.000000)">
<g id="Title" transform="translate(10.000000, 9.000000)">
<g id="Dropdown-down" transform="translate(8.000000, 10.000000)">
<polyline id="Path-8" points="0 0 4 4 8 0"></polyline>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="10px" height="6px" viewBox="0 0 10 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>468CE642-FF47-4D9D-8D01-9137E4A42791@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="1b-Tactical-view---activity-list" transform="translate(-37.000000, -671.000000)" stroke="#95A3BF" stroke-width="2">
<g id="Conmutador" transform="translate(20.000000, 653.000000)">
<g id="Title" transform="translate(10.000000, 9.000000)">
<g id="Dropdown-up" transform="translate(8.000000, 10.000000)">
<polyline id="Path-8" transform="translate(4.000000, 2.000000) scale(1, -1) translate(-4.000000, -2.000000) " points="0 0 4 4 8 0"></polyline>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>788260CF-3DE6-4D64-8B30-B9B35413937B</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -443.949166)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 321.949166)">
<g id="Mobile-modules" transform="translate(15.000000, 0.000000)">
<path d="M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,21.9082784 C30,27.6073092 23.1075582,30 15,30 C6.89244177,30 0,27.6073092 0,21.9082784 L0,16.168 L8.72848758,16.1682636 L8.94543532,16.157208 L9.14227765,16.1277192 C9.65858418,16.028234 10.1028383,15.7637314 10.3982027,15.376652 L11.389,14.076 L14.4909605,20.4094649 L14.5913089,20.5871661 L14.683733,20.7158766 C15.5543921,21.8298347 17.4465108,21.7445543 18.1504724,20.5042927 L20.648,16.101 L22.4708713,16.1014498 L22.6743746,16.0918256 C23.7090033,15.9874588 24.5,15.2164353 24.5,14.2651742 C24.5,13.2349122 23.5776613,12.4288985 22.4708713,12.4288985 L19.409919,12.4288985 L19.1910819,12.4401369 L19.0210633,12.4648524 C18.4062088,12.5770255 17.8894481,12.923802 17.6052051,13.4245902 L16.48,15.405 L13.6321609,9.59066736 L13.5274502,9.40648929 C12.7565937,8.2511657 10.9446993,8.19475986 10.1076384,9.29174039 L7.662,12.495 L0,12.495 L0,8.09172156 C0,2.47775097 6.68823265,0.0721601488 14.6378059,0.00160207373 L15,0 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Icons/Dark/20/checkbox-on@svg</title>
<g id="Icons/Dark/20/checkbox-on" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="Rectangle-2" stroke="#14524F" stroke-width="2" x="1" y="1" width="18" height="18" rx="4"></rect>
<path d="M14.3713994,6.22237132 C14.8008905,5.87515972 15.4305323,5.94186038 15.7777439,6.37135141 C16.098247,6.76780467 16.0660673,7.33480068 15.7214138,7.69277628 L15.6287639,7.77769594 L8.20693177,13.7776959 C7.78987666,14.114854 7.18888164,14.0598005 6.83812914,13.672688 L6.76182606,13.5774872 L4.18365814,9.93238606 C3.86473931,9.48148781 3.97172977,8.85742777 4.42262802,8.53850895 C4.83884178,8.24412234 5.40260169,8.31264068 5.73770948,8.67956758 L5.81650513,8.77747883 L7.77861597,11.5510307 L14.3713994,6.22237132 Z" id="Path-10" fill="#14524F" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>43B3919E-8FE7-441D-8427-E2652997A80E@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2e-Events---dropdown-selector" transform="translate(-285.000000, -35.000000)">
<g id="Group" transform="translate(1.000000, 16.000000)">
<g id="Title" transform="translate(15.000000, 15.000000)">
<g id="Icons/Dark/20/close-off" transform="translate(265.000000, 0.000000)">
<rect id="Rectangle" x="0" y="0" width="20" height="20"></rect>
<path d="M4.35059047,4.35059047 C4.81804444,3.88313651 5.57593706,3.88313651 6.04339103,4.35059047 L6.04339103,4.35059047 L10,8.307 L13.956609,4.35059047 C14.4240629,3.88313651 15.1819556,3.88313651 15.6494095,4.35059047 C16.0876476,4.78882857 16.1150375,5.48233501 15.7315792,5.95248165 L15.6494095,6.04339103 L11.693,10 L15.6494095,13.956609 L15.7315792,14.0475184 C16.1150375,14.517665 16.0876476,15.2111714 15.6494095,15.6494095 C15.1819556,16.1168635 14.4240629,16.1168635 13.956609,15.6494095 L13.956609,15.6494095 L10,11.693 L6.04339103,15.6494095 C5.57593706,16.1168635 4.81804444,16.1168635 4.35059047,15.6494095 C3.91235238,15.2111714 3.8849625,14.517665 4.26842083,14.0475184 L4.35059047,13.956609 L8.307,10 L4.35059047,6.04339103 L4.26842083,5.95248165 C3.8849625,5.48233501 3.91235238,4.78882857 4.35059047,4.35059047 Z" id="Path-6" fill="#95A3BF"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>27D252CA-B4D5-442E-ACDD-238B8E51751E@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1a-Tactical-view---default" transform="translate(-20.000000, -17.000000)" fill="#95A3BF">
<g id="Elements-/-mobile-/-header">
<g id="Go-back" transform="translate(10.000000, 8.000000)">
<g id="Group-2" transform="translate(10.000000, 7.000000)">
<g id="Back" transform="translate(0.000000, 2.000000)">
<path d="M6.22681586,7.18499617 C6.84825397,7.80421394 6.88096124,8.78791523 6.32493766,9.44549969 L6.22681586,9.55195908 C5.60537774,10.1711769 4.61814918,10.2037673 3.95820681,9.64973031 L3.85136569,9.55195908 L0.491971839,6.20456803 L0.471159559,6.18346253 C0.448283024,6.15985237 0.426096906,6.13557366 0.40463361,6.11065869 L0.491971839,6.20456803 C0.449187281,6.16193634 0.409193308,6.117577 0.371989918,6.07171537 C0.350999584,6.04570421 0.330242064,6.0184516 0.310321073,5.99056447 C0.271139022,5.93594655 0.236003122,5.87988377 0.204505607,5.82236871 L0.145733976,5.70401417 C0.124045538,5.65571966 0.104586732,5.60621384 0.0874880109,5.55562669 C0.0818617556,5.53867941 0.0764412566,5.52170989 0.0712989205,5.50467482 C0.0612197632,5.4717683 0.0521679177,5.43808328 0.0441615727,5.40399735 C0.0412764855,5.39105693 0.0384611977,5.37839495 0.0357948693,5.3657081 C0.0291097206,5.33463116 0.0233875846,5.30289036 0.0185767243,5.27085268 C0.0153029314,5.24828532 0.0124012695,5.22594088 0.00995178558,5.20355663 C0.00704369824,5.17765032 0.0047944618,5.15126248 0.00316664333,5.12470734 C0.0016973396,5.10038272 0.000722849869,5.07603294 0.000278799038,5.05167534 C9.04155519e-05,5.04133651 0,5.03122206 0,5.02108658 L0.000563610919,4.9775969 C0.0011706852,4.95417944 0.00226817651,4.93077224 0.00385608484,4.90739193 L0,5.02108658 C0,4.9551527 0.00382623005,4.89010929 0.0112695117,4.82616478 C0.0138053602,4.80529002 0.0166252188,4.78456697 0.0198345397,4.76389234 C0.0327849945,4.67929154 0.0523273944,4.59644178 0.0777734739,4.5162055 C0.0820792159,4.50294578 0.0864580021,4.48969214 0.0910073506,4.47648392 C0.122846114,4.3839691 0.162775714,4.29494223 0.20983783,4.21040281 C0.221199302,4.18987953 0.22970104,4.17526039 0.238443166,4.16074485 C0.254731128,4.13399708 0.271515085,4.10783107 0.288995392,4.08217425 C0.298790066,4.06755699 0.308765074,4.05340543 0.31898569,4.03937632 C0.338027371,4.01341654 0.358006427,3.98757415 0.378709998,3.96234508 C0.384045417,3.95574022 0.388924626,3.94988957 0.393850031,3.94406451 L0.424411969,3.90896446 C0.438242587,3.89347594 0.452357566,3.87824509 0.466748745,3.86328007 L0.491971839,3.83760512 L3.85136569,0.49021407 C4.50732814,-0.16340469 5.5708534,-0.16340469 6.22681586,0.49021407 C6.84825397,1.10943184 6.88096124,2.09313313 6.32493766,2.75071759 L6.22681586,2.85717698 L5.734,3.347 L9.65101119,3.34739105 C13.1574609,3.34739105 16,6.17977404 16,9.67369553 C16,13.0991087 13.2678401,15.8886718 9.85649076,15.9967495 L9.65101119,16 L6.69543864,16 C5.76776764,16 5.01574171,15.250661 5.01574171,14.3263045 C5.01574171,13.4439642 5.70095542,12.7210923 6.57008089,12.6571997 L6.69543864,12.6526089 L9.65101119,12.6526089 C11.3021189,12.6526089 12.6406062,11.318904 12.6406062,9.67369553 C12.6406062,8.08155831 11.3870801,6.78115173 9.80978545,6.69891128 L9.65101119,6.6947821 L5.734,6.694 L6.22681586,7.18499617 Z" id="Path-73"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>B6EE5BBF-2CE4-4EFF-9E46-50036986C7F3</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -236.000000)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 114.000000)">
<g id="Mobile-groups" transform="translate(15.000000, 0.000000)">
<path d="M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,16 C30,14.8954305 29.1045695,14 28,14 L24,14 L24,22.25 C24,23.2164983 23.2164983,24 22.25,24 L14,24 L14,28 C14,29.044389 14.8005167,29.9018074 15.821432,29.992137 C15.5493714,29.9972395 15.2753866,30 15,30 C6.89244177,30 0,27.6073092 0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 Z M19.375,8 L9.625,8 C8.72753728,8 8,8.72753728 8,9.625 L8,19.375 C8,20.2724627 8.72753728,21 9.625,21 L19.375,21 C20.2724627,21 21,20.2724627 21,19.375 L21,9.625 C21,8.72753728 20.2724627,8 19.375,8 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>13ED062F-1DD5-4B18-B16F-64D609ACA6F7@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1a-Tactical-view---default" transform="translate(-292.000000, -17.000000)" fill="#FFFFFF">
<g id="Elements-/-mobile-/-header">
<g id="Home" transform="translate(282.000000, 8.000000)">
<g id="Group-3" transform="translate(10.000000, 7.000000)">
<g id="Home" transform="translate(0.000000, 2.000000)">
<path d="M15.7621654,6.04845511 L8.82364649,0.254535942 C8.35663079,-0.0848453139 7.68946552,-0.0848453139 7.1557333,0.254535942 L0.283930943,5.61675978 C-0.249801279,6.02401729 0.0170648321,7.20235138 0.684230109,7.20235138 L1.62318192,7.20235138 L1.62318192,13.3528262 C1.62318192,14.7782275 2.55229288,16 4.02005649,16 L5.35438705,16 C5.75468621,16 6.02155232,15.728495 6.02155232,15.3212375 L6.02155232,11.9953012 C6.02155232,11.2486624 6.62200107,10.4 7.35588288,10.4 L8.69021343,10.4 C9.42409524,10.4 10.024544,11.2486624 10.024544,11.9953012 L10.024544,15.3212375 C10.024544,15.6606187 10.2914101,16 10.6917093,16 L12.0260398,16 C13.4938034,16 14.4,14.7782275 14.4,13.3528262 L14.4,7.20235138 L15.3618662,7.20235138 C15.962315,7.20235138 16.2291811,6.45571262 15.7621654,6.04845511 Z" id="home"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>08833C7D-0D40-4B38-96C4-14E753034D0F@svg</title>
<desc>Created with sketchtool.</desc>
<defs>
<linearGradient x1="100%" y1="0.453535926%" x2="0%" y2="99.5464641%" id="linearGradient-1">
<stop stop-color="#C1CCDC" offset="0%"></stop>
<stop stop-color="#E1E8F7" offset="100%"></stop>
</linearGradient>
<path d="M20,0 C30.8100776,0 40,3.19025441 40,10.7889621 L40,29.2110379 C40,35.4316123 33.8412391,38.6977972 25.6766489,39.677922 C26.3582749,39.1051401 26.737614,38.6322026 26.7772826,38.5826822 C27.0352391,38.2577604 27.0418534,37.7864452 26.8037397,37.4472411 C26.5557045,37.1116076 26.1290841,37.0044905 25.7785278,37.2044424 C25.4081287,37.4079648 24.2638599,37.9364091 23.4238476,37.9364091 C23.1758125,37.9364091 23.0369128,37.8899917 22.9707701,37.854286 C22.5871425,37.647193 21.8694942,37.2544304 22.6202138,34.8193019 L22.6202138,34.8193019 L23.9629106,30.4596364 C24.7433945,27.9102498 24.5978806,25.5929501 23.5528259,23.9326353 C22.7028922,22.58296 21.3138955,21.7831524 19.6437923,21.6796058 C15.1593172,21.3903897 12.4011665,24.8038542 12.2920311,24.9431064 C12.0340745,25.2680283 12.0274603,25.7393435 12.2688811,26.0785476 C12.5202234,26.4106105 12.9534581,26.5105865 13.2974001,26.3177757 C13.6644921,26.1106827 14.8087608,25.5822384 15.6388517,25.5822384 C15.8372798,25.5822384 15.9993295,25.6143735 16.1018506,25.6715026 C16.4854783,25.8785957 17.1965123,26.2677878 16.452407,28.7064868 L16.452407,28.7064868 L15.1097101,33.0661522 C14.3259191,35.6083978 14.4681259,37.9221269 15.5098735,39.5824417 C15.5601985,39.6625681 15.6124134,39.7407668 15.6664667,39.8170072 C6.84428916,39.0430897 0,35.7686843 0,29.2110379 L0,10.7889621 C0,3.19025441 9.18992236,0 20,0 L20,0 Z M20.7100207,10.2325581 C18.1460335,10.2325581 16.0588579,12.3204068 16.0588579,14.8852208 C16.0648555,17.4410355 18.1520311,19.5288842 20.7130195,19.5348837 C23.2770067,19.5288842 25.3611835,17.4410355 25.3611835,14.882221 C25.3551858,12.3264063 23.2710091,10.2385577 20.7100207,10.2325581 Z" id="path-2"></path>
</defs>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mensajes-emergentes---Default" transform="translate(-1365.000000, -80.000000)">
<g id="Group-+-Group-+-Group-+-Group-+-Group-+-Rectangle-Mask" transform="translate(1345.000000, 53.176276)">
<g id="Group" transform="translate(0.000000, 26.823724)">
<g id="Mensaje-emergente-info" transform="translate(20.000000, 0.000000)">
<g id="Status-check">
<mask id="mask-3" fill="white">
<use xlink:href="#path-2"></use>
</mask>
<use id="Mask" fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>C79B9248-AD28-44E6-97FA-8E8BEC5C229D</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-20.000000, -17.000000)" fill="#ED474A">
<g id="Go-back" transform="translate(20.000000, 15.000000)">
<g id="Icons-/-Dark-/-20-/-Sign-out" transform="translate(8.000000, 10.000000) scale(-1, 1) translate(-8.000000, -10.000000) translate(0.000000, 2.000000)">
<path d="M4,0 C6.209139,-4.05812251e-16 8,1.790861 8,4 L8,12 C8,14.209139 6.209139,16 4,16 C1.790861,16 2.705415e-16,14.209139 0,12 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 Z M4.8,8.8 C4.3581722,8.8 4,8.4418278 4,8 C4,7.5581722 4.3581722,7.2 4.8,7.2 L8,7.2 L13.269,7.2 L10.6343146,4.56568542 C10.3459274,4.27729826 10.3237438,3.82351341 10.5677637,3.50968045 L10.6343146,3.43431458 C10.9227017,3.14592741 11.3764866,3.12374378 11.6903196,3.36776369 L11.7656854,3.43431458 L15.7656854,7.43431458 C16.0540726,7.72270174 16.0762562,8.17648659 15.8322363,8.49031955 L15.7656854,8.56568542 L11.7656854,12.5656854 C11.453266,12.8781049 10.946734,12.8781049 10.6343146,12.5656854 C10.3459274,12.2772983 10.3237438,11.8235134 10.5677637,11.5096804 L10.6343146,11.4343146 L13.269,8.8 L8,8.8 L4.8,8.8 Z" id="Rectangle-2"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="29.9745831px" viewBox="0 0 30 29.9745831" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1823C61D-1174-471F-8BAD-A0B8CB687967</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -340.000000)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 218.000000)">
<g id="Mobile-alerts" transform="translate(15.000000, 0.000000)">
<path d="M30,8.06630471 L30,21.8828616 C30,27.5818923 23.1075582,29.9745831 15,29.9745831 C6.89244177,29.9745831 0,27.5818923 0,21.8828616 L0,8.06630471 C0,2.70512527 6.09946568,0.269891039 13.5720913,-5.84185478e-14 L13.5723301,2.21012161 C10.2928858,2.85573699 7.86075776,5.48727545 7.86075776,8.77458315 C7.86075776,12.6347599 6.57700299,14.1031078 5.68751656,14.9986099 L5.45596532,15.2300015 C5.43160371,15.2544373 5.40774422,15.2784989 5.38443355,15.302237 C5.11657804,15.5751216 4.99782876,15.9013139 4.99997078,16.220737 C5.00497158,16.9145831 5.57952165,17.5745831 6.43308788,17.5745831 L23.5669121,17.5745831 C24.4204784,17.5745831 24.9954749,16.9145831 25.0000292,16.220737 C25.0021712,15.9013139 24.883422,15.5746985 24.6155664,15.302237 L24.5440347,15.2300015 L24.3124834,14.9986099 C23.422997,14.1031078 22.1392422,12.6347599 22.1392422,8.77458315 C22.1392422,5.48727545 19.7071142,2.85573699 16.4276699,2.21012161 L16.4279087,-5.84185478e-14 C23.9005343,0.269891039 30,2.70512527 30,8.06630471 Z M17.8557862,18.6745831 L12.1442138,18.6745831 C12.1442138,20.4973175 13.4232239,21.9745831 15,21.9745831 C16.5767761,21.9745831 17.8557862,20.4973175 17.8557862,18.6745831 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="29.853037px" viewBox="0 0 30 29.853037" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>DD299FDE-0DC6-4356-92DC-926BFF90D985</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -184.146963)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 62.000000)">
<g id="Content" transform="translate(15.000000, 0.000000)">
<g id="Mobile-events" transform="translate(0.000000, 0.146963)">
<path d="M30,7.94475857 L30,21.7613154 C30,27.4603462 23.1075582,29.853037 15,29.853037 C6.89244177,29.853037 0,27.4603462 0,21.7613154 L0,7.94475857 C0,3.76611131 3.70546339,1.364994 8.8784529,0.381256498 L7.01052877,12.078037 C6.91552985,12.753037 7.47552349,13.353037 8.20051525,13.353037 L14.1354478,13.353037 L11.830474,22.4702245 C11.650476,23.1827245 12.2304694,23.853037 12.9954608,23.853037 C13.415456,23.853037 13.8154514,23.646787 14.0354489,23.290537 L22.8353489,9.04053701 C23.3003436,8.29522451 22.7253502,7.35303701 21.8003607,7.35303701 L16.0304263,7.35303701 L18.3597639,-1.98591144e-13 C24.9238182,0.598158755 30,3.05392333 30,7.94475857 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>2CF74761-33EB-44F4-9088-CC2767F8DD95</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -132.000000)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 10.000000)">
<g id="Mobile-tactical-view" transform="translate(15.000000, 0.000000)">
<path d="M0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,21.9082784 C30,27.6073092 23.1075582,30 15,30 C6.89244177,30 0,27.6073092 0,21.9082784 Z M13.9998991,5 L14.0002435,11.0765696 C12.2748927,11.5205277 11,13.0866876 11,14.9506147 C11,17.1597537 12.790861,18.9506147 15,18.9506147 C16.8638701,18.9506147 18.4299912,17.6758 18.8740044,15.9505296 L24.9506147,15.9507157 C24.4488436,21.00399 20.1853136,24.9506147 15,24.9506147 C9.4771525,24.9506147 5,20.4734622 5,14.9506147 C5,9.76530116 8.94662476,5.50177118 13.9998991,5 Z M16.0010997,5.00009923 C20.7249658,5.46963832 24.481539,9.22651135 24.9506147,13.9505138 L18.8737865,13.9498534 C18.51187,12.5448616 17.4057531,11.4387448 16.0007613,11.0768283 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>B4F9F258-05E7-4180-8981-655BFA2BA77E@svg</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-30.000000, -76.000000)">
<g id="Input" transform="translate(20.000000, 65.000000)">
<g id="Group" transform="translate(10.000000, 11.000000)">
<rect id="Rectangle" x="0" y="0" width="20" height="20"></rect>
<path d="M10.5857864,10.5857864 C11.3257272,9.84584567 12.5012114,9.80690142 13.2869988,10.4689537 L13.4142136,10.5857864 L19.4142136,16.5857864 C20.1952621,17.366835 20.1952621,18.633165 19.4142136,19.4142136 C18.6742728,20.1541543 17.4987886,20.1930986 16.7130012,19.5310463 L16.5857864,19.4142136 L10.5857864,13.4142136 C9.80473785,12.633165 9.80473785,11.366835 10.5857864,10.5857864 Z" id="Path-9" fill="#95A3BF" fill-rule="nonzero"></path>
<path d="M7,0 C3.13400675,0 0,3.13400675 0,7 C0,10.8659932 3.13400675,14 7,14 C10.8659932,14 14,10.8659932 14,7 C14,3.13400675 10.8659932,0 7,0 Z M7,2 C9.76142375,2 12,4.23857625 12,7 C12,9.76142375 9.76142375,12 7,12 C4.23857625,12 2,9.76142375 2,7 C2,4.23857625 4.23857625,2 7,2 Z" id="Oval" fill="#95A3BF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="29px" viewBox="0 0 30 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>5DF60C72-9560-434D-8EEE-2966DF14C3C5</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -495.923749)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 373.923749)">
<g id="Mobile-server-status" transform="translate(15.000000, 0.000000)">
<path d="M8,27 C8.55228475,27 9,27.4477153 9,28 C9,28.5522847 8.55228475,29 8,29 C7.44771525,29 7,28.5522847 7,28 C7,27.4477153 7.44771525,27 8,27 Z M11,27 C11.5522847,27 12,27.4477153 12,28 C12,28.5522847 11.5522847,29 11,29 C10.4477153,29 10,28.5522847 10,28 C10,27.4477153 10.4477153,27 11,27 Z M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,21.9082784 C30,24.9407566 28.0485094,27.0370946 25.0008585,28.3349403 L25,27 C25,26.4477153 24.5522847,26 24,26 L6,26 C5.44771525,26 5,26.4477153 5,27 L5.00014724,28.3353686 C1.95191991,27.0375557 0,24.9410901 0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 Z M24,17 L6,17 C5.44771525,17 5,17.4477153 5,18 L5,23 C5,23.5522847 5.44771525,24 6,24 L24,24 C24.5522847,24 25,23.5522847 25,23 L25,18 C25,17.4477153 24.5522847,17 24,17 Z M15,8 C11.6666667,8 8.33333333,8.38888889 5,9.16666667 L5,14 C5,14.5522847 5.44771525,15 6,15 L24,15 C24.5522847,15 25,14.5522847 25,14 L25,9.16666667 C21.6666667,8.38888889 18.3333333,8 15,8 Z M11,10 C11.5522847,10 12,10.4477153 12,11 C12,11.5522847 11.5522847,12 11,12 L8,12 C7.44771525,12 7,11.5522847 7,11 C7,10.4477153 7.44771525,10 8,10 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30.0011092px" height="30px" viewBox="0 0 30.0011092 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>7A93DEF5-4FEF-40B6-99B7-F2F36D7D47A0</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -547.898333)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Mobile-services" transform="translate(15.000000, 425.898333)">
<path d="M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30.0011092,21.5357707 C29.4125119,21.1950335 28.7290322,21 28,21 C27.2685186,21 26.5828964,21.1963461 25.9929619,21.5392097 L23.1145512,18.1809622 C23.6708634,17.432156 24,16.504515 24,15.5 C24,14.3906757 23.5985973,13.3751041 22.9331138,12.590607 L24.9263454,9.93387288 C25.1105489,9.977122 25.3026027,10 25.5,10 C26.8807119,10 28,8.88071187 28,7.5 C28,6.11928813 26.8807119,5 25.5,5 C24.1192881,5 23,6.11928813 23,7.5 C23,7.94894056 23.1183351,8.37024248 23.3255151,8.73441568 L21.3340363,11.3894793 C20.7738858,11.1391713 20.1531955,11 19.5,11 C18.300645,11 17.2108778,11.4692008 16.4042415,12.2340592 L13.9415885,10.5920657 C13.9799014,10.400661 14,10.2026776 14,10 C14,8.34314575 12.6568542,7 11,7 C9.34314575,7 8,8.34314575 8,10 C8,11.6568542 9.34314575,13 11,13 C11.7271223,13 12.3938258,12.741316 12.9131003,12.3109582 L15.2935368,13.8979357 C15.1038711,14.3956458 15,14.9356927 15,15.5 C15,16.1810495 15.1512936,16.8267624 15.4221048,17.4053628 L11.695466,20.3038146 C11.340333,20.1100926 10.9330233,20 10.5,20 C9.11928813,20 8,21.1192881 8,22.5 C8,23.8807119 9.11928813,25 10.5,25 C11.8807119,25 13,23.8807119 13,22.5 C13,22.286925 12.9733436,22.0800759 12.9231838,21.8826056 L16.6499007,18.9825485 C17.4259628,19.6184248 18.4184206,20 19.5,20 C20.2570179,20 20.9703763,19.8130715 21.5964354,19.4828542 L24.5657994,22.947893 C24.2065164,23.5478609 24,24.2498132 24,25 C24,26.2589117 24.5815758,27.3819891 25.4907148,28.1152196 C22.7594493,29.4088759 19.0298244,30 15,30 C6.89244177,30 0,27.6073092 0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="11px" height="10px" viewBox="0 0 11 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>8FDB48E7-691D-43C7-B7AD-DC381E7FA74C@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2b-Events---open-groups" transform="translate(-323.000000, -268.000000)" fill="#3F3F3F">
<g id="List" transform="translate(20.000000, 138.000000)">
<g id="Conmutador" transform="translate(0.000000, 26.000000)">
<g id="Group" transform="translate(10.000000, 48.000000)">
<g id="Elements-/-mobile-/-Event-card">
<g id="Event">
<g id="Secondary" transform="translate(10.000000, 55.000000)">
<g id="Label-star" transform="translate(282.000000, 0.000000)">
<path d="M6.5,9.75 L4.47286801,10.8157264 C3.98402343,11.0727272 3.37939627,10.8847806 3.12239546,10.3959361 C3.02005639,10.2012756 2.98474172,9.9783075 3.02191856,9.76154987 L3.40906632,7.50430523 L3.40906632,7.50430523 L1.7690821,5.9057157 C1.37359852,5.52021449 1.36550621,4.88710123 1.75100742,4.49161765 C1.90451603,4.33413401 2.10565844,4.23164683 2.32329547,4.20002232 L4.58969793,3.87069477 L4.58969793,3.87069477 L5.60326392,1.81698575 C5.84768622,1.32173209 6.44731205,1.11839309 6.94256571,1.36281539 C7.13977832,1.46014562 7.29940584,1.61977315 7.39673608,1.81698575 L8.41030207,3.87069477 L8.41030207,3.87069477 L10.6767045,4.20002232 C11.2232494,4.27943994 11.6019308,4.78688279 11.5225132,5.33342765 C11.4908887,5.55106469 11.3884015,5.7522071 11.2309179,5.9057157 L9.59093368,7.50430523 L9.59093368,7.50430523 L9.97808144,9.76154987 C10.0714424,10.3058863 9.70585462,10.8228422 9.16151817,10.9162033 C8.94476055,10.9533801 8.72179247,10.9180654 8.52713199,10.8157264 L6.5,9.75 L6.5,9.75 Z" id="Star"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="29.3024689px" viewBox="0 0 30 29.3024689" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>51F33933-7E26-4D16-9D45-F3415926FFF6</title>
<g id="Consola-mobile" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="0a-Menu" transform="translate(-35.000000, -288.000000)" fill="#3F3F3F">
<g id="Conmutador" transform="translate(20.000000, 122.000000)">
<g id="Elemento" transform="translate(0.000000, 166.000000)">
<g id="Mobile-visual-consoles" transform="translate(15.000000, 0.000000)">
<path d="M15,0 C23.1075582,0 30,2.39269081 30,8.09172156 L30,21.9082784 C30,25.8641319 26.679133,28.2269482 21.9361208,29.3022878 C21.9771584,29.207048 22,29.1054294 22,29 L21.992772,28.8977558 C21.921078,28.3934997 21.3248737,28 20.6,28 L17,28 L17,24 L23,24 C24.1045695,24 25,23.1045695 25,22 L25,10 C25,8.8954305 24.1045695,8 23,8 L7,8 C5.8954305,8 5,8.8954305 5,10 L5,22 C5,23.1045695 5.8954305,24 7,24 L13,24 L13,28 L9.4,28 C8.62680135,28 8,28.4477153 8,29 C8,29.1054294 8.02284162,29.207048 8.0651829,29.3024689 C3.32086702,28.2269482 0,25.8641319 0,21.9082784 L0,8.09172156 C0,2.39269081 6.89244177,0 15,0 Z" id="Mask"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -2406,7 +2406,7 @@ if ($drawConsoleSound === true) {
'Star_Trek_emergency_simulation.wav' => 'StarTrek emergency simulation',
];
$eventsounds = mysql_db_get_all_rows_sql('SELECT * FROM tevent_sound WHERE active = 1');
$eventsounds = db_get_all_rows_sql('SELECT * FROM tevent_sound WHERE active = 1');
foreach ($eventsounds as $key => $row) {
$sounds[$row['sound']] = $row['name'];
}

View File

@ -137,6 +137,7 @@ if (is_ajax() === true) {
switch ($type) {
case 0:
case 3:
default:
$label = __('Group');
$input = html_print_input(
@ -234,10 +235,6 @@ if (is_ajax() === true) {
'5'
);
break;
case 3:
// Empty.
break;
}
echo html_print_label_input_block(
@ -246,6 +243,7 @@ if (is_ajax() === true) {
[
'label_class' => 'font-title-font',
'div_class' => 'mrgn_top_10px',
'div_id' => 'filter_type',
]
);
}
@ -259,10 +257,19 @@ if (is_ajax() === true) {
$nd->connect();
}
echo '<div class="box-flat white_table_graph">';
switch ($type) {
case 3:
case 2:
$data = db_get_row('tagente_modulo', 'id_agente_modulo', $id);
$sql = sprintf(
'SELECT * FROM tagente_modulo ag
INNER JOIN tagente_estado ae ON ag.id_agente_modulo = ae.id_agente_modulo
WHERE ag.id_agente_modulo = %d',
$id
);
$data = db_get_row_sql($sql);
// Nombre.
$link = sprintf(
@ -298,6 +305,92 @@ if (is_ajax() === true) {
echo '<p class="title-dialog">'.__('Module group').'</p>';
echo '<p class="info-dialog">'.$group.'</p>';
echo '</div>';
$graph_type = return_graphtype($data['module_type']);
$url = ui_get_full_url('operation/agentes/stat_win.php', false, false, false);
$handle = dechex(crc32($data['id_agente_modulo'].$data['module_name']));
$win_handle = 'day_'.$handle;
$graph_params = [
'type' => $graph_type,
'period' => SECONDS_1DAY,
'id' => $data['id_agente_modulo'],
'refresh' => SECONDS_10MINUTES,
];
$graph_params_str = http_build_query($graph_params);
$link = 'winopeng_var(\''.$url.'?'.$graph_params_str.'\',\''.$win_handle.'\', 800, 480)';
$img_graph = html_print_anchor(
[
'href' => 'javascript:'.$link,
'content' => html_print_image('images/module-graph.svg', true, ['border' => '0', 'alt' => '', 'class' => 'invert_filter main_menu_icon']),
],
true
);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Data').'</p>';
$data_module = '';
if (is_numeric($data['datos'])) {
$data_module = remove_right_zeros(
number_format(
$data['datos'],
$config['graph_precision'],
$config['decimal_separator'],
$config['thousand_separator']
)
);
echo '<p class="info-dialog">'.$data_module.' '.$data['unit'].'&nbsp;&nbsp;&nbsp;'.$img_graph.'</p>';
} else {
$data_module = $data['datos'];
echo '<p class="info-dialog">'.$data['datos'].' '.$data['unit'].'&nbsp;&nbsp;&nbsp;'.$img_graph.'</p>';
}
echo '</div>';
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Date of last data').'</p>';
echo '<p class="info-dialog">'.date('Y-m-d H:i:s', $data['utimestamp']).'</p>';
echo '</div>';
$status = modules_get_agentmodule_status($id);
switch ($status) {
case AGENT_MODULE_STATUS_NORMAL:
$status = ui_print_status_image('module_ok.png', $data_module, true);
break;
case AGENT_MODULE_STATUS_CRITICAL_BAD:
$status = ui_print_status_image('module_critical.png', $data_module, false);
break;
case AGENT_MODULE_STATUS_WARNING:
$status = ui_print_status_image('module_warning.png', $data_module, false);
break;
case AGENT_MODULE_STATUS_NORMAL_ALERT:
case AGENT_MODULE_STATUS_WARNING_ALERT:
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
$status = ui_print_status_image('module_alertsfired.png', $data_module, false);
break;
case 4:
$status = ui_print_status_image('module_no_data.png', $data_module, false);
break;
default:
case AGENT_MODULE_STATUS_UNKNOWN:
$status = ui_print_status_image('module_unknown.png', $data_module, false);
break;
}
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Status').'</p>';
echo '<div class="status_rounded_rectangles">'.$status.'</div>';
echo '</div>';
break;
case 1:
@ -381,6 +474,43 @@ if (is_ajax() === true) {
echo '<p class="info-dialog">'.$data['comentarios'].'</p>';
echo '</div>';
// Last contact.
$lastContactDate = ui_print_timestamp($data['ultimo_contacto'], true);
$remoteContactDate = ($data['ultimo_contacto_remoto'] === '01-01-1970 00:00:00') ? __('Never') : date_w_fixed_tz($data['ultimo_contacto_remoto']);
$lastAndRemoteContact = sprintf('%s / %s', $lastContactDate, $remoteContactDate);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Last contact').' / '.__('Remote').'</p>';
echo '<p class="info-dialog">'.$lastAndRemoteContact.'</p>';
echo '</div>';
// Next contact progress.
$progress = agents_get_next_contact($id);
$tempTimeToShow = ($data['intervalo'] - (strtotime('now') - strtotime($data['ultimo_contacto'])));
$progressCaption = ($tempTimeToShow >= 0) ? sprintf('%d s', $tempTimeToShow) : __('Out of bounds');
$ajaxNextContactInterval = (empty($data['intervalo']) === true) ? 0 : (100 / $data['intervalo']);
echo '<div class="div-dialog">';
echo '<p class="title-dialog">'.__('Next contact').'</p>';
echo '<p class="info-dialog">'.ui_progress(
$progress,
'80%',
'1.2',
'#ececec',
true,
$progressCaption,
[
'page' => 'operation/agentes/ver_agente',
'interval' => $ajaxNextContactInterval,
'data' => [
'id_agente' => $id,
'refresh_contact' => 1,
],
]
).'</p>';
echo '</div>';
// Group.
$secondary_groups = '';
$secondary = enterprise_hook('agents_get_secondary_groups', [$data['id_agente']]);
@ -394,6 +524,27 @@ if (is_ajax() === true) {
echo '<p class="info-dialog">'.groups_get_name($data['id_grupo']).$secondary_groups.'</p>';
echo '</div>';
echo '<div class="div-dialog">';
echo graph_agent_status(
$id,
150,
150,
true,
false,
false,
true
);
echo '</div>';
echo '<div class="div-dialog" style="justify-content: center;">';
echo reporting_tiny_stats(
$data,
true,
'agent',
// Useless.
':',
true
);
echo '</div>';
// Events.
$result_graph_event = enterprise_hook(
@ -419,6 +570,8 @@ if (is_ajax() === true) {
break;
}
echo '</div>';
if (empty($id_server) === false) {
$nd->disconnect();
}

View File

@ -583,7 +583,7 @@ if (check_login()) {
}
if (empty($table->data)) {
ui_print_error_message(__('No available data to showaaaa'));
ui_print_error_message(__('No available data to show'));
} else {
ui_pagination(
count($count),

View File

@ -402,8 +402,8 @@ function process_user_login_remote($login, $pass, $api=false)
$config['auth_error'] = __('User not found in database or incorrect password');
return false;
} else {
$user_info['fullname'] = db_escape_string_sql($sr['cn'][0]);
$user_info['email'] = $sr['mail'][0];
$user_info['fullname'] = db_escape_string_sql(io_safe_input($sr['cn'][0]));
$user_info['email'] = io_safe_input($sr['mail'][0]);
// Create the user.
$create_user = create_user_and_permisions_ldap(

View File

@ -1294,6 +1294,7 @@ class CredentialStore extends Wizard
$('#div-extra_1').append(
$('<input type="text" name="extra_1" id="text-extra_1" size="50" value="'+val+'"></input>')
);
hideSNMP();
}
if ($('#product :selected').val() == "CUSTOM") {
@ -1303,6 +1304,7 @@ class CredentialStore extends Wizard
$('#div-password').show();
$('#div-extra_1').hide();
$('#div-extra_2').hide();
hideSNMP();
} else if ($('#product :selected').val() == "AWS") {
$('#div-username label').text('<?php echo __('Access key ID'); ?>');
$('#div-password label').text('<?php echo __('Secret access key'); ?>');
@ -1310,6 +1312,7 @@ class CredentialStore extends Wizard
$('#div-password').show();
$('#div-extra_1').hide();
$('#div-extra_2').hide();
hideSNMP();
} else if ($('#product :selected').val() == "AZURE") {
$('#div-username label').text('<?php echo __('Client ID'); ?>');
$('#div-password label').text('<?php echo __('Application secret'); ?>');
@ -1319,6 +1322,7 @@ class CredentialStore extends Wizard
$('#div-password').show();
$('#div-extra_1').show();
$('#div-extra_2').show();
hideSNMP();
} else if ($('#product :selected').val() == "SAP") {
$('#div-username label').text('<?php echo __('Account ID.'); ?>');
$('#div-password label').text('<?php echo __('Password'); ?>');
@ -1326,6 +1330,7 @@ class CredentialStore extends Wizard
$('#div-password').show();
$('#div-extra_1').hide();
$('#div-extra_2').hide();
hideSNMP();
} else if ($('#product :selected').val() == "GOOGLE") {
$('#div-username').hide();
$('#div-password').hide();
@ -1341,6 +1346,7 @@ class CredentialStore extends Wizard
$('<textarea name="extra_1" id="text-extra_1">'+val+'</textarea>')
);
$('#div-extra_1').show();
hideSNMP();
} else if ($('#product :selected').val() == "WMI") {
$('#div-username label').text('<?php echo __('Username'); ?>');
$('#div-password label').text('<?php echo __('Password'); ?>');
@ -1349,16 +1355,19 @@ class CredentialStore extends Wizard
$('#div-password').show();
$('#div-extra_1').show();
$('#div-extra_2').hide();
hideSNMP();
} else if ($('#product :selected').val() == "SNMP") {
$('#div-username').hide();
$('#div-password').hide();
$('#div-extra_1').hide();
$('#div-extra_2').hide();
$('#li_snmp_1').show();
$('#li_snmp_2').show();
if ($('#li_snmp_1').length > 0) {
console.log($('#li_snmp_1').length);
const test = '<?php echo $json_values; ?>';
console.log(test);
$('#version').val('1');
$('#version').trigger('change');
} else {
const ul = $('#modal_form').children('ul')[0];

View File

@ -1032,10 +1032,14 @@ class Diagnostics extends Wizard
$unit = 'M';
$pathServerLogs = '/var/log/pandora/pandora_server.log';
$logs_directory = (empty($config['server_log_dir']) === false)
? io_safe_output($config['server_log_dir'])
: '/var/log/pandora';
$pathServerLogs = $logs_directory.'/pandora_server.log';
$servers = $this->getLogInfo($pathServerLogs);
$pathErrLogs = '/var/log/pandora/pandora_server.error';
$pathErrLogs = $logs_directory.'/pandora_server.error';
$errors = $this->getLogInfo($pathErrLogs);
$pathConsoleLogs = $config['homedir'].'/log/console.log';

View File

@ -282,7 +282,6 @@ class Heatmap
while (cont <= limit) {
if (typeof lista[cont] !== 'undefined') {
const rect = document.getElementsByName(`${lista[cont]['id']}`);
console.log(rect[0]);
$(`#${rect[0].id}`).removeClass();
$(`#${rect[0].id}`).addClass(`${lista[cont]['status']} hover`);
}
@ -938,10 +937,27 @@ class Heatmap
if (users_is_admin() === false) {
$user_groups = array_keys(users_get_groups($config['user'], 'AR', false));
if (empty($user_groups) === false) {
if (empty($this->filter) === false && empty(current($this->filter)) === false) {
$user_groups = array_intersect($this->filter, $user_groups);
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
implode(',', $user_groups)
);
} else {
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
implode(',', $user_groups)
);
}
}
} else {
if (empty($this->filter) === false && empty(current($this->filter)) === false) {
$id_user_groups = sprintf(
'INNER JOIN tagente a ON a.id_agente = ae.id_agente
AND a.id_grupo IN (%s)',
implode(',', $user_groups)
implode(',', $this->filter)
);
}
}
@ -1292,13 +1308,31 @@ class Heatmap
const id = name.split('|')[0];
const server = name.split('|')[1];
let height = 400;
let width = 530;
switch (type) {
case 0:
height = 670;
width = 460;
break;
case 2:
case 3:
height = 450;
width = 460;
break;
default:
break;
}
$("#info_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
closeOnEscape: true,
height: 400,
width: 530,
height: height,
width: width,
title: '<?php echo __('Info'); ?>',
open: function() {
$.ajax({
@ -1325,13 +1359,23 @@ class Heatmap
if (count($groups) > 1 && $this->group === 1 && $this->dashboard === false) {
$x_back = 0;
$y_back = 0;
$x_text_correction = 0.25;
if ($count_result <= 100) {
if ($count_result <= 10) {
$fontSize = 'small-size';
$stroke = 'small-stroke';
} else {
} else if ($count_result > 10 && $count_result <= 100) {
$fontSize = 'tiny-size';
$stroke = 'tiny-stroke';
} else if ($count_result > 100 && $count_result <= 1000) {
$fontSize = 'medium-size';
$stroke = 'medium-stroke';
} else if ($count_result > 1000 && $count_result <= 10000) {
$fontSize = 'big-size';
$stroke = 'big-stroke';
} else {
$fontSize = 'huge-size';
$stroke = 'huge-stroke';
}
echo '<polyline points="0,0 '.$Xaxis.',0" class="polyline '.$stroke.'" />';
@ -1385,7 +1429,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name.
echo '<text x="'.((($x_position - $x_back) / 2) + $x_back).'" y="'.($y_position + 1).'"
echo '<text x="'.((($x_position - $x_back) / 2) + $x_back - $x_text_correction).'" y="'.($y_position + 1 - 0.01).'"
class="'.$fontSize.'">'.$name.'</text>';
$x_back = $x_position;
@ -1436,7 +1480,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name.
echo '<text x="'.(($x_position) / 2).'" y="'.($y_position + 1).'"
echo '<text x="'.(($x_position) / 2 - $x_text_correction).'" y="'.($y_position + 1 - 0.01).'"
class="'.$fontSize.'">'.$name.'</text>';
// Bottom-right of last line.
@ -1493,7 +1537,7 @@ class Heatmap
echo '<polyline points="'.$points.'" class="polyline '.$stroke.'" />';
// Name.
echo '<text x="'.(($x_position) / 2).'" y="'.($y_position + 1).'"
echo '<text x="'.(($x_position) / 2 - $x_text_correction).'" y="'.($y_position + 1 - 0.02).'"
class="'.$fontSize.'">'.$name.'</text>';
// Bottom-top of last line.

View File

@ -468,18 +468,14 @@ class ManageNetScanScripts extends Wizard
echo "<form name=reconscript method='post' action='".$url."'>";
echo html_print_input_hidden('page', 1, true);
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Add'),
'crtbutton',
false,
[ 'icon' => 'next' ],
true
),
],
true
html_print_action_buttons(
html_print_submit_button(
__('Add'),
'crtbutton',
false,
[ 'icon' => 'next' ],
true
)
);
echo '</form>';
} else {
@ -564,7 +560,7 @@ class ManageNetScanScripts extends Wizard
$data = [];
$data[0] = __('Description');
$data[1] = '<textarea name="form_description" cols="50" rows="4">';
$data[1] = '<textarea name="form_description" cols="69" rows="5">';
$data[1] .= $form_description;
$data[1] .= '</textarea>';
$table->data['recon_description'] = $data;

View File

@ -1723,6 +1723,12 @@ class NetworkMap
$item['image_width'] = 0;
$item['image_height'] = 0;
if (empty($node['style']['image']) === false) {
if (strpos($node['style']['image'], '.svg') === false) {
$node['style']['image'] = os_transform_url_icon(
$node['style']['image']
);
}
$item['image_url'] = ui_get_full_url(
$node['style']['image'],
false,

View File

@ -666,16 +666,17 @@ class SnmpConsole extends HTML
}
if ($filters['filter_free_search'] !== '') {
$free_search_str = io_safe_output($filters['filter_free_search']);
$whereSubquery .= '
AND (source LIKE "%'.$filters['filter_free_search'].'%" OR
oid LIKE "%'.$filters['filter_free_search'].'%" OR
oid_custom LIKE "%'.$filters['filter_free_search'].'%" OR
type_custom LIKE "%'.$filters['filter_free_search'].'%" OR
value LIKE "%'.$filters['filter_free_search'].'%" OR
value_custom LIKE "%'.$filters['filter_free_search'].'%" OR
id_usuario LIKE "%'.$filters['filter_free_search'].'%" OR
text LIKE "%'.$filters['filter_free_search'].'%" OR
description LIKE "%'.$filters['filter_free_search'].'%")';
AND (source LIKE "%'.$free_search_str.'%" OR
oid LIKE "%'.$free_search_str.'%" OR
oid_custom LIKE "%'.$free_search_str.'%" OR
type_custom LIKE "%'.$free_search_str.'%" OR
value LIKE "%'.$free_search_str.'%" OR
value_custom LIKE "%'.$free_search_str.'%" OR
id_usuario LIKE "%'.$free_search_str.'%" OR
text LIKE "%'.$free_search_str.'%" OR
description LIKE "%'.$free_search_str.'%")';
}
if ($filters['filter_status'] != -1) {
@ -718,6 +719,7 @@ class SnmpConsole extends HTML
}
$sql = sprintf($sql, $whereSubquery, $start, $length);
$sql_count = 'SELECT COUNT(id_trap) FROM ttrap
WHERE (
source IN ('.implode(',', $address_by_user_groups).") OR
@ -907,7 +909,7 @@ class SnmpConsole extends HTML
).'</a>';
if ($config['enterprise_installed']) {
$tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">';
$tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&id='.$tmp->id_trap.'&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">';
$tmp->action .= html_print_image(
'images/edit.svg',
true,

View File

@ -133,6 +133,11 @@ class Tree
protected function getEmptyModuleFilterStatus()
{
if ($this->filter['statusModule'] === 'fired') {
$this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
$this->filter['statusModule'] = -1;
}
return (
!isset($this->filter['statusModule']) ||
$this->filter['statusModule'] == -1
@ -219,6 +224,10 @@ class Tree
$agent_status_filter = ' AND (ta.critical_count > 0
OR ta.warning_count > 0) ';
break;
case AGENT_STATUS_ALERT_FIRED:
$agent_status_filter = ' AND ta.fired_count > 0 ';
break;
}
return $agent_status_filter;
@ -284,6 +293,11 @@ class Tree
protected function getModuleStatusFilter()
{
if ($this->filter['statusModule'] === 'fired') {
$this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
$this->filter['statusModule'] = -1;
}
$show_init_condition = ($this->filter['show_not_init_agents']) ? '' : ' AND ta.notinit_count <> ta.total_count';
if ($this->getEmptyModuleFilterStatus()) {
@ -294,6 +308,10 @@ class Tree
return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)';
}
if ($this->filter['statusModule'] === 'fired') {
return ' AND ta.fired_count > 0';
}
$field_filter = modules_get_counter_by_states($this->filter['statusModule']);
if ($field_filter === false) {
return ' AND 1=0';
@ -333,6 +351,11 @@ class Tree
protected function getModuleStatusFilterFromTestado($state=false, $without_ands=false)
{
if ($this->filter['statusModule'] === 'fired') {
$this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
$this->filter['statusModule'] = -1;
}
$selected_status = ($state !== false && $state !== self::TV_DEFAULT_AGENT_STATUS) ? $state : $this->filter['statusModule'];
$filter = [modules_get_state_condition($selected_status)];
@ -811,6 +834,11 @@ class Tree
protected function processAgent(&$agent, $server=false)
{
if ($this->filter['statusModule'] === 'fired') {
$this->filter['statusModuleOriginal'] = $this->filter['statusModule'];
$this->filter['statusModule'] = -1;
}
global $config;
$agent['type'] = 'agent';

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC230413';
$build_version = 'PC230503';
$pandora_version = 'v7.0NG.770';
// Do not overwrite default timezone set if defined.

View File

@ -813,6 +813,7 @@ define('AUDIT_LOG_SERVICE_MANAGEMENT', 'Service management');
define('AUDIT_LOG_INCIDENT_MANAGEMENT', 'Incident management');
define('AUDIT_LOG_UMC', 'Warp Manager');
define('AUDIT_LOG_NMS_VIOLATION', 'NMS Violation');
define('AUDIT_LOG_ENTERPRISE_VIOLATION', 'Enterprise Violation');
// MIMEs.
define(

View File

@ -3908,7 +3908,14 @@ function series_type_graph_array($data, $show_elements_graph)
$type_graph = $show_elements_graph['type_graph'];
}
$color_series = color_graph_array();
if (isset($show_elements_graph['array_colors']) === true
&& empty($show_elements_graph['array_colors']) === false
&& is_array($show_elements_graph['array_colors']) === true
) {
$color_series = $show_elements_graph['array_colors'];
} else {
$color_series = color_graph_array();
}
if ($show_elements_graph['id_widget_dashboard']) {
$opcion = unserialize(
@ -4050,7 +4057,7 @@ function series_type_graph_array($data, $show_elements_graph)
$name_legend .= ' * '.$value['weight'].') ';
}
$data_return['legend'][$key] = $name_legend;
$data_return['legend'][$key] = '<span style="font-size: 9pt; font-weight: bolder;">'.$name_legend.'</span>';
if ((int) $value['min'] === PHP_INT_MAX) {
$value['min'] = 0;
}
@ -4059,28 +4066,28 @@ function series_type_graph_array($data, $show_elements_graph)
$value['max'] = 0;
}
$data_return['legend'][$key] .= __('Min:').remove_right_zeros(
$data_return['legend'][$key] .= '<span class="legend-font-small">'.__('Min').' </span><span class="bolder">'.remove_right_zeros(
number_format(
$value['min'],
$config['graph_precision'],
$config['csv_decimal_separator'],
$config['csv_decimal_separator'] == ',' ? '.' : ','
)
).' '.__('Max:').remove_right_zeros(
).' '.$value['unit'].'</span>&nbsp;<span class="legend-font-small">'.__('Max').' </span><span class="bolder">'.remove_right_zeros(
number_format(
$value['max'],
$config['graph_precision'],
$config['csv_decimal_separator'],
$config['csv_decimal_separator'] == ',' ? '.' : ','
)
).' '._('Avg:').remove_right_zeros(
).' '.$value['unit'].'</span>&nbsp;<span class="legend-font-small">'._('Avg.').' </span><span class="bolder">'.remove_right_zeros(
number_format(
$value['avg'],
$config['graph_precision'],
$config['csv_decimal_separator'],
$config['csv_decimal_separator'] == ',' ? '.' : ','
)
).' '.$str;
).' '.$value['unit'].'</span>&nbsp;'.$str;
if ($show_elements_graph['compare'] == 'overlapped'
&& $key == 'sum2'
@ -4122,9 +4129,9 @@ function series_type_graph_array($data, $show_elements_graph)
$name_legend .= $value['module_name'].': ';
}
$data_return['legend'][$key] = $name_legend;
$data_return['legend'][$key] = '<span style="font-size: 9pt; font-weight: bolder;">'.$name_legend.'</span>';
if ($show_elements_graph['type_mode_graph']) {
$data_return['legend'][$key] .= __('Min:');
$data_return['legend'][$key] .= '<span class="legend-font-small">'.__('Min:').' </span><span class="bolder">';
$data_return['legend'][$key] .= remove_right_zeros(
number_format(
$value['min'],
@ -4132,8 +4139,8 @@ function series_type_graph_array($data, $show_elements_graph)
$config['decimal_separator'],
$config['thousand_separator']
)
);
$data_return['legend'][$key] .= ' '.__('Max:');
).' '.$value['unit'];
$data_return['legend'][$key] .= '</span>&nbsp;<span class="legend-font-small">'.__('Max:').' </span><span class="bolder">';
$data_return['legend'][$key] .= remove_right_zeros(
number_format(
$value['max'],
@ -4141,8 +4148,8 @@ function series_type_graph_array($data, $show_elements_graph)
$config['decimal_separator'],
$config['thousand_separator']
)
);
$data_return['legend'][$key] .= ' '._('Avg:');
).' '.$value['unit'];
$data_return['legend'][$key] .= '</span>&nbsp;<span class="legend-font-small">'._('Avg:').' </span><span class="bolder">';
$data_return['legend'][$key] .= remove_right_zeros(
number_format(
$value['avg'],
@ -4150,7 +4157,7 @@ function series_type_graph_array($data, $show_elements_graph)
$config['decimal_separator'],
$config['thousand_separator']
)
).' '.$str;
).' '.$value['unit'].' </span>&nbsp;'.$str;
}
if ($show_elements_graph['compare'] == 'overlapped'
@ -4164,21 +4171,21 @@ function series_type_graph_array($data, $show_elements_graph)
} else if (strpos($key, 'event') !== false) {
$data_return['series_type'][$key] = 'points';
if ($show_elements_graph['show_events']) {
$data_return['legend'][$key] = __('Events').' '.$str;
$data_return['legend'][$key] = '<span style="font-size: 9pt; font-weight: bolder;">'.__('Events').'</span>'.$str;
}
$data_return['color'][$key] = $color_series['event'];
} else if (strpos($key, 'alert') !== false) {
$data_return['series_type'][$key] = 'points';
if ($show_elements_graph['show_alerts']) {
$data_return['legend'][$key] = __('Alert').' '.$str;
$data_return['legend'][$key] = '<span style="font-size: 9pt; font-weight: bolder;">'.__('Alert').'</span>'.$str;
}
$data_return['color'][$key] = $color_series['alert'];
} else if (strpos($key, 'unknown') !== false) {
$data_return['series_type'][$key] = 'unknown';
if ($show_elements_graph['show_unknown']) {
$data_return['legend'][$key] = __('Unknown').' '.$str;
$data_return['legend'][$key] = '<span style="font-size: 9pt; font-weight: bolder;">'.__('Unknown').'</span>'.$str;
}
$data_return['color'][$key] = $color_series['unknown'];
@ -4186,7 +4193,7 @@ function series_type_graph_array($data, $show_elements_graph)
$data_return['series_type'][$key] = 'percentil';
if ($show_elements_graph['percentil']) {
if ($show_elements_graph['unit']) {
$name_legend = __('Percentil').' ';
$name_legend = '<span style="font-size: 9pt; font-weight: bolder;">'.__('Percentil').'</span>';
$name_legend .= $config['percentil'].'º ';
$name_legend .= __('of module').' ';
$name_legend .= $value['agent_alias'].' / ';

View File

@ -13090,10 +13090,18 @@ function api_set_create_event($id, $trash1, $other, $returnType)
if ($other['data'][18] != '') {
$values['id_extra'] = $other['data'][18];
$sql_validation = 'SELECT id_evento FROM tevento where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
$sql_validation = 'SELECT id_evento,estado FROM tevento where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
$validation = db_get_all_rows_sql($sql_validation);
if ($validation) {
foreach ($validation as $val) {
if ((bool) $config['keep_in_process_status_extra_id'] === true
&& (int) $val['estado'] === EVENT_STATUS_INPROCESS
&& (int) $values['status'] === 0
) {
$values['status'] = 2;
}
api_set_validate_event_by_id($val['id_evento']);
}
}

View File

@ -370,6 +370,10 @@ function config_update_config()
$error_update[] = __('alias_as_name');
}
if (config_update_value('keep_in_process_status_extra_id', get_parameter('keep_in_process_status_extra_id'), true) === false) {
$error_update[] = __('keep_in_process_status_extra_id');
}
if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) {
$error_update[] = __('Console log enabled');
}
@ -1222,6 +1226,10 @@ function config_update_config()
$error_update[] = __('Mobile view not allow visual console orientation');
}
if (config_update_value('display_item_frame', (int) get_parameter('display_item_frame'), true) === false) {
$error_update[] = __('Display item frame on alert triggered');
}
if (config_update_value('ser_menu_items', (int) get_parameter('ser_menu_items', 10), true) === false) {
$error_update[] = __('Default line menu items for the Services');
}
@ -2343,6 +2351,10 @@ function config_process_config()
config_update_value('alias_as_name', 0);
}
if (!isset($config['keep_in_process_status_extra_id'])) {
config_update_value('keep_in_process_status_extra_id', 0);
}
if (!isset($config['console_log_enabled'])) {
config_update_value('console_log_enabled', 0);
}
@ -3417,6 +3429,10 @@ function config_process_config()
config_update_value('mobile_view_orientation_vc', 0);
}
if (isset($config['display_item_frame']) === false) {
config_update_value('display_item_frame', 1);
}
if (!isset($config['agent_size_text_small'])) {
config_update_value('agent_size_text_small', 18);
}

View File

@ -2523,8 +2523,8 @@ function events_print_event_table(
$i = 0;
$table->head[$i] = '<span>'.__('Type').'</span>';
$table->headstyle[$i] = 'width: 3%;text-align: center;';
$table->style[$i++] = 'text-align: center;';
$table->headstyle[$i] = 'width: 3%;text-align: left;';
$table->style[$i++] = 'text-align: left;';
$table->head[$i] = '<span>'.__('Event name').'</span>';
$table->headstyle[$i] = '';
@ -2541,12 +2541,12 @@ function events_print_event_table(
$table->style[$i++] = 'padding: 0 5px;word-break: break-word;';
$table->head[$i] = '<span>'.__('Status').'</span>';
$table->headstyle[$i] = 'width: 150px;text-align: center;';
$table->style[$i++] = 'padding: 0 5px;text-align: center;';
$table->headstyle[$i] = 'width: 150px;text-align: left;';
$table->style[$i++] = 'padding: 0 5px;text-align: left;';
$table->head[$i] = "<span title='".__('Validated')."'>".__('V.').'</span>';
$table->headstyle[$i] = 'width: 1%;text-align: center;';
$table->style[$i++] = 'text-align: center;';
$table->headstyle[$i] = 'width: 1%;text-align: left;';
$table->style[$i++] = 'text-align: left;';
$all_groups = [];
if ($agent_id != 0) {
@ -2730,7 +2730,7 @@ function events_print_type_img(
[
'title' => events_print_type_description($type, true),
'class' => $style,
'style' => 'margin: 0 auto;'.((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
],
true
);
@ -5122,7 +5122,7 @@ function events_page_general($event)
&& count($table_data[$i]) === 2
) {
$table_general->colspan[$i][1] = 2;
$table_general->style[2] = 'text-align:center; width:10%;';
$table_general->style[2] = 'text-align:left; width:10%;';
}
}
@ -5204,7 +5204,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
$comments = (empty($groupedComments) === true) ? $event['user_comment'] : $groupedComments;
if (empty($comments) === true) {
$table_comments->style[0] = 'text-align:center;';
$table_comments->style[0] = 'text-align:left;';
$table_comments->colspan[0][0] = 2;
$data = [];
$data[0] = __('There are no comments');
@ -5272,7 +5272,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
'<b>%s %s %s%s</b>',
$c['action'],
__('by'),
get_user_fullname($c['id_user']).' ('.$c['id_user'].')',
get_user_fullname(io_safe_input($c['id_user'])).' ('.io_safe_input($c['id_user']).')',
$eventIdExplanation
);

View File

@ -833,6 +833,10 @@ function grafico_modulo_sparse($params)
$params['basic_chart'] = false;
}
if (isset($params['array_colors']) === false) {
$params['array_colors'] = false;
}
// If is metaconsole set 10pt size value.
if (is_metaconsole()) {
$font_size = '10';
@ -5237,7 +5241,7 @@ function graph_monitor_wheel($width=550, $height=600, $filter=false)
'name' => __('Main node'),
'type' => 'center_node',
'children' => iterate_group_array($data_groups, $data_agents),
'color' => '#3F3F3F',
'color' => ($config['style'] === 'pandora_black') ? '#111' : '#FFF',
];
if (empty($graph_data['children'])) {

View File

@ -251,6 +251,22 @@ function groups_check_used($idGroup)
$return['tables'][] = __('Network maps');
}
switch ($config['dbtype']) {
case 'mysql':
case 'postgresql':
$numRows = db_get_num_rows('SELECT * FROM talert_snmp WHERE id_group = '.$idGroup.';');
break;
case 'oracle':
$numRows = db_get_num_rows('SELECT * FROM talert_snmp WHERE id_group = '.$idGroup);
break;
}
if ($numRows > 0) {
$return['return'] = true;
$return['tables'][] = __('SNMP alerts');
}
$hookEnterprise = enterprise_include_once('include/functions_groups.php');
if ($hookEnterprise !== ENTERPRISE_NOT_HOOK) {
$returnEnterprise = enterprise_hook('groups_check_used_group_enterprise', [$idGroup]);

View File

@ -77,7 +77,7 @@ function html_debug_print($var, $file='', $oneline=false)
fprintf($f, '%s', $output);
fclose($f);
} else {
echo '<pre class="bg_white pdd_1em zindex10000">'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n";
echo '<pre class="bg_white pdd_1em zindex10000 relative-mobile">'.date('Y/m/d H:i:s').' ('.gettype($var).') '.$more_info."\n";
print_r($var);
echo '</pre>';
}
@ -2130,10 +2130,7 @@ function html_print_extended_select_for_time(
$fields[$selected] = human_time_description_raw($selected, true);
}
if (empty($nothing) === true
&& (empty($selected) === true
|| $selected === '0')
) {
if (empty($nothing) === true && (is_int($selected) === true)) {
$selected = 300;
}
@ -2248,6 +2245,13 @@ function html_print_extended_select_for_time(
$('#".$uniq_name."_manual').show();
$('#".$uniq_name."_default').hide();
}
if ($('#text-".$uniq_name."_text').val() === '0') {
setTimeout(() => {
$('#".$uniq_name."_manual').hide();
$('#".$uniq_name."_default').show();
}, 100);
}
</script>";
$returnString = ob_get_clean();
@ -2880,6 +2884,7 @@ function html_print_input_password(
$class='',
$autocomplete='off',
$hide_div_eye=false,
$div_class=''
) {
if ($maxlength == 0) {
$maxlength = 255;
@ -2910,7 +2915,7 @@ function html_print_input_password(
}
}
return '<div class="relative container-div-input-password">'.html_print_input_text_extended($name, $value, 'password-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, true, '', $autocomplete, false, $hide_div_eye).'</div>';
return '<div class="relative container-div-input-password '.$div_class.'">'.html_print_input_text_extended($name, $value, 'password-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, true, '', $autocomplete, false, $hide_div_eye).'</div>';
}
@ -6435,7 +6440,11 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
[$id_agente]
);
$name = 'secondary_groups_selected'.$options['extra_id'];
if ($options['selected_post'] !== null) {
$secondary_groups_selected['plain'] = $options['selected_post'];
}
$name = 'secondary_groups_selected[]'.$options['extra_id'];
if ($options['only_select'] === true) {
$name = 'secondary_groups'.$options['extra_id'].'[]';
}
@ -6455,7 +6464,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
$name,
// Selected.
// No select any by default.
$secondary_groups_selected['for_select'],
$secondary_groups_selected['plain'],
// Script.
// Javascript onChange code.
'',

View File

@ -36,7 +36,8 @@ function inventory_get_data(
$return_mode=false,
$order_by_agent=false,
$node='',
$pagination_url_parameters=[]
$pagination_url_parameters=[],
$regular_expression=''
) {
global $config;
@ -268,7 +269,15 @@ function inventory_get_data(
$i++;
}
$data[] = $temp_row;
if ($regular_expression !== '') {
if (is_array(preg_grep('/'.$regular_expression.'/', $temp_row))) {
if (count(preg_grep('/'.$regular_expression.'/', $temp_row)) > 0) {
$data[] = $temp_row;
}
}
} else {
$data[] = $temp_row;
}
}
}

View File

@ -585,7 +585,9 @@ function menu_add_extras(&$menu)
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=wizard']['text'] = __('Templates wizard');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=new']['text'] = __('New custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=edit']['text'] = __('Edit custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=delete_report']['text'] = __('Remove custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=list_items&action=edit']['text'] = __('List items');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=item_editor&action=new']['text'] = __('Edit item');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=edit']['text'] = __('Wizard');

View File

@ -570,7 +570,7 @@ function network_components_get_name($id_network_component)
return false;
}
return @db_get_value('name', 'tnetwork_component', 'id', $id_network_component);
return @db_get_value('name', 'tnetwork_component', 'id_nc', $id_network_component);
}

View File

@ -1118,7 +1118,7 @@ function notifications_print_dropdown_element($message_info)
$message_info['id_mensaje'],
messages_get_url($message_info['id_mensaje']),
$target,
html_print_image('images/'.$message_info['icon'], true),
html_print_image('images/info.svg', true, ['style' => 'height: 40px;margin-left: -20px;margin-top: -40px;']),
io_safe_output($message_info['subject']),
$body_preview
);

View File

@ -232,3 +232,97 @@ function os_get_icon($id_os)
{
return db_get_value('icon_name', 'tconfig_os', 'id_os', (int) $id_os);
}
/**
* Transform the old icon url.
*
* @param string $url_icon Icon url .
*
* @return string
*/
function os_transform_url_icon($url_icon)
{
$return = substr($url_icon, 0, strpos($url_icon, basename($url_icon)));
switch (basename($url_icon)) {
case 'android.png':
$return .= 'android@os.svg';
break;
case 'so_mac.png':
$return .= 'apple@os.svg';
break;
case 'so_cisco.png':
$return .= 'cisco@os.svg';
break;
case 'so_aix.png':
$return .= 'aix@os.svg';
break;
case 'so_win.png':
$return .= 'windows@os.svg';
break;
case 'so_vmware.png':
$return .= 'vmware@os.svg';
break;
case 'so_solaris.png':
$return .= 'solaris@os.svg';
break;
case 'so_linux.png':
$return .= 'linux@os.svg';
break;
case 'so_bsd.png':
$return .= 'freebsd@os.svg';
break;
case 'so_cluster.png':
$return .= 'cluster@os.svg';
break;
case 'so_other.png':
$return .= 'other-OS@os.svg';
break;
case 'so_switch.png':
$return .= 'switch@os.svg';
break;
case 'so_mainframe.png':
$return .= 'mainframe@os.svg';
break;
case 'so_hpux.png':
case 'server_hpux.png':
$return .= 'HP@os.svg';
break;
case 'so_router.png':
case 'router.png':
$return .= 'routers@os.svg';
break;
case 'embedded.png':
$return .= 'embedded@os.svg';
break;
case 'network.png':
$return .= 'network-server@os.svg';
break;
case 'satellite.png':
$return .= 'satellite@os.svg';
break;
default:
$return = $url_icon;
break;
}
return $return;
}

View File

@ -3170,6 +3170,7 @@ function reporting_inventory($report, $content, $type)
$date = $es['date'];
$description = $content['description'];
$inventory_regular_expression = $es['inventory_regular_expression'];
switch ($type) {
case 'data':
@ -3179,7 +3180,11 @@ function reporting_inventory($report, $content, $type)
$date,
'',
false,
'csv'
'csv',
false,
'',
[],
$inventory_regular_expression
);
break;
@ -3190,7 +3195,11 @@ function reporting_inventory($report, $content, $type)
$date,
'',
false,
'hash'
'hash',
false,
'',
[],
$inventory_regular_expression
);
break;
}
@ -12121,6 +12130,70 @@ function reporting_get_stats_indicators($data, $width=280, $height=20, $html=tru
}
function reporting_get_stats_indicators_mobile($data, $width=280, $height=20, $html=true)
{
$table_ind = html_get_predefined_table();
$servers = [];
$servers['all'] = (int) db_get_value('COUNT(id_server)', 'tserver');
$servers['up'] = (int) servers_check_status();
$servers['down'] = ($servers['all'] - $servers['up']);
if ($servers['all'] == 0) {
$servers['health'] = 0;
} else {
$servers['health'] = ($servers['up'] / ($servers['all'] / 100));
}
$return = [];
$color = get_color_progress_mobile($servers['health']);
$return['server_health'] = [
'title' => __('Server health'),
'graph' => ui_progress($servers['health'], '90%', '.8', $color, true, '&nbsp;', false),
];
$color = get_color_progress_mobile($data['monitor_health']);
$return['monitor_health'] = [
'title' => __('Monitor health'),
'graph' => ui_progress($data['monitor_health'], '90%', '.8', $color, true, '&nbsp;', false),
];
$color = get_color_progress_mobile($data['module_sanity']);
$return['module_sanity'] = [
'title' => __('Module sanity'),
'graph' => ui_progress($data['module_sanity'], '90%', '.8', $color, true, '&nbsp;', false),
];
$color = get_color_progress_mobile($data['alert_level']);
$return['alert_level'] = [
'title' => __('Alert level'),
'graph' => ui_progress($data['alert_level'], '90%', '.8', $color, true, '&nbsp;', false),
];
return $return;
}
function get_color_progress_mobile($value)
{
$color = '';
if ((int) $value > 66) {
$color = '#82B92E';
}
if ((int) $value < 66) {
$color = '#FCAB10';
}
if ((int) $value < 33) {
$color = '#ED474A';
}
return $color;
}
function reporting_get_stats_alerts($data, $links=false)
{
global $config;

View File

@ -1041,11 +1041,11 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
$table1->class = 'info_table';
$table1->align = [];
$table1->align[0] = 'center';
$table1->align[0] = 'left';
if ($item['show_summary_group']) {
$table1->align[3] = 'center';
$table1->align[3] = 'left';
} else {
$table1->align[2] = 'center';
$table1->align[2] = 'left';
}
$table1->data = [];
@ -1299,7 +1299,7 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
$table1->class = 'info_table';
$table1->data = [];
$table1->head = [];
$table1->align = 'left';
$table1->align[0] = 'left';
if ($show_summary_group) {
$table1->head[0] = __('Status');
@ -1378,7 +1378,16 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
$custom_data = json_decode($event['custom_data'], true);
$custom_data_text = '';
foreach ($custom_data as $key => $value) {
$custom_data_text .= $key.' = '.$value.'<br>';
if (is_array($value)) {
$custom_data_text .= $key.' = ';
foreach ($value as $action) {
$custom_data_text .= $action.', ';
}
$custom_data_text = rtrim($custom_data_text, ', ').'<br>';
} else {
$custom_data_text .= $key.' = '.$value.'<br>';
}
}
$data[6] = $custom_data_text;
@ -1996,6 +2005,13 @@ function reporting_html_inventory($table, $item, $pdf=0)
&& is_array($type_modules) === true
) {
foreach ($type_modules as $key_type_module => $type_module) {
$print_table = true;
foreach ($type_module as $key => $module) {
if (count($module['data']) == 0) {
unset($type_module[$key]);
}
}
$table1 = new stdClass();
$table1->width = '99%';
$table1->class = 'info_table';
@ -2006,57 +2022,62 @@ function reporting_html_inventory($table, $item, $pdf=0)
if (isset($type_module) === true
&& is_array($type_module) === true
) {
foreach ($type_module as $key_type => $module) {
if (isset($module['data']) === true
&& is_array($module['data']) === true
) {
array_pop($module['data']);
foreach ($module['data'] as $k_module => $v_module) {
$str_key = $key_type_module.'-'.$key_type.'-'.$k_module;
$table1->head[0] = __('Agent');
$table1->head[1] = __('Module');
$table1->head[2] = __('Date');
$table1->headstyle[0] = 'text-align: left';
$table1->headstyle[1] = 'text-align: left';
$table1->headstyle[2] = 'text-align: left';
$table1->cellstyle[$str_key][0] = 'text-align: left;';
$table1->cellstyle[$str_key][1] = 'text-align: left;';
$table1->cellstyle[$str_key][2] = 'text-align: left;';
$table1->data[$str_key][0] = $module['agent_name'];
$table1->data[$str_key][1] = $key_type_module;
$dateModule = explode(' ', $module['timestamp']);
$table1->data[$str_key][2] = $dateModule[0];
if (isset($v_module) === true
&& is_array($v_module) === true
) {
foreach ($v_module as $k => $v) {
$table1->head[$k] = $k;
$table1->headstyle[$k] = 'text-align: left';
$table1->cellstyle[$str_key][$k] = 'text-align: left;';
if ($pdf === 0) {
$table1->data[$str_key][$k] = $v;
} else {
// Workaround to prevent table columns from growing indefinitely in PDFs.
$table1->data[$str_key][$k] = preg_replace(
'/([^\s]{30})(?=[^\s])/',
'$1'.'<br>',
$v
);
if (count($type_module) > 0) {
foreach ($type_module as $key_type => $module) {
if (isset($module['data']) === true
&& is_array($module['data']) === true
) {
foreach ($module['data'] as $k_module => $v_module) {
$str_key = $key_type_module.'-'.$key_type.'-'.$k_module;
$table1->head[0] = __('Agent');
$table1->head[1] = __('Module');
$table1->head[2] = __('Date');
$table1->headstyle[0] = 'text-align: left';
$table1->headstyle[1] = 'text-align: left';
$table1->headstyle[2] = 'text-align: left';
$table1->cellstyle[$str_key][0] = 'text-align: left;';
$table1->cellstyle[$str_key][1] = 'text-align: left;';
$table1->cellstyle[$str_key][2] = 'text-align: left;';
$table1->data[$str_key][0] = $module['agent_name'];
$table1->data[$str_key][1] = $key_type_module;
$dateModule = explode(' ', $module['timestamp']);
$table1->data[$str_key][2] = $dateModule[0];
if (isset($v_module) === true
&& is_array($v_module) === true
) {
foreach ($v_module as $k => $v) {
$table1->head[$k] = $k;
$table1->headstyle[$k] = 'text-align: left';
$table1->cellstyle[$str_key][$k] = 'text-align: left;';
if ($pdf === 0) {
$table1->data[$str_key][$k] = $v;
} else {
// Workaround to prevent table columns from growing indefinitely in PDFs.
$table1->data[$str_key][$k] = preg_replace(
'/([^\s]{30})(?=[^\s])/',
'$1'.'<br>',
$v
);
}
}
}
}
}
}
} else {
$print_table = false;
}
} else {
$print_table = false;
}
if ($pdf === 0) {
if ($pdf === 0 && $print_table === true) {
$table->colspan[$key_type_module]['cell'] = 3;
$table->data[$key_type_module]['cell'] = html_print_table(
$table1,
true
);
} else {
} else if ($print_table === true) {
$return_pdf .= html_print_table(
$table1,
true
@ -2620,16 +2641,14 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
$table1->width = '99%';
$table1->class = 'info_table';
$table1->align = [];
$table1->align[0] = 'center';
$table1->align[1] = 'center';
$table1->align[3] = 'center';
if ((bool) $item['show_custom_data'] === true) {
if ($item['show_summary_group']) {
$table1->align[7] = 'left';
} else {
$table1->align[6] = 'left';
}
}
$table1->align[0] = 'left';
$table1->align[1] = 'left';
$table1->align[2] = 'left';
$table1->align[3] = 'left';
$table1->align[4] = 'left';
$table1->align[5] = 'left';
$table1->align[6] = 'left';
$table1->align[7] = 'left';
$table1->data = [];
@ -2705,7 +2724,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
}
if ($item['show_summary_group']) {
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
$data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp']).'</font>';
} else {
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
}
@ -2714,7 +2733,16 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
$custom_data = json_decode($event['custom_data'], true);
$custom_data_text = '';
foreach ($custom_data as $key => $value) {
$custom_data_text .= $key.' = '.$value.'<br>';
if (is_array($value)) {
$custom_data_text .= $key.' = ';
foreach ($value as $action) {
$custom_data_text .= $action.', ';
}
$custom_data_text = rtrim($custom_data_text, ', ').'<br>';
} else {
$custom_data_text .= $key.' = '.$value.'<br>';
}
}
$data[] = $custom_data_text;
@ -4721,7 +4749,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
$table1->style[0] = 'overflow-wrap: break-word';
// Align percentage and checks resume.
$table1->align[2] = 'center';
$table1->align[2] = 'left';
$table1->data[$k_chart][0] = $chart['agent'];
$table1->data[$k_chart][0] .= '<br />';
$table1->data[$k_chart][0] .= $chart['module'];
@ -5988,7 +6016,7 @@ function reporting_get_events($data, $links=false)
$tooltip = ui_print_help_tip(
__(
"Event count corresponds to events within the last hour"
'Event count corresponds to events within the last hour'
),
true
);

View File

@ -522,7 +522,7 @@ function servers_get_rate($avg_interval, $num_modules)
*
* @return mixed False in case the server doesn't exist or an array with info.
*/
function servers_get_info($id_server=-1)
function servers_get_info($id_server=-1, $sql_limit=-1)
{
global $config;
@ -538,6 +538,14 @@ function servers_get_info($id_server=-1)
SELECT *
FROM tserver '.$select_id.'
ORDER BY server_type';
if ($sql_limit !== -1) {
$sql = '
SELECT *
FROM tserver '.$select_id.'
ORDER BY server_type'.$sql_limit;
}
$result = db_get_all_rows_sql($sql);
$time = get_system_time();
@ -996,12 +1004,14 @@ function servers_get_info($id_server=-1)
'SELECT UNIX_TIMESTAMP() - utimestamp
FROM trecon_task
WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep)
AND interval_sweep > 0
AND id_recon_server = '.$server['id_server']
);
$server['module_lag'] = db_get_sql(
'SELECT COUNT(id_rt)
FROM trecon_task
WHERE UNIX_TIMESTAMP() > (utimestamp + interval_sweep)
AND interval_sweep > 0
AND id_recon_server = '.$server['id_server']
);
} else {

View File

@ -1302,9 +1302,10 @@ function snmp_browser_create_modules_snmp(
$snmp3_auth_pass = $snmp_values['snmp3_browser_auth_pass'];
}
if (isset($snmp_values['snmp3_privacy_method']) === true) {
$snmp3_privacy_method = $snmp_values['snmp3_privacy_method'];
if (isset($snmp_values['snmp3_browser_privacy_method']) === true) {
$snmp3_privacy_method = $snmp_values['snmp3_browser_privacy_method'];
};
if (isset($snmp_values['snmp3_browser_privacy_pass']) === true) {
$snmp3_privacy_pass = $snmp_values['snmp3_browser_privacy_pass'];
}
@ -1376,9 +1377,9 @@ function snmp_browser_create_modules_snmp(
'id_module_group' => 3,
'id_modulo' => 2,
'id_plugin' => 0,
'plugin_user' => '',
'plugin_pass' => '',
'plugin_parameter' => '',
'plugin_user' => $snmp3_auth_user,
'plugin_pass' => $snmp3_auth_pass,
'plugin_parameter' => $snmp3_auth_method,
'macros' => '',
'max_timeout' => 0,
'max_retries' => 0,
@ -1394,9 +1395,9 @@ function snmp_browser_create_modules_snmp(
'max_critical' => 0,
'str_critical' => '',
'min_ff_event' => 0,
'custom_string_1' => '',
'custom_string_2' => '',
'custom_string_3' => '',
'custom_string_1' => $snmp3_privacy_method,
'custom_string_2' => $snmp3_privacy_pass,
'custom_string_3' => $snmp3_security_level,
'post_process' => 0,
'unit' => '',
'wizard_level' => 'nowizard',
@ -1435,9 +1436,9 @@ function snmp_browser_create_modules_snmp(
'id_module_group' => 3,
'id_modulo' => 2,
'id_plugin' => 0,
'plugin_user' => '',
'plugin_pass' => '',
'plugin_parameter' => '',
'plugin_user' => $snmp3_auth_user,
'plugin_pass' => $snmp3_auth_pass,
'plugin_parameter' => $snmp3_auth_method,
'macros' => '',
'max_timeout' => 0,
'max_retries' => 0,
@ -1453,9 +1454,9 @@ function snmp_browser_create_modules_snmp(
'max_critical' => 0,
'str_critical' => '',
'min_ff_event' => 0,
'custom_string_1' => '',
'custom_string_2' => '',
'custom_string_3' => '',
'custom_string_1' => $snmp3_privacy_method,
'custom_string_2' => $snmp3_privacy_pass,
'custom_string_3' => $snmp3_security_level,
'post_process' => 0,
'unit' => '',
'wizard_level' => 'nowizard',
@ -1496,9 +1497,9 @@ function snmp_browser_create_modules_snmp(
'snmp_community' => $community,
'id_module_group' => 3,
'id_plugin' => 0,
'plugin_user' => '',
'plugin_pass' => '',
'plugin_parameter' => '',
'plugin_user' => $snmp3_auth_user,
'plugin_pass' => $snmp3_auth_pass,
'plugin_parameter' => $snmp3_auth_method,
'macros' => '',
'max_timeout' => 0,
'max_retries' => 0,
@ -1514,9 +1515,9 @@ function snmp_browser_create_modules_snmp(
'max_critical' => 0,
'str_critical' => '',
'min_ff_event' => 0,
'custom_string_1' => '',
'custom_string_2' => '',
'custom_string_3' => '',
'custom_string_1' => $snmp3_privacy_method,
'custom_string_2' => $snmp3_privacy_pass,
'custom_string_3' => $snmp3_security_level,
'post_process' => 0,
'unit' => '',
'macros' => '',

View File

@ -712,7 +712,14 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
$output = '';
$icon = ($id_group > 0) ? (string) db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group) : 'unknown@groups.svg';
$icon = 'world@svg.svg';
if ($id_group > 0) {
$icon = db_get_value('icon', 'tgrupo', 'id_grupo', (int) $id_group);
if (empty($icon) === true) {
$icon = 'unknown@groups.svg';
}
}
$extension = pathinfo($icon, PATHINFO_EXTENSION);
if (empty($extension) === true) {
$icon .= '.png';
@ -1763,7 +1770,7 @@ function ui_require_javascript_file($name, $path='include/javascript/', $echo_ta
if (is_metaconsole()
&& (isset($config['requirements_use_base_url']) === false
|| $config['requirements_use_base_url'] === false)
|| $config['requirements_use_base_url'] === false) && $filename !== 'include/javascript/select2.min.js'
) {
$config['js'][$name] = '../../'.$filename;
} else {
@ -3871,7 +3878,7 @@ function ui_print_datatable(array $parameters)
$export_columns = ',columns: \'th:not(:last-child)\'';
}
if (isset($parameters['data_element']) === false) {
if (isset($parameters['data_element']) === false || isset($parameters['print_pagination_search_csv'])) {
if (isset($parameters['ajax_url'])) {
$type_data = 'ajax: {
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
@ -7050,23 +7057,20 @@ function ui_print_comments($comments)
}
}
$last_comment = [];
foreach ($comments_array as $comm) {
// Show the comments more recent first.
if (is_array($comm)) {
$order_utimestamp = array_reduce(
$comm,
function ($carry, $item) {
$carry[$item['utimestamp']] = $item;
return $carry;
}
);
$order_utimestamp = array_reduce(
$comments_array,
function ($carry, $item) {
foreach ($item as $k => $v) {
$carry[$v['utimestamp']] = $v;
}
$key_max_utimestamp = max(array_keys($order_utimestamp));
$last_comment = $order_utimestamp[$key_max_utimestamp];
return $carry;
}
}
);
$key_max_utimestamp = max(array_keys($order_utimestamp));
$last_comment = $order_utimestamp[$key_max_utimestamp];
if (empty($last_comment) === true) {
return '';
@ -7455,13 +7459,20 @@ function ui_get_inventory_module_add_form(
0,
'',
__('Select inventory module'),
0,
'',
true,
false,
false,
'w100p',
false,
'width: 100%'
'width: 100%',
false,
false,
false,
'',
false,
false,
true
)
);
} else {
@ -7556,81 +7567,95 @@ function ui_get_inventory_module_add_form(
$table->data['userpass-row'] = $row;
$row = [];
$row['hidden-title'] = '';
$row['hidden-input'] = html_print_input_hidden('hidden-custom-field-name', '', true);
$row['hidden-input'] .= html_print_input_hidden('hidden-custom-field-is-secure', 0, true);
$row['hidden-input'] .= html_print_input_text(
'hidden-custom-field-input',
'',
'',
25,
40,
true,
false,
false,
'',
'w93p'
);
$row['hidden-input'] .= html_print_image(
'images/delete.svg',
true,
[
'border' => '0',
'title' => __('Remove'),
'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter',
]
);
$table->data['hidden-custom-field-row'] = $row;
$table->data['hidden-custom-field-row'] = html_print_label_input_block(
'',
'<div class="agent_details_agent_data">'.html_print_input_hidden(
'hidden-custom-field-name',
'',
true
).html_print_input_hidden(
'hidden-custom-field-is-secure',
0,
true
).html_print_input_text(
'hidden-custom-field-input',
'',
'',
25,
40,
true,
false,
false,
'',
'w100p'
).html_print_image(
'images/delete.svg',
true,
[
'border' => '0',
'title' => __('Remove'),
'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter main_menu_icon',
]
).'</div>'
);
$table->colspan['hidden-custom-field-row'][0] = 2;
if ($custom_fields_enabled) {
foreach ($custom_fields as $i => $field) {
$row = [];
$row['title'] = '<b>'.$field['name'].'</b>';
$row['input'] = html_print_input_hidden(
'custom_fields['.$i.'][name]',
$field['name'],
true
);
$row['input'] .= html_print_input_hidden(
'custom_fields['.$i.'][secure]',
$field['secure'],
true
);
if ($field['secure']) {
$row['input'] .= html_print_input_password(
$secure = html_print_input_password(
'custom_fields['.$i.'][value]',
$field['value'],
io_safe_input($field['value']),
'',
25,
false,
40,
true
true,
false,
false,
'',
'off',
false,
'w100p'
);
} else {
$row['input'] .= html_print_input_text(
$secure = html_print_input_text(
'custom_fields['.$i.'][value]',
$field['value'],
io_safe_input($field['value']),
'',
25,
false,
40,
true
true,
false,
false,
'',
'w100p'
);
}
$row['input'] .= '<span>&nbsp;</span>';
$row['input'] .= html_print_image(
'images/delete.svg',
true,
[
'border' => '0',
'title' => __('Remove'),
'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter',
]
$table->colspan['custom-field-row-'.$i][0] = 2;
$table->data['custom-field-row-'.$i] = html_print_label_input_block(
$field['name'],
'<div class="agent_details_agent_data">'.html_print_input_hidden(
'custom_fields['.$i.'][name]',
$field['name'],
true
).html_print_input_hidden(
'custom_fields['.$i.'][secure]',
$field['secure'],
true
).$secure.html_print_image(
'images/delete.svg',
true,
[
'border' => '0',
'title' => __('Remove'),
'style' => 'cursor: pointer;',
'class' => 'remove-custom-field invert_filter main_menu_icon',
]
).'</div>'
);
$table->data['custom-field-row-'.$i] = $row;
}
}
@ -7689,46 +7714,50 @@ function ui_get_inventory_module_add_form(
$("#inventory-module-form-userpass-row").hide();
$("#inventory-module-form-custom-fields-row").show();
$("tr[id^=inventory-module-form-custom-field-row-]").show();
$('#inventory-module-form-custom-fields-button').show();
} else {
$("#inventory-module-form-userpass-row").show();
$("#inventory-module-form-custom-fields-row").hide();
$("tr[id^=inventory-module-form-custom-field-row-]").hide();
$('#inventory-module-form-custom-fields-button').hide();
}
}
function add_row_for_custom_field (fieldName, isSecure) {
var custom_fields_num = $("tr[id^=inventory-module-form-custom-field-row-]").length;
$("#inventory-module-form-hidden-custom-field-row")
.clone()
.prop("id", "inventory-module-form-custom-field-row-" + custom_fields_num)
.children("#inventory-module-form-hidden-custom-field-row-hidden-title")
.prop("id", "inventory-module-form-custom-field-row-title-" + custom_fields_num)
.html("<b>" + fieldName + "</b>")
.parent()
.children("#inventory-module-form-hidden-custom-field-row-hidden-input")
.prop("id", "inventory-module-form-custom-field-row-input-" + custom_fields_num)
.prop("colspan", 2)
.children("input[name=hidden-custom-field-name]")
.clone()
.prop("id", "inventory-module-form-custom-field-row-" + custom_fields_num)
.children("[id^='inventory-module-form-hidden-custom-field-row']") // go to TD
.prop("id", "inventory-module-form-hidden-custom-field-row-"+ custom_fields_num)
.children() // go to DIV
.find('label')
.html(fieldName)
.parent() // up to DIV padre
.find('div') //go to DIV no label
.children("[id^=hidden-hidden-custom-field-name]")
.prop("id", "custom-field-name-" + custom_fields_num)
.prop("name", "custom_fields[" + custom_fields_num + "][name]")
.val(fieldName)
.prop("value", fieldName)
.parent()
.children("input[name=hidden-custom-field-is-secure]")
.prop("id", "custom-field-is-secure-" + custom_fields_num)
.prop("name", "custom_fields[" + custom_fields_num + "][secure]")
.val(isSecure ? 1 : 0)
.parent()
.children("input[name=hidden-custom-field-input]")
.prop("id", "custom-field-input-" + custom_fields_num)
.prop("type", isSecure ? "password" : "text")
.prop("name", "custom_fields[" + custom_fields_num + "][value]")
.parent()
.children("img.remove-custom-field")
.click(remove_custom_field)
.parent()
.parent()
.insertBefore($("#inventory-module-form-custom-fields-row"))
.show();
.children("input[name=hidden-custom-field-is-secure]")
.prop("id", "custom-field-is-secure-" + custom_fields_num)
.prop("name", "custom_fields[" + custom_fields_num + "][secure]")
.val(isSecure ? 1 : 0)
.parent()
.children("input[name=hidden-custom-field-input]")
.prop("id", "custom-field-input-" + custom_fields_num)
.prop("type", isSecure ? "password" : "text")
.prop("name", "custom_fields[" + custom_fields_num + "][value]")
.parent()
.children("img.remove-custom-field")
.click(remove_custom_field)
.parent()
.parent()
.parent() // up to TD
.parent() // up to TR
.insertBefore($("#inventory-module-form-custom-fields-row"))
.show();
}
function add_custom_field () {

View File

@ -2062,7 +2062,8 @@ function pandoraFlotArea(
yaxes: [
{
tickFormatter: yFormatter,
position: "left"
position: "left",
minTickSize: 0.5
}
],
legend: {
@ -2462,12 +2463,13 @@ function pandoraFlotArea(
$.each(update_legend, function(index, value) {
if (typeof value[x - 1] !== "undefined") {
data_legend[index] =
" Min: " +
"<span class='legend-font-small'> Min: </span><span class='bolder'>" +
number_format(value[x - 1].min, 0, unit, short_data, divisor) +
" Max: " +
"</span><span class='legend-font-small'> Max: </span><span class='bolder'>" +
number_format(value[x - 1].max, 0, unit, short_data, divisor) +
" Avg: " +
number_format(value[x - 1].avg, 0, unit, short_data, divisor);
"</span><span class='legend-font-small'> Avg: </span><span class='bolder'>" +
number_format(value[x - 1].avg, 0, unit, short_data, divisor) +
"</span>";
} else {
data_legend[index] = " Min: " + 0 + " Max: " + 0 + " Avg: " + 0;
}
@ -2475,9 +2477,9 @@ function pandoraFlotArea(
if (typeof data_legend[series.label] !== "undefined") {
label_aux =
legend[series.label].split(": Min")[0] +
": " +
data_legend[series.label];
legend[series.label].split(
'<span class="legend-font-small">'
)[0] + data_legend[series.label];
$("#legend_" + graph_id + " .legendLabel")
.eq(i)
.html(label_aux);

View File

@ -272,6 +272,11 @@ function flot_area_graph(
style=' width: ".$params['width'].'px;
height: '.$params['height']."px;'></div>";
$legend_top = 10;
if (empty($params['show_legend']) === false) {
$legend_top = (int) $params['height'];
}
if ($params['menu']) {
$params['height'] = 100;
} else {
@ -280,13 +285,9 @@ function flot_area_graph(
if ((bool) $params['vconsole'] === false) {
$return .= '<div id="overview_'.$graph_id.'" class="overview_graph" style="margin:0px; margin-top:30px; margin-bottom:50px; width:'.$params['width'].'px; height: 200px;"></div>';
$legend_top = 10;
if (empty($params['show_legend']) === false) {
$legend_top = (20 + (count($legend) * 18));
}
if ($water_mark != '' && (bool) $params['dashboard'] === false) {
$return .= '<div id="watermark_'.$graph_id.'" style="position:absolute; top: '.$legend_top.'px; left: calc(100% - 100px);">';
$return .= '<div id="watermark_'.$graph_id.'" style="position:absolute; bottom: '.$legend_top.'px; left: calc(100% - 100px);">';
$return .= '<img id="watermark_image_'.$graph_id.'" src="'.$water_mark['url'].'">';
$return .= '</div>';
}

View File

@ -825,8 +825,7 @@ function sunburst(recipient, data, width, height, tooltip = true) {
if (height === "auto") {
height = width;
}
// var width = 960,
// height = 700;
var radius = Math.min(width, height) / 2;
var x = d3.scale.linear().range([0, 2 * Math.PI]);
@ -857,7 +856,11 @@ function sunburst(recipient, data, width, height, tooltip = true) {
return Math.max(0, y(d.y));
})
.outerRadius(function(d) {
return Math.max(0, y(d.y + d.dy));
if (d.children || d.depth === 4) {
return Math.max(0, y(d.y + d.dy));
} else {
return Math.max(0, y(d.y + d.dy)) + 20;
}
});
var g = svg
@ -879,6 +882,7 @@ function sunburst(recipient, data, width, height, tooltip = true) {
: color((d.children ? d : d.parent).name);
})
.style("cursor", "pointer")
.style("stroke-width", "0.2")
.on("click", click)
.on("mouseover", tooltip === "1" ? over_user : "")
.on("mouseout", out_user)
@ -888,23 +892,38 @@ function sunburst(recipient, data, width, height, tooltip = true) {
if (d.type === "central_service") {
return 0;
}
var ang = ((x(d.x + d.dx / 2) - Math.PI / 2) / Math.PI) * 180;
return ang > 90 ? 180 + ang : ang;
if (calculate_angle(d) < 20) {
return ang;
} else {
return Math.trunc(ang) == 90 || Math.trunc(ang) == 89
? ang - 90
: 90 + ang;
}
}
var text = g
.append("text")
.attr("transform", function(d) {
return (
"translate(" +
arc.centroid(d) +
")rotate(" +
computeTextRotation(d) +
")"
);
if (typeof d.show_name != "undefined" && d.show_name) {
return (
"translate(" +
arc.centroid(d) +
")rotate(" +
computeTextRotation(d) +
")"
);
}
})
.attr("x", function(d) {
return computeTextRotation(d) > 180 ? -40 : -30;
if (typeof d.show_name != "undefined" && d.show_name) {
if (calculate_angle(d) < 20) {
return (d.name.length + 15) * -1;
} else {
return (d.name.length + 25) * -1;
}
}
})
.attr("dx", "6") // margin
.attr("dy", function(d) {
@ -914,17 +933,30 @@ function sunburst(recipient, data, width, height, tooltip = true) {
return ".35em";
}) // vertical-align
.attr("opacity", function(d) {
if (
(typeof d.show_name != "undefined" && d.show_name) ||
d.type === "central_service"
)
if (typeof d.show_name != "undefined" && d.show_name) {
return 1;
else return 0;
} else {
return 0;
}
})
.text(function(d) {
if (d.name.length > 20) {
var resta = d.name.length - 12;
var string = d.name.slice(
d.name.length / 2 - resta / 2,
d.name.length / 2 + resta / 2
);
var split = d.name.split(`${string}`);
return `${split[0]}...${split[1]}`;
}
return d.name;
})
.style("font-size", "10px")
.style("font-size", "11px")
.style("fill", function(d) {
if (d.color !== "#82b92e") {
return "white";
}
})
// Makes svg elements invisible to events
.style("pointer-events", "none");
@ -972,7 +1004,11 @@ function sunburst(recipient, data, width, height, tooltip = true) {
);
})
.attr("x", function(d) {
return computeTextRotation(d) > 180 ? -40 : -30;
if (calculate_angle(d) < 20) {
return (d.name.length + 15) * -1;
} else {
return (d.name.length + 25) * -1;
}
})
.transition()
.duration(250)
@ -1074,6 +1110,15 @@ function sunburst(recipient, data, width, height, tooltip = true) {
function hide_tooltip() {
$("#tooltip").hide();
}
function calculate_angle(d) {
var start_angle = Math.max(0, Math.min(2 * Math.PI, x(d.x)));
start_angle = (start_angle * 180) / Math.PI;
var end_angle = Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
end_angle = (end_angle * 180) / Math.PI;
return end_angle - start_angle;
}
}
function createGauge(

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