diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index 8cb980cff1..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 @@ -310,11 +300,15 @@ module_plugin pandora_df #module_description Postcondition test module #module_end +# This plugin runs several security checks in a Linux system + +#module_plugin pandora_security_check + # 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..b2535f2fe7 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2023 Pandora FMS -# Version 7.0NG.776 +# Version 7.0NG.776 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software # Foundation; either version 2 of the Licence or any later version @@ -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 d9f39051c1..85fd264914 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-240405 +Version: 7.0NG.776-240410 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 58061ca21f..a1390d619c 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-240405" +pandora_version="7.0NG.776-240410" 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 20714a13b7..ca2c414d9d 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -325,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 58d67e967e..be678985b8 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 => '240405'; +use constant AGENT_BUILD => '240410'; # 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 2d78b25776..62bc889628 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 240405 +%define release 240410 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 02a5ac81c9..35bb00dcd9 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 240405 +%define release 240410 %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 301ae017c6..63702a385b 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 240405 +%define release 240410 %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 4618abe7d8..027bf514f6 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 240405 +%define release 240410 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 2692fd86e0..1ea84212af 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 240405 +%define release 240410 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 024143fda1..9ee0aed4d7 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="240405" +PI_BUILD="240410" OS_NAME=`uname -s` FORCE=0 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 eadebab010..cd3d838ffd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{240405} +{240410} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 053c8d970f..717d7a0f37 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 240405") +#define PANDORA_VERSION ("7.0NG.776 Build 240410") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3d5b2b3912..170e2b1bc1 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 240405))" + VALUE "ProductVersion", "(7.0NG.776(Build 240410))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 569ea4ac3f..52e9d061aa 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.776-240405 +Version: 7.0NG.776-240410 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 3946802c4a..4cac08383a 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-240405" +pandora_version="7.0NG.776-240410" package_pear=0 package_pandora=1 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/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 2be1a25079..63e3a21b32 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -7712,4 +7712,38 @@ 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; + COMMIT; \ No newline at end of file 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/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index f4aefb957a..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, '', 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..279872b744 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -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..3b858f23a3 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -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; diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index ef1b66a731..269d92f984 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -723,6 +723,11 @@ if ($is_management_allowed === true ['id_grupo' => $id_group] ); + $result_user_profile = db_process_sql_delete( + 'tusuario_perfil', + ['id_grupo' => $id_group] + ); + if ($result && (!$usedGroup['return'])) { db_process_sql_delete( 'tfavmenu_user', @@ -1128,7 +1133,7 @@ if ($tab == 'tree') { $confirm_message = __('The child groups will be updated to use the parent id of the deleted group').'. '.$confirm_message; } - $table->data[$key][6] .= ''.html_print_image( + $table->data[$key][6] .= ''.html_print_image( 'images/delete.svg', true, [ @@ -1214,7 +1219,6 @@ $tab = 'group_edition'; }); $('#button-filter').on('click', function(event) { - console.log('here'); event.preventDefault(); load_tree(show_full_hirearchy, show_not_init_agents, show_not_init_modules); @@ -1314,5 +1318,39 @@ $tab = 'group_edition'; }); } + function preprocessDeletion(group_id, delete_URL, confirm_text) { + var parameters = {}; + parameters['page'] = 'include/ajax/group'; + parameters['method'] = 'checkGroupIsLinkedToElement'; + parameters['group_id'] = group_id; + parameters['table_name'] = 'tusuario_perfil'; + parameters['field_name'] = 'id_grupo'; + + $.ajax({ + type: "POST", + url: "", + data: parameters, + success: function(data) { + if (data.result == '1') { + confirmDialog({ + title: '', + message: '', + onAccept: function() { + window.location.assign(delete_URL); + } + }); + } else { + if (!confirm(confirm_text)) { + return false; + } else { + window.location.assign(delete_URL); + } + } + }, + dataType: "json" + }); + + return true; + } diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 4bed6d4f35..8cb5da658b 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -131,6 +131,10 @@ if ($update_agents) { ) { if (get_parameter('interval') != -2) { $values['intervalo'] = get_parameter('interval'); + + if ($values['intervalo'] < 60) { + $values['intervalo'] = 60; + } } } @@ -753,7 +757,7 @@ $table->data[1][0] = html_print_label_input_block( $table->data[1][1] = html_print_label_input_block( __('Interval'), - html_print_extended_select_for_time( + html_print_select_agentmodule_interval( 'interval', -2, '', diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 672c59276c..8e2a450a71 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -865,7 +865,7 @@ $table->data[15][0] = html_print_label_input_block( $table->data[16][0] = html_print_label_input_block( __('Interval'), - html_print_extended_select_for_time( + html_print_select_agentmodule_interval( 'module_interval', 0, '', @@ -2444,6 +2444,10 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' case 'module_interval': if ($value != 0) { $values[$field] = $value; + + if ($values[$field] < 60) { + $values[$field] = 60; + } } break; diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 5160933143..40c42fd557 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -426,14 +426,14 @@ if ($access_console_node === true) { if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { // Setup. - $menu_godmode['gsetup']['text'] = __('Setup'); + $menu_godmode['gsetup']['text'] = __('Settings'); $menu_godmode['gsetup']['sec2'] = 'general'; $menu_godmode['gsetup']['id'] = 'god-setup'; $sub = []; // Options Setup. - $sub['general']['text'] = __('Setup'); + $sub['general']['text'] = __('System Settings'); $sub['general']['id'] = 'Setup'; $sub['general']['type'] = 'direct'; $sub['general']['subtype'] = 'nolink'; diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index c04a66b549..7e72262bdf 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -82,6 +82,11 @@ $snmp_oid = (string) get_parameter('snmp_oid'); $snmp_community = (string) get_parameter('snmp_community'); $id_module_group = (int) get_parameter('id_module_group'); $module_interval = (int) get_parameter('module_interval'); +// Limit module interval to at least 60 secs. +if ($module_interval > 0) { + $module_interval = max($module_interval, 60); +} + $id_group = (int) get_parameter('id_group'); $plugin_user = (string) get_parameter('plugin_user'); $plugin_pass = io_input_password((string) get_parameter('plugin_pass')); diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index 3f573ec2c8..7a016d7a91 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -154,7 +154,7 @@ $table->data[2][0] = html_print_label_input_block( $table->data[2][1] = html_print_label_input_block( __('Interval'), - html_print_extended_select_for_time('module_interval', $module_interval, '', '', '0', false, true) + html_print_select_agentmodule_interval('module_interval', $module_interval, '', '', '0', false, true) ); $dynamic_interval_img = ''.html_print_image( diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 806e9e980d..5087bd5349 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1454,7 +1454,7 @@ $class = 'databox filters'; diff --git a/pandora_console/godmode/servers/plugin_registration.php b/pandora_console/godmode/servers/plugin_registration.php index 8394ae8980..9a21f0bc73 100644 --- a/pandora_console/godmode/servers/plugin_registration.php +++ b/pandora_console/godmode/servers/plugin_registration.php @@ -93,33 +93,26 @@ if (is_metaconsole() === true) { } } -$output = '
'; -$output .= '
'; -$output .= html_print_image( - 'images/first_task/icono_grande_import.png', - true, - ['title' => __('Plugin Registration') ] -); -$output .= '
'; -$output .= '
'; -$output .= '

