diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index a49cc294bf..6433324056 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -528,23 +528,6 @@ ServerTokens Prod EO_CONFIG_F -# Add ws proxy options to apache. -cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD' -LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - -EO_HTTPD_MOD - -cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 - -EO_HTTPD_WSTUNNEL - # Temporal quitar htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess @@ -691,16 +674,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ -chmod +x /etc/init.d/pandora_websocket_engine - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> $LOGFILE - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> $LOGFILE - # Enable pandora ha service systemctl enable pandora_server --now &>> $LOGFILE execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server" diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index 72ee496fa0..e6af38ecde 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -394,8 +394,8 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ - https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm \ @@ -639,23 +639,6 @@ ServerTokens Prod EO_CONFIG_F -# Add ws proxy options to apache. -cat >> /etc/httpd/conf.modules.d/00-proxy.conf << 'EO_HTTPD_MOD' -LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - -EO_HTTPD_MOD - -cat >> /etc/httpd/conf.d/wstunnel.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 - -EO_HTTPD_WSTUNNEL - # Temporal quitar htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/images/.htaccess sed -i -e "s/php_flag engine off//g" $PANDORA_CONSOLE/attachment/.htaccess @@ -813,16 +796,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE" -chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE" - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE" - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> "$LOGFILE" - # Enable pandora ha service systemctl enable pandora_server --now &>> "$LOGFILE" execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server" diff --git a/extras/deploy-scripts/pandora_deploy_community_el9.sh b/extras/deploy-scripts/pandora_deploy_community_el9.sh index 70b473b49b..738833d774 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el9.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el9.sh @@ -386,8 +386,8 @@ console_dependencies=" \ mod_ssl \ libzstd \ openldap-clients \ - https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \ + https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \ https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm " execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" diff --git a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh index 6d0bb69d06..64beb74eb2 100644 --- a/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh +++ b/extras/deploy-scripts/pandora_deploy_community_ubuntu_2204.sh @@ -371,7 +371,7 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE" # Chrome rm -f /usr/bin/chromium-browser &>> "$LOGFILE" -CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb +CHROME_VERSION=google-chrome-stable_122.0.6261.128-1_amd64.deb execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome" execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome" execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink" @@ -601,6 +601,7 @@ EOF_PARAM a2enmod ssl &>> "$LOGFILE" a2enmod headers &>> "$LOGFILE" +a2enmod rewrite &>> "$LOGFILE" a2enconf ssl-params &>> "$LOGFILE" a2ensite default-ssl &>> "$LOGFILE" a2enconf ssl-params &>> "$LOGFILE" @@ -648,17 +649,6 @@ ServerTokens Prod EO_CONFIG_F -#Enable quickshell proxy -cat >> /etc/apache2/mods-enabled/00-proxy.conf << 'EO_HTTPD_WSTUNNEL' -ProxyRequests Off - - Require all granted - - -ProxyPass /ws ws://127.0.0.1:8080 -ProxyPassReverse /ws ws://127.0.0.1:8080 -EO_HTTPD_WSTUNNEL - # Fixing console permissions chmod 600 $PANDORA_CONSOLE/include/config.php &>> "$LOGFILE" chown -R www-data:www-data $PANDORA_CONSOLE &>> "$LOGFILE" @@ -813,16 +803,6 @@ EO_LRA chmod 0644 /etc/logrotate.d/pandora_server chmod 0644 /etc/logrotate.d/pandora_agent -# Add websocket engine start script. -mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE" -chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE" - -# Start Websocket engine -/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE" - -# Configure websocket to be started at start. -systemctl enable pandora_websocket_engine &>> "$LOGFILE" - # Enable pandora ha service execute_cmd "/etc/init.d/pandora_server start" "Starting Pandora FMS Server" systemctl enable pandora_server &>> "$LOGFILE" diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 4f49fb8cf5..45c7eb54bb 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -234,16 +234,6 @@ module_description Number of cron task files module_unit files module_end -# This module /var/log/syslog file, under the module name "syslog" -# And search for "ssh" string into it, sending only that information. -module_begin -module_name Syslog -module_description Search for ssh string into /var/log/syslog file -module_type log -module_regexp /var/log/syslog -module_pattern ssh -module_end - #Hardening plugin for security compliance analysis. Enable to use it. #module_begin #module_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150 @@ -316,9 +306,9 @@ module_plugin pandora_df # Extraction module example #module_begin -#module_name Collector -#module_description Logs extraction module +#module_name Syslog +#module_description Gets all logs from system messages #module_type log -#module_regexp /var/log/logfile.log +#module_regexp /var/log/messages #module_pattern .* #module_end \ No newline at end of file diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 0b8aeb6e0b..f6e51eb6f7 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -354,11 +354,11 @@ module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df.vbs" #module_description Postcondition test module #module_end -# Example of collector module +# Logs extraction #module_begin -#module_name Collector -#module_description Logs extraction module +#module_name Syslog +#module_description Gets all logs from system messages #module_type log -#module_regexp /var/log/logfile.log +#module_regexp C:\server\logs\messages #module_pattern .* #module_end \ No newline at end of file diff --git a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py index d9ac15f978..0fc119bb03 100644 --- a/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py +++ b/pandora_agents/plugins/windows/pandora_security_win/src/pandora_security_win.py @@ -1,6 +1,9 @@ +# -*- coding: utf-8 -*- + import wmi, sys, winreg, os, subprocess, json, re from datetime import datetime, timedelta - +import argparse +import configparser ## Define modules modules=[] @@ -333,22 +336,19 @@ def check_password_enforcement(): print("Failed to check password enforcement for users.", file=sys.stderr) -def check_login_audit_policy(): +def check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf): try: # Run the auditpol command to check the audit policy for Logon/Logoff - cmd_command = "auditpol /get /subcategory:Logon" - result = subprocess.run(cmd_command, shell=True, capture_output=True, text=True, check=True) - last_line = result.stdout.strip().split('\n')[-1] + cmd_command = f'auditpol /get /subcategory:"{auditpol_logon_category}"' + result = subprocess.run(cmd_command, shell=True, capture_output=True, text=False, check=True) + stdout = result.stdout.decode('cp850', errors='replace') + last_line = stdout.strip().split('\n')[-1] cleaned_line = re.sub(' +', ' ', last_line) # Interpret the result - if "Success and Failure" in result.stdout: + if auditpol_logon_success_conf in stdout: result = 1 - elif "Aciertos y errores" in result.stdout: - result = 1 - elif "No Auditing" in result.stdout: - result = 0 - elif "Sin auditoría" in result.stdout: + elif auditpol_logon_noaudit_conf in stdout: result = 0 else: print("Unable to determine audit policy for Logon/Logoff events.", file=sys.stderr) @@ -366,14 +366,38 @@ def check_login_audit_policy(): print("Failed to check audit policy using auditpol command.", file=sys.stderr) return +def parse_parameter(config=None, key="", default=""): + try: + return config.get("CONF", key) + except Exception as e: + return default if __name__ == "__main__": + + # Parse arguments + parser = argparse.ArgumentParser(description= "", formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('--conf', help='Path to configuration file', metavar='', required=False) + args = parser.parse_args() + config = configparser.ConfigParser() + + if(args.conf): + try: + with open(args.conf, 'r', encoding='utf-8') as f: + content = f.read() + config.read_string('[CONF]\n' + content) + except Exception as e: + print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr) + + auditpol_logon_category = parse_parameter(config, "auditpol_logon_category", "Logon") + auditpol_logon_success_conf = parse_parameter(config, "auditpol_logon_success_conf", "Success and Failure") + auditpol_logon_noaudit_conf = parse_parameter(config, "auditpol_logon_noaudit_conf", "No Auditing") + check_antivirus_status() check_locksreen_enables() get_windows_update_info() is_firewall_enabled() check_password_enforcement() - check_login_audit_policy() + check_login_audit_policy(auditpol_logon_category, auditpol_logon_success_conf, auditpol_logon_noaudit_conf) for module in modules: print_module(module, True) diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index b8f6941240..d0172175a9 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -163,26 +163,16 @@ module_end #module_absoluteinterval 7d #module_end -# This module parses /var/log/syslog file, under the module name "syslog" -# And search for "ssh" string into it, sending only that information. -module_begin -module_name Syslog -module_description Search for ssh string into /var/log/syslog file -module_type log -module_regexp /var/log/syslog -module_pattern ssh -module_end - # Plugin example # Plugin for inventory on the agent. # module_plugin inventory 1 cpu ram video nic hd cdrom software -# Extraction module example +# Logs extraction #module_begin -#module_name Collector -#module_description Logs extraction module +#module_name Syslog +#module_description Gets all logs from system messages #module_type log -#module_regexp /var/log/logfile.log +#module_regexp /var/log/messages #module_pattern .* #module_end \ No newline at end of file diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 6d6c530a45..1baa97d507 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -378,26 +378,16 @@ module_end #module_absoluteinterval 7d #module_end -# This module parses /var/log/syslog file, under the module name "syslog" -# And search for "ssh" string into it, sending only that information. -module_begin -module_name Syslog -module_description Log collection modules -module_type log -module_regexp /var/log/syslog -module_pattern ssh -module_end - # Plugin example # Plugin for inventory on the agent. # module_plugin inventory 1 cpu ram video nic hd cdrom software -# Extraction module example +# Logs extraction #module_begin -#module_name Collector -#module_description Logs extraction module +#module_name Syslog +#module_description Gets all logs from system messages #module_type log -#module_regexp /var/log/logfile.log +#module_regexp /var/log/messages #module_pattern .* #module_end \ No newline at end of file diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1a93e1bda0..c6c1a5d4ba 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.776-240402 +Version: 7.0NG.776-240415 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index dd97783482..5a5ba493a4 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.776-240402" +pandora_version="7.0NG.776-240415" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index b182045ac9..a146bb28d8 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -277,4 +277,10 @@ module_plugin grep_log /var/log/auth.log Syslog sshd # Log collection modules. Only for enterprise version, this will collect log files for forensic analysis. # This is for LOG monitoring, only on enterprise version -#module_plugin grep_log_module /var/log/messages Syslog \.\* +#module_begin +#module_name Syslog +#module_description Gets all logs from system messages +#module_type log +#module_regexp /var/log/messages +#module_pattern .* +#module_end diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 882be1bda8..ca2c414d9d 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -270,6 +270,9 @@ module_plugin pandora_netusage # Service autodiscovery plugin module_plugin autodiscover --default +# This plugin runs several security checks in a Linux system +# module_plugin perl /usr/share/pandora_agent/plugins/pandora_security_check --conf /usr/share/pandora_agent/plugins/pandora_security_check.conf + # Plugin for inventory on the agent. # module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route @@ -322,12 +325,3 @@ module_end #module_plugin /usr/share/pandora_agent/plugins/pandora_hardening -t 150 #module_absoluteinterval 7d #module_end - -# Extraction module example -#module_begin -#module_name Collector -#module_description Logs extraction module -#module_type log -#module_regexp /var/log/logfile.log -#module_pattern .* -#module_end \ No newline at end of file diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index f8917912c2..716b7a33d3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1039,7 +1039,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.776'; -use constant AGENT_BUILD => '240402'; +use constant AGENT_BUILD => '240415'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 87257d94e7..bc946945ea 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240402 +%define release 240415 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec index b10f85df8d..7b3b86bf3e 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el8.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240402 +%define release 240415 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec index 9c6a6060ee..0ea18b9521 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.el9.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240402 +%define release 240415 %define debug_package %{nil} Summary: Pandora FMS Linux agent, binary version diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec index 75e053f16e..8ec99fa455 100644 --- a/pandora_agents/unix/pandora_agent.redhat_bin.spec +++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec @@ -5,7 +5,7 @@ %define name pandorafms_agent_linux_bin %define source_name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240402 +%define release 240415 Summary: Pandora FMS Linux agent, binary version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 95cdfb9cb1..67d4db51aa 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.776 -%define release 240402 +%define release 240415 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 8b89c4b715..bb68b0547e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.776" -PI_BUILD="240402" +PI_BUILD="240415" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/plugins/pandora_security_check b/pandora_agents/unix/plugins/pandora_security_check index 0ad845639b..53022feba7 100644 --- a/pandora_agents/unix/plugins/pandora_security_check +++ b/pandora_agents/unix/plugins/pandora_security_check @@ -297,6 +297,10 @@ sub parse_configuration { $line =~ s/^\s+//; $line =~ s/\s+$//; + if($line =~ /^$/) { + next; + } + if ($line =~ /^\[($b_ports|$b_files|$b_passwords)\]$/) { $configuration_block = $1; } @@ -537,7 +541,6 @@ if ($check_files) { if ($can_check_files) { # Check each file integrity - my @errored_files; my @no_integrity_files; # Create unique check files list @@ -556,8 +559,6 @@ if ($check_files) { push @no_integrity_files, $file; } $integrity{$file_key} = $file_md5; - } else { - push @errored_files, $file; } } @@ -571,11 +572,6 @@ if ($check_files) { $value = 0; $desc = "Changed files found:\n" . join("\n", @no_integrity_files); } - - if (@errored_files) { - $value = 0; - $desc .= "\nUnable to check integrity of some files:\n" . join("\n", @errored_files); - } } print_xml_module('Files check status', 'generic_proc', $desc, $value); @@ -596,10 +592,15 @@ if ($check_passwords) { open my $shadow_fh, '<', $shadow_file; while (my $line = <$shadow_fh>) { chomp $line; + + if($line =~ /^$/) { + next; + } + my ($username, $password_hash, @rest) = split /:/, $line; # Skip users with no password hash - if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked") { + if ($password_hash ne "*" && $password_hash ne "!!" && $password_hash ne "!locked" && $password_hash ne "!*") { my $salt = substr($password_hash, 0, rindex($password_hash, '$') + 1); my $user_hash = crypt($username, $salt); if ($user_hash eq $password_hash) { diff --git a/pandora_agents/unix/plugins/pandora_security_check.conf b/pandora_agents/unix/plugins/pandora_security_check.conf new file mode 100644 index 0000000000..c48d94af4d --- /dev/null +++ b/pandora_agents/unix/plugins/pandora_security_check.conf @@ -0,0 +1,22 @@ +[PORTS] +22 +80 +443 +41121 +8080 + +[FILES] +/etc/httpd/httpd.conf +/etc/my.cnf +/etc/sudoers +/etc/passwd +/etc/hosts + +[PASSWORDS] +pandora +PANDORA +P4nd0r4 +password +root +linux +admin diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 1fc54530c5..b0faeeabbd 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -289,14 +289,6 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default #module_type generic_data_string #module_end -# Get logs from Application source. Need enterprise version. -#module_begin -#module_name Eventlog_Application -#module_type log -#module_logevent -#module_source Application -#module_end - # Example: get Network information using Agent plugin #module_plugin cscript //B "%ProgramFiles%\Pandora_Agent\util\nettraffic.vbs" @@ -533,10 +525,10 @@ module_plugin "%PROGRAMFILES%\Pandora_Agent\util\autodiscover.exe" --default # Logs extraction #module_begin -#module_name X_Server_log -#module_description Logs extraction module +#module_name Syslog +#module_description Gets all logs from system messages #module_type log -#module_regexp C:\server\logs\xserver.log +#module_regexp C:\server\logs\messages #module_pattern .* #module_end diff --git a/pandora_agents/win32/bin/util/pandora_security_win.conf b/pandora_agents/win32/bin/util/pandora_security_win.conf new file mode 100644 index 0000000000..7986220bb4 --- /dev/null +++ b/pandora_agents/win32/bin/util/pandora_security_win.conf @@ -0,0 +1,8 @@ +auditpol_logon_category = Logon +#auditpol_logon_category = Inicio de sesión + +auditpol_logon_success_conf = Success and Failure +#auditpol_logon_success_conf = Aciertos y errores + +auditpol_logon_noaudit_conf = No Auditing +#auditpol_logon_noaudit_conf = Sin auditoría \ No newline at end of file diff --git a/pandora_agents/win32/bin/util/pandora_security_win.exe b/pandora_agents/win32/bin/util/pandora_security_win.exe index a21f40faf6..6be32bc37c 100755 --- a/pandora_agents/win32/bin/util/pandora_security_win.exe +++ b/pandora_agents/win32/bin/util/pandora_security_win.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c58891fbd16bf80f288e0ff4751801aa02dbf4e6c914625b4d49a364c7e0b511 -size 7829249 +oid sha256:293dc77d39c303793a73bf83a2698c5886331f24b8abed4a40566474a64e3f60 +size 7735667 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 38490f2f6d..915940c8f4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240402} +{240415} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 33b0ea0cdf..8361ccfafc 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.776 Build 240402") +#define PANDORA_VERSION ("7.0NG.776 Build 240415") string pandora_path; string pandora_dir; @@ -53,6 +53,9 @@ Key_Value::parseLine (string str) { string trimmedstr; trimmedstr = trim (str); + if (trimmedstr == "") { + return; + } /* Check if the string has " */ pos = trimmedstr.find ("\""); diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c7fc47bd7b..02a4d1a9e5 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Pandora FMS" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.776(Build 240402))" + VALUE "ProductVersion", "(7.0NG.776(Build 240415))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b1fe76adcb..a29cfd48d9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240402 +Version: 7.0NG.776-240415 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index debdb72758..85a218609f 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.776-240402" +pandora_version="7.0NG.776-240415" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index a5dcf2cb0d..db90fe2fe4 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -75,23 +75,19 @@ if (empty($_REQUEST) === true) { } // Hash login process. -if (isset($_GET['loginhash']) === true) { - $loginhash_data = get_parameter('loginhash_data', ''); - $loginhash_user = str_rot13(get_parameter('loginhash_user', '')); - - if ($config['loginhash_pwd'] != '' - && $loginhash_data == md5( - $loginhash_user.io_output_password($config['loginhash_pwd']) - ) - ) { - db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']); - $_SESSION['id_usuario'] = $loginhash_user; - $config['id_user'] = $loginhash_user; +if (isset($_POST['auth_token']) === true && (bool) $config['JWT_signature'] !== false) { + include_once $config['homedir'].'/include/class/JWTRepository.class.php'; + $jwt = new JWTRepository($config['JWT_signature']); + if ($jwt->setToken($_POST['auth_token']) && $jwt->validate()) { + $id_user = $jwt->payload()->get('id_user'); + db_logon($id_user, $_SERVER['REMOTE_ADDR']); + $_SESSION['id_usuario'] = $id_user; + $config['id_user'] = $id_user; } else { include_once 'general/login_page.php'; db_pandora_audit( AUDIT_LOG_USER_REGISTRATION, - 'Loginhash failed', + 'Login token failed', 'system' ); while (ob_get_length() > 0) { diff --git a/pandora_console/api/documentation/swagger-ui-bundle.js b/pandora_console/api/documentation/swagger-ui-bundle.js index 69d6da74a6..c7d16e44f4 100644 --- a/pandora_console/api/documentation/swagger-ui-bundle.js +++ b/pandora_console/api/documentation/swagger-ui-bundle.js @@ -4675,8 +4675,9 @@ return ( "function" == typeof _ && "function" == typeof Symbol && - "symbol" == typeof _("foo") && - "symbol" == typeof Symbol("bar") && w() + "symbol" == typeof _("foo") && + "symbol" == typeof Symbol("bar") && + w() ); }; }, @@ -13386,7 +13387,9 @@ null != s && !w(s) ) || - j.test(s) || !x.test(s) || (null != i && s in Object(i)) + j.test(s) || + !x.test(s) || + (null != i && s in Object(i)) ); }; }, @@ -20230,7 +20233,8 @@ var i = s.memoizedState; if ( (null === i && - null !== (s = s.alternate) && (i = s.memoizedState), + null !== (s = s.alternate) && + (i = s.memoizedState), null !== i) ) return i.dehydrated; @@ -21697,7 +21701,8 @@ null !== ae && ((Z = ae), null !== X && - null != (ae = Kb(ee, X)) && U.push(tf(ee, ae, Z))), + null != (ae = Kb(ee, X)) && + U.push(tf(ee, ae, Z))), Y) ) break; @@ -21894,9 +21899,9 @@ } })(s, u)) && 0 < (_ = oe(_, "onBeforeInput")).length && - ((w = new fr("onBeforeInput", "beforeinput", null, u, w)), - j.push({ event: w, listeners: _ }), - (w.data = ce)); + ((w = new fr("onBeforeInput", "beforeinput", null, u, w)), + j.push({ event: w, listeners: _ }), + (w.data = ce)); } se(j, i); }); @@ -22535,8 +22540,8 @@ var U = s.alternate; null !== U && (P = (U = U.updateQueue).lastBaseUpdate) !== j && - (null === P ? (U.firstBaseUpdate = $) : (P.next = $), - (U.lastBaseUpdate = B)); + (null === P ? (U.firstBaseUpdate = $) : (P.next = $), + (U.lastBaseUpdate = B)); } if (null !== x) { var Y = w.baseState; @@ -22675,7 +22680,8 @@ ? s.shouldComponentUpdate(_, x, j) : !i.prototype || !i.prototype.isPureReactComponent || - !Ie(u, _) || !Ie(w, x); + !Ie(u, _) || + !Ie(w, x); } function ph(s, i, u) { var _ = !1, @@ -25167,11 +25173,11 @@ (s.sibling = null), 5 === s.tag && null !== (i = s.stateNode) && - (delete i[gn], - delete i[yn], - delete i[vn], - delete i[_n], - delete i[wn]), + (delete i[gn], + delete i[yn], + delete i[vn], + delete i[_n], + delete i[wn]), (s.stateNode = null), (s.return = null), (s.dependencies = null), @@ -25282,7 +25288,8 @@ case 15: if ( !Po && - null !== (_ = u.updateQueue) && null !== (_ = _.lastEffect) + null !== (_ = u.updateQueue) && + null !== (_ = _.lastEffect) ) { w = _ = _.next; do { @@ -26026,7 +26033,8 @@ return !0; })(w) && (2 === (i = Jk(s, _)) && - 0 !== (x = xc(s)) && ((_ = x), (i = Ok(s, x))), + 0 !== (x = xc(s)) && + ((_ = x), (i = Ok(s, x))), 1 === i)) ) throw ((u = Go), Lk(s, 0), Dk(s, _), Ek(s, yt()), u); @@ -28469,7 +28477,8 @@ return ( void 0 !== this._readableState && void 0 !== this._writableState && - this._readableState.destroyed && this._writableState.destroyed + this._readableState.destroyed && + this._writableState.destroyed ); }, set: function set(s) { @@ -29506,7 +29515,8 @@ return ( !!$.call(this, s) || (this === Writable && - s && s._writableState instanceof WritableState) + s && + s._writableState instanceof WritableState) ); } })) @@ -33989,7 +33999,8 @@ j = s; if ( "object" == typeof s && - (j = s[(_ = Object.keys(s)[0])]) && j._elem + (j = s[(_ = Object.keys(s)[0])]) && + j._elem ) return ( (j._elem.name = _), @@ -46937,10 +46948,11 @@ !!Jl(s) || (!!s && "object" == typeof s && - !_isString(s) && - (0 === s.length || - (s.length > 0 && - s.hasOwnProperty(0) && s.hasOwnProperty(s.length - 1)))) + !_isString(s) && + (0 === s.length || + (s.length > 0 && + s.hasOwnProperty(0) && + s.hasOwnProperty(s.length - 1)))) ); }); var sc = "undefined" != typeof Symbol ? Symbol.iterator : "@@iterator"; @@ -48536,10 +48548,10 @@ ? !(!s || "object" != typeof s || "string" != typeof s.uri) : ("undefined" != typeof File && s instanceof File) || ("undefined" != typeof Blob && s instanceof Blob) || - !!ArrayBuffer.isView(s) || - (null !== s && - "object" == typeof s && - "function" == typeof s.pipe) + !!ArrayBuffer.isView(s) || + (null !== s && + "object" == typeof s && + "function" == typeof s.pipe) ); } function isArrayOfFile(s, i) { @@ -49050,7 +49062,8 @@ "object" == typeof i && null !== i && "primitive" in i && - "function" == typeof i.primitive && i.primitive() === s, + "function" == typeof i.primitive && + i.primitive() === s, hasClass = (s, i) => "object" == typeof i && null !== i && @@ -58899,13 +58912,12 @@ const parameterEquals = (i, u) => !!s.isParameterElement(i) && !!s.isParameterElement(u) && - !!s.isStringElement(i.name) && - !!s.isStringElement(i.in) && - !!s.isStringElement(u.name) && - !!s.isStringElement(u.in) && - serializers_value(i.name) === - serializers_value(u.name) && - serializers_value(i.in) === serializers_value(u.in), + !!s.isStringElement(i.name) && + !!s.isStringElement(i.in) && + !!s.isStringElement(u.name) && + !!s.isStringElement(u.in) && + serializers_value(i.name) === serializers_value(u.name) && + serializers_value(i.in) === serializers_value(u.in), i = []; return { visitor: { @@ -62689,20 +62701,18 @@ He.createElement( "div", { className: "modal-ux-content" }, - j - .valueSeq() - .map((j, B) => - He.createElement(P, { - key: B, - AST: x, - definitions: j, - getComponent: u, - errSelectors: _, - authSelectors: s, - authActions: i, - specSelectors: w - }) - ) + j.valueSeq().map((j, B) => + He.createElement(P, { + key: B, + AST: x, + definitions: j, + getComponent: u, + errSelectors: _, + authSelectors: s, + authActions: i, + specSelectors: w + }) + ) ) ) ) @@ -65124,15 +65134,13 @@ He.createElement( "tbody", null, - s - .entrySeq() - .map(([s, i]) => - He.createElement(u, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + s.entrySeq().map(([s, i]) => + He.createElement(u, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) ) ) ) @@ -65560,15 +65568,13 @@ He.createElement(_e, { source: _.get("description") }) ), ie && le.size - ? le - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + ? le.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) : null, ae && _.get("content") ? He.createElement( @@ -66472,26 +66478,22 @@ ")" ), Z && et.size - ? et - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + ? et.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) : null, X && tt.size - ? tt - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + ? tt.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) : null ), He.createElement( @@ -68903,16 +68905,14 @@ He.createElement("span", { className: "brace-close" }, "}") ), ye.size - ? ye - .entrySeq() - .map(([s, i]) => - He.createElement(Re, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: "property" - }) - ) + ? ye.entrySeq().map(([s, i]) => + He.createElement(Re, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: "property" + }) + ) : null ); } @@ -69093,28 +69093,24 @@ ")" ), ae.size - ? ae - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: eI - }) - ) + ? ae.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: eI + }) + ) : null, P && ee.size - ? ee - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: eI - }) - ) + ? ee.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: eI + }) + ) : null, Z ? He.createElement(ce, { source: Z }) : null, ie && @@ -69448,12 +69444,13 @@ return ( !(s >= 55296 && s <= 57343) && !(s >= 64976 && s <= 65007) && - 65535 != (65535 & s) && - 65534 != (65535 & s) && - !(s >= 0 && s <= 8) && - 11 !== s && - !(s >= 14 && s <= 31) && - !(s >= 127 && s <= 159) && !(s > 1114111) + 65535 != (65535 & s) && + 65534 != (65535 & s) && + !(s >= 0 && s <= 8) && + 11 !== s && + !(s >= 14 && s <= 31) && + !(s >= 127 && s <= 159) && + !(s > 1114111) ); } function fromCodePoint(s) { @@ -71014,37 +71011,37 @@ return ( P !== $ + 2 && !(P + 1 >= U || 58 !== s.src.charCodeAt(++P)) && - (_ || - (P++, - s.env.footnotes || (s.env.footnotes = {}), - s.env.footnotes.refs || (s.env.footnotes.refs = {}), - (B = s.src.slice($ + 2, P - 2)), - (s.env.footnotes.refs[":" + B] = -1), - s.tokens.push({ - type: "footnote_reference_open", - label: B, - level: s.level++ - }), - (w = s.bMarks[i]), - (x = s.tShift[i]), - (j = s.parentType), - (s.tShift[i] = s.skipSpaces(P) - P), - (s.bMarks[i] = P), - (s.blkIndent += 4), - (s.parentType = "footnote"), - s.tShift[i] < s.blkIndent && - ((s.tShift[i] += s.blkIndent), - (s.bMarks[i] -= s.blkIndent)), - s.parser.tokenize(s, i, u, !0), - (s.parentType = j), - (s.blkIndent -= 4), - (s.tShift[i] = x), - (s.bMarks[i] = w), - s.tokens.push({ - type: "footnote_reference_close", - level: --s.level - })), - !0) + (_ || + (P++, + s.env.footnotes || (s.env.footnotes = {}), + s.env.footnotes.refs || (s.env.footnotes.refs = {}), + (B = s.src.slice($ + 2, P - 2)), + (s.env.footnotes.refs[":" + B] = -1), + s.tokens.push({ + type: "footnote_reference_open", + label: B, + level: s.level++ + }), + (w = s.bMarks[i]), + (x = s.tShift[i]), + (j = s.parentType), + (s.tShift[i] = s.skipSpaces(P) - P), + (s.bMarks[i] = P), + (s.blkIndent += 4), + (s.parentType = "footnote"), + s.tShift[i] < s.blkIndent && + ((s.tShift[i] += s.blkIndent), + (s.bMarks[i] -= s.blkIndent)), + s.parser.tokenize(s, i, u, !0), + (s.parentType = j), + (s.blkIndent -= 4), + (s.tShift[i] = x), + (s.bMarks[i] = w), + s.tokens.push({ + type: "footnote_reference_close", + level: --s.level + })), + !0) ); }, ["paragraph"] @@ -71107,32 +71104,32 @@ return ( !(j >= u) && !(s.tShift[j] < s.blkIndent) && - !(s.tShift[j] - s.blkIndent > 3) && - !((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) && - (45 === (_ = s.src.charCodeAt(w)) || 61 === _) && - ((w = s.skipChars(w, _)), - !((w = s.skipSpaces(w)) < x) && - ((w = s.bMarks[i] + s.tShift[i]), - (s.line = j + 1), - s.tokens.push({ - type: "heading_open", - hLevel: 61 === _ ? 1 : 2, - lines: [i, s.line], - level: s.level - }), - s.tokens.push({ - type: "inline", - content: s.src.slice(w, s.eMarks[i]).trim(), - level: s.level + 1, - lines: [i, s.line - 1], - children: [] - }), - s.tokens.push({ - type: "heading_close", - hLevel: 61 === _ ? 1 : 2, - level: s.level - }), - !0)) + !(s.tShift[j] - s.blkIndent > 3) && + !((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) && + (45 === (_ = s.src.charCodeAt(w)) || 61 === _) && + ((w = s.skipChars(w, _)), + !((w = s.skipSpaces(w)) < x) && + ((w = s.bMarks[i] + s.tShift[i]), + (s.line = j + 1), + s.tokens.push({ + type: "heading_open", + hLevel: 61 === _ ? 1 : 2, + lines: [i, s.line], + level: s.level + }), + s.tokens.push({ + type: "inline", + content: s.src.slice(w, s.eMarks[i]).trim(), + level: s.level + 1, + lines: [i, s.line - 1], + children: [] + }), + s.tokens.push({ + type: "heading_close", + hLevel: 61 === _ ? 1 : 2, + level: s.level + }), + !0)) ); } ], @@ -72276,31 +72273,31 @@ return ( !(P + 2 >= j) && 94 === s.src.charCodeAt(P) && - 91 === s.src.charCodeAt(P + 1) && - !(s.level >= s.options.maxNesting) && - ((u = P + 2), - !((_ = parseLinkLabel(s, P + 1)) < 0) && - (i || - (s.env.footnotes || (s.env.footnotes = {}), - s.env.footnotes.list || (s.env.footnotes.list = []), - (w = s.env.footnotes.list.length), - (s.pos = u), - (s.posMax = _), - s.push({ - type: "footnote_ref", - id: w, - level: s.level - }), - s.linkLevel++, - (x = s.tokens.length), - s.parser.tokenize(s), - (s.env.footnotes.list[w] = { - tokens: s.tokens.splice(x) - }), - s.linkLevel--), - (s.pos = _ + 1), - (s.posMax = j), - !0)) + 91 === s.src.charCodeAt(P + 1) && + !(s.level >= s.options.maxNesting) && + ((u = P + 2), + !((_ = parseLinkLabel(s, P + 1)) < 0) && + (i || + (s.env.footnotes || (s.env.footnotes = {}), + s.env.footnotes.list || (s.env.footnotes.list = []), + (w = s.env.footnotes.list.length), + (s.pos = u), + (s.posMax = _), + s.push({ + type: "footnote_ref", + id: w, + level: s.level + }), + s.linkLevel++, + (x = s.tokens.length), + s.parser.tokenize(s), + (s.env.footnotes.list[w] = { + tokens: s.tokens.splice(x) + }), + s.linkLevel--), + (s.pos = _ + 1), + (s.posMax = j), + !0)) ); } ], @@ -72326,27 +72323,27 @@ return ( _ !== P + 2 && !(_ >= j) && - (_++, - (u = s.src.slice(P + 2, _ - 1)), - void 0 !== s.env.footnotes.refs[":" + u] && - (i || - (s.env.footnotes.list || (s.env.footnotes.list = []), - s.env.footnotes.refs[":" + u] < 0 - ? ((w = s.env.footnotes.list.length), - (s.env.footnotes.list[w] = { label: u, count: 0 }), - (s.env.footnotes.refs[":" + u] = w)) - : (w = s.env.footnotes.refs[":" + u]), - (x = s.env.footnotes.list[w].count), - s.env.footnotes.list[w].count++, - s.push({ - type: "footnote_ref", - id: w, - subId: x, - level: s.level - })), - (s.pos = _), - (s.posMax = j), - !0)) + (_++, + (u = s.src.slice(P + 2, _ - 1)), + void 0 !== s.env.footnotes.refs[":" + u] && + (i || + (s.env.footnotes.list || (s.env.footnotes.list = []), + s.env.footnotes.refs[":" + u] < 0 + ? ((w = s.env.footnotes.list.length), + (s.env.footnotes.list[w] = { label: u, count: 0 }), + (s.env.footnotes.refs[":" + u] = w)) + : (w = s.env.footnotes.refs[":" + u]), + (x = s.env.footnotes.list[w].count), + s.env.footnotes.list[w].count++, + s.push({ + type: "footnote_ref", + id: w, + subId: x, + level: s.level + })), + (s.pos = _), + (s.posMax = j), + !0)) ); } ], @@ -72362,41 +72359,41 @@ return ( 60 === s.src.charCodeAt(P) && !((u = s.src.slice(P)).indexOf(">") < 0) && - ((_ = u.match(NI)) - ? !(II.indexOf(_[1].toLowerCase()) < 0) && - ((j = normalizeLink((x = _[0].slice(1, -1)))), - !!s.parser.validateLink(x) && - (i || - (s.push({ - type: "link_open", - href: j, - level: s.level - }), - s.push({ - type: "text", - content: x, - level: s.level + 1 - }), - s.push({ type: "link_close", level: s.level })), - (s.pos += _[0].length), - !0)) - : !!(w = u.match(PI)) && - ((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))), - !!s.parser.validateLink(j) && - (i || - (s.push({ - type: "link_open", - href: j, - level: s.level - }), - s.push({ - type: "text", - content: x, - level: s.level + 1 - }), - s.push({ type: "link_close", level: s.level })), - (s.pos += w[0].length), - !0))) + ((_ = u.match(NI)) + ? !(II.indexOf(_[1].toLowerCase()) < 0) && + ((j = normalizeLink((x = _[0].slice(1, -1)))), + !!s.parser.validateLink(x) && + (i || + (s.push({ + type: "link_open", + href: j, + level: s.level + }), + s.push({ + type: "text", + content: x, + level: s.level + 1 + }), + s.push({ type: "link_close", level: s.level })), + (s.pos += _[0].length), + !0)) + : !!(w = u.match(PI)) && + ((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))), + !!s.parser.validateLink(j) && + (i || + (s.push({ + type: "link_open", + href: j, + level: s.level + }), + s.push({ + type: "text", + content: x, + level: s.level + 1 + }), + s.push({ type: "link_close", level: s.level })), + (s.pos += w[0].length), + !0))) ); } ], @@ -72420,15 +72417,15 @@ return i >= 97 && i <= 122; })(u) ) && - !!(_ = s.src.slice(x).match(DI)) && - (i || - s.push({ - type: "htmltag", - content: s.src.slice(x, x + _[0].length), - level: s.level - }), - (s.pos += _[0].length), - !0)) + !!(_ = s.src.slice(x).match(DI)) && + (i || + s.push({ + type: "htmltag", + content: s.src.slice(x, x + _[0].length), + level: s.level + }), + (s.pos += _[0].length), + !0)) ); } ], @@ -73554,7 +73551,7 @@ return ( !(!s || !i) && !this.hasFullProtocolRegex.test(i) && - !this.hasWordCharAfterProtocolRegex.test(s) + !this.hasWordCharAfterProtocolRegex.test(s) ); }), (UrlMatchValidator.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//), @@ -75977,19 +75974,17 @@ ? He.createElement( "select", { "data-variable": s, onChange: $ }, - u - .get("enum") - .map(u => - He.createElement( - "option", - { - selected: u === w(i, s), - key: u, - value: u - }, - u - ) + u.get("enum").map(u => + He.createElement( + "option", + { + selected: u === w(i, s), + key: u, + value: u + }, + u ) + ) ) : He.createElement("input", { type: "text", @@ -80766,7 +80761,8 @@ const { examples: i, example: u, default: _ } = s; return ( !!(Array.isArray(i) && i.length >= 1) || - void 0 !== _ || void 0 !== u + void 0 !== _ || + void 0 !== u ); }, extractExample = s => { diff --git a/pandora_console/api/documentation/swagger-ui-es-bundle-core.js b/pandora_console/api/documentation/swagger-ui-es-bundle-core.js index a0770fdc9b..0897eadaf3 100644 --- a/pandora_console/api/documentation/swagger-ui-es-bundle-core.js +++ b/pandora_console/api/documentation/swagger-ui-es-bundle-core.js @@ -2323,7 +2323,8 @@ var ve = { return ( void 0 !== this._readableState && void 0 !== this._writableState && - this._readableState.destroyed && this._writableState.destroyed + this._readableState.destroyed && + this._writableState.destroyed ); }, set: function set(e) { @@ -3336,7 +3337,8 @@ var ve = { return ( !!c.call(this, e) || (this === Writable && - e && e._writableState instanceof WritableState) + e && + e._writableState instanceof WritableState) ); } })) @@ -10833,20 +10835,18 @@ var we = {}; Ke.default.createElement( "div", { className: "modal-ux-content" }, - s - .valueSeq() - .map((s, i) => - Ke.default.createElement(l, { - key: i, - AST: o, - definitions: s, - getComponent: r, - errSelectors: n, - authSelectors: e, - authActions: t, - specSelectors: a - }) - ) + s.valueSeq().map((s, i) => + Ke.default.createElement(l, { + key: i, + AST: o, + definitions: s, + getComponent: r, + errSelectors: n, + authSelectors: e, + authActions: t, + specSelectors: a + }) + ) ) ) ) @@ -13194,15 +13194,13 @@ var we = {}; Ke.default.createElement( "tbody", null, - e - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(r, { - key: `${e}-${t}`, - xKey: e, - xVal: t - }) - ) + e.entrySeq().map(([e, t]) => + Ke.default.createElement(r, { + key: `${e}-${t}`, + xKey: e, + xVal: t + }) + ) ) ) ) @@ -13627,15 +13625,13 @@ var we = {}; Ke.default.createElement(x, { source: n.get("description") }) ), g && y.size - ? y - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(v, { - key: `${e}-${t}`, - xKey: e, - xVal: t - }) - ) + ? y.entrySeq().map(([e, t]) => + Ke.default.createElement(v, { + key: `${e}-${t}`, + xKey: e, + xVal: t + }) + ) : null, h && n.get("content") ? Ke.default.createElement( @@ -16688,16 +16684,14 @@ var we = {}; Ke.default.createElement("span", { className: "brace-close" }, "}") ), w.size - ? w - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(R, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: "property" - }) - ) + ? w.entrySeq().map(([e, t]) => + Ke.default.createElement(R, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: "property" + }) + ) : null ); } @@ -16748,16 +16742,14 @@ var we = {}; { title: _, expanded: n <= a, collapsedContent: "[...]" }, "[", d.size - ? d - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(y, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: "property" - }) - ) + ? d.entrySeq().map(([e, t]) => + Ke.default.createElement(y, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: "property" + }) + ) : null, i ? Ke.default.createElement(f, { source: i }) @@ -16874,28 +16866,24 @@ var we = {}; ")" ), h.size - ? h - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(v, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: ka - }) - ) + ? h.entrySeq().map(([e, t]) => + Ke.default.createElement(v, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: ka + }) + ) : null, l && f.size - ? f - .entrySeq() - .map(([e, t]) => - Ke.default.createElement(v, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: ka - }) - ) + ? f.entrySeq().map(([e, t]) => + Ke.default.createElement(v, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: ka + }) + ) : null, m ? Ke.default.createElement(S, { source: m }) : null, g && @@ -18263,15 +18251,13 @@ var we = {}; ")" ), x && c.size - ? c - .entrySeq() - .map(([e, r]) => - Ke.default.createElement(t, { - key: `${e}-${r}`, - xKey: e, - xVal: r - }) - ) + ? c.entrySeq().map(([e, r]) => + Ke.default.createElement(t, { + key: `${e}-${r}`, + xKey: e, + xVal: r + }) + ) : null ), Ke.default.createElement( @@ -20384,10 +20370,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !c - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !c + } + ) }, c && Ke.default.createElement( @@ -20577,10 +20565,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !c - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !c + } + ) }, c && Ke.default.createElement( @@ -20661,10 +20651,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !c - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !c + } + ) }, c && Ke.default.createElement( @@ -21224,10 +21216,12 @@ var we = {}; "li", { key: e, - className: (0, - ha.default)("json-schema-2020-12-$vocabulary-uri", { - "json-schema-2020-12-$vocabulary-uri--disabled": !t - }) + className: (0, ha.default)( + "json-schema-2020-12-$vocabulary-uri", + { + "json-schema-2020-12-$vocabulary-uri--disabled": !t + } + ) }, Ke.default.createElement( "span", @@ -21422,10 +21416,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !n - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !n + } + ) }, n && Ke.default.createElement( @@ -21512,10 +21508,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !a - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !a + } + ) }, a && Ke.default.createElement( @@ -21583,10 +21581,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !a - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !a + } + ) }, a && Ke.default.createElement( @@ -21654,10 +21654,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !a - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !a + } + ) }, a && Ke.default.createElement( @@ -21813,10 +21815,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !n - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !n + } + ) }, n && Ke.default.createElement( @@ -21877,10 +21881,12 @@ var we = {}; Ke.default.createElement( "ul", { - className: (0, - ha.default)("json-schema-2020-12-keyword__children", { - "json-schema-2020-12-keyword__children--collapsed": !a - }) + className: (0, ha.default)( + "json-schema-2020-12-keyword__children", + { + "json-schema-2020-12-keyword__children--collapsed": !a + } + ) }, a && Ke.default.createElement( diff --git a/pandora_console/api/documentation/swagger-ui-es-bundle.js b/pandora_console/api/documentation/swagger-ui-es-bundle.js index 53039891ad..d0cbef7112 100644 --- a/pandora_console/api/documentation/swagger-ui-es-bundle.js +++ b/pandora_console/api/documentation/swagger-ui-es-bundle.js @@ -4587,8 +4587,9 @@ return ( "function" == typeof _ && "function" == typeof Symbol && - "symbol" == typeof _("foo") && - "symbol" == typeof Symbol("bar") && w() + "symbol" == typeof _("foo") && + "symbol" == typeof Symbol("bar") && + w() ); }; }, @@ -13205,7 +13206,9 @@ null != s && !w(s) ) || - j.test(s) || !x.test(s) || (null != i && s in Object(i)) + j.test(s) || + !x.test(s) || + (null != i && s in Object(i)) ); }; }, @@ -19958,7 +19961,8 @@ var i = s.memoizedState; if ( (null === i && - null !== (s = s.alternate) && (i = s.memoizedState), + null !== (s = s.alternate) && + (i = s.memoizedState), null !== i) ) return i.dehydrated; @@ -21407,7 +21411,8 @@ null !== ae && ((Z = ae), null !== X && - null != (ae = Kb(ee, X)) && U.push(tf(ee, ae, Z))), + null != (ae = Kb(ee, X)) && + U.push(tf(ee, ae, Z))), Y) ) break; @@ -21603,9 +21608,9 @@ } })(s, u)) && 0 < (_ = oe(_, "onBeforeInput")).length && - ((w = new fr("onBeforeInput", "beforeinput", null, u, w)), - j.push({ event: w, listeners: _ }), - (w.data = ce)); + ((w = new fr("onBeforeInput", "beforeinput", null, u, w)), + j.push({ event: w, listeners: _ }), + (w.data = ce)); } se(j, i); }); @@ -22232,8 +22237,8 @@ var U = s.alternate; null !== U && (P = (U = U.updateQueue).lastBaseUpdate) !== j && - (null === P ? (U.firstBaseUpdate = $) : (P.next = $), - (U.lastBaseUpdate = B)); + (null === P ? (U.firstBaseUpdate = $) : (P.next = $), + (U.lastBaseUpdate = B)); } if (null !== x) { var Y = w.baseState; @@ -22372,7 +22377,8 @@ ? s.shouldComponentUpdate(_, x, j) : !i.prototype || !i.prototype.isPureReactComponent || - !Ie(u, _) || !Ie(w, x); + !Ie(u, _) || + !Ie(w, x); } function ph(s, i, u) { var _ = !1, @@ -24842,11 +24848,11 @@ (s.sibling = null), 5 === s.tag && null !== (i = s.stateNode) && - (delete i[gn], - delete i[yn], - delete i[vn], - delete i[_n], - delete i[wn]), + (delete i[gn], + delete i[yn], + delete i[vn], + delete i[_n], + delete i[wn]), (s.stateNode = null), (s.return = null), (s.dependencies = null), @@ -24957,7 +24963,8 @@ case 15: if ( !Po && - null !== (_ = u.updateQueue) && null !== (_ = _.lastEffect) + null !== (_ = u.updateQueue) && + null !== (_ = _.lastEffect) ) { w = _ = _.next; do { @@ -25693,7 +25700,8 @@ return !0; })(w) && (2 === (i = Jk(s, _)) && - 0 !== (x = xc(s)) && ((_ = x), (i = Ok(s, x))), + 0 !== (x = xc(s)) && + ((_ = x), (i = Ok(s, x))), 1 === i)) ) throw ((u = Go), Lk(s, 0), Dk(s, _), Ek(s, yt()), u); @@ -28109,7 +28117,8 @@ return ( void 0 !== this._readableState && void 0 !== this._writableState && - this._readableState.destroyed && this._writableState.destroyed + this._readableState.destroyed && + this._writableState.destroyed ); }, set: function set(s) { @@ -29135,7 +29144,8 @@ return ( !!$.call(this, s) || (this === Writable && - s && s._writableState instanceof WritableState) + s && + s._writableState instanceof WritableState) ); } })) @@ -33559,7 +33569,8 @@ j = s; if ( "object" == typeof s && - (j = s[(_ = Object.keys(s)[0])]) && j._elem + (j = s[(_ = Object.keys(s)[0])]) && + j._elem ) return ( (j._elem.name = _), @@ -46143,10 +46154,11 @@ !!Jl(s) || (!!s && "object" == typeof s && - !_isString(s) && - (0 === s.length || - (s.length > 0 && - s.hasOwnProperty(0) && s.hasOwnProperty(s.length - 1)))) + !_isString(s) && + (0 === s.length || + (s.length > 0 && + s.hasOwnProperty(0) && + s.hasOwnProperty(s.length - 1)))) ); }); var sc = "undefined" != typeof Symbol ? Symbol.iterator : "@@iterator"; @@ -47695,10 +47707,8 @@ ? !(!s || "object" != typeof s || "string" != typeof s.uri) : ("undefined" != typeof File && s instanceof File) || ("undefined" != typeof Blob && s instanceof Blob) || - !!ArrayBuffer.isView(s) || - (null !== s && - "object" == typeof s && - "function" == typeof s.pipe) + !!ArrayBuffer.isView(s) || + (null !== s && "object" == typeof s && "function" == typeof s.pipe) ); } function isArrayOfFile(s, i) { @@ -48197,7 +48207,8 @@ "object" == typeof i && null !== i && "primitive" in i && - "function" == typeof i.primitive && i.primitive() === s, + "function" == typeof i.primitive && + i.primitive() === s, hasClass = (s, i) => "object" == typeof i && null !== i && @@ -57589,12 +57600,12 @@ const parameterEquals = (i, u) => !!s.isParameterElement(i) && !!s.isParameterElement(u) && - !!s.isStringElement(i.name) && - !!s.isStringElement(i.in) && - !!s.isStringElement(u.name) && - !!s.isStringElement(u.in) && - serializers_value(i.name) === serializers_value(u.name) && - serializers_value(i.in) === serializers_value(u.in), + !!s.isStringElement(i.name) && + !!s.isStringElement(i.in) && + !!s.isStringElement(u.name) && + !!s.isStringElement(u.in) && + serializers_value(i.name) === serializers_value(u.name) && + serializers_value(i.in) === serializers_value(u.in), i = []; return { visitor: { @@ -61244,20 +61255,18 @@ He.createElement( "div", { className: "modal-ux-content" }, - j - .valueSeq() - .map((j, B) => - He.createElement(P, { - key: B, - AST: x, - definitions: j, - getComponent: u, - errSelectors: _, - authSelectors: s, - authActions: i, - specSelectors: w - }) - ) + j.valueSeq().map((j, B) => + He.createElement(P, { + key: B, + AST: x, + definitions: j, + getComponent: u, + errSelectors: _, + authSelectors: s, + authActions: i, + specSelectors: w + }) + ) ) ) ) @@ -64919,26 +64928,22 @@ ")" ), Z && et.size - ? et - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + ? et.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) : null, X && tt.size - ? tt - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - xKey: s, - xVal: i - }) - ) + ? tt.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + xKey: s, + xVal: i + }) + ) : null ), He.createElement( @@ -67252,16 +67257,14 @@ He.createElement("span", { className: "brace-close" }, "}") ), ye.size - ? ye - .entrySeq() - .map(([s, i]) => - He.createElement(Re, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: "property" - }) - ) + ? ye.entrySeq().map(([s, i]) => + He.createElement(Re, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: "property" + }) + ) : null ); } @@ -67430,28 +67433,24 @@ ")" ), ae.size - ? ae - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: eI - }) - ) + ? ae.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: eI + }) + ) : null, P && ee.size - ? ee - .entrySeq() - .map(([s, i]) => - He.createElement(de, { - key: `${s}-${i}`, - propKey: s, - propVal: i, - propClass: eI - }) - ) + ? ee.entrySeq().map(([s, i]) => + He.createElement(de, { + key: `${s}-${i}`, + propKey: s, + propVal: i, + propClass: eI + }) + ) : null, Z ? He.createElement(ce, { source: Z }) : null, ie && @@ -67779,12 +67778,13 @@ return ( !(s >= 55296 && s <= 57343) && !(s >= 64976 && s <= 65007) && - 65535 != (65535 & s) && - 65534 != (65535 & s) && - !(s >= 0 && s <= 8) && - 11 !== s && - !(s >= 14 && s <= 31) && - !(s >= 127 && s <= 159) && !(s > 1114111) + 65535 != (65535 & s) && + 65534 != (65535 & s) && + !(s >= 0 && s <= 8) && + 11 !== s && + !(s >= 14 && s <= 31) && + !(s >= 127 && s <= 159) && + !(s > 1114111) ); } function fromCodePoint(s) { @@ -69288,36 +69288,36 @@ return ( P !== $ + 2 && !(P + 1 >= U || 58 !== s.src.charCodeAt(++P)) && - (_ || - (P++, - s.env.footnotes || (s.env.footnotes = {}), - s.env.footnotes.refs || (s.env.footnotes.refs = {}), - (B = s.src.slice($ + 2, P - 2)), - (s.env.footnotes.refs[":" + B] = -1), - s.tokens.push({ - type: "footnote_reference_open", - label: B, - level: s.level++ - }), - (w = s.bMarks[i]), - (x = s.tShift[i]), - (j = s.parentType), - (s.tShift[i] = s.skipSpaces(P) - P), - (s.bMarks[i] = P), - (s.blkIndent += 4), - (s.parentType = "footnote"), - s.tShift[i] < s.blkIndent && - ((s.tShift[i] += s.blkIndent), (s.bMarks[i] -= s.blkIndent)), - s.parser.tokenize(s, i, u, !0), - (s.parentType = j), - (s.blkIndent -= 4), - (s.tShift[i] = x), - (s.bMarks[i] = w), - s.tokens.push({ - type: "footnote_reference_close", - level: --s.level - })), - !0) + (_ || + (P++, + s.env.footnotes || (s.env.footnotes = {}), + s.env.footnotes.refs || (s.env.footnotes.refs = {}), + (B = s.src.slice($ + 2, P - 2)), + (s.env.footnotes.refs[":" + B] = -1), + s.tokens.push({ + type: "footnote_reference_open", + label: B, + level: s.level++ + }), + (w = s.bMarks[i]), + (x = s.tShift[i]), + (j = s.parentType), + (s.tShift[i] = s.skipSpaces(P) - P), + (s.bMarks[i] = P), + (s.blkIndent += 4), + (s.parentType = "footnote"), + s.tShift[i] < s.blkIndent && + ((s.tShift[i] += s.blkIndent), (s.bMarks[i] -= s.blkIndent)), + s.parser.tokenize(s, i, u, !0), + (s.parentType = j), + (s.blkIndent -= 4), + (s.tShift[i] = x), + (s.bMarks[i] = w), + s.tokens.push({ + type: "footnote_reference_close", + level: --s.level + })), + !0) ); }, ["paragraph"] @@ -69376,32 +69376,32 @@ return ( !(j >= u) && !(s.tShift[j] < s.blkIndent) && - !(s.tShift[j] - s.blkIndent > 3) && - !((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) && - (45 === (_ = s.src.charCodeAt(w)) || 61 === _) && - ((w = s.skipChars(w, _)), - !((w = s.skipSpaces(w)) < x) && - ((w = s.bMarks[i] + s.tShift[i]), - (s.line = j + 1), - s.tokens.push({ - type: "heading_open", - hLevel: 61 === _ ? 1 : 2, - lines: [i, s.line], - level: s.level - }), - s.tokens.push({ - type: "inline", - content: s.src.slice(w, s.eMarks[i]).trim(), - level: s.level + 1, - lines: [i, s.line - 1], - children: [] - }), - s.tokens.push({ - type: "heading_close", - hLevel: 61 === _ ? 1 : 2, - level: s.level - }), - !0)) + !(s.tShift[j] - s.blkIndent > 3) && + !((w = s.bMarks[j] + s.tShift[j]) >= (x = s.eMarks[j])) && + (45 === (_ = s.src.charCodeAt(w)) || 61 === _) && + ((w = s.skipChars(w, _)), + !((w = s.skipSpaces(w)) < x) && + ((w = s.bMarks[i] + s.tShift[i]), + (s.line = j + 1), + s.tokens.push({ + type: "heading_open", + hLevel: 61 === _ ? 1 : 2, + lines: [i, s.line], + level: s.level + }), + s.tokens.push({ + type: "inline", + content: s.src.slice(w, s.eMarks[i]).trim(), + level: s.level + 1, + lines: [i, s.line - 1], + children: [] + }), + s.tokens.push({ + type: "heading_close", + hLevel: 61 === _ ? 1 : 2, + level: s.level + }), + !0)) ); } ], @@ -70516,27 +70516,27 @@ return ( !(P + 2 >= j) && 94 === s.src.charCodeAt(P) && - 91 === s.src.charCodeAt(P + 1) && - !(s.level >= s.options.maxNesting) && - ((u = P + 2), - !((_ = parseLinkLabel(s, P + 1)) < 0) && - (i || - (s.env.footnotes || (s.env.footnotes = {}), - s.env.footnotes.list || (s.env.footnotes.list = []), - (w = s.env.footnotes.list.length), - (s.pos = u), - (s.posMax = _), - s.push({ type: "footnote_ref", id: w, level: s.level }), - s.linkLevel++, - (x = s.tokens.length), - s.parser.tokenize(s), - (s.env.footnotes.list[w] = { - tokens: s.tokens.splice(x) - }), - s.linkLevel--), - (s.pos = _ + 1), - (s.posMax = j), - !0)) + 91 === s.src.charCodeAt(P + 1) && + !(s.level >= s.options.maxNesting) && + ((u = P + 2), + !((_ = parseLinkLabel(s, P + 1)) < 0) && + (i || + (s.env.footnotes || (s.env.footnotes = {}), + s.env.footnotes.list || (s.env.footnotes.list = []), + (w = s.env.footnotes.list.length), + (s.pos = u), + (s.posMax = _), + s.push({ type: "footnote_ref", id: w, level: s.level }), + s.linkLevel++, + (x = s.tokens.length), + s.parser.tokenize(s), + (s.env.footnotes.list[w] = { + tokens: s.tokens.splice(x) + }), + s.linkLevel--), + (s.pos = _ + 1), + (s.posMax = j), + !0)) ); } ], @@ -70562,27 +70562,27 @@ return ( _ !== P + 2 && !(_ >= j) && - (_++, - (u = s.src.slice(P + 2, _ - 1)), - void 0 !== s.env.footnotes.refs[":" + u] && - (i || - (s.env.footnotes.list || (s.env.footnotes.list = []), - s.env.footnotes.refs[":" + u] < 0 - ? ((w = s.env.footnotes.list.length), - (s.env.footnotes.list[w] = { label: u, count: 0 }), - (s.env.footnotes.refs[":" + u] = w)) - : (w = s.env.footnotes.refs[":" + u]), - (x = s.env.footnotes.list[w].count), - s.env.footnotes.list[w].count++, - s.push({ - type: "footnote_ref", - id: w, - subId: x, - level: s.level - })), - (s.pos = _), - (s.posMax = j), - !0)) + (_++, + (u = s.src.slice(P + 2, _ - 1)), + void 0 !== s.env.footnotes.refs[":" + u] && + (i || + (s.env.footnotes.list || (s.env.footnotes.list = []), + s.env.footnotes.refs[":" + u] < 0 + ? ((w = s.env.footnotes.list.length), + (s.env.footnotes.list[w] = { label: u, count: 0 }), + (s.env.footnotes.refs[":" + u] = w)) + : (w = s.env.footnotes.refs[":" + u]), + (x = s.env.footnotes.list[w].count), + s.env.footnotes.list[w].count++, + s.push({ + type: "footnote_ref", + id: w, + subId: x, + level: s.level + })), + (s.pos = _), + (s.posMax = j), + !0)) ); } ], @@ -70598,25 +70598,25 @@ return ( 60 === s.src.charCodeAt(P) && !((u = s.src.slice(P)).indexOf(">") < 0) && - ((_ = u.match(NI)) - ? !(II.indexOf(_[1].toLowerCase()) < 0) && - ((j = normalizeLink((x = _[0].slice(1, -1)))), - !!s.parser.validateLink(x) && - (i || - (s.push({ type: "link_open", href: j, level: s.level }), - s.push({ type: "text", content: x, level: s.level + 1 }), - s.push({ type: "link_close", level: s.level })), - (s.pos += _[0].length), - !0)) - : !!(w = u.match(PI)) && - ((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))), - !!s.parser.validateLink(j) && - (i || - (s.push({ type: "link_open", href: j, level: s.level }), - s.push({ type: "text", content: x, level: s.level + 1 }), - s.push({ type: "link_close", level: s.level })), - (s.pos += w[0].length), - !0))) + ((_ = u.match(NI)) + ? !(II.indexOf(_[1].toLowerCase()) < 0) && + ((j = normalizeLink((x = _[0].slice(1, -1)))), + !!s.parser.validateLink(x) && + (i || + (s.push({ type: "link_open", href: j, level: s.level }), + s.push({ type: "text", content: x, level: s.level + 1 }), + s.push({ type: "link_close", level: s.level })), + (s.pos += _[0].length), + !0)) + : !!(w = u.match(PI)) && + ((j = normalizeLink("mailto:" + (x = w[0].slice(1, -1)))), + !!s.parser.validateLink(j) && + (i || + (s.push({ type: "link_open", href: j, level: s.level }), + s.push({ type: "text", content: x, level: s.level + 1 }), + s.push({ type: "link_close", level: s.level })), + (s.pos += w[0].length), + !0))) ); } ], @@ -70640,15 +70640,15 @@ return i >= 97 && i <= 122; })(u) ) && - !!(_ = s.src.slice(x).match(DI)) && - (i || - s.push({ - type: "htmltag", - content: s.src.slice(x, x + _[0].length), - level: s.level - }), - (s.pos += _[0].length), - !0)) + !!(_ = s.src.slice(x).match(DI)) && + (i || + s.push({ + type: "htmltag", + content: s.src.slice(x, x + _[0].length), + level: s.level + }), + (s.pos += _[0].length), + !0)) ); } ], @@ -71740,7 +71740,7 @@ return ( !(!s || !i) && !this.hasFullProtocolRegex.test(i) && - !this.hasWordCharAfterProtocolRegex.test(s) + !this.hasWordCharAfterProtocolRegex.test(s) ); }), (UrlMatchValidator.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//), @@ -74095,19 +74095,17 @@ ? He.createElement( "select", { "data-variable": s, onChange: $ }, - u - .get("enum") - .map(u => - He.createElement( - "option", - { - selected: u === w(i, s), - key: u, - value: u - }, - u - ) + u.get("enum").map(u => + He.createElement( + "option", + { + selected: u === w(i, s), + key: u, + value: u + }, + u ) + ) ) : He.createElement("input", { type: "text", diff --git a/pandora_console/api/documentation/swagger-ui-standalone-preset.js b/pandora_console/api/documentation/swagger-ui-standalone-preset.js index 5a7d464c49..0c1f324ddd 100644 --- a/pandora_console/api/documentation/swagger-ui-standalone-preset.js +++ b/pandora_console/api/documentation/swagger-ui-standalone-preset.js @@ -6859,7 +6859,9 @@ null != e && !i(e) ) || - a.test(e) || !o.test(e) || (null != t && e in Object(t)) + a.test(e) || + !o.test(e) || + (null != t && e in Object(t)) ); }; }, diff --git a/pandora_console/api/documentation/swagger-ui.js b/pandora_console/api/documentation/swagger-ui.js index c72fd6d40e..ae78269ee4 100644 --- a/pandora_console/api/documentation/swagger-ui.js +++ b/pandora_console/api/documentation/swagger-ui.js @@ -4819,20 +4819,18 @@ k().createElement( "div", { className: "modal-ux-content" }, - o - .valueSeq() - .map((o, c) => - k().createElement(l, { - key: c, - AST: s, - definitions: o, - getComponent: r, - errSelectors: a, - authSelectors: e, - authActions: t, - specSelectors: n - }) - ) + o.valueSeq().map((o, c) => + k().createElement(l, { + key: c, + AST: s, + definitions: o, + getComponent: r, + errSelectors: a, + authSelectors: e, + authActions: t, + specSelectors: n + }) + ) ) ) ) @@ -7258,15 +7256,13 @@ k().createElement( "tbody", null, - e - .entrySeq() - .map(([e, t]) => - k().createElement(r, { - key: `${e}-${t}`, - xKey: e, - xVal: t - }) - ) + e.entrySeq().map(([e, t]) => + k().createElement(r, { + key: `${e}-${t}`, + xKey: e, + xVal: t + }) + ) ) ) ) @@ -7698,15 +7694,13 @@ k().createElement(C, { source: a.get("description") }) ), y && f.size - ? f - .entrySeq() - .map(([e, t]) => - k().createElement(_, { - key: `${e}-${t}`, - xKey: e, - xVal: t - }) - ) + ? f.entrySeq().map(([e, t]) => + k().createElement(_, { + key: `${e}-${t}`, + xKey: e, + xVal: t + }) + ) : null, g && a.get("content") ? k().createElement( @@ -10816,16 +10810,14 @@ k().createElement("span", { className: "brace-close" }, "}") ), w.size - ? w - .entrySeq() - .map(([e, t]) => - k().createElement(j, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: "property" - }) - ) + ? w.entrySeq().map(([e, t]) => + k().createElement(j, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: "property" + }) + ) : null ); } @@ -10882,16 +10874,14 @@ { title: E, expanded: a <= n, collapsedContent: "[...]" }, "[", m.size - ? m - .entrySeq() - .map(([e, t]) => - k().createElement(f, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: "property" - }) - ) + ? m.entrySeq().map(([e, t]) => + k().createElement(f, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: "property" + }) + ) : null, c ? k().createElement(h, { source: c }) @@ -11008,28 +10998,24 @@ ")" ), g.size - ? g - .entrySeq() - .map(([e, t]) => - k().createElement(_, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: ln - }) - ) + ? g.entrySeq().map(([e, t]) => + k().createElement(_, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: ln + }) + ) : null, l && h.size - ? h - .entrySeq() - .map(([e, t]) => - k().createElement(_, { - key: `${e}-${t}`, - propKey: e, - propVal: t, - propClass: ln - }) - ) + ? h.entrySeq().map(([e, t]) => + k().createElement(_, { + key: `${e}-${t}`, + propKey: e, + propVal: t, + propClass: ln + }) + ) : null, d ? k().createElement(S, { source: d }) : null, y && @@ -12452,15 +12438,13 @@ ")" ), C && i.size - ? i - .entrySeq() - .map(([e, r]) => - k().createElement(t, { - key: `${e}-${r}`, - xKey: e, - xVal: r - }) - ) + ? i.entrySeq().map(([e, r]) => + k().createElement(t, { + key: `${e}-${r}`, + xKey: e, + xVal: r + }) + ) : null ), k().createElement( @@ -12703,19 +12687,17 @@ ? k().createElement( "select", { "data-variable": e, onChange: i }, - r - .get("enum") - .map(r => - k().createElement( - "option", - { - selected: r === n(t, e), - key: r, - value: r - }, - r - ) + r.get("enum").map(r => + k().createElement( + "option", + { + selected: r === n(t, e), + key: r, + value: r + }, + r ) + ) ) : k().createElement("input", { type: "text", @@ -17499,7 +17481,8 @@ const { examples: t, example: r, default: a } = e; return ( !!(Array.isArray(t) && t.length >= 1) || - void 0 !== a || void 0 !== r + void 0 !== a || + void 0 !== r ); }, extractExample = e => { diff --git a/pandora_console/composer.lock b/pandora_console/composer.lock index 171c94a267..3ec4ac1312 100644 --- a/pandora_console/composer.lock +++ b/pandora_console/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0d777bd9c0ca68c9ec0fe911e71b1b2a", + "content-hash": "c7549451bb31a635714731144a995123", "packages": [ { "name": "amphp/amp", @@ -1553,6 +1553,143 @@ }, "time": "2023-11-08T14:08:06+00:00" }, + { + "name": "lcobucci/clock", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/clock.git", + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715", + "reference": "6f28b826ea01306b07980cb8320ab30b966cd715", + "shasum": "" + }, + "require": { + "php": "~8.2.0 || ~8.3.0", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "infection/infection": "^0.27", + "lcobucci/coding-standard": "^11.0.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.25", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.13", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^10.2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" + } + ], + "description": "Yet another clock abstraction", + "support": { + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-11-17T17:00:27+00:00" + }, + { + "name": "lcobucci/jwt", + "version": "5.2.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/0ba88aed12c04bd2ed9924f500673f32b67a6211", + "reference": "0ba88aed12c04bd2ed9924f500673f32b67a6211", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-sodium": "*", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "psr/clock": "^1.0" + }, + "require-dev": { + "infection/infection": "^0.27.0", + "lcobucci/clock": "^3.0", + "lcobucci/coding-standard": "^11.0", + "phpbench/phpbench": "^1.2.9", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.10.7", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.10", + "phpstan/phpstan-strict-rules": "^1.5.0", + "phpunit/phpunit": "^10.2.6" + }, + "suggest": { + "lcobucci/clock": ">= 3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/5.2.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-11-20T21:17:42+00:00" + }, { "name": "monolog/monolog", "version": "3.5.0", @@ -2307,6 +2444,54 @@ }, "time": "2021-02-03T23:26:27+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -4338,5 +4523,5 @@ "platform-overrides": { "php": "8.2" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 91ece86c2b..e3c0cebe1c 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -2,6 +2,10 @@ START TRANSACTION; DROP TABLE tskin; +ALTER TABLE tfavmenu_user CONVERT TO CHARACTER SET UTF8MB4; +ALTER TABLE tfiles_repo CONVERT TO CHARACTER SET UTF8MB4; +ALTER TABLE tfiles_repo_group CONVERT TO CHARACTER SET UTF8MB4; + ALTER TABLE `tusuario` ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`; @@ -7708,6 +7712,40 @@ UPDATE `twelcome_tip` SET url = 'https://pandorafms.com/manual/!current/start?id DELETE FROM tconfig WHERE `token` = 'legacy_database_ha'; +-- Add new columns in tdeployment_hosts +ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_method` ENUM('SSH', 'HTTP', 'HTTPS') DEFAULT 'SSH'; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `deploy_port` INT UNSIGNED NOT NULL DEFAULT 22; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `server_port` INT UNSIGNED NOT NULL DEFAULT 41121; +ALTER TABLE `tdeployment_hosts` ADD COLUMN `temp_folder` VARCHAR(500) DEFAULT '/tmp'; + +UPDATE + `tdeployment_hosts`, `tconfig_os` +SET + `tdeployment_hosts`.`deploy_method` = 'HTTP', + `tdeployment_hosts`.`deploy_port` = 5985, + `tdeployment_hosts`.`temp_folder` = 'C:\Widnows\Temp' +WHERE + `tdeployment_hosts`.`id_os` = `tconfig_os`.`id_os` AND `tconfig_os`.`name` = 'Windows' AND `tdeployment_hosts`.`deployed` = 0; + +-- Find the name of the foreign key constraint +SELECT @constraint_name := `constraint_name` +FROM `information_schema`.`key_column_usage` +WHERE `table_name` = 'tdeployment_hosts' AND `column_name` = 'id_os'; + +-- Drop the foreign key constraint using dynamic SQL +SET @drop_fk_query = CONCAT('ALTER TABLE `tdeployment_hosts` DROP FOREIGN KEY ', @constraint_name); +PREPARE stmt FROM @drop_fk_query; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +-- Drop unused columns in tdeployment_hosts +ALTER TABLE `tdeployment_hosts` DROP COLUMN `id_os`; +ALTER TABLE `tdeployment_hosts` DROP COLUMN `os_version`; +ALTER TABLE `tdeployment_hosts` DROP COLUMN `arch`; + +-- Update all deployment recon tasks port +UPDATE `trecon_task` SET `field4` = 41121 WHERE `type` = 9; + INSERT INTO `tconfig` (`token`, `value`) VALUES ('JWT_signature', 1); DELETE FROM tconfig WHERE `token` = 'loginhash_pwd'; diff --git a/pandora_console/general/first_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php index 4f04d37f71..1d81c59c91 100644 --- a/pandora_console/general/first_task/cluster_builder.php +++ b/pandora_console/general/first_task/cluster_builder.php @@ -41,39 +41,28 @@ ui_print_standard_header( ); ui_require_css_file('first_task'); -?> - true, 'message' => __('There are no clusters defined yet.') ]); -?> -
-
- __('Clusters')]); ?> -
-
-