'.__('Plugin registration').'

'; -$output .= '

'; -$output .= __('This extension makes registering server plugins an easier task. Here you can upload a server plugin in .pspz zipped format. Please refer to the official documentation on how to obtain and use Server Plugins.'); -$output .= '

'; -$output .= __('You can get more plugins in our'); -$output .= '
'; -$output .= ' '.__('Public Resource Library'); -$output .= ''; -$output .= '

'; + +$msg = __('This extension makes registering server plugins an easier task. Here you can upload a server plugin in .pspz zipped format. Please refer to the official documentation on how to obtain and use Server Plugins.'); +$msg .= '

'; +$msg .= __('You can get more plugins in our'); +$msg .= ''; +$msg .= ' '.__('Public Resource Library'); +$msg .= ''; // Upload form. -$output .= "
"; -$output .= ''; -$output .= "
"; -$output .= ""; -$output .= '
'; -$output .= '
'; -$output .= '
'; +$button = "
"; +$button .= ""; +$button .= ""; +$button .= '
'; + +$output = ui_print_empty_view( + __('Register plugins'), + $msg, + 'plugins.svg', + $button +); echo $output; diff --git a/pandora_console/godmode/setup/file_manager.php b/pandora_console/godmode/setup/file_manager.php index 4aac87d770..8ccddde606 100644 --- a/pandora_console/godmode/setup/file_manager.php +++ b/pandora_console/godmode/setup/file_manager.php @@ -75,8 +75,8 @@ if (isset($text) === false) { } $directory = (string) get_parameter('directory'); -$directory = str_replace('<', '', $text); -$directory = str_replace('>', '', $text); +$directory = str_replace('<', '', $directory); +$directory = str_replace('>', '', $directory); if (empty($directory) === true) { $directory = $fallback_directory; } else { diff --git a/pandora_console/godmode/setup/license.php b/pandora_console/godmode/setup/license.php index 2bc556ac62..518d4bab97 100644 --- a/pandora_console/godmode/setup/license.php +++ b/pandora_console/godmode/setup/license.php @@ -68,7 +68,7 @@ if ($renew_license_result !== null) { } if ($update_settings) { - if (!is_metaconsole()) { + if (is_metaconsole() === false) { // Node. foreach ($_POST['keys'] as $key => $value) { db_process_sql_update( diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 6518470811..8624146692 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -111,11 +111,8 @@ if (enterprise_installed()) { array_push($menu_tabs, $menu_tab_url); $menu_tab_url = ''.__('History database').''; array_push($menu_tabs, $menu_tab_url); - - if ($config['log_collector']) { - $menu_tab_url = ''.__('Log collector').''; - array_push($menu_tabs, $menu_tab_url); - } + $menu_tab_url = ''.__('Log collector').''; + array_push($menu_tabs, $menu_tab_url); } $buttons['auth'] = [ @@ -422,8 +419,14 @@ switch ($section) { $help_header = ''; break; + case 'log': + $buttons['log']['active'] = true; + $subpage = __('Log Collector'); + $help_header = 'opensearch_installation'; + break; + default: - $subpage = 'seccion: '; + $subpage = ''; // Default. break; } @@ -432,7 +435,7 @@ $dots = dot_tab($menu_tabs); // Header. ui_print_standard_header( - __('Setup').' » '.$subpage, + $subpage, '', false, $help_header, diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 56b81d230e..348f98b31d 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1461,7 +1461,7 @@ $table_vc->data[$row][] = html_print_label_input_block( $table_vc->data[$row][] = html_print_label_input_block( __('Number of favorite visual consoles to show in the menu'), - "" + '' ); $row++; @@ -1477,6 +1477,12 @@ $table_vc->data[$row][] = html_print_label_input_block( ) ); +$table_vc->data[$row][] = html_print_label_input_block( + __('Visual console default text margin (em)'), + '' +); +$row++; + $table_vc->data[$row][] = html_print_label_input_block( __('Lock screen orientation when viewing on mobile devices'), html_print_checkbox_switch( @@ -1486,7 +1492,6 @@ $table_vc->data[$row][] = html_print_label_input_block( true ) ); -$row++; $table_vc->data[$row][] = html_print_label_input_block( __('Display item frame on alert triggered').ui_print_help_tip(__('It displays an orange box around items that have triggered an alert.'), true), diff --git a/pandora_console/godmode/update_manager/just_enterprise_warning.php b/pandora_console/godmode/update_manager/just_enterprise_warning.php new file mode 100644 index 0000000000..79de165bd1 --- /dev/null +++ b/pandora_console/godmode/update_manager/just_enterprise_warning.php @@ -0,0 +1,110 @@ + + + + + \ No newline at end of file diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php index 3cb774c4d5..fdfc3611fd 100644 --- a/pandora_console/godmode/update_manager/update_manager.php +++ b/pandora_console/godmode/update_manager/update_manager.php @@ -166,5 +166,9 @@ switch ($tab) { $mode = \UpdateManager\UI\Manager::MODE_ONLINE; include $config['homedir'].'/godmode/um_client/index.php'; include $config['homedir'].'/godmode/update_manager/modal_lts_update.php'; + + if (enterprise_installed() === false) { + include $config['homedir'].'/godmode/update_manager/just_enterprise_warning.php'; + } break; } diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 5d352ebeb1..e3c049d758 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -100,6 +100,26 @@ class DiscoveryTaskList extends HTML // Load styles. parent::run(); + $deploymentCenter = new DeploymentCenter(); + echo $deploymentCenter->loadJS(); + ui_require_css_file('deployment_list'); + + html_print_div( + [ + 'content' => '', + 'id' => 'modal_add_target', + 'class' => 'invisible', + ] + ); + + html_print_div( + [ + 'content' => '', + 'id' => 'modal_deploy_targets', + 'class' => 'invisible', + ] + ); + $this->prepareBreadcrum( [ [ @@ -184,7 +204,7 @@ class DiscoveryTaskList extends HTML } if (is_reporting_console_node() === false) { - $ret2 = $this->showList(__('Host & devices tasks'), [0, 1]); + $ret2 = $this->showList(__('Host & devices tasks'), [0, 1, 9]); $ret2 .= $this->showList(__('Applications tasks'), [3, 4, 5, 10, 11, 12], 'app'); $ret2 .= $this->showList(__('Cloud tasks'), [6, 7, 8, 13, 14], 'cloud'); $ret2 .= $this->showList(__('Custom tasks'), [-1], 'custom'); @@ -874,14 +894,12 @@ class DiscoveryTaskList extends HTML break; case DISCOVERY_DEPLOY_AGENTS: - // Internal deployment task. - $no_operations = true; $data[6] = html_print_image( 'images/osx-terminal@groups.svg', true, ['title' => __('Agent deployment')] ).'  '; - $data[6] .= __('Discovery.Agent.Deployment (legacy)'); + $data[6] .= __('Discovery.Agent.Deployment'); break; case DISCOVERY_APP_MICROSOFT_SQL_SERVER: @@ -1007,6 +1025,7 @@ class DiscoveryTaskList extends HTML && $task['type'] != DISCOVERY_APP_SAP && $task['type'] != DISCOVERY_CLOUD_AWS_RDS && $task['type'] != DISCOVERY_CLOUD_AWS_S3 + && $task['type'] != DISCOVERY_DEPLOY_AGENTS ) { if (check_acl($config['id_user'], 0, 'MR') && (int) $task['type'] !== DISCOVERY_EXTENSION) { $data[9] .= ''; @@ -1066,25 +1085,40 @@ class DiscoveryTaskList extends HTML ).''; } } else { - $url_edit = sprintf( - 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', - $this->getTargetWiz($task, $recon_script_data), - $task['id_rt'] - ); + // Create the url edit. + switch ((int) $task['type']) { + case DISCOVERY_EXTENSION: + $url_edit = ui_get_full_url( + sprintf( + 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=%s&mode=%s&id_task=%s', + $task['section'], + $task['short_name'], + $task['id_rt'], + ) + ); + break; - if ((int) $task['type'] === DISCOVERY_EXTENSION) { - $url_edit = sprintf( - 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=%s&mode=%s&id_task=%s', - $task['section'], - $task['short_name'], - $task['id_rt'], - ); + case DISCOVERY_DEPLOY_AGENTS: + if (empty($task['field1']) === false) { + $url_edit = 'javascript:show_deploy_targets('.$task['id_rt'].')'; + } else { + $url_edit = 'javascript:show_scan_targets('.$task['id_rt'].')'; + } + break; + + default: + $url_edit = ui_get_full_url( + sprintf( + 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', + $this->getTargetWiz($task, $recon_script_data), + $task['id_rt'] + ) + ); + break; } // Check if is a H&D, Cloud or Application or IPAM. - $data[9] .= ''.html_print_image( + $data[9] .= ''.html_print_image( 'images/edit.svg', true, [ diff --git a/pandora_console/images/empty_views/aws.svg b/pandora_console/images/empty_views/aws.svg new file mode 100644 index 0000000000..dc7cdca069 --- /dev/null +++ b/pandora_console/images/empty_views/aws.svg @@ -0,0 +1,50 @@ + + + No AWS found + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/clusters.svg b/pandora_console/images/empty_views/clusters.svg new file mode 100644 index 0000000000..fff5bf7569 --- /dev/null +++ b/pandora_console/images/empty_views/clusters.svg @@ -0,0 +1,85 @@ + + + 696E9E4D-6D6D-4E30-B1C6-1CBF60018B2A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/custom-graph.svg b/pandora_console/images/empty_views/custom-graph.svg new file mode 100644 index 0000000000..5321c3a91e --- /dev/null +++ b/pandora_console/images/empty_views/custom-graph.svg @@ -0,0 +1,93 @@ + + + D0434C46-6D79-4C4C-9726-C296821D870B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/ncm.svg b/pandora_console/images/empty_views/ncm.svg new file mode 100644 index 0000000000..da43101e5b --- /dev/null +++ b/pandora_console/images/empty_views/ncm.svg @@ -0,0 +1,68 @@ + + + 7C2E23EA-BCA7-4E5D-BAD4-CF7507F60894 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/plugins.svg b/pandora_console/images/empty_views/plugins.svg new file mode 100644 index 0000000000..a66e5a0b7d --- /dev/null +++ b/pandora_console/images/empty_views/plugins.svg @@ -0,0 +1,63 @@ + + + A84B8A2A-F149-4822-9084-B43F3D4C6C8F + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/sap.svg b/pandora_console/images/empty_views/sap.svg new file mode 100644 index 0000000000..01d338c0c7 --- /dev/null +++ b/pandora_console/images/empty_views/sap.svg @@ -0,0 +1,59 @@ + + + E164C8FF-CEE9-4F16-BA63-5FB4919DD393 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/services.svg b/pandora_console/images/empty_views/services.svg new file mode 100644 index 0000000000..5b485933c9 --- /dev/null +++ b/pandora_console/images/empty_views/services.svg @@ -0,0 +1,86 @@ + + + D3A9E7AB-A2B9-4073-9525-28AED9DF6D51 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/visual-console.svg b/pandora_console/images/empty_views/visual-console.svg new file mode 100644 index 0000000000..9143f65483 --- /dev/null +++ b/pandora_console/images/empty_views/visual-console.svg @@ -0,0 +1,63 @@ + + + E456EC32-2047-44E1-9548-F616AC208D65 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/empty_views/vmware.svg b/pandora_console/images/empty_views/vmware.svg new file mode 100644 index 0000000000..665991272a --- /dev/null +++ b/pandora_console/images/empty_views/vmware.svg @@ -0,0 +1,58 @@ + + + 4960C5A6-9E07-4510-BA7E-097B9AE32028 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/external_alert.svg b/pandora_console/images/external_alert.svg new file mode 100644 index 0000000000..3a4b512a3b --- /dev/null +++ b/pandora_console/images/external_alert.svg @@ -0,0 +1,7 @@ + + + alerta externa + + + + \ No newline at end of file diff --git a/pandora_console/images/free_license.svg b/pandora_console/images/free_license.svg new file mode 100644 index 0000000000..a6a7ab5bb3 --- /dev/null +++ b/pandora_console/images/free_license.svg @@ -0,0 +1,85 @@ + + + 771F63E3-1B6F-4CAC-94BD-C4F0EC2141AA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/images/linking.svg b/pandora_console/images/linking.svg new file mode 100644 index 0000000000..87470b4493 --- /dev/null +++ b/pandora_console/images/linking.svg @@ -0,0 +1,10 @@ + + + linking + + + + + + + \ No newline at end of file diff --git a/pandora_console/include/api.php b/pandora_console/include/api.php index 4836f98c64..00119668e6 100644 --- a/pandora_console/include/api.php +++ b/pandora_console/include/api.php @@ -114,6 +114,7 @@ if ($info === 'version') { exit; } +$user_in_db = null; if (empty($apiPassword) === true || (empty($apiPassword) === false && $api_password === $apiPassword) || $apiTokenValid === true diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 24af0a860c..884991c9f2 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -250,6 +250,13 @@ class ConsoleSupervisor $this->checkAllowOverrideEnabled(); + /* + * Check if OpenSearch is configured and log collector enabled + * NOTIF.OPENSEARCH.CONSOLELOG + */ + + $this->checkOpenSearchLogCollector(); + /* * Check if the Pandora Console log * file remains in old location. @@ -540,6 +547,12 @@ class ConsoleSupervisor $this->checkUpdateManagerRegistration(); + /* + * Check if OpenSearch is configured and log collector enabled + * NOTIF.OPENSEARCH.CONSOLELOG + */ + $this->checkOpenSearchLogCollector(); + /* * Check if has API access. * NOTIF.API.ACCESS @@ -2540,6 +2553,35 @@ class ConsoleSupervisor } + /** + * Check if OpenSearch is configured and log collector enabled. + * + * @return void + */ + public function checkOpenSearchLogCollector() + { + global $config; + include_once $config['homedir'].'/include/functions_update_manager.php'; + $login = get_parameter('login', false); + + if ($config['log_collector'] !== '1' && empty($config['elasticsearch_ip']) === false && empty($config['elasticsearch_port']) === false) { + if (update_manager_verify_registration() === false) { + $this->notify( + [ + 'type' => 'NOTIF.OPENSEARCH.CONSOLELOG', + 'title' => __('The Log collector is not enabled'), + 'message' => __('The OpenSearch is defined but the log collector is not enabled.'), + 'url' => '__url__/index.php?sec=gsetup&sec2=godmode/setup/setup§ion=log', + 'icon_notification' => self::ICON_QUESTION, + ] + ); + } else { + $this->cleanNotifications('NOTIF.OPENSEARCH.CONSOLELOG'); + } + } + } + + /** * Check if has access to the API * @@ -3137,7 +3179,7 @@ class ConsoleSupervisor return; } - $sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(true); + $sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(); $counts = $sync->getQueues(true); if (count($counts) === 0) { @@ -3195,7 +3237,7 @@ class ConsoleSupervisor return; } - $sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(true); + $sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(); $queues = $sync->getQueues(); if (count($queues) === 0) { // Clean all. @@ -3325,27 +3367,34 @@ class ConsoleSupervisor public function checkTotalModulesByAgent() { $modules_by_agent = db_process_sql( - 'SELECT count(*) AS modules_by_agent + 'SELECT count(*) AS count FROM tagente a LEFT JOIN tagente_modulo m ON a.id_agente = m.id_agente + WHERE m.disabled = 0 GROUP BY m.id_agente' ); $show_warning = false; - foreach ($modules_by_agent as $key => $total_modules) { - if ($total_modules['modules_by_agent'] > 200) { - $this->notify( - [ - 'type' => 'NOTIF.MODULES_AGENT.ALERT', - 'title' => __('Your system has an average of %s modules per agent', $total_modules['modules_by_agent']), - 'message' => __('This is higher than the recommended maximum (200). This may result in poor performance of your system.'), - 'icon_notification' => self::ICON_HEADSUP, - 'url' => '__url__index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', - ] - ); - $show_warning = true; - break; - } + + if ($modules_by_agent !== false) { + $agents = count($modules_by_agent); + $modules = array_sum(array_column($modules_by_agent, 'count')); + + $ratio = ($modules / $agents); + $ratio = round($ratio, 2); + } + + if ($ratio > 200) { + $this->notify( + [ + 'type' => 'NOTIF.MODULES_AGENT.ALERT', + 'title' => __('Your system has an average of %s modules per agent', $ratio), + 'message' => __('This is higher than the recommended maximum (200). This may result in poor performance of your system.'), + 'icon_notification' => self::ICON_HEADSUP, + 'url' => '__url__index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', + ] + ); + $show_warning = true; } if ($show_warning === false) { 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 37b251825f..72c75f7c39 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 = 'PC240405'; +$build_version = 'PC240410'; $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 a20cbef290..eb494e2b30 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -322,6 +322,11 @@ function clippy_context_help($help=null) $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', diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index baf09bd9fc..d344c3ce9c 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1259,6 +1259,10 @@ function config_update_config() $error_update[] = __('Default line menu items for the Visual Console'); } + if (config_update_value('vc_text_margin', (int) get_parameter('vc_text_margin', 1), true) === false) { + $error_update[] = __('Default text margin for the Visual Console'); + } + if (config_update_value('vc_line_thickness', (int) get_parameter('vc_line_thickness'), true) === false) { $error_update[] = __('Default line thickness for the Visual Console'); } @@ -2930,6 +2934,10 @@ function config_process_config() config_update_value('vc_menu_items', 10); } + if (!isset($config['vc_text_margin'])) { + config_update_value('vc_text_margin', 1); + } + if (!isset($config['ser_menu_items'])) { config_update_value('ser_menu_items', 10); } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2353279c65..eba07feece 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1235,6 +1235,8 @@ function events_get_all( io_safe_input($filter['user_comment']), $filter['user_comment'] ); + + array_unshift($fields, 'DISTINCT te.id_evento AS distinct_event'); } // Source. diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index a09baf5d9f..1cce0ec199 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -107,22 +107,6 @@ function groups_check_used($idGroup) $return['tables'][] = __('Discovery task'); } - switch ($config['dbtype']) { - case 'mysql': - case 'postgresql': - $numRows = db_get_num_rows('SELECT * FROM tgraph WHERE id_group = '.$idGroup.';'); - break; - - case 'oracle': - $numRows = db_get_num_rows('SELECT * FROM tgraph WHERE id_group = '.$idGroup); - break; - } - - if ($numRows > 0) { - $return['return'] = true; - $return['tables'][] = __('Graphs'); - } - switch ($config['dbtype']) { case 'mysql': case 'postgresql': diff --git a/pandora_console/include/functions_groupview.php b/pandora_console/include/functions_groupview.php index 7ababa9b95..9c1ae5841c 100644 --- a/pandora_console/include/functions_groupview.php +++ b/pandora_console/include/functions_groupview.php @@ -206,3 +206,43 @@ function groupview_get_groups_list($id_user=false, $access='AR', $is_not_paginat 'counter' => $counter, ]; } + + +function get_recursive_groups_heatmap($parent_group, $acl) +{ + if ($parent_group['counter'] > 0) { + foreach ($parent_group['groups'] as $group_key => $group_value) { + if ((int) $group_value['_id_'] === 0) { + continue; + } + + $childrens = groups_get_children($group_value['_id_'], true, $acl, false); + if (empty($childrens) === false) { + foreach ($childrens as $children) { + $children_status = groups_get_status($children['id_grupo']); + $parent_group['groups'][$group_key]['_monitor_checks_']++; + switch ($children_status) { + case AGENT_STATUS_CRITICAL: + $parent_group['groups'][$group_key]['_monitors_critical_']++; + break; + + case AGENT_STATUS_WARNING: + $parent_group['groups'][$group_key]['_monitors_warning_']++; + break; + + case AGENT_STATUS_UNKNOWN: + $parent_group['groups'][$group_key]['_monitors_unknown_']++; + break; + + case AGENT_STATUS_NORMAL: + default: + $parent_group['groups'][$group_key]['_monitors_ok_']++; + break; + } + } + } + } + } + + return $parent_group; +} diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 52ed76bd6b..a3a46dbc52 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -16,7 +16,7 @@ * @package Include * @subpackage HTML */ - +use PandoraFMS\Enterprise\Metaconsole\Node; if (!isset($config)) { $working_dir = getcwd(); $working_dir = str_replace('\\', '/', $working_dir); @@ -1854,6 +1854,301 @@ function html_print_select_multiple_modules_filtered(array $data):string } +/** + * Form multiple inputs for slect groups. + * + * @param array $data Data inputs. + * + * @return string Html output. + */ +function html_print_select_multiple_modules_filtered_formated(array $data):string +{ + if (is_ajax() === true) { + ui_require_javascript_file( + 'multiselect_filtered', + 'include/javascript/', + true + ); + ui_require_css_file( + 'multiselect_filtered', + 'include/styles/', + true + ); + } else { + ui_require_javascript_file('multiselect_filtered'); + ui_require_css_file('multiselect_filtered'); + } + + $uniqId = $data['uniqId']; + + $return_all_group = isset($data['mReturnAllGroup']) ? $data['mReturnAllGroup'] : true; + + // Group. + $output = '
'; + $output .= html_print_input( + [ + 'label' => __('Group'), + 'label_class' => 'font-title-font', + 'name' => 'filtered-module-group-'.$uniqId, + 'returnAllGroup' => $return_all_group, + 'privilege' => 'AR', + 'type' => 'select_groups', + 'return' => true, + 'script' => 'fmAgentChange(\''.$uniqId.'\')', + 'selected' => $data['mGroup'], + ] + ); + + // Groups module. + $module_groups = db_get_all_rows_sql( + 'SELECT * FROM tmodule_group ORDER BY name' + ); + $module_groups = array_reduce( + $module_groups, + function ($carry, $item) { + $carry[$item['id_mg']] = $item['name']; + return $carry; + } + ); + + $output .= html_print_input( + [ + 'label' => __('Module group'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $module_groups, + 'name' => 'filtered-module-module-group-'.$uniqId, + 'selected' => $data['mModuleGroup'], + 'return' => true, + 'nothing' => __('All'), + 'nothing_value' => 0, + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + ] + ); + $output .= '
'; + $output .= '
'; + + // Recursion. + $output .= html_print_input( + [ + 'label' => __('Recursion'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'name' => 'filtered-module-recursion-'.$uniqId, + 'value' => (empty($data['mRecursion']) === true) ? false : true, + 'checked' => (empty($data['mRecursion']) === true) ? false : true, + 'return' => true, + 'id' => 'filtered-module-recursion-'.$uniqId, + 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', + ] + ); + + $commonModules = 0; + if (empty($data['mShowCommonModules']) === false) { + $commonModules = 1; + } + + $output .= html_print_input( + [ + 'label' => __('Only common modules'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'checked' => $commonModules, + 'value' => $commonModules, + 'name' => 'filtered-module-show-common-modules-'.$uniqId, + 'id' => 'filtered-module-show-common-modules-'.$uniqId, + 'return' => true, + 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + ] + ); + + $output .= '
'; + + if (empty($data['searchBar']) === false && $data['searchBar'] === true) { + $output .= '
'; + + $output .= '
'; + $output .= html_print_input( + [ + 'type' => 'text', + 'name' => 'agent-searchBar-'.$uniqId, + 'onKeyUp' => 'searchAgent(\''.$uniqId.'\')', + 'placeholder' => __('Type to search agents'), + 'return' => true, + ] + ); + + $output .= '
'; + + $output .= '
'; + $output .= html_print_input( + [ + 'type' => 'text', + 'name' => 'module-searchBar-'.$uniqId, + 'onKeyUp' => 'searchModule(\''.$uniqId.'\')', + 'return' => true, + 'placeholder' => __('Type to search modules'), + ] + ); + + $output .= '
'; + + $output .= '
'; + } + + $output .= '
'; + // Agent. + $agents = agents_get_group_agents( + // Id_group. + $data['mGroup'], + // Search. + false, + // Case. + 'lower', + // NoACL. + false, + // ChildGroups. + false, + // Serialized. + false, + // Separator. + '|', + // Add_alert_bulk_op. + false, + // Force_serialized. + false, + // Meta_fields. + ($data['mMetaFields'] ?? is_metaconsole()) + ); + + if ((empty($agents)) === true || $agents == -1) { + $agents = []; + } + + if ($data['mShowSelectedOtherGroups']) { + $selected_agents = explode(',', $data['mAgents']); + foreach ($selected_agents as $agent_id) { + if (!array_key_exists($agent_id, $agents)) { + $agents[$agent_id] = agents_get_alias($agent_id); + } + } + } + + if (is_metaconsole() === true) { + $output .= html_print_input( + [ + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $agents, + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + 'truncate_size' => 300, + ] + ); + } else { + $output .= html_print_input( + [ + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select_from_sql', + 'sql' => 'SELECT `id_agente`,`alias` FROM tagente', + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '', + 'truncate_size' => 300, + ] + ); + } + + if (empty($data['mAgents']) === false + && empty($data['mModuleGroup'] === false) + ) { + $all_modules = get_modules_agents( + $data['mModuleGroup'], + explode(',', $data['mAgents']), + !$commonModules, + !is_metaconsole(), + is_metaconsole(), + false + ); + } else { + $all_modules = []; + } + + $mModules = $data['mModules']; + if (is_array($data['mModules']) === false) { + $mModules = explode( + ',', + $data['mModules'] + ); + } else { + if (is_metaconsole()) { + foreach ($data['mModules'] as $row) { + $exp = explode('|', $row); + if (empty($exp[0]) === false) { + if (is_numeric($exp[1]) === false) { + if (is_metaconsole() === true) { + $node = new Node($exp[0]); + $node->connect(); + } + + $module = explode(' » ', $exp[1]); + $id_agente = db_get_sql(sprintf('SELECT id_agente FROM tagente WHERE nombre = "%s"', $module[1])); + $id_agente_modulo = db_get_sql(sprintf('SELECT id_agente_modulo FROM tagente_modulo WHERE nombre = "%s" AND id_agente = %s', $module[2], $id_agente)); + $array = [ + $exp[0].'|'.$id_agente_modulo => $exp[0].'|'.$id_agente_modulo, + ]; + $mModules = array_merge($mModules, $array); + if (is_metaconsole() === true) { + $node->disconnect(); + } + } + } + } + } + } + + $result = []; + // Clean double safe input. + foreach ($mModules as $name) { + $result[] = io_safe_output($name); + } + + $output .= html_print_input( + [ + 'label' => __('Modules'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $all_modules, + 'name' => 'filtered-module-modules-'.$uniqId, + 'selected' => $result, + 'return' => true, + 'multiple' => true, + 'style' => 'max-width:98%;', + 'input_class' => 'flex-colum-center-important', + 'truncate_size' => 300, + ] + ); + + $output .= '
'; + if ($data['return'] === false) { + echo $output; + } + + return $output; +} + + /** * Prints an array of fields in a popup menu of a form based on a SQL query. * The first and second columns of the query will be used. @@ -1896,6 +2191,7 @@ function html_print_select_from_sql( $class='', $required=false, $placeholder='', + $title=false, ) { global $config; @@ -1943,7 +2239,8 @@ function html_print_select_from_sql( '', false, null, - $placeholder + $placeholder, + $title ); } @@ -2290,7 +2587,7 @@ function html_print_extended_select_for_time( echo '
'; - echo '
'; + echo '
'; html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class, $script_input); html_print_input_hidden($name, $selected, false, $uniq_name); @@ -2317,7 +2614,7 @@ function html_print_extended_select_for_time( false, false ); - echo ' '.html_print_image( + echo '  '.html_print_image( 'images/logs@svg.svg', true, [ @@ -2358,6 +2655,174 @@ function html_print_extended_select_for_time( } +/** + * Render agent/module interval-specific time selection set of inputs + * from html_print_extended_select_for_time with additional structure and + * behavior associated (establishes a limit of at least 60 seconds to be + * selected and displays notice when this limit is actively selected). + * + * @param string $name Select form name. + * @param mixed $selected Current selected value. Can be a single value or an array of selected values (in combination with multiple). + * @param string $script Javascript onChange (select) code. + * @param string $nothing Label when nothing is selected. + * @param mixed $nothing_value Value when nothing is selected. + * @param integer $size Size of the input. + * @param boolean $return Whether to return an output string or echo now (optional, echo by default). + * @param boolean $select_style Wherter to assign to combo a unique name (to have more than one on same page, like dashboard). + * @param boolean $unique_name Uunique name value. + * @param string $class Class value. + * @param boolean $readonly Readonly value. + * @param string $custom_fields Custom fields value. + * @param string $style_icon Style icon value. + * @param boolean $no_change No change value. + * @param boolean $allow_zero Allow the use of the value zero. + + * @return string HTML code if return parameter is true. + */ +function html_print_select_agentmodule_interval( + $name, + $selected='', + $script='', + $nothing='', + $nothing_value='0', + $size=false, + $return=false, + $select_style=false, + $unique_name=true, + $class='', + $readonly=false, + $custom_fields=false, + $style_icon='', + $no_change=false, + $allow_zero=0, + $units=null, + $script_input='' +) { + global $config; + + include_once $config['homedir'].'/include/functions_clippy.php'; + + $output = '
'; + $output .= html_print_extended_select_for_time( + $name, + $selected, + $script, + $nothing, + $nothing_value, + $size, + $return, + $select_style, + $unique_name, + $class, + $readonly + ); + + $unique_id = ''; + + if ($unique_name === true) { + $pattern = '/'.$name.'([a-fA-F0-9]+)_default/'; + + if (preg_match($pattern, $output, $matches)) { + // Obtain the unique ID of the generated input. + $unique_id = $matches[1]; + $name .= $unique_id; + } + } + + $output .= html_print_div( + [ + 'id' => 'agent_module_interval_clippy'.$unique_id, + 'class' => 'invisible flex align-self-center', + 'content' => clippy_context_help('agent_module_interval'), + ], + true + ); + + $output .= ""; + $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 5f9e3bd62d..a93a760f88 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, @@ -710,7 +710,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; @@ -737,6 +739,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' @@ -750,21 +756,23 @@ function inventory_get_datatable( } 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 @@ -884,12 +892,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 { @@ -910,7 +920,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']), @@ -977,21 +987,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'], @@ -999,8 +1008,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 @@ -1018,13 +1031,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_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 af05902517..27ea241de8 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3352,8 +3352,8 @@ function reporting_inventory($report, $content, $type) $date, '', false, - 'csv', false, + 'csv', '', [], $inventory_regular_expression @@ -3367,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 321cb77f69..ae7279a40d 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; @@ -5169,7 +5169,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'); @@ -6380,6 +6380,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;'; } } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 34bd3a0fdd..468dae0c4d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4283,6 +4283,12 @@ function ui_print_datatable(array $parameters) $js = ''; $js .= '