-

-
'; +$msg = __('A cluster is a group of devices that provide the same service in high availability.').'
'; - echo __('Depending on how they provide that service, we can find two types:').'

'; +$msg .= __('Depending on how they provide that service, we can find two types:').'

'; - echo __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'

'; +$msg .= __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'

'; - echo __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another won\'t (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.'); - ?> -

- - - -
- -
- - -
-
+$msg .= __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another will not (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.'); + + + +$button = false; +if (check_acl($config['id_user'], 0, 'AW')) { + $button = " +
+ +
"; +} + +echo ui_print_empty_view( + __('There are no defined clusters'), + $msg, + 'clusters.svg', + $button +); diff --git a/pandora_console/general/first_task/custom_graphs.php b/pandora_console/general/first_task/custom_graphs.php index 7840fc631a..aba2e72ee2 100644 --- a/pandora_console/general/first_task/custom_graphs.php +++ b/pandora_console/general/first_task/custom_graphs.php @@ -14,36 +14,22 @@ global $config; check_login(); ui_require_css_file('first_task'); -?> +$msg = __( + 'Graphs are designed to show the data collected by %s in a temporary scale defined by the user. %s Graphs display data in real time. They are generated every time the operator requires any of them and display the up-to-date state.', + get_product_name(), + get_product_name() +); -
-
- __('Custom Graphs')]); ?> -
-
-

- -

-
- 'wand'], - true - ) - ); - ?> -
-
-
\ No newline at end of file +$msg .= '

'.__("There are two types of graphs: The agent's automated graphs and the graphs the user customizes by using one or more modules to do so."); + + $url_new = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder'; + $button = '
+ +
'; + + echo ui_print_empty_view( + __('Create custom graph'), + $msg, + 'custom-graph.svg', + $button + ); diff --git a/pandora_console/general/first_task/map_builder.php b/pandora_console/general/first_task/map_builder.php index dca6b255ad..854c1c8da7 100755 --- a/pandora_console/general/first_task/map_builder.php +++ b/pandora_console/general/first_task/map_builder.php @@ -34,37 +34,30 @@ check_login(); ui_require_css_file('first_task'); if ($vconsoles_write || $vconsoles_manage) { - ?> + $msg = __( + '%s allows users to create visual maps on which each user is able to create his or her own monitoring map. The new visual console editor is much more practical, although the prior visual console editor had its advantages.', + get_product_name() + ); -
-
- __('Visual Console')]); ?> -
-
-

- -

-
- 'wand'], - true - ) - ); - ?> -
-
-
-
'.__( + "On the new visual console, we have been successful in imitating the sensation and touch of a drawing application like GIMP. We have also simplified the editor by dividing it into several subject-divided tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and 'Editor'." + ); + + $msg .= '

'.__( + " The items the %s Visual Map was designed to handle are 'static images', 'percentage bars', 'module graphs' and 'simple values'", + get_product_name() + ); + + $url_new = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder'; + $button = '
'; + $button .= html_print_input_hidden('edit_layout', 1); + $button .= ''; + $button .= '
'; + + echo ui_print_empty_view( + __('There are no customized visual consoles'), + $msg, + 'visual-console.svg', + $button + ); } diff --git a/pandora_console/general/first_task/service_list.php b/pandora_console/general/first_task/service_list.php index 783e263999..6d0d798a70 100755 --- a/pandora_console/general/first_task/service_list.php +++ b/pandora_console/general/first_task/service_list.php @@ -31,40 +31,25 @@ global $config; check_login(); ui_require_css_file('first_task'); -?> - -
-
- __('Services'), 'class' => 'w120px']); ?> -
-
-

-

- -

-
- 'wand'], - true - ) - ); - ?> -
-
-
- + + '; + + echo ui_print_empty_view( + __('No services found'), + $msg, + 'services.svg', + $button + ); } diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 1596ec7d80..2d3d95a77e 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -140,7 +140,6 @@ echo sprintf('
', $menuTypeClass); } } - $search_bar .= '
'; $search_bar .= '', $menuTypeClass); $modal_box .= ''.__('Join discord community').''; $modal_box .= '
'; + // Move help modal (header) fix z-index. + $modal_box .= ' + + '; + if ($config['activate_feedback'] === '1') { $modal_help = html_print_div( [ @@ -883,7 +903,8 @@ echo sprintf('
', $menuTypeClass); enterprise: , }, success: function (data) { - $('#result_order').html(data); + $('#result_order').html(data); + resizeSearchHeader() }, error: function (data) { console.error("Fatal error in AJAX call to interpreter order", data) @@ -1208,4 +1229,8 @@ echo sprintf('
', $menuTypeClass); }); }); /* ]]> */ + +$(window).resize(function () { + resizeSearchHeader() +}); diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index c1c9159134..300d72d9cb 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -558,7 +558,7 @@ if ($broker === false) { $tableAgent->data['caption_interval'][0] = __('Interval').ui_print_help_tip(__('Time that elapses when updating data in the agent. Remote modules have their own interval, but this time is used to find out if an agent stopped responding (unknown state). When twice the time interval defined in an agent goes by, it is considered to be in unknown state (or also if all its remote modules are in unknown state). An agent may be in unknown state if all of its local (software agent-based) modules have a last contact time longer than twice the agent interval, even if it has updated remote modules.'), true); // $tableAgent->rowstyle['interval'] = 'width: 260px'; $tableAgent->rowclass['interval'] = 'w540px'; - $tableAgent->data['interval'][0] = html_print_extended_select_for_time( + $tableAgent->data['interval'][0] = html_print_select_agentmodule_interval( 'intervalo', $intervalo, '', @@ -936,7 +936,7 @@ $switchButtons[] = html_print_radio_button_extended( ); $tableAdvancedAgent->data['module_definition'][] = html_print_label_input_block( - __('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true), + __('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true).clippy_context_help('modules_not_learning_mode'), html_print_div( [ 'class' => 'switch_radio_button', @@ -1297,7 +1297,6 @@ if ($modo == 0) { echo "'; if ($new_agent === false) { @@ -1434,15 +1433,15 @@ ui_require_jquery_file('bgiframe'); function show_modules_not_learning_mode_context_help() { if ($("input[name='modo'][value=0]").is(':checked')) { - $("#modules_not_learning_mode_context_help").show().css('padding-right','8px'); - } - else { - $("#modules_not_learning_mode_context_help").hide(); + $(".div-modules_not_learning_mode").show(); + } else { + $(".div-modules_not_learning_mode").hide(); } } $(document).ready (function() { + show_modules_not_learning_mode_context_help(); var $id_agent = ''; var previous_primary_group_select; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index f98567d948..cdbe26d89d 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1501,6 +1501,11 @@ if ($update_module === true || $create_module === true) { $min = (int) get_parameter('min'); $max = (int) get_parameter('max'); $interval = (int) get_parameter('module_interval', $intervalo); + // Limit module interval to at least 60 secs. + if ($interval > 0) { + $interval = max($interval, 60); + } + $ff_interval = (int) get_parameter('module_ff_interval'); $quiet_module = (int) get_parameter('quiet_module'); $cps_module = (int) get_parameter('cps_module'); @@ -2425,10 +2430,7 @@ if ($delete_module) { if ($error != 0) { ui_print_error_message(__('There was a problem deleting the module')); } else { - echo ''; + ui_print_success_message(__('Module deleted succesfully')); $agent = db_get_row('tagente', 'id_agente', $id_agente); db_pandora_audit( diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 51607427fa..3832461da0 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -1208,7 +1208,7 @@ $createModuleTable->data[1][] = html_print_label_input_block( html_print_anchor( [ 'href' => 'https://pandorafms.com/Library/Library/', - 'class' => 'color-black-grey invert_filter', + 'class' => 'color-black-grey', 'content' => __('Get more modules on Monitoring Library'), ], true @@ -1365,4 +1365,9 @@ html_print_div( } + + $(document).ready(function () { + $('#module_action').select2('open'); + $('#module_action').select2('close'); + }); diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index fda655f314..c535c1bb31 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -442,7 +442,7 @@ $tableBasicThresholds->rowclass = []; $tableBasicThresholds->data = []; // WARNING THRESHOLD. -$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width pdd_t_10px'; +$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width'; $tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width'; $tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').' '; @@ -617,7 +617,7 @@ $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text( $classdisabledBecauseInPolicy ); -$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 400px;width: 100%'; +$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 450px;width: 100%'; $table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left'; $table_simple->data['thresholds_table'][0] = html_print_table($tableBasicThresholds, true); if (modules_is_string_type($id_module_type) === false || (bool) $edit === true) { @@ -705,7 +705,19 @@ if ((int) $moduletype === MODULE_DATA) { // be taken the agent interval (this code is at configurar_agente.php). } else { $interval = ($interval === '') ? '300' : $interval; - $outputExecutionInterval = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy); + $outputExecutionInterval = html_print_select_agentmodule_interval( + 'module_interval', + $interval, + '', + '', + '0', + false, + true, + false, + false, + $classdisabledBecauseInPolicy, + $disabledBecauseInPolicy + ); } $module_id_policy_module = 0; @@ -884,7 +896,7 @@ $tagsAvailableData .= html_print_image( [ 'id' => 'right', 'title' => __('Add tags to module'), - 'class' => 'main_menu_icon invert_filter clickable mrgn_lft_5px', + 'class' => 'main_menu_icon invert_filter clickable mrgn_lft_5px black-and-white', ] ); diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 2d8b092471..0df61ee1c2 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -712,9 +712,9 @@ foreach ($simple_alerts as $alert) { WHERE id = '.$alert['id_alert_template'] ); if ($default_action != '') { - $data[3] .= "
  • "; + $data[3] .= ""; $data[3] .= db_get_sql("SELECT name FROM talert_actions WHERE id = $default_action").' ('.__('Default').')'; - $data[3] .= '
'; + $data[3] .= ''; $data[3] .= ''; } @@ -722,7 +722,7 @@ foreach ($simple_alerts as $alert) { $data[3] .= ''; $data[3] .= ''; $data[3] .= ''; if ($iterator > 10) { - echo '
+ echo '
+ '.$more_results.' '.__('results found').'
'; } if ($iterator === 0) { - echo ''.__('Press enter to search').''; + echo ''.__('Press enter to search').''; } echo '
'; diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 160e020e07..d166f03590 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -240,27 +240,27 @@ class SnmpConsole extends HTML 'status', [ 'text' => 'snmp_agent', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'enterprise_string', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'count', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'trap_subtype', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'user_id', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], [ 'text' => 'timestamp', - 'class' => 'snmp-td datos_green', + 'class' => 'snmp-td', ], 'alert', [ @@ -791,7 +791,7 @@ class SnmpConsole extends HTML // SNMP Agent. $agent = agents_get_agent_with_ip($tmp->source); if ($agent === false) { - $tmp->snmp_agent .= '
'.$tmp->source.''; + $tmp->snmp_agent .= 'source.'" title="'.__('Create agent').'">'.$tmp->source.''; } else { $tmp->snmp_agent .= '
'; $tmp->snmp_agent .= ''.$agent['alias'].ui_print_help_tip($tmp->source, true); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9682ab4858..0db792110c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ use DI\ContainerBuilder; /* * Pandora build version and version */ -$build_version = 'PC240402'; +$build_version = 'PC240415'; $pandora_version = 'v7.0NG.776'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 60d22cee1e..e3418a0f48 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -470,7 +470,7 @@ function get_user_language($id_user=null) if ($id_user !== null) { $userinfo = get_user_info($id_user); - if ($userinfo['language'] != 'default') { + if (isset($userinfo['language']) === true && $userinfo['language'] != 'default') { return $userinfo['language']; } } @@ -5617,6 +5617,13 @@ function get_help_info($section_name) } break; + case 'opensearch_installation': + if ($es) { + $result .= 'pandorafms/technical_annexes/38_opensearch_installation#instalacion'; + } else { + $result .= 'pandorafms/technical_annexes/38_opensearch_installation#installation'; + } + case 'servers_ha_clusters_tab': if ($es) { $result .= 'pandorafms/complex_environments_and_optimization/06_ha#alta_disponibilidad_del_servidor_de_datos'; @@ -6943,6 +6950,48 @@ function get_defined_translation($string) } +/** + * General utility to check if at least one element in an array meets a certain criteria defined by passed function. + * + * @param array $array Array to be checked. + * @param callable $fn Checking function (must accept one argument => array item to be evaluated and returns + * true/false depending on whether or not the condition was fulfilled). + * + * @return boolean + */ +function array_some(array $array, callable $fn) +{ + foreach ($array as $value) { + if ($fn($value) === true) { + return true; + } + } + + return false; +} + + +/** + * General utility to check if every element in an array meets a certain criteria defined by passed function. + * + * @param array $array Array to be checked. + * @param callable $fn Checking function (must accept one argument => array item to be evaluated and returns + * true/false depending on whether or not the condition was fulfilled). + * + * @return boolean + */ +function array_every(array $array, callable $fn) +{ + foreach ($array as $value) { + if ($fn($value) === false) { + return false; + } + } + + return true; +} + + /** * Merge any number of arrays by pairs of elements at the same index. * diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 8505e0bf09..eb494e2b30 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -317,6 +317,16 @@ function clippy_context_help($help=null) $title = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['title']; $intro = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['intro']; $img = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['img']; + } else if ($help === 'modules_not_learning_mode') { + $clippy_modules_not_learning_mode = clippy_modules_not_learning_mode(); + $title = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['title']; + $intro = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['intro']; + $img = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['img']; + } else if ($help === 'agent_module_interval') { + $clippy_agent_module_interval = clippy_agent_module_interval(); + $title = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['title']; + $intro = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['intro']; + $img = $clippy_agent_module_interval['tours']['agent_module_interval']['steps'][0]['img']; } else { $img = html_print_image( 'images/info-warning.svg', @@ -325,7 +335,7 @@ function clippy_context_help($help=null) ); } - $return = $code.' + $return = $code.' "; + $output .= '
'; + return $output; +} + + /** * Print selects to configure the cron of a module. * @@ -4133,6 +4598,10 @@ function html_print_table(&$table, $return=false) $headStyle = ''; } + if (isset($table->headStyle[$heading])) { + $headStyle = ' style = "'.$table->headStyle[$heading].'" '; + } + $output .= ''.$heading.''; } @@ -5723,6 +6192,7 @@ function html_print_input($data, $wrapper='div', $input_only=false) ((isset($data['class']) === true) ? $data['class'] : ''), ((isset($data['required']) === true) ? $data['required'] : false), ((isset($data['placeholder']) === true) ? $data['placeholder'] : null), + ((isset($data['title']) === true) ? $data['title'] : false), ); break; @@ -6108,6 +6578,10 @@ function html_print_input($data, $wrapper='div', $input_only=false) $output .= html_print_select_multiple_modules_filtered($data); break; + case 'select_multiple_modules_filtered_formated': + $output .= html_print_select_multiple_modules_filtered_formated($data); + break; + case 'datalist': $output .= html_print_datalist( $data['name'], diff --git a/pandora_console/include/functions_inventory.php b/pandora_console/include/functions_inventory.php index 7c7ed8fc8e..d844e62a52 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -99,9 +99,9 @@ function inventory_get_data( // Prepare pagination. $url = sprintf( '?sec=estado&sec2=operation/inventory/inventory&agent_id=%s&agent=%s&id_group=%s&export=%s&module_inventory_general_view=%s&search_string=%s&utimestamp=%s&period=%s&order_by_agent=%s&submit_filter=%d', - $pagination_url_parameters['inventory_id_agent'], - $pagination_url_parameters['inventory_agent'], - $pagination_url_parameters['inventory_id_group'], + (isset($pagination_url_parameters['inventory_id_agent']) ?? ''), + (isset($pagination_url_parameters['inventory_agent']) ?? ''), + (isset($pagination_url_parameters['inventory_id_group']) ?? ''), $export_csv, $inventory_module_name, $inventory_search_string, @@ -709,7 +709,9 @@ function inventory_get_datatable( $inventory_search_string='', $export_csv=false, $return_mode=false, - $order_by_agent=false + $order_by_agent=false, + $date_init=false, + $status_agent=-1, ) { global $config; @@ -736,6 +738,10 @@ function inventory_get_datatable( array_push($where, 'tagent_module_inventory.id_agente IN ('.implode(',', $agents_ids).')'); } + if ($status_agent > -1) { + array_push($where, 'tagente.disabled ='.$status_agent); + } + if ($inventory_module_name[0] !== '0' && $inventory_module_name !== '' && $inventory_module_name !== 'all' @@ -745,25 +751,27 @@ function inventory_get_datatable( } if ($inventory_search_string != '') { - array_push($where, "REPLACE(tagente_datos_inventory.data, ' ', ' ') LIKE '%".$inventory_search_string."%'"); + array_push($where, "REPLACE(tagent_module_inventory.data, ' ', ' ') LIKE '%".$inventory_search_string."%'"); } if ($utimestamp > 0) { - array_push($where, 'tagente_datos_inventory.utimestamp <= '.$utimestamp.' '); + array_push($where, 'tagent_module_inventory.utimestamp <= '.$utimestamp.' '); + } + + if ($date_init !== false) { + array_push($where, 'tagent_module_inventory.utimestamp >= '.$date_init.' '); } $sql = sprintf( 'SELECT tmodule_inventory.*, tagent_module_inventory.*, tagente.alias as name_agent, - tagente_datos_inventory.utimestamp as last_update, - tagente_datos_inventory.timestamp as last_update_timestamp, - tagente_datos_inventory.data as data_inventory + tagent_module_inventory.utimestamp as last_update, + tagent_module_inventory.timestamp as last_update_timestamp, + tagent_module_inventory.data as data_inventory FROM tmodule_inventory - INNER JOIN tagent_module_inventory + LEFT JOIN tagent_module_inventory ON tmodule_inventory.id_module_inventory = tagent_module_inventory.id_module_inventory - INNER JOIN tagente_datos_inventory - ON tagent_module_inventory.id_agent_module_inventory = tagente_datos_inventory.id_agent_module_inventory LEFT JOIN tagente ON tagente.id_agente = tagent_module_inventory.id_agente @@ -883,12 +891,14 @@ function get_data_basic_info_sql($params, $count=false) } $where = 'WHERE 1=1 '; - if ($params['id_agent'] > 0 && $count === true) { - $where .= sprintf(' AND id_agente = %d', $params['id_agent']); - } else if ($params['id_agent'] > 0 && $count === false) { + if ($params['id_agent'] > 0) { $where .= sprintf(' AND %s.id_agente = %d', $table, $params['id_agent']); } + if ($params['status'] >= 0) { + $where .= sprintf(' AND %s.disabled = %d', $table, $params['status']); + } + if ($params['id_group'] > 0) { $where .= sprintf(' AND id_grupo = %d', $params['id_group']); } else { @@ -909,7 +919,7 @@ function get_data_basic_info_sql($params, $count=false) ); } - if ($params['utimestamp'] > 0 && $count === false) { + if ($params['utimestamp'] > 0) { $where .= sprintf( ' AND utimestamp BETWEEN %d AND %d', ($params['utimestamp'] - $params['period']), @@ -976,21 +986,20 @@ function get_data_basic_info_sql($params, $count=false) $limit_condition = ''; $order_condition = ''; - $fields = 'count(*)'; $innerjoin = ''; $groupby = ''; - if ($count !== true) { - if (is_metaconsole() === true) { - $fields = 'tmetaconsole_agent.*, tagent_secondary_group.*, tagent_custom_data.*'; - } else { - $fields = 'tagente.*, tagent_secondary_group.*, tagent_custom_data.*'; - } + if (is_metaconsole() === true) { + $fields = 'tmetaconsole_agent.*, tagent_secondary_group.*, tagent_custom_data.*'; + } else { + $fields = 'tagente.*, tagent_secondary_group.*, tagent_custom_data.*'; + } - $innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente '; - $innerjoin .= 'LEFT JOIN tagent_secondary_group ON '.$table.'.id_agente = tagent_secondary_group.id_agent '; - $innerjoin .= 'LEFT JOIN tagent_custom_data ON '.$table.'.id_agente = tagent_custom_data.id_agent '; - $groupby = 'GROUP BY '.$table.'.id_agente'; + $innerjoin = 'LEFT JOIN tagente_estado ON '.$table.'.id_agente = tagente_estado.id_agente '; + $innerjoin .= 'LEFT JOIN tagent_secondary_group ON '.$table.'.id_agente = tagent_secondary_group.id_agent '; + $innerjoin .= 'LEFT JOIN tagent_custom_data ON '.$table.'.id_agente = tagent_custom_data.id_agent '; + + if ($count !== true) { $limit_condition = sprintf( 'LIMIT %d, %d', $params['start'], @@ -998,8 +1007,12 @@ function get_data_basic_info_sql($params, $count=false) ); $order_condition = sprintf('ORDER BY %s', $params['order']); + } else { + $fields = 'COUNT(*)'; } + $groupby = 'GROUP BY '.$table.'.id_agente'; + $sql = sprintf( 'SELECT %s FROM %s @@ -1017,13 +1030,19 @@ function get_data_basic_info_sql($params, $count=false) $limit_condition ); + $sql_count = sprintf( + 'SELECT COUNT(*) + FROM (%s) AS sub_sql', + $sql + ); + if ($count !== true) { $result = db_get_all_rows_sql($sql); if ($result === false) { $result = []; } } else { - $result = db_get_sql($sql); + $result = db_get_sql($sql_count); if ($result === false) { $result = 0; } diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index a58c77fc62..a3b08230a8 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -90,6 +90,10 @@ function io_safe_input($value) $value = utf8_encode($value); } + if (preg_match('/<\/?script(.*?)>/', $value)) { + $value = preg_replace('/<\/?script(.*?)>/', '', $value); + } + $valueHtmlEncode = htmlentities(($value ?? ''), ENT_QUOTES, 'UTF-8', true); // Replace the character '\' for the equivalent html entitie diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 361f2a5e33..9bca063e6e 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -167,6 +167,8 @@ function menu_print_menu(&$menu) $sec2 = 'godmode/groups/group_list'; } else if ($sec2 === 'godmode/users/configure_profile') { $sec2 = 'godmode/users/profile_list'; + } else if ($sec2 === 'godmode/users/configure_token') { + $sec2 = 'godmode/users/token_list'; } else { $sec2 = (string) get_parameter('sec2'); } diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index 30b30539d5..947b2d8657 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -147,6 +147,7 @@ function notifications_get_subtypes(?string $source=null) 'NOTIF.METACONSOLE.DB_CONNECTION', 'NOTIF.DOWNTIME', 'NOTIF.UPDATEMANAGER.REGISTRATION', + 'NOTIF.OPENSEARCH.CONSOLELOG', 'NOTIF.API.ACCESS', 'NOTIF.MISC.EVENTSTORMPROTECTION', 'NOTIF.MISC.DEVELOPBYPASS', diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index c5c7090623..27ea241de8 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -164,8 +164,12 @@ function shutdown($memory) unset($memory->reserve); $error = error_get_last(); - if (isset($error['type']) === true && $error['type'] === 1) { - echo __('You have no memory for this operation, increase the memory limit.'); + if (isset($error['type'])) { + if ($error['type'] === E_ERROR) { + if (strpos($error['message'], 'Allowed memory size') !== false) { + echo __('You have no memory for this operation, increase the memory limit.'); + } + } } } @@ -3348,8 +3352,8 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'csv', false, + 'csv', '', [], $inventory_regular_expression @@ -3363,12 +3367,13 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'hash', false, + 'hash', '', [], $inventory_regular_expression ); + break; } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index c52e920e92..e0bcdb9176 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2644,7 +2644,7 @@ function reporting_html_inventory($table, $item, $pdf=0) } else { // Grouped type inventory. $type_modules = array_reduce( - $item['data'], + ($item['data'] ?? []), function ($carry, $it) { $carry[$it['name']][] = $it; return $carry; @@ -4044,6 +4044,10 @@ function reporting_html_historical_data($table, $item, $pdf=0) __('Date'), __('Data'), ]; + + $table1->headStyle['Date'] = 'text-align: center;'; + $table1->headStyle['Data'] = 'text-align: center;'; + $table1->data = []; foreach ($item['data'] as $data) { if (!is_numeric($data[__('Data')])) { @@ -4098,6 +4102,13 @@ function reporting_html_historical_data($table, $item, $pdf=0) $table1->titleclass = 'title_table_pdf'; $table1->titlestyle = 'text-align:left;'; + // Center every row + foreach ($table1->data[0] as $k => $v) { + for ($i = 0; $i < count($table1->data); $i++) { + $table1->cellstyle[$i][$k] = 'text-align: center;'; + } + } + return html_print_table($table1, true); } @@ -4129,6 +4140,10 @@ function reporting_html_database_serialized($table, $item, $pdf=0) __('Date'), __('Data'), ]; + + $table1->headStyle['Date'] = 'text-align: center;'; + $table1->headStyle['Data'] = 'text-align: center;'; + if (!empty($item['keys'])) { $table1->head = array_merge($table1->head, $item['keys']); } @@ -4169,6 +4184,14 @@ function reporting_html_database_serialized($table, $item, $pdf=0) $table1->title = $item['title']; $table1->titleclass = 'title_table_pdf'; $table1->titlestyle = 'text-align:left;'; + + // Center every row + foreach ($table1->data[0] as $k => $v) { + for ($i = 0; $i < count($table1->data); $i++) { + $table1->cellstyle[$i][$k] = 'text-align: center;'; + } + } + return html_print_table( $table1, true @@ -4195,9 +4218,7 @@ function reporting_html_last_value($table, $item, $pdf=0) $table_data->width = '100%'; $table_data->class = 'info_table'; $table_data->headstyle = []; - $table_data->headstyle[0] = 'text-align: left;'; $table_data->style = []; - $table_data->style[0] = 'text-align: left;'; $table_data->head = [ __('Name'), __('Date'), @@ -4205,6 +4226,11 @@ function reporting_html_last_value($table, $item, $pdf=0) __('Status'), ]; + $table_data->headStyle['Name'] = 'text-align: center;'; + $table_data->headStyle['Date'] = 'text-align: center;'; + $table_data->headStyle['Data'] = 'text-align: center;'; + $table_data->headStyle['Status'] = 'text-align: center;'; + $table_data->data = []; $table_data->data[1][0] = $item['data']['agent_name']; $table_data->data[1][0] .= ' / '; @@ -4329,6 +4355,11 @@ function reporting_html_last_value($table, $item, $pdf=0) true ); } else { + // Center every row + for ($i = 0; $i < 4; $i++) { + $table_data->cellstyle['1'][$i] = 'text-align: center;'; + } + return html_print_table( $table_data, true @@ -5169,7 +5200,7 @@ function reporting_html_value( $table->colspan['data']['cell'] = 3; $table->cellstyle['data']['cell'] = 'text-align: left;'; - $table->data['data']['cell'] = '

'; + $table->data['data']['cell'] = '

'; if ($check_empty && empty($item['data']['value'])) { $table->data['data']['cell'] .= __('Unknown'); @@ -6018,6 +6049,15 @@ function reporting_html_availability_graph($table, $item, $pdf=0) $total_values .= $sla_value; $count_total_charts++; $title = ''.__('Result').''; + + if (isset($chart['agent']) === true) { + $title .= '
'.$chart['agent']; + } + + if (isset($chart['module']) === true) { + $title .= '
'.$chart['module']; + } + $sla_value_text = "".$sla_value.''; $checks_resume_text = ''; $checks_resume_text .= $checks_resume; @@ -6371,6 +6411,7 @@ function reporting_html_sql($table, $item, $pdf=0) // Print the header. foreach ($row as $key => $value) { $table2->head[] = $key; + $table2->headStyle[$key] = 'text-align: center;'; } } @@ -6388,6 +6429,14 @@ function reporting_html_sql($table, $item, $pdf=0) $table2->title = $item['title']; $table2->titleclass = 'title_table_pdf'; $table2->titlestyle = 'text-align:left;'; + + // Center every row + foreach ($table2->data[0] as $k => $v) { + for ($i = 0; $i < count($table2->data); $i++) { + $table2->cellstyle[$i][$k] = 'text-align: center;'; + } + } + $return_pdf .= html_print_table( $table2, true diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 50fffbcd12..55ac6c9180 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1496,14 +1496,41 @@ function ui_format_alert_row( metaconsole_restore_db(); } - if (empty($actions) === false || $actionDefault != '') { - $actionText = '