Merge conflict solution

This commit is contained in:
Jonathan 2023-03-27 12:11:53 +02:00
commit 3057e67d1f
209 changed files with 7979 additions and 6147 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, AIX version # Version 7.0NG.770, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, FreeBSD Version # Version 7.0NG.770, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, HP-UX Version # Version 7.0NG.770, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, GNU/Linux # Version 7.0NG.770, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, GNU/Linux # Version 7.0NG.770, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, Solaris Version # Version 7.0NG.770, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas # (c) 2006-2021 Artica Soluciones Tecnologicas
# Version 7.0NG.769 # Version 7.0NG.770
# This program is Free Software, you can redistribute it and/or modify it # 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 # 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 # Foundation; either version 2 of the Licence or any later version

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.769, AIX version # Version 7.0NG.770, AIX version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.769 # Version 7.0NG.770
# FreeBSD/IPSO version # FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena # Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.769, HPUX Version # Version 7.0NG.770, HPUX Version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769 # Version 7.0NG.770
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas # (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769 # Version 7.0NG.770
# Licensed under GPL license v2, # Licensed under GPL license v2,
# (c) 2003-2021 Artica Soluciones Tecnologicas # (c) 2003-2021 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769 # Version 7.0NG.770
# Licensed under GPL license v2, # Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net # please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.769, Solaris version # Version 7.0NG.770, Solaris version
# General Parameters # General Parameters
# ================== # ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, AIX version # Version 7.0NG.770, AIX version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

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

View File

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

View File

@ -31,7 +31,7 @@ fi
if [ "$#" -ge 2 ]; then if [ "$#" -ge 2 ]; then
VERSION="$2" VERSION="$2"
else else
VERSION="7.0NG.769" VERSION="7.0NG.770"
fi fi
# Path for the generated DMG file # Path for the generated DMG file

View File

@ -19,11 +19,11 @@
<choice id="com.pandorafms.pandorafms_src" visible="false"> <choice id="com.pandorafms.pandorafms_src" visible="false">
<pkg-ref id="com.pandorafms.pandorafms_src"/> <pkg-ref id="com.pandorafms.pandorafms_src"/>
</choice> </choice>
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.769" onConclusion="none">pandorafms_src.pdk</pkg-ref> <pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.770" onConclusion="none">pandorafms_src.pdk</pkg-ref>
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications"> <choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/> <pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
</choice> </choice>
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.769" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref> <pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.770" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
<!-- <installation-check script="check()" /> <!-- <installation-check script="check()" />
<script> <script>
<![CDATA[ <![CDATA[

View File

@ -5,9 +5,9 @@
<key>CFBundleIconFile</key> <string>pandorafms.icns</string> <key>CFBundleIconFile</key> <string>pandorafms.icns</string>
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string> <key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
<key>CFBundleVersion</key> <string>7.0NG.769</string> <key>CFBundleVersion</key> <string>7.0NG.770</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.769 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string> <key>CFBundleGetInfoString</key> <string>7.0NG.770 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.769</string> <key>CFBundleShortVersionString</key> <string>7.0NG.770</string>
<key>NSPrincipalClass</key><string>NSApplication</string> <key>NSPrincipalClass</key><string>NSApplication</string>
<key>NSMainNibFile</key><string>MainMenu</string> <key>NSMainNibFile</key><string>MainMenu</string>

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, GNU/Linux # Version 7.0NG.770, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, FreeBSD Version # Version 7.0NG.770, FreeBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, HP-UX Version # Version 7.0NG.770, HP-UX Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, GNU/Linux # Version 7.0NG.770, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, GNU/Linux # Version 7.0NG.770, GNU/Linux
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, NetBSD Version # Version 7.0NG.770, NetBSD Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # Base config file for Pandora FMS agents
# Version 7.0NG.769, Solaris Version # Version 7.0NG.770, Solaris Version
# Licensed under GPL license v2, # Licensed under GPL license v2,
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas # Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

@ -1022,8 +1022,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads # Semaphore used to control the number of threads
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.769'; use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230315'; use constant AGENT_BUILD => '230327';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -3749,6 +3749,7 @@ sub module_plugin ($) {
# Do not save the output if there was an error # Do not save the output if there was an error
if ($? != 0) { if ($? != 0) {
log_message ('error', "plugin execution '". $command ."' exited with error code " . $?);
return (); return ();
} }

View File

@ -3,8 +3,8 @@
# #
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.769 %define version 7.0NG.770
%define release 230315 %define release 1
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,8 +3,8 @@
# #
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.769 %define version 7.0NG.770
%define release 230315 %define release 1
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.769" PI_VERSION="7.0NG.770"
PI_BUILD="230315" PI_BUILD="230327"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2021 Artica Soluciones Tecnologicas # (c) 2006-2021 Artica Soluciones Tecnologicas
# Version 7.0NG.769 # Version 7.0NG.770
# This program is Free Software, you can redistribute it and/or modify it # 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 # 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 # Foundation; either version 2 of the Licence or any later version

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes} {Yes}
AppName AppName
{Pandora FMS Windows Agent v7.0NG.769} {Pandora FMS Windows Agent v7.0NG.770}
ApplicationID ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F} {17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{230315} {230327}
ViewReadme ViewReadme
{Yes} {Yes}
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
{No} {No}
Windows,Executable Windows,Executable
{<%AppName%>-<%Version%>-Setup<%Ext%>} {<%AppName%>-Setup<%Ext%>}
Windows,FileDescription Windows,FileDescription
{<%AppName%> <%Version%> Setup} {<%AppName%> <%Version%> Setup}

View File

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

View File

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

View File

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

View File

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

View File

@ -240,7 +240,28 @@ function pandora_files_repo_operation()
} }
// Header. // Header.
ui_print_page_header(__('Files repository'), 'images/extensions.png', false, '', false, $onheader); ui_print_standard_header(
__('Files repository'),
'images/extensions.png',
false,
'',
false,
$onheader,
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Files repository'),
],
]
);
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/'; $full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php'; include_once $full_extensions_dir.'files_repo/functions_files_repo.php';

View File

@ -441,84 +441,95 @@ function quickShellSettings()
} }
// Form. Using old style. // Form. Using old style.
echo '<fieldset>'; echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Quickshell').'</legend>'; echo '<legend>'.__('Quickshell').'</legend>';
$t = new StdClass(); $t = new StdClass();
$t->data = []; $t->data = [];
$t->width = '100%'; $t->width = '100%';
$t->class = 'databox filters'; $t->class = 'filter-table-adv';
$t->data = []; $t->data = [];
$t->style = []; $t->style = [];
$t->style[0] = 'font-weight: bold; width: 40%;'; $t->style[0] = 'width: 50%;';
$t->data[0][0] = __('Gotty path'); $t->data[0][] = html_print_label_input_block(
$t->data[0][1] = html_print_input_text( __('Gotty path'),
html_print_input_text(
'gotty', 'gotty',
$config['gotty'], $config['gotty'],
'', '',
30, 30,
100, 100,
true true
)
); );
$t->data[1][0] = __('Gotty host'); $t->data[0][] = html_print_label_input_block(
$t->data[1][1] = html_print_input_text( __('Gotty host'),
html_print_input_text(
'gotty_host', 'gotty_host',
$config['gotty_host'], $config['gotty_host'],
'', '',
30, 30,
100, 100,
true true
)
); );
$t->data[2][0] = __('Gotty ssh port'); $t->data[1][] = html_print_label_input_block(
$t->data[2][1] = html_print_input_text( __('Gotty ssh port'),
html_print_input_text(
'gotty_ssh_port', 'gotty_ssh_port',
$config['gotty_ssh_port'], $config['gotty_ssh_port'],
'', '',
30, 30,
100, 100,
true true
)
); );
$t->data[3][0] = __('Gotty telnet port'); $t->data[1][] = html_print_label_input_block(
$t->data[3][1] = html_print_input_text( __('Gotty telnet port'),
html_print_input_text(
'gotty_telnet_port', 'gotty_telnet_port',
$config['gotty_telnet_port'], $config['gotty_telnet_port'],
'', '',
30, 30,
100, 100,
true true
)
); );
$hidden = new StdClass(); $hidden = new stdClass();
$hidden->data = []; $hidden->data = [];
$hidden->width = '100%'; $hidden->width = '100%';
$hidden->class = 'databox filters'; $hidden->class = 'filter-table-adv';
$hidden->data = []; $hidden->data = [];
$hidden->style[0] = 'font-weight: bold;width: 40%;'; $hidden->style[0] = 'width: 50%;';
$hidden->data[0][0] = __('Gotty user'); $hidden->data[0][] = html_print_label_input_block(
$hidden->data[0][1] = html_print_input_text( __('Gotty user'),
html_print_input_text(
'gotty_user', 'gotty_user',
$config['gotty_user'], $config['gotty_user'],
'', '',
30, 30,
100, 100,
true true
)
); );
$hidden->data[1][0] = __('Gotty password'); $hidden->data[0][] = html_print_label_input_block(
$hidden->data[1][1] = html_print_input_password( __('Gotty password'),
html_print_input_password(
'gotty_pass', 'gotty_pass',
io_output_password($config['gotty_pass']), io_output_password($config['gotty_pass']),
'', '',
30, 30,
100, 100,
true true
)
); );
$hidden->data[1][1] .= ui_print_reveal_password('gotty_pass', true);
html_print_table($t); html_print_table($t);

View File

@ -1,5 +1,14 @@
START TRANSACTION; START TRANSACTION;
ALTER TABLE `tdatabase` ADD COLUMN `ssh_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `db_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `replication_status` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `replication_delay` BIGINT DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `master` TINYINT UNSIGNED DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `utimestamp` BIGINT DEFAULT 0;
ALTER TABLE `tdatabase` ADD COLUMN `mysql_version` VARCHAR(10) DEFAULT '';
ALTER TABLE `tdatabase` ADD COLUMN `pandora_version` VARCHAR(10) DEFAULT '';
UPDATE tconfig_os SET `icon_name` = 'linux@os.svg' WHERE `id_os` = 1; UPDATE tconfig_os SET `icon_name` = 'linux@os.svg' WHERE `id_os` = 1;
UPDATE tconfig_os SET `icon_name` = 'solaris@os.svg' WHERE `id_os` = 2; UPDATE tconfig_os SET `icon_name` = 'solaris@os.svg' WHERE `id_os` = 2;
UPDATE tconfig_os SET `icon_name` = 'aix@os.svg' WHERE `id_os` = 3; UPDATE tconfig_os SET `icon_name` = 'aix@os.svg' WHERE `id_os` = 3;
@ -166,4 +175,6 @@ CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
`section` VARCHAR(255) NOT NULL, `section` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`)); PRIMARY KEY (`id`));
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
COMMIT; COMMIT;

View File

@ -27,8 +27,25 @@ require_once __DIR__.'/../include/functions_ui.php';
require_once __DIR__.'/../include/functions.php'; require_once __DIR__.'/../include/functions.php';
require_once __DIR__.'/../include/functions_html.php'; require_once __DIR__.'/../include/functions_html.php';
echo '<style>
:root {';
if ($config['style'] === 'pandora') {
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
echo '--login-label-color: #545454;';
echo '--login-text-color: #000;';
$style_theme = 'white-theme';
} else {
echo '--login-background-color: rgba(0, 0, 0, 0.8);';
echo '--login-label-color: #c5c5c5;';
echo '--login-text-color: #fff;';
$style_theme = '';
}
echo '}
</style>';
if ($config['visual_animation']) { if ($config['visual_animation']) {
// form#login_form, div.login_data {
echo '<style> echo '<style>
div.container_login { div.container_login {
animation: container_login 3s ease; animation: container_login 3s ease;
@ -120,7 +137,13 @@ if (empty($config['background_opacity']) === false) {
$opacity = 30; $opacity = 30;
} }
$login_body_style = 'style="'.$background_100.'background: linear-gradient(rgba(0,0,0,.'.$opacity.'), rgba(0,0,0,.'.$opacity.")), url('".$background_url."');\""; if ($config['style'] === 'pandora') {
$opacity_color = '255, 255, 255, .';
} else {
$opacity_color = '0, 0, 0, .';
}
$login_body_style = 'style="'.$background_100.'background: linear-gradient(rgba('.$opacity_color.$opacity.'), rgba('.$opacity_color.$opacity.")), url('".$background_url."');\"";
// Get alternative custom in case of db fail. // Get alternative custom in case of db fail.
$custom_fields = [ $custom_fields = [
@ -147,7 +170,7 @@ foreach ($custom_fields as $field) {
$docs_logo = ui_get_docs_logo(); $docs_logo = ui_get_docs_logo();
$support_logo = ui_get_support_logo(); $support_logo = ui_get_support_logo();
echo '<div id="login_body" '.$login_body_style.'>'; echo '<div id="login_body" '.$login_body_style.'>';
echo '<div id="header_login">'; echo '<div id="header_login" class="'.$style_theme.'">';
echo '<div id="list_icon_docs_support"><ul>'; echo '<div id="list_icon_docs_support"><ul>';
@ -185,12 +208,12 @@ echo '</div>';
echo '<div class="container_login">'; echo '<div class="container_login">';
echo '<div class="login_page">'; echo '<div class="login_page">';
echo '<form method="post" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">'; echo '<form method="post" id="login_form" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">';
echo '<a href="'.$logo_link.'">'; echo '<a href="'.$logo_link.'">';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
if (!isset($config['custom_logo_login'])) { if (!isset($config['custom_logo_login'])) {
html_print_image( html_print_image(
'enterprise/images/custom_logo_login/login_logo.png', 'enterprise/images/custom_logo_login/Pandora-FMS-1.png',
false, false,
[ [
'class' => 'login_logo', 'class' => 'login_logo',
@ -215,13 +238,13 @@ if (is_metaconsole() === true) {
} }
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { } else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (!isset($config['custom_logo_login'])) { if (!isset($config['custom_logo_login'])) {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/login_logo_v7.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else { } else {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} }
} else { } else {
if (empty($config['custom_logo_login']) === true) { if (empty($config['custom_logo_login']) === true) {
html_print_image(ui_get_full_url('images/custom_logo_login/pandora_logo.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); html_print_image(ui_get_full_url('images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else { } else {
html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} }
@ -297,7 +320,7 @@ switch ($login_screen) {
); );
echo '</div>'; echo '</div>';
} else { } else {
echo '<div class="login_nick">'; echo '<div class="login_nick '.$style_theme.'">';
html_print_input_text_extended( html_print_input_text_extended(
'nick', 'nick',
'', '',
@ -307,10 +330,11 @@ switch ($login_screen) {
'', '',
false, false,
'', '',
'autocomplete="off" placeholder="'.__('User').'"' 'autocomplete="off" class="input" placeholder=" "'
); );
echo '<label for="nick" class="placeholder">'.__('User').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_pass">'; echo '<div class="login_pass '.$style_theme.'">';
html_print_input_text_extended( html_print_input_text_extended(
'pass', 'pass',
'', '',
@ -320,20 +344,18 @@ switch ($login_screen) {
'', '',
false, false,
'', '',
'autocomplete="off" placeholder="'.__('Password').'"', 'autocomplete="off" class="input " placeholder=" " style="background-image: url(images/enable.svg);"',
false, false,
true true
); );
echo '<label for="pass" class="placeholder">'.__('Password').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_button">'; echo '<div class="login_button">';
html_print_submit_button( html_print_submit_button(
__('Login'), __('Let&#39;s go'),
'login_button', 'login_button',
false, false,
[ ['fixed_id' => 'submit-login_button']
'fixed_id' => 'submit-login_button',
'icon' => 'signin',
]
); );
echo '</div>'; echo '</div>';
} }
@ -346,15 +368,36 @@ switch ($login_screen) {
} }
} }
echo '<div class="login_nick">'; echo '<div class="login_nick '.$style_theme.'">';
echo '<div>'; echo '<div>';
echo '</div>'; echo '</div>';
html_print_input_text_extended('auth_code', '', 'auth_code', '', '', '', false, '', 'class="login login_password" placeholder="'.__('Authentication code').'"', false, true); html_print_input_text_extended(
'auth_code',
'',
'auth_code',
'',
'',
'',
false,
'',
'class="login login_password input" placeholder=" "',
false,
true
);
echo '<label for="pass" class="placeholder">'.__('Authentication code').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_button">'; echo '<div class="login_button">';
// html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, 'class="next_login"'); // html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, 'class="next_login"');
html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']); html_print_submit_button(
__('Check code'),
'login_button',
false,
[
'fixed_id' => 'submit-login_button',
'class' => 'next_login',
]
);
echo '</div>'; echo '</div>';
break; break;
@ -425,16 +468,66 @@ html_print_csrf_hidden();
echo '</form></div>'; echo '</form></div>';
echo '<div class="login_data">'; echo '<div class="login_data">';
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
if ($config['custom_splash_login'] !== 'none.png') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'class' => 'splash-logo',
'alt' => 'splash',
'border' => 0,
],
false,
false
);
}
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
echo '</div>';
echo '<div class ="text_banner_login">'; echo '<div class ="text_banner_login">';
echo '<div><span class="span1">'; echo '<div><span class="span1">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title1_login']) { if ($config['custom_title1_login']) {
echo io_safe_output($config['custom_title1_login']); echo io_safe_output($config['custom_title1_login']);
} else { } else {
echo __('WELCOME TO %s', get_product_name()); echo __('ONE TOOL TO RULE THEM ALL');
} }
} else { } else {
echo __('WELCOME TO %s', get_product_name()); echo __('ONE TOOL TO RULE THEM ALL');
} }
echo '</span></div>'; echo '</span></div>';
@ -442,60 +535,11 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title2_login']) { if ($config['custom_title2_login']) {
echo io_safe_output($config['custom_title2_login']); echo io_safe_output($config['custom_title2_login']);
} else {
echo __('NEXT GENERATION');
} }
} else {
echo __('NEXT GENERATION');
} }
echo '</span></div>'; echo '</span></div>';
echo '</div>'; echo '</div>';
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'alt' => 'splash',
'border' => 0,
],
false,
false
);
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';

View File

@ -184,7 +184,7 @@ if (!$double_auth_enabled
background: "black" background: "black"
}, },
width: 500, width: 500,
height: 400, height: 'auto',
close: function (event, ui) { close: function (event, ui) {
// Abort the ajax request // Abort the ajax request
if (typeof request != 'undefined'){ if (typeof request != 'undefined'){

View File

@ -487,9 +487,8 @@ if (isset($groups[$grupo]) === true || $new_agent === true) {
$tableAgent->data['primary_group'][0] .= html_print_input_hidden('grupo', $grupo, true); $tableAgent->data['primary_group'][0] .= html_print_input_hidden('grupo', $grupo, true);
} }
$tableAgent->data['primary_group'][0] .= html_print_div( $tableAgent->data['primary_group'][0] .= '<span id="group_preview">';
[ $tableAgent->data['primary_group'][0] .= ui_print_group_icon(
'content' => ui_print_group_icon(
$grupo, $grupo,
true, true,
'', '',
@ -498,10 +497,8 @@ $tableAgent->data['primary_group'][0] .= html_print_div(
false, false,
false, false,
'after_input_icon' 'after_input_icon'
),
],
true
); );
$tableAgent->data['primary_group'][0] .= '</span>';
$tableAgent->data['caption_interval'][0] = __('Interval'); $tableAgent->data['caption_interval'][0] = __('Interval');
// $tableAgent->rowstyle['interval'] = 'width: 260px'; // $tableAgent->rowstyle['interval'] = 'width: 260px';
@ -974,7 +971,7 @@ foreach ($fields as $field) {
$data_field[1] .= html_print_textarea( $data_field[1] .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]', 'customvalue_'.$field['id_field'].'[]',
2, 2,
65, 1000,
$link_text, $link_text,
'class="min-height-30px w100p"', 'class="min-height-30px w100p"',
true true
@ -985,7 +982,7 @@ foreach ($fields as $field) {
$data_field[1] .= html_print_textarea( $data_field[1] .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]', 'customvalue_'.$field['id_field'].'[]',
2, 2,
65, 1000,
$link_url, $link_url,
'class="min-height-30px w100p"', 'class="min-height-30px w100p"',
true true
@ -994,7 +991,7 @@ foreach ($fields as $field) {
$customContent = html_print_textarea( $customContent = html_print_textarea(
'customvalue_'.$field['id_field'], 'customvalue_'.$field['id_field'],
2, 2,
65, 1000,
$custom_value, $custom_value,
'class="min-height-30px w100p"', 'class="min-height-30px w100p"',
true true
@ -1039,7 +1036,7 @@ if (empty($fields) === false) {
'', '',
true, true,
false, false,
'white_box white_box_opened white_table_graph_fixed', 'white_box white_box_opened white_table_graph_fixed no_border',
'no-border custom_fields_elements' 'no-border custom_fields_elements'
); );
} }

View File

@ -827,12 +827,6 @@ if ($id_agente) {
'link' => '', 'link' => '',
'label' => $tab_name, 'label' => $tab_name,
], ],
],
[
'id_element' => $id_agente,
'url' => 'godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente,
'label' => agents_get_alias($id_agente),
'section' => 'Agents',
] ]
); );
} }

View File

@ -57,14 +57,33 @@ if ($id_field) {
$combo_values = $field['combo_values'] ? $field['combo_values'] : ''; $combo_values = $field['combo_values'] ? $field['combo_values'] : '';
$is_combo_enable = $config['is_combo_enable']; $is_combo_enable = $config['is_combo_enable'];
$is_link_enabled = $field['is_link_enabled']; $is_link_enabled = $field['is_link_enabled'];
ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, ''); $header_title = __('Update agent custom field');
} else { } else {
ui_print_page_header(__('Create agent custom field'), 'images/custom_field.png', false, '', true, ''); $header_title = __('Create agent custom field');
} }
$table = new stdClass(); ui_print_standard_header(
$table->class = 'databox'; $header_title,
$table->id = 'configure_field'; 'images/custom_field.png',
false,
'',
true,
[],
[
[
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
'label' => __('Resources'),
],
[
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
'label' => __('Custom field'),
],
[
'link' => '',
'label' => __('Edit'),
],
]
);
echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>"; echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>";
echo "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>'; echo "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>';
@ -82,42 +101,44 @@ echo "<div id='message_no_set_combo' title='".__('Agent Custom Fields Informati
echo "<p class='center bolder'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>'; echo "<p class='center bolder'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>';
echo '</div>'; echo '</div>';
$table = new stdClass();
$table->class = 'databox filter-table-adv';
$table->id = 'configure_field';
$table->width = '100%';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Name'); $table->data[0][0] = html_print_label_input_block(
$table->data[1][0] = html_print_input_text( __('Name'),
html_print_input_text(
'name', 'name',
$name, $name,
'', '',
35, 35,
100, 100,
true true
)
); );
$table->data[2][0] = __('Pass type').ui_print_help_tip( $table->data[0][1] = html_print_label_input_block(
__('The fields with pass type enabled will be displayed like html input type pass in html'), __('Display on front').ui_print_help_tip(
true
);
$table->data[2][1] = __('Display on front').ui_print_help_tip(
__('The fields with display on front enabled will be displayed into the agent details'), __('The fields with display on front enabled will be displayed into the agent details'),
true true
); ),
$table->data[2][2] = __('Link type'); html_print_checkbox_switch(
$table->data[3][0] = html_print_checkbox_switch(
'is_password_type',
1,
$is_password_type,
true
);
$table->data[3][1] = html_print_checkbox_switch(
'display_on_front', 'display_on_front',
1, 1,
$display_on_front, $display_on_front,
true true
)
); );
$table->data[3][2] = html_print_checkbox_switch_extended(
$table->data[1][0] = html_print_label_input_block(
__('Link type'),
html_print_checkbox_switch_extended(
'is_link_enabled', 'is_link_enabled',
1, 1,
$is_link_enabled, $is_link_enabled,
@ -125,9 +146,25 @@ $table->data[3][2] = html_print_checkbox_switch_extended(
'', '',
'', '',
true true
)
); );
$table->data[4][0] = __('Enabled combo');
$table->data[5][0] = html_print_checkbox_switch_extended( $table->data[2][0] = html_print_label_input_block(
__('Pass type').ui_print_help_tip(
__('The fields with pass type enabled will be displayed like html input type pass in html'),
true
),
html_print_checkbox_switch(
'is_password_type',
1,
$is_password_type,
true
)
);
$table->data[2][1] = html_print_label_input_block(
__('Enabled combo'),
html_print_checkbox_switch_extended(
'is_combo_enable', 'is_combo_enable',
0, 0,
$config['is_combo_enable'], $config['is_combo_enable'],
@ -135,27 +172,25 @@ $table->data[5][0] = html_print_checkbox_switch_extended(
'', '',
'', '',
true true
)
); );
$table->data[3][0] = html_print_label_input_block(
$table->cellstyle[4][1] = 'display: none;'; __('Combo values').ui_print_help_tip(
$table->cellstyle[5][1] = 'display: none;';
$table->data[4][1] = __('Combo values').ui_print_help_tip(
__('Set values separated by comma'), __('Set values separated by comma'),
true true
); ),
$table->data[5][1] = html_print_textarea( html_print_textarea(
'combo_values', 'combo_values',
3, 3,
65, 65,
io_safe_output($combo_values), io_safe_output($combo_values),
'', '',
true true
)
); );
echo '<form class="max_floating_element_size" name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
html_print_table($table); html_print_table($table);
if ($id_field > 0) { if ($id_field > 0) {
@ -194,65 +229,65 @@ echo '</form>';
<script> <script>
$(document).ready (function () { $(document).ready (function () {
if($('input[type=hidden][name=update_field]').val() == 1 && $('#textarea_combo_values').val() != ''){ if($('input[type=hidden][name=update_field]').val() == 1 && $('#textarea_combo_values').val() != ''){
console.log('entra2');
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true); $('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show(); $('#configure_field-3').show();
$('input[type=checkbox][name=is_password_type]').change(function (e) { $('input[type=checkbox][name=is_password_type]').change(function (e) {
dialog_message("#message_set_password"); dialog_message("#message_set_password");
$('input[type=checkbox][name=is_password_type]').prop('checked', false); $('input[type=checkbox][name=is_password_type]').prop('checked', false);
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true); $('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show(); $('#configure_field-3').show();
e.preventDefault(); e.preventDefault();
}); });
$('input[type=checkbox][name=is_combo_enable]').change(function (e) { $('input[type=checkbox][name=is_combo_enable]').change(function (e) {
if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){ if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){
dialog_message("#message_set_combo"); dialog_message("#message_set_combo");
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true); $('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-4').show(); $('#configure_field-3').show();
e.preventDefault(); e.preventDefault();
} }
}); });
} else {
console.log('entra');
$('#configure_field-3').hide();
} }
if ($('input[type=checkbox][name=is_link_enabled]').is(":checked") === true) { if ($('input[type=checkbox][name=is_link_enabled]').is(":checked") === true) {
$('#configure_field-1').hide(); $('#configure_field-2').hide();
$('#configure_field-3').hide();
} else { } else {
$('#configure_field-1').show(); $('#configure_field-2').show();
$('#configure_field-3').show();
} }
$('input[type=checkbox][name=is_link_enabled]').change(function () { $('input[type=checkbox][name=is_link_enabled]').change(function () {
if( $(this).is(":checked") ){ if( $(this).is(":checked") ){
$('#configure_field-1').hide(); $('#configure_field-2').hide();
$('#configure_field-3').hide(); $('#configure_field-3').hide();
} else{ } else{
$('#configure_field-1').show(); $('#configure_field-2').show();
$('#configure_field-3').show(); $('#configure_field-3').show();
} }
}); });
$('input[type=checkbox][name=is_combo_enable]').change(function () { $('input[type=checkbox][name=is_combo_enable]').change(function () {
if( $(this).is(":checked") ){ if( $(this).is(":checked") ){
$('#configure_field-4').show(); $('#configure_field-3').show();
dialog_message("#message_no_set_password"); dialog_message("#message_no_set_password");
$('#configure_field-1').hide(); $('#configure_field-1').hide();
$('#configure_field-5').hide();
} }
else{ else{
$('#configure_field-4').hide(); $('#configure_field-3').hide();
$('#configure_field-1').show(); $('#configure_field-1').show();
$('#configure_field-5').show();
} }
}); });
$('input[type=checkbox][name=is_password_type]').change(function () { $('input[type=checkbox][name=is_password_type]').change(function () {
if( $(this).is(":checked")){ if( $(this).is(":checked")){
dialog_message("#message_no_set_combo"); dialog_message("#message_no_set_combo");
$('#configure_field-3').hide(); $('#configure_field-3').hide();
$('#configure_field-5').hide();
} }
else{ else{
$('#configure_field-3').show(); $('#configure_field-3').show();
$('#configure_field-5').show();
} }
}); });
}); });

View File

@ -225,7 +225,7 @@ if (db_get_num_rows($sql) == 0) {
} else { } else {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox info_trable'; $table->class = 'databox info_table max_floating_element_size';
$table->data = []; $table->data = [];
$table->head = []; $table->head = [];
$table->styleTable = ''; $table->styleTable = '';

View File

@ -794,7 +794,7 @@ if ($agents !== false) {
// Agent name column (1). Agent name. // Agent name column (1). Agent name.
$agentNameColumn = html_print_anchor( $agentNameColumn = html_print_anchor(
[ [
'href' => ui_get_full_url($agentNameUrl), 'href' => ui_get_full_url($agentViewUrl),
'title' => $agent['nombre'], 'title' => $agent['nombre'],
'content' => ui_print_truncate_text($agent['alias'], 'agent_medium').implode('', $additionalDataAgentName), 'content' => ui_print_truncate_text($agent['alias'], 'agent_medium').implode('', $additionalDataAgentName),
], ],
@ -866,7 +866,6 @@ if ($agents !== false) {
// Operating System icon column. // Operating System icon column.
$osIconColumn = html_print_div( $osIconColumn = html_print_div(
[ [
'class' => 'main_menu_icon invert_filter',
'content' => ui_print_os_icon($agent['id_os'], false, true), 'content' => ui_print_os_icon($agent['id_os'], false, true),
], ],
true true
@ -885,7 +884,6 @@ if ($agents !== false) {
// Group icon and name column. // Group icon and name column.
$agentGroupIconColumn = html_print_div( $agentGroupIconColumn = html_print_div(
[ [
'class' => 'main_menu_icon invert_filter',
'content' => ui_print_group_icon($agent['id_grupo'], true), 'content' => ui_print_group_icon($agent['id_grupo'], true),
], ],
true true
@ -907,12 +905,12 @@ if ($agents !== false) {
$agentDisableEnableTitle = __('Enable agent'); $agentDisableEnableTitle = __('Enable agent');
$agentDisableEnableAction = 'enable_agent'; $agentDisableEnableAction = 'enable_agent';
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?'); $agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-pause.svg'; $agentDisableEnableIcon = 'change-active.svg';
} else { } else {
$agentDisableEnableTitle = __('Disable agent'); $agentDisableEnableTitle = __('Disable agent');
$agentDisableEnableAction = 'disable_agent'; $agentDisableEnableAction = 'disable_agent';
$agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?'); $agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-active.svg'; $agentDisableEnableIcon = 'change-pause.svg';
} }
$agentActionButtons[] = html_print_menu_button( $agentActionButtons[] = html_print_menu_button(

View File

@ -1117,7 +1117,7 @@ $modalCreateModule .= html_print_div(
'class' => 'action-buttons-right-forced', 'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
__('Create'), __('Create'),
'create_module', 'modal_button_create',
false, false,
[ [
'icon' => 'next', 'icon' => 'next',
@ -1142,7 +1142,6 @@ html_print_div(
<script type="text/javascript"> <script type="text/javascript">
function create_module_dialog(){ function create_module_dialog(){
console.log('Entra');
$('#modal').dialog({ $('#modal').dialog({
title: '<?php echo __('Create Module'); ?>', title: '<?php echo __('Create Module'); ?>',
resizable: true, resizable: true,

View File

@ -445,7 +445,6 @@ $tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width
$tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width'; $tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width';
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').'&nbsp;'; $tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').'&nbsp;';
if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_minmax_warning">('.__('Min / Max').')</span>'; $tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_minmax_warning">('.__('Min / Max').')</span>';
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text( $tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
'min_warning', 'min_warning',
@ -481,9 +480,7 @@ if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
[ 'class' => 'margin-top-10' ], [ 'class' => 'margin-top-10' ],
true true
); );
}
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
$basicThresholdsIntervalWarning = []; $basicThresholdsIntervalWarning = [];
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>'; $basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch( $basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
@ -517,7 +514,6 @@ if (isset($stringTypeModule) === true && $stringTypeModule === true) {
'', '',
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
).'</span>'; ).'</span>';
}
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div( $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
@ -532,7 +528,6 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px'; $tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width'; $tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').'&nbsp;'; $tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').'&nbsp;';
if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_minmax_critical">('.__('Min / Max').')</span>'; $tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_minmax_critical">('.__('Min / Max').')</span>';
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text( $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
'min_critical', 'min_critical',
@ -568,9 +563,8 @@ if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
[ 'class' => 'margin-top-10' ], [ 'class' => 'margin-top-10' ],
true true
); );
}
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
$basicThresholdsIntervalCritical = []; $basicThresholdsIntervalCritical = [];
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>'; $basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch( $basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
@ -612,7 +606,6 @@ if (isset($stringTypeModule) === true && $stringTypeModule === true) {
'', '',
$classdisabledBecauseInPolicy $classdisabledBecauseInPolicy
); );
}
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 340px;width: 100%'; $table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 340px;width: 100%';
$table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left'; $table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left';
@ -1623,6 +1616,11 @@ ui_require_jquery_file('json');
/* <![CDATA[ */ /* <![CDATA[ */
$(document).ready (function () { $(document).ready (function () {
var disabledBecauseInPolicy = <?php echo '\''.((empty($disabledBecauseInPolicy) === true) ? '0' : '1').'\''; ?>; var disabledBecauseInPolicy = <?php echo '\''.((empty($disabledBecauseInPolicy) === true) ? '0' : '1').'\''; ?>;
var idModuleType = '<?php echo $type_names_hash[$id_module_type]; ?>';
if (idModuleType != '') {
setModuleType(idModuleType);
}
$("#right").click (function () { $("#right").click (function () {
jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) { jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) {
tag_name = $(value).html(); tag_name = $(value).html();

View File

@ -123,7 +123,7 @@ $table->data[1][0] = html_print_label_input_block(
'w100p', 'w100p',
false, false,
'width: 100%;' 'width: 100%;'
).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span>'.$create_action ).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span><div class="flex_justify_end">'.$create_action.'</div>'
); );
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
@ -162,7 +162,7 @@ $table->data[1][1] = html_print_label_input_block(
'w100p', 'w100p',
false, false,
'width: 100%;' 'width: 100%;'
).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a>'.$create_template ).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a><div class="flex_justify_end">'.$create_template.'</div>'
); );
$table->data[2][0] = html_print_label_input_block( $table->data[2][0] = html_print_label_input_block(

View File

@ -679,7 +679,7 @@ foreach ($simple_alerts as $alert) {
true, true,
[ [
'id' => 'template-details-'.$alert['id_alert_template'], 'id' => 'template-details-'.$alert['id_alert_template'],
'class' => 'img_help action_button_img invert_filter', 'class' => 'img_help main_menu_icon invert_filter',
] ]
); );
$data[2] .= '</a> '; $data[2] .= '</a> ';
@ -757,7 +757,7 @@ foreach ($simple_alerts as $alert) {
true, true,
[ [
'title' => __('Delete action'), 'title' => __('Delete action'),
'class' => 'action_button_img invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
); );
$data[3] .= html_print_input_hidden('delete_action', 1, true); $data[3] .= html_print_input_hidden('delete_action', 1, true);
@ -772,7 +772,7 @@ foreach ($simple_alerts as $alert) {
true, true,
[ [
'title' => __('Update action'), 'title' => __('Update action'),
'class' => 'action_button_img invert_filter', 'class' => 'main_menu_icon invert_filter',
'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')', 'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')',
] ]
); );

View File

@ -122,9 +122,6 @@ $sec = (is_metaconsole() === true) ? 'advanced' : 'galertas';
// case delete_templete action is performed. // case delete_templete action is performed.
if (!$delete_template) { if (!$delete_template) {
// Header. // Header.
if (is_metaconsole() === true) {
alerts_meta_print_header();
} else {
ui_print_standard_header( ui_print_standard_header(
__('Alerts'), __('Alerts'),
'images/gm_alerts.png', 'images/gm_alerts.png',
@ -133,6 +130,10 @@ if (!$delete_template) {
true, true,
[], [],
[ [
[
'link' => '',
'label' => __('Alerts'),
],
[ [
'link' => '', 'link' => '',
'label' => __('Alert templates'), 'label' => __('Alert templates'),
@ -140,7 +141,6 @@ if (!$delete_template) {
] ]
); );
} }
}
if ($update_template) { if ($update_template) {
$id = (int) get_parameter('id'); $id = (int) get_parameter('id');

View File

@ -704,6 +704,19 @@ if ($step == 2) {
) )
); );
$usr_groups = implode(
',',
array_keys(users_get_groups($config['id_user'], 'LM', true))
);
$sql_query = sprintf(
'SELECT id, name
FROM talert_actions
WHERE id_group IN (%s)
ORDER BY name',
$usr_groups
);
$table->data[2][1] = html_print_label_input_block( $table->data[2][1] = html_print_label_input_block(
__('Default action').ui_print_help_tip( __('Default action').ui_print_help_tip(
__('Unless they\'re left blank, the fields from the action will override those set on the template.'), __('Unless they\'re left blank, the fields from the action will override those set on the template.'),
@ -801,19 +814,6 @@ if ($step == 2) {
) )
); );
$usr_groups = implode(
',',
array_keys(users_get_groups($config['id_user'], 'LM', true))
);
$sql_query = sprintf(
'SELECT id, name
FROM talert_actions
WHERE id_group IN (%s)
ORDER BY name',
$usr_groups
);
$table->data[5][0] = html_print_label_input_block( $table->data[5][0] = html_print_label_input_block(
__('Condition type'), __('Condition type'),
html_print_select( html_print_select(

View File

@ -132,7 +132,8 @@ $table->data[1][1] = '<a href="javascript:">'.html_print_image(
[ [
'id' => 'right', 'id' => 'right',
'title' => __('Add fields to select'), 'title' => __('Add fields to select'),
'style' => 'rotate: 180deg; width: 40px', 'style' => 'rotate: 180deg;',
'class' => 'main_menu_icon invert_filter',
] ]
).'</a>'; ).'</a>';
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image( $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
@ -141,7 +142,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
[ [
'id' => 'left', 'id' => 'left',
'title' => __('Delete fields to select'), 'title' => __('Delete fields to select'),
'style' => 'width: 40px', 'style' => '',
] ]
).'</a>'; ).'</a>';
@ -169,6 +170,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[ [
'onclick' => 'sortUpDown(\'up\');', 'onclick' => 'sortUpDown(\'up\');',
'title' => __('Move up selected fields'), 'title' => __('Move up selected fields'),
'class' => 'main_menu_icon invert_filter',
] ]
).'</a>'; ).'</a>';
$table->data[1][2] .= '<a href="javascript:">'.html_print_image( $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
@ -177,6 +179,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[ [
'onclick' => 'sortUpDown(\'down\');', 'onclick' => 'sortUpDown(\'down\');',
'title' => __('Move down selected fields'), 'title' => __('Move down selected fields'),
'class' => 'main_menu_icon invert_filter',
] ]
).'</a>'; ).'</a>';
$table->data[1][2] .= '</div></div>'; $table->data[1][2] .= '</div></div>';

View File

@ -445,7 +445,7 @@ if ($is_management_allowed === true
if ($aviable_name === true) { if ($aviable_name === true) {
$values = [ $values = [
'nombre' => $name, 'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4), 'icon' => $icon,
'parent' => $id_parent, 'parent' => $id_parent,
'disabled' => $alerts_disabled, 'disabled' => $alerts_disabled,
'custom_id' => $custom_id, 'custom_id' => $custom_id,
@ -513,7 +513,7 @@ if ($is_management_allowed === true && $update_group === true) {
if ($aviable_name === true) { if ($aviable_name === true) {
$values = [ $values = [
'nombre' => $name, 'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4), 'icon' => $icon,
'parent' => ($id_parent == -1) ? 0 : $id_parent, 'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled, 'disabled' => !$alerts_enabled,
'custom_id' => $custom_id, 'custom_id' => $custom_id,
@ -718,7 +718,7 @@ if ($is_management_allowed === true
'tfavmenu_user', 'tfavmenu_user',
[ [
'id_element' => $id_group, 'id_element' => $id_group,
'section' => 'Tactic_group', 'section' => 'Groups',
'id_user' => $config['id_user'], 'id_user' => $config['id_user'],
] ]
); );
@ -741,12 +741,11 @@ if ($is_management_allowed === true
// Credential store is loaded previously in this document to avoid // Credential store is loaded previously in this document to avoid
// process group tree - list forms. // process group tree - list forms.
ui_print_spinner(__('Loading'));
if ($tab == 'tree') { if ($tab == 'tree') {
/* /*
* Group tree view. * Group tree view.
*/ */
ui_print_spinner(__('Loading'));
echo "<div id='tree-controller-recipient'></div>"; echo "<div id='tree-controller-recipient'></div>";
} else { } else {
/* /*
@ -906,7 +905,6 @@ if ($tab == 'tree') {
foreach ($groups as $key => $group) { foreach ($groups as $key => $group) {
$url_edit = 'index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo']; $url_edit = 'index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'];
$url_tactical = 'index.php?sec=gagente&sec2=godmode/groups/tactical&id_group='.$group['id_grupo'];
if (is_metaconsole()) { if (is_metaconsole()) {
$url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'].'&tab=groups'; $url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'].'&tab=groups';
} else { } else {
@ -915,7 +913,7 @@ if ($tab == 'tree') {
$table->data[$key][0] = $group['id_grupo']; $table->data[$key][0] = $group['id_grupo'];
if ($is_management_allowed === true) { if ($is_management_allowed === true) {
$table->data[$key][1] = '<a href="'.$url_tactical.'">'.$group['nombre'].'</a>'; $table->data[$key][1] = '<a href="'.$url_edit.'">'.$group['nombre'].'</a>';
} else { } else {
$table->data[$key][1] = $group['nombre']; $table->data[$key][1] = $group['nombre'];
} }
@ -926,7 +924,7 @@ if ($tab == 'tree') {
true, true,
[ [
'style' => '', 'style' => '',
'class' => 'bot', 'class' => 'bot main_menu_icon invert_filter',
'alt' => io_safe_input($group['nombre']), 'alt' => io_safe_input($group['nombre']),
'title' => io_safe_input($group['nombre']), 'title' => io_safe_input($group['nombre']),
], ],
@ -987,7 +985,7 @@ if ($tab == 'tree') {
true, true,
'offset', 'offset',
false, false,
'pagination-bottom' ''
); );
} else { } else {
ui_print_info_message( ui_print_info_message(
@ -1039,6 +1037,7 @@ $tab = 'group_edition';
<script type="text/javascript"> <script type="text/javascript">
var treeController = TreeController.getController(); var treeController = TreeController.getController();
treeController.meta = <?php echo (is_metaconsole() === true) ? 1 : 0; ?>;
if (typeof treeController.recipient != 'undefined' && treeController.recipient.length > 0) if (typeof treeController.recipient != 'undefined' && treeController.recipient.length > 0)
treeController.recipient.empty(); treeController.recipient.empty();

View File

@ -72,14 +72,14 @@ if (is_metaconsole() === false) {
], ],
[ [
'link' => '', 'link' => '',
'label' => __('Tactic group'), 'label' => __('Tactical group view'),
], ],
], ],
[ [
'id_element' => $id_group, 'id_element' => $id_group,
'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group, 'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group,
'label' => groups_get_name($id_group), 'label' => groups_get_name($id_group),
'section' => 'Tactic_group', 'section' => 'Groups',
] ]
); );
} }
@ -187,7 +187,7 @@ try {
[ [
'id' => 'list_agents_tactical', 'id' => 'list_agents_tactical',
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $columnNames, 'column_names' => $columnNames,
'return' => true, 'return' => true,
@ -196,6 +196,7 @@ try {
'method' => 'getAgentsByGroup', 'method' => 'getAgentsByGroup',
'id_group' => $id_group, 'id_group' => $id_group,
], ],
'dom_elements' => 'lpfti',
'no_sortable_columns' => [-1], 'no_sortable_columns' => [-1],
'order' => [ 'order' => [
'field' => 'alias', 'field' => 'alias',

View File

@ -306,21 +306,37 @@ $onheader['snmp'] = $snmptab;
$onheader['satellite'] = $satellitetab; $onheader['satellite'] = $satellitetab;
$onheader['services'] = $servicestab; $onheader['services'] = $servicestab;
// Header. // Header.
if (is_metaconsole() === false) { ui_print_standard_header(
ui_print_page_header( __('Bulk operations').' - '.$options[$option],
__('Bulk operations').' &raquo; '.$options[$option],
'images/gm_massive_operations.png', 'images/gm_massive_operations.png',
false, false,
$help_header, $help_header,
true,
$onheader,
false, false,
'massivemodal' [
$agentstab,
$modulestab,
$pluginstab,
$userstab,
$alertstab,
$policiestab,
$snmptab,
$satellitetab,
$servicestab,
],
[
[
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Bulk operations'),
],
]
); );
} else {
massive_meta_print_header();
}
// Checks if the PHP configuration is correctly. // Checks if the PHP configuration is correctly.
if ((get_cfg_var('max_execution_time') != 0) if ((get_cfg_var('max_execution_time') != 0)

View File

@ -364,6 +364,11 @@ if ($access_console_node === true) {
$sub2['godmode/setup/setup&section=net']['text'] = __('Netflow'); $sub2['godmode/setup/setup&section=net']['text'] = __('Netflow');
$sub2['godmode/setup/setup&section=net']['refr'] = 0; $sub2['godmode/setup/setup&section=net']['refr'] = 0;
} }
if ((bool) $config['activate_sflow'] === true) {
$sub2['godmode/setup/setup&section=sflow']['text'] = __('Sflow');
$sub2['godmode/setup/setup&section=sflow']['refr'] = 0;
}
} }
$sub2['godmode/setup/setup&section=ehorus']['text'] = __('eHorus'); $sub2['godmode/setup/setup&section=ehorus']['text'] = __('eHorus');

View File

@ -297,7 +297,7 @@ if (!empty($table->data)) {
html_print_input_hidden('multiple_delete', 1); html_print_input_hidden('multiple_delete', 1);
ui_pagination($count_network_templates, false, $offset); ui_pagination($count_network_templates, false, $offset);
html_print_table($table); html_print_table($table);
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom'); ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, '');
echo "<div class='pdd_l_5px right'>"; echo "<div class='pdd_l_5px right'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</div>'; echo '</div>';

View File

@ -56,9 +56,13 @@ ui_print_standard_header(
[ [
[ [
'link' => '', 'link' => '',
'label' => __('Netflow'), 'label' => __('Resources'),
], ],
[
'link' => '',
'label' => __('Netflow filters'),
], ],
]
); );
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); $is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
@ -211,7 +215,6 @@ $buttons = html_print_submit_button(
true true
); );
// hd($filters);
if (empty($filters) === false) { if (empty($filters) === false) {
echo '<form id="multiple_delete" method="POST" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure='.$pure.'">'; echo '<form id="multiple_delete" method="POST" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure='.$pure.'">';
html_print_input_hidden('multiple_delete', 1); html_print_input_hidden('multiple_delete', 1);

View File

@ -445,7 +445,7 @@ if (!empty($graphs)) {
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>"; echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
html_print_input_hidden('multiple_delete', 1); html_print_input_hidden('multiple_delete', 1);
html_print_table($table); html_print_table($table);
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom'); ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, '');
echo "<div class='right'>"; echo "<div class='right'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"'); html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</form>'; echo '</form>';

View File

@ -115,6 +115,7 @@ $exception_condition_value = 10;
$modulegroup = 0; $modulegroup = 0;
$period = SECONDS_1DAY; $period = SECONDS_1DAY;
$search = ''; $search = '';
$full_text = 0;
$log_number = 1000; $log_number = 1000;
// Added support for projection graphs. // Added support for projection graphs.
$period_pg = SECONDS_5DAY; $period_pg = SECONDS_5DAY;
@ -316,6 +317,7 @@ switch ($action) {
$source = $es['source']; $source = $es['source'];
$search = $es['search']; $search = $es['search'];
$log_number = empty($es['log_number']) ? $log_number : $es['log_number']; $log_number = empty($es['log_number']) ? $log_number : $es['log_number'];
$full_text = empty($es['full_text']) ? 0 : $es['full_text'];
break; break;
case 'simple_graph': case 'simple_graph':
@ -1047,17 +1049,6 @@ $class = 'databox filters';
?> ?>
<table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> <table id="table_item_edit_reporting" class="<?php echo $class; ?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%">
<?php
if (defined('METACONSOLE')) {
echo '<thead>
<tr>
<th align=center colspan=5>
'.__('Item Editor').'
</th>
</tr>
</thead>';
}
?>
<tbody> <tbody>
<tr id="row_type" class="datos"> <tr id="row_type" class="datos">
<td class="bolder w220px"> <td class="bolder w220px">
@ -1324,6 +1315,14 @@ $class = 'databox filters';
<td > <td >
<?php <?php
html_print_input_text('search', $search, '', 40, 100); html_print_input_text('search', $search, '', 40, 100);
html_print_checkbox(
'full_text',
1,
$full_text,
false,
false
);
ui_print_help_tip(__('Full context'), false);
?> ?>
</td> </td>
</tr> </tr>

View File

@ -201,7 +201,6 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
$urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter; $urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter;
if (!defined('METACONSOLE')) {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv'; $table->class = 'filter-table-adv';
@ -282,58 +281,6 @@ if (!defined('METACONSOLE')) {
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Filters'), '', '', false); ui_toggle($form, __('Filters'), '', '', false);
} else {
$table = new stdClass();
$table->width = '96%';
$table->class = 'databox_filters';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->data[0][0] = __('Agents');
$table->data[0][1] = html_print_select(
$agents,
'agent_filter',
$agentFilter,
'',
__('All'),
0,
true
);
$table->data[0][2] = __('Modules');
$table->data[0][3] = html_print_select(
$modules,
'module_filter',
$moduleFilter,
'',
__('All'),
0,
true
);
$table->data[0][4] = __('Type');
$table->data[0][5] = html_print_select(
$types,
'type_filter',
$typeFilter,
'',
__('All'),
0,
true
);
$table->style[6] = 'text-align:right;';
$table->data[0][6] = html_print_submit_button(
__('Filter'),
'filter',
false,
'class="sub upd"',
true
).html_print_input_hidden('action', 'filter', true);
$filters = '<form class="filters_form" method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=
list_items&action=filter&id_report='.$idReport.'">';
$filters .= html_print_table($table, true);
$filters .= '</form>';
ui_toggle($filters, __('Show Options'));
}
$where = '1=1'; $where = '1=1';
if ($typeFilter != '0') { if ($typeFilter != '0') {
@ -412,16 +359,9 @@ $table->style[0] = 'text-align: right;';
if ($items) { if ($items) {
$table->width = '100%'; $table->width = '100%';
if (defined('METACONSOLE')) {
$table->width = '100%';
$table->class = 'databox data';
$arrow_up = 'images/sort_up.png';
$arrow_down = 'images/sort_down.png';
} else {
$table->class = 'info_table'; $table->class = 'info_table';
$arrow_up = 'images/sort_up_black.png'; $arrow_up = 'images/sort_up_black.png';
$arrow_down = 'images/sort_down_black.png'; $arrow_down = 'images/sort_down_black.png';
}
$table->size = []; $table->size = [];
$table->size[0] = '5px'; $table->size[0] = '5px';
@ -717,24 +657,6 @@ foreach ($items as $item) {
} }
} }
if (defined('METACONSOLE')) {
if ($items != false) {
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter);
html_print_table($table);
ui_pagination($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report='.$idReport.$urlFilter);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=".$idReport."'
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>";
echo "<div class='right w100p'>";
if (check_acl($config['id_user'], 0, 'RM')) {
html_print_input_hidden('ids_items_to_delete', '');
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete right mrgn_btn_15px"');
}
echo '</div>';
echo '</form>';
}
} else {
if ($items != false) { if ($items != false) {
ui_pagination( ui_pagination(
$countItems, $countItems,
@ -768,58 +690,9 @@ if (defined('METACONSOLE')) {
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
} }
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
if (defined('METACONSOLE')) {
$table->colspan[0][0] = 3;
$table->size = [];
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Sort items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Sort selected items from position: ');
$table->data[1][1] = html_print_select_style(
[
'before' => __('Move before to'),
'after' => __('Move after to'),
],
'move_to',
'',
'',
'',
'',
0,
true
);
$table->data[1][2] = html_print_input_text_extended(
'position_to_sort',
1,
'text-position_to_sort',
'',
3,
10,
false,
"only_numbers('position_to_sort');",
'',
true
);
$table->data[1][2] .= html_print_input_hidden('ids_items_to_sort', '', true);
$table->data[1][3] = html_print_submit_button(__('Sort'), 'sort_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=".$idReport."'
method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
html_print_table($table);
echo '</form>';
} else {
$table->class = 'filter-table-adv'; $table->class = 'filter-table-adv';
$table->size[0] = '50%'; $table->size[0] = '50%';
$table->size[1] = '50%'; $table->size[1] = '50%';
@ -879,57 +752,9 @@ if (defined('METACONSOLE')) {
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Sort items'), '', '', false); ui_toggle($form, __('Sort items'), '', '', false);
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
if (defined('METACONSOLE')) {
$table->colspan[0][0] = 3;
$table->size = [];
$table->size[0] = '25%';
$table->size[1] = '25%';
$table->size[2] = '25%';
$table->size[3] = '25%';
$table->class = 'databox data';
$table->head[0] = __('Delete items');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->data[1][0] = __('Delete selected items from position: ');
$table->data[1][1] = html_print_select_style(
[
'above' => __('Delete above to'),
'below' => __('Delete below to'),
],
'delete_m',
'',
'',
'',
'',
0,
true
);
$table->data[1][2] = html_print_input_text_extended(
'position_to_delete',
1,
'text-position_to_delete',
'',
3,
10,
false,
"only_numbers('position_to_delete');",
'',
true
);
$table->data[1][2] .= html_print_input_hidden('ids_items_to_delete', '', true);
$table->data[1][3] = html_print_submit_button(__('Delete'), 'delete_submit', false, 'class="sub upd"', true);
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
method='post'>";
html_print_table($table);
echo '</form>';
} else {
$table->class = 'filter-table-adv'; $table->class = 'filter-table-adv';
$table->size[0] = '50%'; $table->size[0] = '50%';
$table->size[1] = '50%'; $table->size[1] = '50%';
@ -989,7 +814,7 @@ if (defined('METACONSOLE')) {
); );
$form .= '</form>'; $form .= '</form>';
ui_toggle($form, __('Delete items'), '', '', false); ui_toggle($form, __('Delete items'), '', '', false);
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -70,21 +70,13 @@ $table->head = [];
$table->data = []; $table->data = [];
$table->size = []; $table->size = [];
if (is_metaconsole() === true) {
$table->class = 'databox filters';
$table->head[0] = __('Main data');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->size[0] = '15%';
$table->size[1] = '90%';
$table->style[0] = 'font-weight: bold; vertical-align: top;';
} else {
$table->class = 'filter-table-adv databox'; $table->class = 'filter-table-adv databox';
$table->size[0] = '50%'; $table->size[0] = '50%';
$table->size[1] = '50%'; $table->size[1] = '50%';
$table->size[2] = '50%'; $table->size[2] = '50%';
$table->size[3] = '50%'; $table->size[3] = '50%';
}
$write_groups = users_get_groups_for_select( $write_groups = users_get_groups_for_select(
false, false,
@ -95,21 +87,6 @@ $write_groups = users_get_groups_for_select(
'id_grupo' 'id_grupo'
); );
if (is_metaconsole() === true) {
$table->data['name'][0] = __('Name');
$table->data['name'][1] = html_print_input_text(
'name',
$reportName,
__('Name'),
80,
100,
true,
false,
true
);
$table->data['group'][0] = __('Group');
} else {
$table->data[0][0] = html_print_label_input_block( $table->data[0][0] = html_print_label_input_block(
__('Name'), __('Name'),
html_print_input_text( html_print_input_text(
@ -123,7 +100,7 @@ if (is_metaconsole() === true) {
true true
) )
); );
}
// If the report group is not among the // If the report group is not among the
// RW groups (special permission) we add it. // RW groups (special permission) we add it.
@ -137,25 +114,7 @@ if (users_can_manage_group_all('RW') === true) {
$return_all_group = true; $return_all_group = true;
} }
if (is_metaconsole() === true) {
$table->data['group'][1] = '<div class="w290px inline">';
$table->data['group'][1] .= html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
);
$table->data['group'][1] .= '</div>';
} else {
$table->data[0][1] = html_print_label_input_block( $table->data[0][1] = html_print_label_input_block(
__('Group'), __('Group'),
html_print_input( html_print_input(
@ -174,7 +133,21 @@ if (is_metaconsole() === true) {
] ]
) )
); );
}
$table->colspan[1][0] = 2;
$table->data[1][0] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
if ($report_id_user == $config['id_user'] if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user']) || is_user_admin($config['id_user'])
@ -185,44 +158,7 @@ if ($report_id_user == $config['id_user']
'group_edit' => __('The next group can edit the report'), 'group_edit' => __('The next group can edit the report'),
'user_edit' => __('Only the user and admin user can edit the report'), 'user_edit' => __('Only the user and admin user can edit the report'),
]; ];
if (is_metaconsole() === true) { $table->data[2][0] = html_print_label_input_block(
$table->data['access'][0] = __('Write Access');
$table->data['access'][0] .= ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
);
$table->data['access'][1] = html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
);
$class = ' invisible_important ';
if ($type_access_selected == 'group_edit') {
$class = '';
}
$table->data['access'][1] .= '<span class="access_subform'.$class.'" id="group_edit">';
$table->data['access'][1] .= '<div class="w290px inline">';
$table->data['access'][1] .= html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
);
$table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
} else {
$table->data[1][0] = html_print_label_input_block(
__('Write Access').ui_print_help_tip( __('Write Access').ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'), __('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true true
@ -244,7 +180,7 @@ if ($report_id_user == $config['id_user']
$options['div_class'] = ''; $options['div_class'] = '';
} }
$table->data[1][1] = html_print_label_input_block( $table->data[2][1] = html_print_label_input_block(
__('Group'), __('Group'),
html_print_select_groups( html_print_select_groups(
false, false,
@ -260,7 +196,6 @@ if ($report_id_user == $config['id_user']
$options $options
); );
} }
}
if ($enterpriseEnable) { if ($enterpriseEnable) {
$non_interactive_check = false; $non_interactive_check = false;
@ -268,16 +203,7 @@ if ($enterpriseEnable) {
$non_interactive_check = $non_interactive; $non_interactive_check = $non_interactive;
} }
if (is_metaconsole() === true) { $table->data[2][1] = html_print_label_input_block(
$table->data['interactive_report'][0] = __('Non interactive report');
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
true
);
} else {
$table->data[2][0] = html_print_label_input_block(
__('Non interactive report'), __('Non interactive report'),
html_print_checkbox_switch( html_print_checkbox_switch(
'non_interactive', 'non_interactive',
@ -287,50 +213,9 @@ if ($enterpriseEnable) {
) )
); );
} }
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
2,
80,
$description,
'',
true
);
} else {
$table->data[2][1] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
}
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
if (is_metaconsole() === true) {
$table->data['cover'][0] = __('Generate cover page in PDF render');
$table->data['cover'][1] = html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
);
$table->data['index'][0] = __('Generate index in PDF render');
$table->data['index'][1] = html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
);
} else {
$table->data[3][0] = html_print_label_input_block( $table->data[3][0] = html_print_label_input_block(
__('Generate cover page in PDF render'), __('Generate cover page in PDF render'),
html_print_checkbox_switch( html_print_checkbox_switch(
@ -351,7 +236,7 @@ if (enterprise_installed() === true) {
) )
); );
} }
}
echo '<form class="" method="post">'; echo '<form class="" method="post">';
html_print_table($table); html_print_table($table);

View File

@ -713,47 +713,6 @@ switch ($action) {
$table_aux = new stdClass(); $table_aux = new stdClass();
$table_aux->width = '100%'; $table_aux->width = '100%';
if (is_metaconsole()) {
$table_aux->class = 'databox filters';
$table_aux->colspan[0][0] = 4;
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
$table_aux->data[0][1] = html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
).'<br>';
$table_aux->data[0][2] = '<b>'.__('Free text for search: ');
$table_aux->data[0][2] .= ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
);
$table_aux->data[0][2] .= '</b>';
$table_aux->data[0][3] = html_print_input_text(
__('search'),
$search,
'',
30,
'',
true
);
} else {
$table_aux->class = 'filter-table-adv'; $table_aux->class = 'filter-table-adv';
$table_aux->size[0] = '30%'; $table_aux->size[0] = '30%';
$table_aux->size[1] = '30%'; $table_aux->size[1] = '30%';
@ -796,25 +755,8 @@ switch ($action) {
true true
) )
); );
}
if (is_metaconsole()) {
$table_aux->data[0][6] = html_print_submit_button(
__('Search'),
'search_submit',
false,
'class="sub upd"',
true
);
}
$url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder'; $url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder';
if (is_metaconsole()) {
$filter = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$filter .= html_print_table($table_aux, true);
$filter .= '</form>';
ui_toggle($filter, __('Show Option'));
} else {
$searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">'; $searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$searchForm .= html_print_table($table_aux, true); $searchForm .= html_print_table($table_aux, true);
$searchForm .= html_print_div( $searchForm .= html_print_div(
@ -846,7 +788,6 @@ switch ($action) {
'white-box-content', 'white-box-content',
'box-flat white_table_graph fixed_filter_bar' 'box-flat white_table_graph fixed_filter_bar'
); );
}
ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('pandora.controls');
ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('ajaxqueue');
@ -1656,11 +1597,13 @@ switch ($action) {
$agents_to_report = get_parameter('id_agents3'); $agents_to_report = get_parameter('id_agents3');
$source = get_parameter('source', ''); $source = get_parameter('source', '');
$search = get_parameter('search', ''); $search = get_parameter('search', '');
$full_text = (integer) get_parameter('full_text', 0);
$log_number = get_parameter('log_number', ''); $log_number = get_parameter('log_number', '');
$es['source'] = $source; $es['source'] = $source;
$es['id_agents'] = $agents_to_report; $es['id_agents'] = $agents_to_report;
$es['search'] = $search; $es['search'] = $search;
$es['full_text'] = $full_text;
$es['log_number'] = $log_number; $es['log_number'] = $log_number;
$values['external_source'] = json_encode($es); $values['external_source'] = json_encode($es);
@ -2601,11 +2544,13 @@ switch ($action) {
$agents_to_report = get_parameter('id_agents3'); $agents_to_report = get_parameter('id_agents3');
$source = get_parameter('source', ''); $source = get_parameter('source', '');
$search = get_parameter('search', ''); $search = get_parameter('search', '');
$full_text = (integer) get_parameter('full_text', 0);
$log_number = get_parameter('log_number', ''); $log_number = get_parameter('log_number', '');
$es['source'] = $source; $es['source'] = $source;
$es['id_agents'] = $agents_to_report; $es['id_agents'] = $agents_to_report;
$es['search'] = $search; $es['search'] = $search;
$es['full_text'] = $full_text;
$es['log_number'] = $log_number; $es['log_number'] = $log_number;
$values['external_source'] = json_encode($es); $values['external_source'] = json_encode($es);

View File

@ -137,8 +137,6 @@ echo $formHidden;
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filter-table-adv'; $table->class = 'databox filter-table-adv';
$table->size = []; $table->size = [];
$table->size[0] = '50%'; $table->size[0] = '50%';
@ -373,22 +371,20 @@ $(document).ready (function () {
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px'); alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024'); $('input[name=width]').val('1024');
$('#preimagew').html(1024); $('#preimagew').html(1024);
} } else{
else{
$('input[name=width]').val($('#imagen').width()); $('input[name=width]').val($('#imagen').width());
$('#preimagew').html($('#imagen').width()); $('#preimagew').html($('#imagen').width());
} }
if (parseInt($('#imagen').height()) < 768){ if (parseInt($('#imagen').height()) < 768){
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px'); alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768'); $('input[name=height]').val('768');
$('#preimageh').html(768); $('#preimageh').html(768);
} } else{
else{
$('input[name=height]').val($('#imagen').height()); $('input[name=height]').val($('#imagen').height());
$('#preimageh').html($('#imagen').height()); $('#preimageh').html($('#imagen').height());
} }
} } else {
else{
original_image=new Image(); original_image=new Image();
url_hack_metaconsole = metaconsole_url(); url_hack_metaconsole = metaconsole_url();
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val(); original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
@ -396,8 +392,7 @@ $(document).ready (function () {
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px'); alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024'); $('input[name=width]').val('1024');
$('#preimagew').html(1024); $('#preimagew').html(1024);
} } else {
else{
$('input[name=width]').val(original_image.height); $('input[name=width]').val(original_image.height);
$('#preimagew').html(original_image.height); $('#preimagew').html(original_image.height);
} }
@ -405,15 +400,15 @@ $(document).ready (function () {
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px'); alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768'); $('input[name=height]').val('768');
$('#preimageh').html(768); $('#preimageh').html(768);
} } else {
else{
$('input[name=height]').val(original_image.height); $('input[name=height]').val(original_image.height);
$('#preimageh').html(original_image.height); $('#preimageh').html(original_image.height);
} }
} }
}); });
$( "input[type=submit]" ).click(function( event ) { $( "button[type=submit]" ).click(function( event ) {
console.log('aaaaaaaaaaa');
if (parseInt($('input[name=width]').val()) < 1024){ if (parseInt($('input[name=width]').val()) < 1024){
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px'); alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024'); $('input[name=width]').val('1024');
@ -431,7 +426,6 @@ $(document).ready (function () {
if (x || y){ if (x || y){
return false; return false;
} }
}); });
//Preload image size and activate auto image size changer when user click over a image in the selector //Preload image size and activate auto image size changer when user click over a image in the selector

View File

@ -63,7 +63,7 @@ if (empty($idVisualConsole) === true) {
$idVisualConsole = get_parameter('id', 0); $idVisualConsole = get_parameter('id', 0);
} }
if (!defined('METACONSOLE')) { if (is_metaconsole() === false) {
$action_name_parameter = 'action'; $action_name_parameter = 'action';
} else { } else {
$action_name_parameter = 'action2'; $action_name_parameter = 'action2';
@ -93,7 +93,6 @@ $activeTab = get_parameterBetweenListValues(
'data' 'data'
); );
// Visual console creation tab and actions. // Visual console creation tab and actions.
if (empty($idVisualConsole)) { if (empty($idVisualConsole)) {
$visualConsole = null; $visualConsole = null;
@ -137,7 +136,6 @@ $refr = (int) get_parameter('refr', $config['vc_refr']);
$id_layout = 0; $id_layout = 0;
// Save/Update data in DB // Save/Update data in DB
global $statusProcessInDB; global $statusProcessInDB;
if (empty($statusProcessInDB)) { if (empty($statusProcessInDB)) {
@ -786,7 +784,7 @@ if (isset($config['vc_refr']) and $config['vc_refr'] != 0) {
$view_refresh = '300'; $view_refresh = '300';
} }
if (!defined('METACONSOLE')) { if (is_metaconsole() === false) {
$url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='; $url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action=';
$url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh; $url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh;
} else { } else {
@ -798,14 +796,18 @@ if (!defined('METACONSOLE')) {
$hash = User::generatePublicHash(); $hash = User::generatePublicHash();
$buttons = []; $buttons = [];
$buttons['consoles_list'] = [ $buttons['consoles_list'] = [
'active' => false, 'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr='.$refr.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Visual consoles list'), 'class' => 'main_menu_icon invert_filter']).'</a>', 'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr='.$refr.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Visual consoles list'), 'class' => 'main_menu_icon invert_filter']).'</a>',
]; ];
$buttons['public_link'] = [ $buttons['public_link'] = [
'active' => false, 'active' => false,
'text' => '<a href="'.ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user']).'">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public Visual Console'), 'class' => 'main_menu_icon invert_filter']).'</a>', 'text' => '<a href="'.ui_get_full_url(
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user'],
false,
false,
false
).'">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public Visual Console'), 'class' => 'main_menu_icon invert_filter']).'</a>',
]; ];
$buttons['data'] = [ $buttons['data'] = [
'active' => false, 'active' => false,
@ -839,7 +841,7 @@ $buttons['view'] = [
'text' => '<a href="'.$url_view.'">'.html_print_image('images/enable.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>', 'text' => '<a href="'.$url_view.'">'.html_print_image('images/enable.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>',
]; ];
if ($idVisualConsole === false) { if (empty($idVisualConsole) === true) {
$buttons = ['data' => $buttons['data']]; $buttons = ['data' => $buttons['data']];
// Show only the data tab // Show only the data tab
// If it is a fail try, reset the values // If it is a fail try, reset the values
@ -850,9 +852,8 @@ if ($idVisualConsole === false) {
$buttons[$activeTab]['active'] = true; $buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : ''; $tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
ui_print_standard_header( ui_print_standard_header(
$visualConsoleName, ($visualConsoleName ?? ''),
'images/visual_console.png', 'images/visual_console.png',
false, false,
$tab_builder, $tab_builder,

View File

@ -65,7 +65,7 @@ switch ($action) {
$table = new stdClass(); $table = new stdClass();
$table->class = 'info_table'; $table->class = 'info_table';
$table->width = '98%'; $table->width = '100%';
$table->head[0] = __('Map connection name'); $table->head[0] = __('Map connection name');
$table->head[1] = __('Group'); $table->head[1] = __('Group');
$table->head[3] = __('Delete'); $table->head[3] = __('Delete');
@ -84,7 +84,7 @@ if ($mapsConnections !== false) {
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>', '<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>',
ui_print_group_icon($mapsConnection['group_id'], true), ui_print_group_icon($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection" '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>', onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>',
]; ];
$table->cellclass[][2] = 'table_action_buttons'; $table->cellclass[][2] = 'table_action_buttons';
} }
@ -95,6 +95,14 @@ html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="post">'; echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="post">';
html_print_input_hidden('action', 'create_connection_map'); html_print_input_hidden('action', 'create_connection_map');
html_print_submit_button(__('Create'), '', false, 'class="sub next"'); html_print_action_buttons(
html_print_submit_button(
__('Create'),
'',
false,
['icon' => 'wand'],
true
)
);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';

View File

@ -55,7 +55,7 @@ $iconData[] = html_print_select(
$iconData[] = html_print_div( $iconData[] = html_print_div(
[ [
'id' => 'icon_image', 'id' => 'icon_image',
'class' => 'inverse_filter main_menu_icon', 'class' => 'invert_filter main_menu_icon',
'style' => 'margin-left: 10px', 'style' => 'margin-left: 10px',
'content' => ui_print_os_icon($idOS, false, true), 'content' => ui_print_os_icon($idOS, false, true),
], ],

View File

@ -69,7 +69,6 @@ if ($is_management_allowed === true) {
$table->head[4] = ''; $table->head[4] = '';
} }
$table->align[1] = 'center';
if ($is_management_allowed === true) { if ($is_management_allowed === true) {
$table->align[4] = 'center'; $table->align[4] = 'center';
} }
@ -100,7 +99,7 @@ $table->data = [];
foreach ($osList as $os) { foreach ($osList as $os) {
$data = []; $data = [];
$data[] = $os['id_os']; $data[] = $os['id_os'];
$data[] = html_print_div(['class' => 'invert_filter main_menu_icon', 'content' => ui_print_os_icon($os['id_os'], false, true)], true); $data[] = ui_print_os_icon($os['id_os'], false, true);
if ($is_management_allowed === true) { if ($is_management_allowed === true) {
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$osNameUrl = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=edit&tab2=builder&id_os='.$os['id_os']; $osNameUrl = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=edit&tab2=builder&id_os='.$os['id_os'];
@ -133,7 +132,7 @@ foreach ($osList as $os) {
$data[] = html_print_anchor( $data[] = html_print_anchor(
[ [
'href' => $hrefDelete, 'href' => $hrefDelete,
'class' => 'inverse_filter main_menu_icon', 'class' => 'invert_filter main_menu_icon',
'content' => html_print_image('images/delete.svg', true), 'content' => html_print_image('images/delete.svg', true),
], ],
true true
@ -147,17 +146,41 @@ foreach ($osList as $os) {
$table->data[] = $data; $table->data[] = $data;
} }
$tablePagination = '';
if (isset($data) === true) { if (isset($data) === true) {
html_print_table($table); html_print_table($table);
ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset, 0, false, 'offset', true, 'pagination-bottom'); $tablePagination = ui_pagination(
$count_osList,
ui_get_url_refresh(['message' => false]),
$offset,
0,
true,
'offset',
false,
''
);
} else { } else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]); ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
} }
$buttons = '';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
echo '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">'; $buttons .= '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
echo "<div style='text-align:right;width:".$table->width."'>"; $buttons .= html_print_submit_button(
html_print_submit_button(__('Create OS'), '', false, 'class="sub next"'); __('Create OS'),
echo '</div>'; '',
echo '</form>'; false,
['icon' => 'next'],
true
);
$buttons .= '</form>';
} }
html_print_action_buttons(
$buttons,
[
'type' => 'data_table',
'class' => 'fixed_action_buttons',
'right_content' => $tablePagination,
]
);

View File

@ -254,15 +254,14 @@ if ($config['history_db_enabled'] == 1) {
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'filter-table-adv';
$table->data = []; $table->data = [];
$table->style[0] = 'font-weight: bold'; $table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[0] = '70%'; $table->data[0][0] = html_print_label_input_block(
$table->size[1] = '30%'; __('Max. days before delete events'),
html_print_input(
$table->data[1][0] = __('Max. days before delete events');
$table->data[1][1] = html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -271,12 +270,13 @@ $table->data[1][1] = html_print_input(
'value' => $config['event_purge'], 'value' => $config['event_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['event_purge']->min, 'min' => $performance_variables_control['event_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[2][0] = __('Max. days before delete traps'); $table->data[0][1] = html_print_label_input_block(
$table->data[2][1] = html_print_input( __('Max. days before delete traps'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -285,12 +285,13 @@ $table->data[2][1] = html_print_input(
'value' => $config['trap_purge'], 'value' => $config['trap_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['trap_purge']->min, 'min' => $performance_variables_control['trap_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[3][0] = __('Max. days before delete audit events'); $table->data[1][0] = html_print_label_input_block(
$table->data[3][1] = html_print_input( __('Max. days before delete audit events'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -299,12 +300,13 @@ $table->data[3][1] = html_print_input(
'value' => $config['audit_purge'], 'value' => $config['audit_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['audit_purge']->min, 'min' => $performance_variables_control['audit_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[4][0] = __('Max. days before delete string data'); $table->data[1][1] = html_print_label_input_block(
$table->data[4][1] = html_print_input( __('Max. days before delete string data'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -313,12 +315,13 @@ $table->data[4][1] = html_print_input(
'value' => $config['string_purge'], 'value' => $config['string_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['string_purge']->min, 'min' => $performance_variables_control['string_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[5][0] = __('Max. days before delete GIS data'); $table->data[2][0] = html_print_label_input_block(
$table->data[5][1] = html_print_input( __('Max. days before delete GIS data'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -327,12 +330,13 @@ $table->data[5][1] = html_print_input(
'value' => $config['gis_purge'], 'value' => $config['gis_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['gis_purge']->min, 'min' => $performance_variables_control['gis_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[6][0] = __('Max. days before purge'); $table->data[2][1] = html_print_label_input_block(
$table->data[6][1] = html_print_input( __('Max. days before purge'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -341,12 +345,13 @@ $table->data[6][1] = html_print_input(
'value' => $config['days_purge'], 'value' => $config['days_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_purge']->min, 'min' => $performance_variables_control['days_purge']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[7][0] = __('Max. days before compact data'); $table->data[3][0] = html_print_label_input_block(
$table->data[7][1] = html_print_input( __('Max. days before compact data'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -355,12 +360,13 @@ $table->data[7][1] = html_print_input(
'value' => $config['days_compact'], 'value' => $config['days_compact'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_compact']->min, 'min' => $performance_variables_control['days_compact']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[8][0] = __('Max. days before delete unknown modules'); $table->data[3][1] = html_print_label_input_block(
$table->data[8][1] = html_print_input( __('Max. days before delete unknown modules'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -369,13 +375,13 @@ $table->data[8][1] = html_print_input(
'value' => $config['days_delete_unknown'], 'value' => $config['days_delete_unknown'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_delete_unknown']->min, 'min' => $performance_variables_control['days_delete_unknown']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[4][0] = html_print_label_input_block(
$table->data[9][0] = __('Max. days before delete not initialized modules'); __('Max. days before delete not initialized modules'),
$table->data[9][1] = html_print_input( html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -384,12 +390,13 @@ $table->data[9][1] = html_print_input(
'value' => $config['days_delete_not_initialized'], 'value' => $config['days_delete_not_initialized'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_delete_not_initialized']->min, 'min' => $performance_variables_control['days_delete_not_initialized']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[10][0] = __('Max. days before delete autodisabled agents'); $table->data[4][1] = html_print_label_input_block(
$table->data[10][1] = html_print_input( __('Max. days before delete autodisabled agents'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -398,45 +405,37 @@ $table->data[10][1] = html_print_input(
'value' => $config['days_autodisable_deletion'], 'value' => $config['days_autodisable_deletion'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_autodisable_deletion']->min, 'min' => $performance_variables_control['days_autodisable_deletion']->min,
'style' => 'width:43px',
] ]
)
); );
$table->data[11][0] = __('Retention period of past special days'); $table->data[5][0] = html_print_label_input_block(
$table->data[11][1] = html_print_input_text( __('Retention period of past special days'),
html_print_input_text(
'num_past_special_days', 'num_past_special_days',
$config['num_past_special_days'], $config['num_past_special_days'],
'', '',
5, false,
5, 5,
true true
)
); );
$table->data[12][0] = __('Max. macro data fields'); $table->data[5][1] = html_print_label_input_block(
$table->data[12][1] = html_print_input_text( __('Max. macro data fields'),
html_print_input_text(
'max_macro_fields', 'max_macro_fields',
$config['max_macro_fields'], $config['max_macro_fields'],
'', '',
5, false,
5, 5,
true, true,
false, false,
false, false,
'onChange="change_macro_fields()"' 'onChange="change_macro_fields()"'
)
); );
if (enterprise_installed()) {
$table->data[13][0] = __('Max. days before delete inventory data');
$table->data[13][1] = html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
'',
5,
5,
true
);
}
if ($config['history_db_enabled'] == 1) { if ($config['history_db_enabled'] == 1) {
if (! isset($config['history_db_connection']) if (! isset($config['history_db_connection'])
|| $config['history_db_connection'] === false || $config['history_db_connection'] === false
@ -459,86 +458,94 @@ if ($config['history_db_enabled'] == 1) {
$table_historical = new StdClass(); $table_historical = new StdClass();
$table_historical->width = '100%'; $table_historical->width = '100%';
$table_historical->class = 'databox filters'; $table_historical->class = 'filter-table-adv';
$table_historical->data = []; $table_historical->data = [];
$table_historical->style[0] = 'font-weight: bold';
$table_historical->size[0] = '70%'; $table_historical->size[0] = '50%';
$table_historical->size[1] = '30%'; $table_historical->size[1] = '50%';
enterprise_hook('enterprise_warnings_history_days'); enterprise_hook('enterprise_warnings_history_days');
$table_historical->data[0][0] = __('Max. days before purge'); $table_historical->data[0][0] = html_print_label_input_block(
$table_historical->data[0][1] = html_print_input_text( __('Max. days before purge'),
html_print_input_text(
'historical_days_purge', 'historical_days_purge',
$config_history['days_purge'], $config_history['days_purge'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_historical->data[1][0] = __('Max. days before compact data'); $table_historical->data[0][1] = html_print_label_input_block(
$table_historical->data[1][1] = html_print_input_text( __('Max. days before compact data'),
html_print_input_text(
'historical_days_compact', 'historical_days_compact',
$config_history['days_compact'], $config_history['days_compact'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table_historical->data[1][0] = html_print_label_input_block(
$table_historical->data[2][1] = html_print_input_text( __('Compact interpolation in hours (1 Fine-20 bad)'),
html_print_input_text(
'historical_step_compact', 'historical_step_compact',
$config_history['step_compact'], $config_history['step_compact'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_historical->data[3][0] = __('Max. days before delete events'); $table_historical->data[1][1] = html_print_label_input_block(
$table_historical->data[3][1] = html_print_input_text( __('Max. days before delete events'),
html_print_input_text(
'historical_event_purge', 'historical_event_purge',
$config_history['event_purge'], $config_history['event_purge'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_historical->data[4][0] = __('Max. days before delete string data'); $table_historical->data[2][0] = html_print_label_input_block(
$table_historical->data[4][1] = html_print_input_text( __('Max. days before delete string data'),
html_print_input_text(
'historical_string_purge', 'historical_string_purge',
$config_history['string_purge'], $config_history['string_purge'],
'', '',
5, 5,
5, 5,
true true
)
); );
$table_historical->data[4][1] .= html_print_input_hidden( $table_historical->data[2][0] .= html_print_input_hidden(
'historical_history_db_enabled', 'historical_history_db_enabled',
0, 0,
true true
); );
} }
$table->data[] = [ $table->data[6][0] = html_print_label_input_block(
__('Max. days before delete old messages'), __('Max. days before delete old messages'),
html_print_input_text( html_print_input_text(
'delete_old_messages', 'delete_old_messages',
$config['delete_old_messages'], $config['delete_old_messages'],
'', '',
5, false,
5, 5,
true true
), )
]; );
$table->data[6][1] = html_print_label_input_block(
$table->data[] = [
__('Max. days before delete old network matrix data'), __('Max. days before delete old network matrix data'),
html_print_input( html_print_input(
[ [
@ -549,22 +556,35 @@ $table->data[] = [
'value' => $config['delete_old_network_matrix'], 'value' => $config['delete_old_network_matrix'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['delete_old_network_matrix']->min, 'min' => $performance_variables_control['delete_old_network_matrix']->min,
'style' => 'width:43px',
] ]
), )
]; );
if (enterprise_installed()) {
$table->data[7][0] = html_print_label_input_block(
__('Max. days before delete inventory data'),
html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
'',
false,
5,
true
)
);
}
$table_other = new stdClass(); $table_other = new stdClass();
$table_other->width = '100%'; $table_other->width = '100%';
$table_other->class = 'databox filters'; $table_other->class = 'filter-table-adv';
$table_other->data = []; $table_other->data = [];
$table_other->style[0] = 'font-weight: bold';
$table_other->size[0] = '70%'; $table_other->size[0] = '50%';
$table_other->size[1] = '30%'; $table_other->size[1] = '50%';
$i = 0;
$table_other->data[$i][0] = __('Item limit for realtime reports'); $table_other->data[0][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Item limit for realtime reports'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -573,12 +593,13 @@ $table_other->data[$i++][1] = html_print_input(
'value' => $config['report_limit'], 'value' => $config['report_limit'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['report_limit']->min, 'min' => $performance_variables_control['report_limit']->min,
'style' => 'width:43px',
] ]
)
); );
$table_other->data[$i][0] = __('Limit of events per query'); $table_other->data[0][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Limit of events per query'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -586,18 +607,20 @@ $table_other->data[$i++][1] = html_print_input(
'name' => 'events_per_query', 'name' => 'events_per_query',
'value' => $config['events_per_query'], 'value' => $config['events_per_query'],
'return' => true, 'return' => true,
'style' => 'width:50px',
] ]
)
); );
$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table_other->data[1][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Compact interpolation in hours (1 Fine-20 bad)'),
html_print_input_text(
'step_compact', 'step_compact',
$config['step_compact'], $config['step_compact'],
'', '',
5, false,
5, 5,
true true
)
); );
$intervals = []; $intervals = [];
@ -610,8 +633,9 @@ $intervals[SECONDS_1WEEK] = __('Last week');
$intervals[SECONDS_2WEEK] = __('2 weeks'); $intervals[SECONDS_2WEEK] = __('2 weeks');
$intervals[SECONDS_1MONTH] = __('Last month'); $intervals[SECONDS_1MONTH] = __('Last month');
$table_other->data[$i][0] = __('Default hours for event view'); $table_other->data[1][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Default hours for event view'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -620,46 +644,68 @@ $table_other->data[$i++][1] = html_print_input(
'value' => $config['event_view_hr'], 'value' => $config['event_view_hr'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['event_view_hr']->min, 'min' => $performance_variables_control['event_view_hr']->min,
'style' => 'width:43px',
] ]
)
); );
$table_other->data[$i][0] = __('Use realtime statistics'); $table_other->data[2][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch( __('Use realtime statistics'),
html_print_checkbox_switch(
'realtimestats', 'realtimestats',
1, 1,
$config['realtimestats'], $config['realtimestats'],
true true
)
); );
$table_other->data[$i][0] = __('Batch statistics period (secs)'); $table_other->data[2][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Batch statistics period (secs)'),
html_print_input_text(
'stats_interval', 'stats_interval',
$config['stats_interval'], $config['stats_interval'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_other->data[$i][0] = __('Use agent access graph'); $table_other->data[3][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true, $disable_agentaccess); __('Use agent access graph'),
html_print_checkbox_switch(
'agentaccess',
1,
$config['agentaccess'],
true,
$disable_agentaccess
)
);
$table_other->data[$i][0] = __('Max. recommended number of files in attachment directory'); $table_other->data[3][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Max. recommended number of files in attachment directory'),
html_print_input_text(
'num_files_attachment', 'num_files_attachment',
$config['num_files_attachment'], $config['num_files_attachment'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_other->data[$i][0] = __('Delete not init modules'); $table_other->data[4][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true); __('Delete not init modules'),
html_print_checkbox_switch(
'delete_notinit',
1,
$config['delete_notinit'],
true
)
);
$table_other->data[$i][0] = __('Big Operation Step to purge old data'); $table_other->data[4][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Big Operation Step to purge old data'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -668,14 +714,13 @@ $table_other->data[$i++][1] = html_print_input(
'value' => $config['big_operation_step_datos_purge'], 'value' => $config['big_operation_step_datos_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min, 'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
'style' => 'width:50px',
] ]
)
); );
$table_other->data[5][0] = html_print_label_input_block(
__('Small Operation Step to purge old data'),
$table_other->data[$i][0] = __('Small Operation Step to purge old data'); html_print_input(
$table_other->data[$i++][1] = html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -684,32 +729,37 @@ $table_other->data[$i++][1] = html_print_input(
'value' => $config['small_operation_step_datos_purge'], 'value' => $config['small_operation_step_datos_purge'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min, 'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
'style' => 'width:50px',
] ]
)
); );
$table_other->data[$i][0] = __('Graph container - Max. Items'); $table_other->data[5][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Graph container - Max. Items'),
html_print_input_text(
'max_graph_container', 'max_graph_container',
$config['max_graph_container'], $config['max_graph_container'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_other->data[$i][0] = __('Events response max. execution'); $table_other->data[6][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Events response max. execution'),
html_print_input_text(
'max_execution_event_response', 'max_execution_event_response',
$config['max_execution_event_response'], $config['max_execution_event_response'],
'', '',
5, false,
5, 5,
true true
)
); );
$table_other->data[$i][0] = __('Row limit in csv log'); $table_other->data[6][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Row limit in csv log'),
html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
@ -718,32 +768,37 @@ $table_other->data[$i++][1] = html_print_input(
'value' => $config['row_limit_csv'], 'value' => $config['row_limit_csv'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['row_limit_csv']->min, 'min' => $performance_variables_control['row_limit_csv']->min,
'style' => 'width:63px',
] ]
)
); );
$table_other->data[$i][0] = __('SNMP walk binary'); $table_other->data[7][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('SNMP walk binary'),
html_print_input_text(
'snmpwalk', 'snmpwalk',
$config['snmpwalk'], $config['snmpwalk'],
'', '',
50, false,
10, 10,
true true
)
); );
$tip = ui_print_help_tip( $tip = ui_print_help_tip(
__('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'), __('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'),
true true
); );
$table_other->data[$i][0] = __('SNMP walk binary (fallback)').$tip;
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[7][1] = html_print_label_input_block(
__('SNMP walk binary (fallback)').$tip,
html_print_input_text(
'snmpwalk_fallback', 'snmpwalk_fallback',
$config['snmpwalk_fallback'], $config['snmpwalk_fallback'],
'', '',
50, false,
10, 10,
true true
)
); );
$tip = ui_print_help_tip( $tip = ui_print_help_tip(
@ -754,41 +809,45 @@ $tip = ui_print_help_tip(
true true
); );
$table_other->data[$i][0] = __('WMI binary'); $table_other->data[8][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('WMI binary'),
html_print_input_text(
'wmiBinary', 'wmiBinary',
$config['wmiBinary'], $config['wmiBinary'],
'', '',
50, false,
50, 50,
true true
)
); );
// Agent Wizard defaults. // Agent Wizard defaults.
$defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults'])); $defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults']));
$tableSnmpWizard = new stdClass(); $tableSnmpWizard = new stdClass();
$tableSnmpWizard->width = '100%'; $tableSnmpWizard->width = '100%';
$tableSnmpWizard->class = 'databox filters'; $tableSnmpWizard->class = 'filter-table-adv';
$tableSnmpWizard->data = []; $tableSnmpWizard->data = [];
$tableSnmpWizard->style[0] = 'font-weight: bold'; $tableSnmpWizard->size[0] = '50%';
$tableSnmpWizard->style[2] = 'font-weight: bold'; $tableSnmpWizard->size[1] = '50%';
$tableSnmpWizard->size[0] = '30%';
$tableSnmpWizard->size[2] = '30%';
$i = 0; $i = 0;
$j = 0; $j = 0;
foreach ($defaultAgentWizardOptions as $key => $value) { foreach ($defaultAgentWizardOptions as $key => $value) {
$tableSnmpWizard->data[$i][$j++] = $key; if ($i > 1) {
$tableSnmpWizard->data[$i][$j++] = html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true); $i = 0;
if ($j >= 3) { $j++;
$j = 0; }
$tableSnmpWizard->data[$j][$i] = html_print_label_input_block(
$key,
html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true)
);
$i++; $i++;
} }
}
echo '<form id="form_setup" method="post">'; echo '<form id="form_setup" method="post" class="max_floating_element_size">';
echo '<fieldset class="full-column">'; echo '<fieldset>';
echo '<legend>'.__('Database maintenance status').' '.ui_print_help_icon('database_maintenance_status_tab', true).'</legend>'; echo '<legend>'.__('Database maintenance status').' '.ui_print_help_icon('database_maintenance_status_tab', true).'</legend>';
html_print_table($table_status); html_print_table($table_status);
echo '</fieldset>'; echo '</fieldset>';
@ -817,18 +876,14 @@ echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
html_print_div( $actionButtons = html_print_submit_button(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
[ 'icon' => 'update' ], [ 'icon' => 'update' ],
true true
),
]
); );
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
echo '</form>'; echo '</form>';
?> ?>

View File

@ -154,6 +154,20 @@ if (check_acl($config['id_user'], 0, 'AW')) {
).'</a>', ).'</a>',
]; ];
} }
if ($config['activate_sflow']) {
$buttons['sflow'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=sflow').'">'.html_print_image(
'images/op_recon.png',
true,
[
'title' => __('Sflow'),
'class' => 'invert_filter',
]
).'</a>',
];
}
} }
$buttons['integria'] = [ $buttons['integria'] = [
@ -277,6 +291,12 @@ switch ($section) {
$help_header = 'setup_netflow_tab'; $help_header = 'setup_netflow_tab';
break; break;
case 'sflow':
$buttons['sflow']['active'] = true;
$subpage = __('Sflow');
$help_header = 'setup_flow_tab';
break;
case 'ehorus': case 'ehorus':
$buttons['ehorus']['active'] = true; $buttons['ehorus']['active'] = true;
$subpage = __('eHorus'); $subpage = __('eHorus');
@ -410,6 +430,10 @@ switch ($section) {
include_once $config['homedir'].'/godmode/setup/setup_netflow.php'; include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
break; break;
case 'sflow':
include_once $config['homedir'].'/godmode/setup/setup_sflow.php';
break;
case 'vis': case 'vis':
include_once $config['homedir'].'/godmode/setup/setup_visuals.php'; include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
break; break;

View File

@ -43,7 +43,7 @@ if (is_ajax() === true) {
$table = new StdClass(); $table = new StdClass();
$table->data = []; $table->data = [];
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters table_result_auth'; $table->class = 'databox filters table_result_auth filter-table-adv';
$table->size['name'] = '30%'; $table->size['name'] = '30%';
$table->style['name'] = 'font-weight: bold'; $table->style['name'] = 'font-weight: bold';
@ -94,7 +94,11 @@ if (is_ajax() === true) {
'', '',
30, 30,
100, 100,
true true,
false,
false,
'',
'w400px'
); );
$table->data['ldap_server'] = $row; $table->data['ldap_server'] = $row;
@ -107,7 +111,11 @@ if (is_ajax() === true) {
'', '',
10, 10,
100, 100,
true true,
false,
false,
'',
'w400px'
); );
$table->data['ldap_port'] = $row; $table->data['ldap_port'] = $row;
@ -126,7 +134,10 @@ if (is_ajax() === true) {
'', '',
'', '',
0, 0,
true true,
false,
true,
'w400px'
); );
$table->data['ldap_version'] = $row; $table->data['ldap_version'] = $row;
@ -189,12 +200,12 @@ if (is_ajax() === true) {
$alt = '', $alt = '',
60, 60,
100, 100,
true true,
); false,
$row['control'] .= ui_print_reveal_password( false,
'ldap_admin_pass', 'w400px-important'
true
); );
$table->data['ldap_admin_pass'] = $row; $table->data['ldap_admin_pass'] = $row;
// Ldapsearch timeout. // Ldapsearch timeout.
@ -208,7 +219,11 @@ if (is_ajax() === true) {
'', '',
10, 10,
10, 10,
true true,
false,
false,
'',
'w400px'
); );
$table->data['ldap_search_timeout'] = $row; $table->data['ldap_search_timeout'] = $row;
@ -239,7 +254,11 @@ if (is_ajax() === true) {
'', '',
30, 30,
100, 100,
true true,
false,
false,
'',
'w400px'
); );
$table->data['ldap_server_secondary'] = $row; $table->data['ldap_server_secondary'] = $row;
@ -252,7 +271,11 @@ if (is_ajax() === true) {
'', '',
10, 10,
100, 100,
true true,
false,
false,
'',
'w400px'
); );
$table->data['ldap_port_secondary'] = $row; $table->data['ldap_port_secondary'] = $row;
@ -271,7 +294,10 @@ if (is_ajax() === true) {
'', '',
'', '',
0, 0,
true true,
false,
true,
'w400px'
); );
$table->data['ldap_version_secondary'] = $row; $table->data['ldap_version_secondary'] = $row;
@ -334,11 +360,10 @@ if (is_ajax() === true) {
$alt = '', $alt = '',
60, 60,
100, 100,
true true,
); false,
$row['control'] .= ui_print_reveal_password( false,
'ldap_admin_pass_secondary', 'w400px-important'
true
); );
$table->data['ldap_admin_pass_secondary'] = $row; $table->data['ldap_admin_pass_secondary'] = $row;
break; break;
@ -407,7 +432,11 @@ if (is_ajax() === true) {
'', '',
10, 10,
10, 10,
true true,
false,
false,
'',
'w400px'
); );
$table->data['session_timeout'] = $row; $table->data['session_timeout'] = $row;
@ -421,7 +450,7 @@ require_once $config['homedir'].'/include/functions_profile.php';
$table = new StdClass(); $table = new StdClass();
$table->data = []; $table->data = [];
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters filter-table-adv';
$table->size['name'] = '30%'; $table->size['name'] = '30%';
$table->style['name'] = 'font-weight: bold'; $table->style['name'] = 'font-weight: bold';
@ -459,12 +488,15 @@ $row['control'] = html_print_select(
'', '',
'', '',
0, 0,
true true,
false,
true,
'w400px'
); );
$table->data['auth'] = $row; $table->data['auth'] = $row;
// Form. // Form.
echo '<form id="form_setup" method="post">'; echo '<form id="form_setup" class="max_floating_element_size" method="post">';
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
@ -478,17 +510,14 @@ html_print_csrf_hidden();
html_print_table($table); html_print_table($table);
html_print_div([ 'id' => 'table_auth_result' ]); html_print_div([ 'id' => 'table_auth_result' ]);
html_print_div( html_print_action_buttons(
[ html_print_submit_button(
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
[ 'icon' => 'update' ], [ 'icon' => 'update' ],
true true
), )
]
); );
echo '</form>'; echo '</form>';

View File

@ -74,52 +74,70 @@ $table_remote->data = [];
$table_remote->width = '100%'; $table_remote->width = '100%';
$table_remote->styleTable = 'margin-bottom: 10px;'; $table_remote->styleTable = 'margin-bottom: 10px;';
$table_remote->id = 'ehorus-remote-setup'; $table_remote->id = 'ehorus-remote-setup';
$table_remote->class = 'databox filters'; $table_remote->class = 'databox filters filter-table-adv';
$table_remote->size['name'] = '30%'; $table_remote->size['ehorus_hostname'] = '50%';
$table_remote->style['name'] = 'font-weight: bold'; $table_remote->size['ehorus_port'] = '50%';
$table_remote->style['control'] = 'display: flex;align-items: center;';
// Enable eHorus user configuration. // Enable eHorus user configuration.
$row = []; $row = [];
$row['name'] = ('eHorus configuration at user level'); $row['ehorus_user_level_conf'] = html_print_label_input_block(
$row['control'] = html_print_checkbox_switch('ehorus_user_level_conf', 1, $config['ehorus_user_level_conf'], true); __('eHorus configuration at user level'),
html_print_checkbox_switch(
'ehorus_user_level_conf',
1,
$config['ehorus_user_level_conf'],
true
)
);
$table_remote->data['ehorus_user_level_conf'] = $row; $table_remote->data['ehorus_user_level_conf'] = $row;
// User. // User.
$row = []; $row = [];
$row['name'] = __('User'); $row['ehorus_user'] = html_print_label_input_block(
$row['control'] = html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true); __('User'),
$table_remote->data['ehorus_user'] = $row; html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true),
['div_class' => 'ehorus-remote-setup-ehorus_user']
);
// Pass. // Pass.
$row = []; $row['ehorus_pass'] = html_print_label_input_block(
$row['name'] = __('Password'); __('Password'),
$row['control'] = html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true); html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true),
$row['control'] .= ui_print_reveal_password('ehorus_pass', true); ['div_class' => 'ehorus-remote-setup-ehorus_user']
);
$table_remote->data['ehorus_pass'] = $row; $table_remote->data['ehorus_pass'] = $row;
// Directory hostname. // Directory hostname.
$row = []; $row = [];
$row['name'] = __('API Hostname'); $row['ehorus_hostname'] = html_print_label_input_block(
$row['control'] = html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true); __('API Hostname'),
$table_remote->data['ehorus_hostname'] = $row; html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true)
);
// Directory port. // Directory port.
$row = []; $row['ehorus_port'] = html_print_label_input_block(
$row['name'] = __('API Port'); __('API Port'),
$row['control'] = html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true); html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true)
);
$table_remote->data['ehorus_port'] = $row; $table_remote->data['ehorus_port'] = $row;
// Request timeout. // Request timeout.
$row = []; $row = [];
$row['name'] = __('Request timeout'); $row['ehorus_req_timeout'] = html_print_label_input_block(
$row['control'] = html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true); __('Request timeout'),
html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true)
);
$table_remote->data['ehorus_req_timeout'] = $row; $table_remote->data['ehorus_req_timeout'] = $row;
// Test. // Test.
$row = []; $row = [];
$row['name'] = __('Test'); $test_start = '<span id="test-ehorus-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] = html_print_button( $test_start .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$test_start .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$test_start .= '&nbsp;<span id="test-ehorus-message" class="invisible"></span>';
$row['ehorus_test'] = html_print_label_input_block(
__('Test'),
html_print_button(
__('Start'), __('Start'),
'test-ehorus', 'test-ehorus',
false, false,
@ -127,29 +145,27 @@ $row['control'] = html_print_button(
[ [
'icon' => 'cog', 'icon' => 'cog',
'mode' => 'secondary mini', 'mode' => 'secondary mini',
'style' => 'width: 115px;',
], ],
true true
).$test_start
); );
$row['control'] .= '<span id="test-ehorus-spinner" class="invisible">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] .= '<span id="test-ehorus-success" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$row['control'] .= '<span id="test-ehorus-failure" class="invisible">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$row['control'] .= '&nbsp;<span id="test-ehorus-message" class="invisible"></span>';
$table_remote->data['ehorus_test'] = $row; $table_remote->data['ehorus_test'] = $row;
// Print. // Print.
echo '<div class="center pdd_b_20px mrgn_top_20px">'; echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://ehorus.com">'; echo '<a target="_blank" rel="noopener noreferrer" href="http://ehorus.com">';
if ($config['style'] === 'pandora_black' && is_metaconsole() === true) { if ($config['style'] === 'pandora_black' && is_metaconsole() === true) {
html_print_image( html_print_image(
'include/ehorus/images/ehorus-logo.png', 'include/ehorus/images/ehorus-logo.png',
false, false,
['class' => 'w400px'] ['class' => 'w400px mrgn_top_15px']
); );
} else { } else {
html_print_image( html_print_image(
'include/ehorus/images/ehorus-logo-grey.png', 'include/ehorus/images/ehorus-logo-grey.png',
false, false,
['class' => 'w400px'] ['class' => 'w400px mrgn_top_15px']
); );
} }
@ -179,7 +195,7 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) {
ui_print_error_message($error_message); ui_print_error_message($error_message);
} }
echo "<form method='post'>"; echo "<form method='post' class='max_floating_element_size'>";
// Form enable. // Form enable.
echo '<div id="form_enable">'; echo '<div id="form_enable">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
@ -195,17 +211,14 @@ echo '</div>';
echo '</fieldset>'; echo '</fieldset>';
echo '</div>'; echo '</div>';
html_print_div( html_print_action_buttons(
[ html_print_submit_button(
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
['icon' => 'update'], ['icon' => 'update'],
true true
), )
]
); );
echo '</form>'; echo '</form>';
@ -220,8 +233,8 @@ if(!$('input:checkbox[name="ehorus_enabled"]').is(':checked'))
if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked')) if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
{ {
$('#ehorus-remote-setup-ehorus_user').hide(); $('.ehorus-remote-setup-ehorus_user').hide();
$('#ehorus-remote-setup-ehorus_pass').hide() $('.ehorus-remote-setup-ehorus_pass').hide()
} }
@ -234,13 +247,13 @@ if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
} }
var hideUserPass = function () { var hideUserPass = function () {
$('#ehorus-remote-setup-ehorus_user').hide(); $('.ehorus-remote-setup-ehorus_user').hide();
$('#ehorus-remote-setup-ehorus_pass').hide(); $('.ehorus-remote-setup-ehorus_pass').hide();
} }
var showUserPass = function () { var showUserPass = function () {
$('#ehorus-remote-setup-ehorus_user').show(); $('.ehorus-remote-setup-ehorus_user').show();
$('#ehorus-remote-setup-ehorus_pass').show(); $('.ehorus-remote-setup-ehorus_pass').show();
} }
var handleEnable = function (event) { var handleEnable = function (event) {

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
* *
* ============================================================================ * ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list * Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License

File diff suppressed because it is too large Load Diff

View File

@ -269,52 +269,102 @@ $table_remote->data = [];
$table_remote->width = '100%'; $table_remote->width = '100%';
$table_remote->styleTable = 'margin-bottom: 10px;'; $table_remote->styleTable = 'margin-bottom: 10px;';
$table_remote->id = 'integria-remote-setup'; $table_remote->id = 'integria-remote-setup';
$table_remote->class = 'databox filters'; $table_remote->class = 'databox filters filter-table-adv';
$table_remote->size['name'] = '30%'; $table_remote->size['hostname'] = '50%';
$table_remote->style['name'] = 'font-weight: bold'; $table_remote->size['api_pass'] = '50%';
$table_remote->style['control'] = 'display: flex;align-items: center;';
// Enable eHorus user configuration. // Enable Integria user configuration.
$row = []; $row = [];
$row['name'] = ('Integria configuration at user level'); $row['user_level'] = html_print_label_input_block(
$row['control'] = html_print_checkbox_switch('integria_user_level_conf', 1, $config['integria_user_level_conf'], true); __('Integria configuration at user level'),
html_print_checkbox_switch(
'integria_user_level_conf',
1,
$config['integria_user_level_conf'],
true
)
);
$table_remote->data['integria_user_level_conf'] = $row; $table_remote->data['integria_user_level_conf'] = $row;
// Integria user. // Integria user.
$row = []; $row = [];
$row['name'] = __('User'); $row['user'] = html_print_label_input_block(
$row['control'] = html_print_input_text('integria_user', $config['integria_user'], '', 30, 100, true); __('User'),
$table_remote->data['integria_user'] = $row; html_print_input_text(
'integria_user',
$config['integria_user'],
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_user']
);
// Integria password. // Integria password.
$row = []; $row['password'] = html_print_label_input_block(
$row['name'] = __('Password'); __('Password'),
$row['control'] = html_print_input_password('integria_pass', io_output_password($config['integria_pass']), '', 30, 100, true); html_print_input_password(
$row['control'] .= ui_print_reveal_password('integria_pass', true); 'integria_pass',
io_output_password($config['integria_pass']),
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_pass']
);
$table_remote->data['integria_pass'] = $row; $table_remote->data['integria_pass'] = $row;
// Integria hostname. // Integria hostname.
$row = []; $row = [];
$row['name'] = __('URL to Integria IMS setup').ui_print_help_tip(__('Full URL to your Integria IMS setup (e.g., http://192.168.1.20/integria, https://support.mycompany.com).'), true); $row['hostname'] = html_print_label_input_block(
$row['control'] = html_print_input_text('integria_hostname', $config['integria_hostname'], '', 30, 100, true); __('URL to Integria IMS setup').ui_print_help_tip(__('Full URL to your Integria IMS setup (e.g., http://192.168.1.20/integria, https://support.mycompany.com).'), true),
$table_remote->data['integria_hostname'] = $row; html_print_input_text(
'integria_hostname',
$config['integria_hostname'],
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_hostname']
);
// API password. // API password.
$row = []; $row['api_pass'] = html_print_label_input_block(
$row['name'] = __('API Password'); __('API Password'),
$row['control'] = html_print_input_password('integria_api_pass', io_output_password($config['integria_api_pass']), '', 30, 100, true); html_print_input_password(
$row['control'] .= ui_print_reveal_password('integria_api_pass', true); 'integria_api_pass',
io_output_password($config['integria_api_pass']),
'',
30,
100,
true
),
['div_class' => 'integria-remote-setup-integria_api_pass']
);
$table_remote->data['integria_api_pass'] = $row; $table_remote->data['integria_api_pass'] = $row;
// Request timeout. // Request timeout.
$row = []; $row = [];
$row['name'] = __('Request timeout'); $row['req_timeout'] = html_print_label_input_block(
$row['control'] = html_print_input_text('integria_req_timeout', $config['integria_req_timeout'], '', 3, 10, true); __('Request timeout'),
html_print_input_text(
'integria_req_timeout',
$config['integria_req_timeout'],
'',
3,
10,
true
),
['div_class' => 'integria-remote-setup-integria_req_timeout']
);
$table_remote->data['integria_req_timeout'] = $row; $table_remote->data['integria_req_timeout'] = $row;
$row = []; $row = [];
$row['name'] = __('Inventory'); $row['control'] = __('Inventory');
$row['control'] = html_print_button( $row['control'] .= html_print_button(
__('Sync inventory'), __('Sync inventory'),
'sync-inventory', 'sync-inventory',
false, false,
@ -336,14 +386,15 @@ $table_alert_settings->data = [];
$table_alert_settings->width = '100%'; $table_alert_settings->width = '100%';
$table_alert_settings->styleTable = 'margin-bottom: 10px;'; $table_alert_settings->styleTable = 'margin-bottom: 10px;';
$table_alert_settings->id = 'integria-cr-settings-setup'; $table_alert_settings->id = 'integria-cr-settings-setup';
$table_alert_settings->class = 'databox filters'; $table_alert_settings->class = 'databox filters filter-table-adv';
$table_alert_settings->size['name'] = '30%'; $table_alert_settings->size[0] = '50%';
$table_alert_settings->style['name'] = 'font-weight: bold'; $table_alert_settings->size[1] = '50%';
// Alert incident title. // Alert incident title.
$row = []; $row = [];
$row['name'] = __('Title'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_input_text( __('Title'),
html_print_input_text(
'incident_title', 'incident_title',
$config['incident_title'], $config['incident_title'],
__('Name'), __('Name'),
@ -352,26 +403,28 @@ $row['control'] = html_print_input_text(
true, true,
false, false,
false false
)
); );
$table_alert_settings->data['custom_response_incident_title'] = $row;
// Alert incident description. // Alert incident description.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Ticket body'); __('Ticket body'),
$row['control'] = html_print_textarea( html_print_textarea(
'incident_content', 'incident_content',
7, 3,
25, 25,
$config['incident_content'], $config['incident_content'],
'', '',
true true
)
); );
$table_alert_settings->data['custom_response_incident_content'] = $row; $table_alert_settings->data[0] = $row;
// Alert default group. // Alert default group.
$row = []; $row = [];
$row['name'] = __('Group'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_select( __('Group'),
html_print_select(
$integria_group_values, $integria_group_values,
'default_group', 'default_group',
$config['default_group'], $config['default_group'],
@ -383,13 +436,13 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_alert_settings->data['custom_response_def_group'] = $row;
// Alert default criticity. // Alert default criticity.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Priority'); __('Priority'),
$row['control'] = html_print_select( html_print_select(
$integria_criticity_values, $integria_criticity_values,
'default_criticity', 'default_criticity',
$config['default_criticity'], $config['default_criticity'],
@ -401,24 +454,30 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_alert_settings->data['custom_response_def_criticity'] = $row; $table_alert_settings->data[1] = $row;
// Alert default owner. // Alert default owner.
$row = []; $row = [];
$row['name'] = __('Owner'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_autocomplete_users_from_integria( __('Owner'),
html_print_autocomplete_users_from_integria(
'default_owner', 'default_owner',
$config['default_owner'], $config['default_owner'],
true true,
'30',
false,
false,
'w100p'
),
['div_class' => 'inline']
); );
$table_alert_settings->data['custom_response_def_owner'] = $row;
// Alert default incident type. // Alert default incident type.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Type'); __('Type'),
$row['control'] = html_print_select( html_print_select(
$integria_types_values, $integria_types_values,
'incident_type', 'incident_type',
$config['incident_type'], $config['incident_type'],
@ -430,13 +489,15 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_alert_settings->data['custom_response_incident_type'] = $row; $table_alert_settings->data[2] = $row;
// Alert default incident status. // Alert default incident status.
$row = []; $row = [];
$row['name'] = __('Status'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_select( __('Status'),
html_print_select(
$integria_status_values, $integria_status_values,
'incident_status', 'incident_status',
$config['incident_status'], $config['incident_status'],
@ -448,8 +509,9 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_alert_settings->data['custom_response_incident_status'] = $row; $table_alert_settings->data[3] = $row;
// Custom response settings. // Custom response settings.
$table_cr_settings = new StdClass(); $table_cr_settings = new StdClass();
@ -457,14 +519,15 @@ $table_cr_settings->data = [];
$table_cr_settings->width = '100%'; $table_cr_settings->width = '100%';
$table_cr_settings->styleTable = 'margin-bottom: 10px;'; $table_cr_settings->styleTable = 'margin-bottom: 10px;';
$table_cr_settings->id = 'integria-cr-settings-setup'; $table_cr_settings->id = 'integria-cr-settings-setup';
$table_cr_settings->class = 'databox filters'; $table_cr_settings->class = 'databox filters filter-table-adv';
$table_cr_settings->size['name'] = '30%'; $table_cr_settings->size[0] = '50%';
$table_cr_settings->style['name'] = 'font-weight: bold'; $table_cr_settings->size[1] = '50%';
// Custom response incident title. // Custom response incident title.
$row = []; $row = [];
$row['name'] = __('Title'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_input_text( __('Title'),
html_print_input_text(
'cr_incident_title', 'cr_incident_title',
$config['cr_incident_title'], $config['cr_incident_title'],
__('Name'), __('Name'),
@ -473,27 +536,29 @@ $row['control'] = html_print_input_text(
true, true,
false, false,
false false
)
); );
$table_cr_settings->data['custom_response_incident_title'] = $row;
// Custom response incident description. // Custom response incident description.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Ticket body'); __('Ticket body'),
$row['control'] = html_print_textarea( html_print_textarea(
'cr_incident_content', 'cr_incident_content',
7, 3,
25, 25,
$config['cr_incident_content'], $config['cr_incident_content'],
'', '',
true true
)
); );
$table_cr_settings->data['custom_response_incident_content'] = $row; $table_cr_settings->data[0] = $row;
// Custom response default group. // Custom response default group.
$row = []; $row = [];
$row['name'] = __('Group'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_select( __('Group'),
html_print_select(
$integria_group_values, $integria_group_values,
'cr_default_group', 'cr_default_group',
$config['cr_default_group'], $config['cr_default_group'],
@ -505,13 +570,13 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_cr_settings->data['custom_response_def_group'] = $row;
// Custom response default criticity. // Custom response default criticity.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Priority'); __('Priority'),
$row['control'] = html_print_select( html_print_select(
$integria_criticity_values, $integria_criticity_values,
'cr_default_criticity', 'cr_default_criticity',
$config['cr_default_criticity'], $config['cr_default_criticity'],
@ -523,24 +588,30 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_cr_settings->data['custom_response_def_criticity'] = $row; $table_cr_settings->data[1] = $row;
// Custom response default owner. // Custom response default owner.
$row = []; $row = [];
$row['name'] = __('Owner'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_autocomplete_users_from_integria( __('Owner'),
html_print_autocomplete_users_from_integria(
'cr_default_owner', 'cr_default_owner',
$config['cr_default_owner'], $config['cr_default_owner'],
true true,
'30',
false,
false,
'w100p'
),
['div_class' => 'inline']
); );
$table_cr_settings->data['custom_response_def_owner'] = $row;
// Custom response default incident type. // Custom response default incident type.
$row = []; $row[1] = html_print_label_input_block(
$row['name'] = __('Type'); __('Type'),
$row['control'] = html_print_select( html_print_select(
$integria_types_values, $integria_types_values,
'cr_incident_type', 'cr_incident_type',
$config['cr_incident_type'], $config['cr_incident_type'],
@ -552,13 +623,15 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_cr_settings->data['custom_response_incident_type'] = $row; $table_cr_settings->data[2] = $row;
// Custom response default incident status. // Custom response default incident status.
$row = []; $row = [];
$row['name'] = __('Status'); $row[0] = html_print_label_input_block(
$row['control'] = html_print_select( __('Status'),
html_print_select(
$integria_status_values, $integria_status_values,
'cr_incident_status', 'cr_incident_status',
$config['cr_incident_status'], $config['cr_incident_status'],
@ -570,13 +643,14 @@ $row['control'] = html_print_select(
true, true,
'', '',
false false
)
); );
$table_cr_settings->data['custom_response_incident_status'] = $row; $table_cr_settings->data[3] = $row;
// Test. // Test.
$row = []; $row = [];
$row['name'] = __('Test'); $row['control'] = __('Test');
$row['control'] = html_print_button( $row['control'] .= html_print_button(
__('Start'), __('Start'),
'test-integria', 'test-integria',
false, false,
@ -594,12 +668,12 @@ $row['control'] .= '&nbsp;<span id="test-integria-message" class="invisible"></s
$table_remote->data['integria_test'] = $row; $table_remote->data['integria_test'] = $row;
// Print. // Print.
echo '<div class="center pdd_b_20px mrgn_top_20px">'; echo '<div class="center pdd_b_10px mrgn_btn_20px white_box max_floating_element_size">';
echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">'; echo '<a target="_blank" rel="noopener noreferrer" href="http://integriaims.com">';
html_print_image( html_print_image(
'images/integria_logo.svg', 'images/integria_logo.svg',
false, false,
['class' => 'w400px' ] ['class' => 'w400px mrgn_top_15px']
); );
echo '</a>'; echo '</a>';
echo '<br />'; echo '<br />';
@ -611,7 +685,7 @@ echo 'https://integriaims.com';
echo '</a>'; echo '</a>';
echo '</div>'; echo '</div>';
echo "<form method='post'>"; echo "<form method='post' class='max_floating_element_size'>";
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
// Form enable. // Form enable.
@ -632,7 +706,7 @@ echo '</div>';
if ($has_connection != false) { if ($has_connection != false) {
// Form alert default settings. // Form alert default settings.
echo '<div id="form_alert_settings">'; echo '<div id="form_alert_settings">';
echo '<fieldset>'; echo '<fieldset class="mrgn_top_15px">';
echo '<legend>'.__('Alert default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>'; echo '<legend>'.__('Alert default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>';
html_print_table($table_alert_settings); html_print_table($table_alert_settings);
@ -642,7 +716,7 @@ if ($has_connection != false) {
// Form custom response default settings. // Form custom response default settings.
echo '<div id="form_custom_response_settings">'; echo '<div id="form_custom_response_settings">';
echo '<fieldset>'; echo '<fieldset class="mrgn_top_15px">';
echo '<legend>'.__('Event custom response default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>'; echo '<legend>'.__('Event custom response default values').'&nbsp'.ui_print_help_icon('alert_macros', true).'</legend>';
html_print_table($table_cr_settings); html_print_table($table_cr_settings);
@ -650,33 +724,24 @@ if ($has_connection != false) {
echo '</fieldset>'; echo '</fieldset>';
echo '</div>'; echo '</div>';
html_print_div( $update_button = html_print_submit_button(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
['icon' => 'update'], ['icon' => 'update'],
true true
),
]
); );
} else { } else {
html_print_div( $update_button = html_print_submit_button(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update and continue'), __('Update and continue'),
'update_button', 'update_button',
false, false,
['icon' => 'update'], ['icon' => 'update'],
true true
),
]
); );
} }
html_print_action_buttons($update_button);
echo '</form>'; echo '</form>';
@ -686,8 +751,8 @@ echo '</form>';
if($('input:checkbox[name="integria_user_level_conf"]').is(':checked')) if($('input:checkbox[name="integria_user_level_conf"]').is(':checked'))
{ {
$('#integria-remote-setup-integria_user').hide(); $('.integria-remote-setup-integria_user').hide();
$('#integria-remote-setup-integria_pass').hide() $('.integria-remote-setup-integria_pass').hide()
} }
var handleUserLevel = function(event) { var handleUserLevel = function(event) {
@ -726,13 +791,13 @@ echo '</form>';
} }
var hideUserPass = function () { var hideUserPass = function () {
$('#integria-remote-setup-integria_user').hide(); $('.integria-remote-setup-integria_user').hide();
$('#integria-remote-setup-integria_pass').hide(); $('.integria-remote-setup-integria_pass').hide();
} }
var showUserPass = function () { var showUserPass = function () {
$('#integria-remote-setup-integria_user').show(); $('.integria-remote-setup-integria_user').show();
$('#integria-remote-setup-integria_pass').show(); $('.integria-remote-setup-integria_pass').show();
} }
var handleEnable = function (event) { var handleEnable = function (event) {

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
* *
* ============================================================================ * ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list * Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -37,46 +37,72 @@ $update = (bool) get_parameter('update');
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->border = 0; $table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = 'databox filters';
$table->data = []; $table->data = [];
$table->data[0][0] = '<b>'.__('Data storage path').'</b>'; $table->data[0][] = html_print_label_input_block(
$table->data[0][1] = html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true); __('Data storage path'),
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
);
$table->data[1][0] = '<b>'.__('Daemon interval').'</b>'; $table->data[0][] = html_print_label_input_block(
$table->data[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true); __('Daemon interval'),
html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true)
);
$table->data[2][0] = '<b>'.__('Daemon binary path').'</b>'; $table->data[1][] = html_print_label_input_block(
$table->data[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true); __('Daemon binary path'),
html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true)
);
$table->data[3][0] = '<b>'.__('Nfdump binary path').'</b>'; $table->data[1][] = html_print_label_input_block(
$table->data[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true); __('Nfdump binary path'),
html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true)
);
$table->data[4][0] = '<b>'.__('Nfexpire binary path').'</b>'; $table->data[2][] = html_print_label_input_block(
$table->data[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true); __('Nfexpire binary path'),
html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true)
);
$table->data[5][0] = '<b>'.__('Maximum chart resolution').'</b>'; $table->data[2][] = html_print_label_input_block(
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true); __('Maximum chart resolution'),
html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true)
);
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>'; $table->data[3][] = html_print_label_input_block(
$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true); __('Disable custom live view filters'),
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>'; html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true)
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true); );
$table->data[3][] = html_print_label_input_block(
__('Netflow max lifetime'),
html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true)
);
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>';
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;"; $onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true); $table->data[4][] = html_print_label_input_block(
__('Name resolution for IP address'),
echo '<form id="netflow_setup" method="post">'; html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true)
);
echo '<form class="max_floating_element_size" id="netflow_setup" method="post">';
html_print_table($table); html_print_table($table);
// Update button.
echo '<div class="action-buttons w100p">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"'); html_print_action_buttons(
echo '</div></form>'; html_print_submit_button(
__('Update'),
'upd_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';
?>
<script>
$("input[name=netflow_name_dir]").on("input", function() {
$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));
});
</script>

View File

@ -0,0 +1,108 @@
<?php
/**
* Setup view for sflow
*
* @category Setup
* @package Pandora FMS
* @subpackage Configuration
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
require_once 'include/functions_ui.php';
check_login();
$update = (bool) get_parameter('update');
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->data = [];
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
html_print_input_text('sflow_name_dir', $config['sflow_name_dir'], false, 50, 200, true)
);
$table->data[0][] = html_print_label_input_block(
__('Daemon interval'),
html_print_input_text('sflow_interval', $config['sflow_interval'], false, 50, 200, true)
);
$table->data[1][] = html_print_label_input_block(
__('Daemon binary path'),
html_print_input_text('sflow_daemon', $config['sflow_daemon'], false, 50, 200, true)
);
$table->data[1][] = html_print_label_input_block(
__('Nfdump binary path'),
html_print_input_text('sflow_nfdump', $config['sflow_nfdump'], false, 50, 200, true)
);
$table->data[2][] = html_print_label_input_block(
__('Nfexpire binary path'),
html_print_input_text('sflow_nfexpire', $config['sflow_nfexpire'], false, 50, 200, true)
);
$table->data[2][] = html_print_label_input_block(
__('Maximum chart resolution'),
html_print_input_text('sflow_max_resolution', $config['sflow_max_resolution'], false, 50, 200, true)
);
$table->data[3][] = html_print_label_input_block(
__('Disable custom live view filters'),
html_print_checkbox_switch('sflow_disable_custom_lvfilters', 1, $config['sflow_disable_custom_lvfilters'], true)
);
$table->data[3][] = html_print_label_input_block(
__('Sflow max lifetime'),
html_print_input_text('sflow_max_lifetime', $config['sflow_max_lifetime'], false, 50, 200, true)
);
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[4][] = html_print_label_input_block(
__('Name resolution for IP address'),
html_print_checkbox_switch_extended('sflow_get_ip_hostname', 1, $config['sflow_get_ip_hostname'], false, $onclick, '', true)
);
echo '<form class="max_floating_element_size" id="sflow_setup" method="post">';
html_print_table($table);
html_print_input_hidden('update_config', 1);
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'upd_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';
?>
<script>
$("input[name=sflow_name_dir]").on("input", function() {
$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
* *
* ============================================================================ * ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list * Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -32,68 +32,70 @@ $url = ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=websocket_engine&amp;pure='.$config['pure'] 'index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=websocket_engine&amp;pure='.$config['pure']
); );
echo '<form id="form_setup" method="post" action="'.$url.'">'; echo '<form class="max_floating_element_size" id="form_setup" method="post" action="'.$url.'">';
echo '<fieldset>'; echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('WebSocket settings').'</legend>'; echo '<legend>'.__('WebSocket settings').'</legend>';
$t = new StdClass(); $t = new StdClass();
$t->data = []; $t->data = [];
$t->width = '100%'; $t->width = '100%';
$t->class = 'databox filters'; $t->class = 'databox filter-table-adv';
$t->data = []; $t->data = [];
$t->style[0] = 'font-weight: bold';
$t->data[0][0] = __('Bind address'); $t->data[0][] = html_print_label_input_block(
$t->data[0][1] = html_print_input_text( __('Bind address'),
html_print_input_text(
'ws_bind_address', 'ws_bind_address',
$config['ws_bind_address'], $config['ws_bind_address'],
'', '',
30, 30,
100, 100,
true true
)
); );
$t->data[1][0] = __('Bind port'); $t->data[0][] = html_print_label_input_block(
$t->data[1][2] = html_print_input_text( __('Bind port'),
html_print_input_text(
'ws_port', 'ws_port',
$config['ws_port'], $config['ws_port'],
'', '',
30, 30,
100, 100,
true true
)
); );
$t->data[2][0] = __('WebSocket proxy url'); $t->data[1][] = html_print_label_input_block(
$t->data[2][2] = html_print_input_text( __('WebSocket proxy url'),
html_print_input_text(
'ws_proxy_url', 'ws_proxy_url',
$config['ws_proxy_url'], $config['ws_proxy_url'],
'', '',
30, 30,
100, 100,
true true
)
); );
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
html_print_table($t); html_print_table($t);
echo '</fieldset>'; echo '</fieldset>';
if (function_exists('quickShellSettings') === true) { if (function_exists('quickShellSettings') === true) {
quickShellSettings(); quickShellSettings();
} }
html_print_div( html_print_action_buttons(
[ html_print_submit_button(
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
[ 'icon' => 'update' ], [ 'icon' => 'update' ],
true true
), )
]
); );
echo '</form>'; echo '</form>';

View File

@ -1885,7 +1885,7 @@ if ($create_alert || $update_alert) {
$table->cellpadding = 4; $table->cellpadding = 4;
$table->cellspacing = 4; $table->cellspacing = 4;
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'info_table';
$table->align = []; $table->align = [];
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>'; $table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';
@ -1983,7 +1983,7 @@ if ($create_alert || $update_alert) {
[ [
'alt' => __('Duplicate'), 'alt' => __('Duplicate'),
'title' => __('Duplicate'), 'title' => __('Duplicate'),
'class' => 'main_menu_icon invert_filter', 'class' => 'main_menu_icon',
] ]
), ),
], ],
@ -2001,7 +2001,7 @@ if ($create_alert || $update_alert) {
[ [
'alt' => __('Update'), 'alt' => __('Update'),
'border' => 0, 'border' => 0,
'class' => 'main_menu_icon invert_filter', 'class' => 'main_menu_icon',
] ]
), ),
], ],
@ -2031,6 +2031,7 @@ if ($create_alert || $update_alert) {
true, true,
[ [
'title' => __('Delete action'), 'title' => __('Delete action'),
'class' => 'main_menu_icon',
] ]
), ),
'onClick' => 'delete_snmp_alert('.$row['id_as'].')', 'onClick' => 'delete_snmp_alert('.$row['id_as'].')',

View File

@ -50,7 +50,7 @@ try {
[ [
'id' => $tableId, 'id' => $tableId,
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => 'include/ajax/update_manager', 'ajax_url' => 'include/ajax/update_manager',
@ -66,12 +66,13 @@ try {
[ [
'label' => __('Free search'), 'label' => __('Free search'),
'type' => 'text', 'type' => 'text',
'class' => 'mw250px', 'class' => 'w400px',
'id' => 'free_search', 'id' => 'free_search',
'name' => 'free_search', 'name' => 'free_search',
], ],
], ],
], ],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ',
] ]
); );
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -256,20 +256,20 @@ if ((bool) is_metaconsole() === true) {
); );
} }
echo '<form method="post" action="'.$action.'">'; echo '<form method="post" action="'.$action.'" class="max_floating_element_size">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$i = 0; $table->size[1] = '50%';
$table->style[$i] = 'font-weight: bolder;width:250px';
$url_update_manager = update_manager_get_url(); $url_update_manager = update_manager_get_url();
$table->data[$i][0] = __('Warp Update URL'); $table->data[0][0] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text( __('Warp Update URL'),
html_print_input_text(
'url_update_manager', 'url_update_manager',
$url_update_manager, $url_update_manager,
__('URL update manager'), __('URL update manager'),
@ -277,112 +277,137 @@ $table->data[$i++][1] = html_print_input_text(
255, 255,
true, true,
true true
)
); );
$table->data[$i][0] = __('Use secured Warp Update'); $table->data[0][1] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input( __('Use secured Warp Update'),
html_print_input(
[ [
'type' => 'switch', 'type' => 'switch',
'name' => 'secure_update_manager', 'name' => 'secure_update_manager',
'value' => ($secure_update_manager ?? 1), 'value' => ($secure_update_manager ?? 1),
] ]
)
); );
$table->data[$i][0] = __('Proxy server'); $table->data[1][0] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text( __('Proxy server'),
html_print_input_text(
'update_manager_proxy_server', 'update_manager_proxy_server',
$update_manager_proxy_server, $update_manager_proxy_server,
__('Proxy server'), __('Proxy server'),
80, 80,
60, 60,
true true
)
); );
$table->data[$i][0] = __('Proxy port'); $table->data[1][1] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text( __('Proxy port'),
html_print_input_text(
'update_manager_proxy_port', 'update_manager_proxy_port',
$update_manager_proxy_port, $update_manager_proxy_port,
__('Proxy port'), __('Proxy port'),
80, 80,
60, 60,
true true
)
); );
$table->data[$i][0] = __('Proxy user'); $table->data[2][0] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text( __('Proxy user'),
html_print_input_text(
'update_manager_proxy_user', 'update_manager_proxy_user',
$update_manager_proxy_user, $update_manager_proxy_user,
__('Proxy user'), __('Proxy user'),
80, 80,
60, 60,
true true
)
); );
$table->data[$i][0] = __('Proxy password'); $table->data[2][1] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_password( __('Proxy password'),
html_print_input_password(
'update_manager_proxy_password', 'update_manager_proxy_password',
$update_manager_proxy_password, $update_manager_proxy_password,
__('Proxy password'), __('Proxy password'),
80, 80,
60, 60,
true true
)
); );
$table->data[$i][0] = __('Allow no-consecutive patches'); $table->data[3][0] = html_print_label_input_block(
$table->data[$i++][1] = html_print_switch( __('Allow no-consecutive patches'),
html_print_switch(
[ [
'name' => 'allow_offline_patches', 'name' => 'allow_offline_patches',
'value' => $allow_offline_patches, 'value' => $allow_offline_patches,
'return' => true, 'return' => true,
] ]
)
); );
$table->data[$i][0] = __('Limit to LTS updates'); $table->data[3][1] = html_print_label_input_block(
$table->data[$i++][1] = html_print_switch( __('Limit to LTS updates'),
html_print_switch(
[ [
'name' => 'lts_updates', 'name' => 'lts_updates',
'value' => $lts_updates, 'value' => $lts_updates,
'return' => true, 'return' => true,
] ]
)
); );
$table->data[4][0] = html_print_label_input_block(
$table->data[$i][0] = __('Registration ID'); __('Registration ID'),
$table->data[$i++][1] = '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>'; '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>'
);
if (update_manager_verify_registration() === true && users_is_admin()) { if (update_manager_verify_registration() === true && users_is_admin()) {
$table->data[$i][0] = __('Cancel registration'); $url = '<a href="';
$table->data[$i][1] = '<a href="';
if ((bool) is_metaconsole() === true) { if ((bool) is_metaconsole() === true) {
$table->data[$i][1] .= ui_get_full_url( $url .= ui_get_full_url(
'index.php?sec=advanced&sec2=advanced/metasetup&pure=0&tab=update_manager_setup&um_disconnect_console=1' 'index.php?sec=advanced&sec2=advanced/metasetup&pure=0&tab=update_manager_setup&um_disconnect_console=1'
); );
} else { } else {
$table->data[$i][1] .= ui_get_full_url( $url .= ui_get_full_url(
'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup&um_disconnect_console=1' 'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=setup&um_disconnect_console=1'
); );
} }
$table->data[$i++][1] .= '" onclick="if(confirm(\'Are you sure?\')) {return true;} else { return false; }">'.__('Unregister').'</a>'; $url .= '" onclick="if(confirm(\'Are you sure?\')) {return true;} else { return false; }">'.__('Unregister').'</a>';
$table->data[4][1] = html_print_label_input_block(
__('Cancel registration'),
$url
);
} }
if (license_free()) { if (license_free()) {
$config['identification_reminder'] = isset($config['identification_reminder']) ? $config['identification_reminder'] : 1; $config['identification_reminder'] = isset($config['identification_reminder']) ? $config['identification_reminder'] : 1;
$table->data[$i][0] = __('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true);
$table->data[$i][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 1, '', $config['identification_reminder'], true).'&nbsp;&nbsp;'; $table->data[4][1] = html_print_label_input_block(
$table->data[$i++][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button('identification_reminder', 0, '', $config['identification_reminder'], true); __('%s community reminder', get_product_name()).ui_print_help_tip(__('Every 8 days, a message is displayed to admin users to remember to register this %s instance', get_product_name()), true),
'<div class="inline-radio-button">
'.__('Yes').html_print_radio_button('realtimestats', 1, '', $config['realtimestats'], true).'&nbsp;&nbsp;
'.__('No').html_print_radio_button('realtimestats', 0, '', $config['realtimestats'], true).'</div>'
);
} }
html_print_input_hidden('action_update_url_update_manager', 1); html_print_input_hidden('action_update_url_update_manager', 1);
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
html_print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; html_print_action_buttons(
html_print_submit_button( html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
'class="sub upd"' ['icon' => 'wand'],
true
)
); );
echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -392,6 +392,8 @@ if ($create_user === true) {
$values['timezone'] = (string) get_parameter('timezone'); $values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view'); $values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0);
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
$dashboard = get_parameter('dashboard', ''); $dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', ''); $visual_console = get_parameter('visual_console', '');
@ -653,6 +655,7 @@ if ($update_user) {
$values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view'); $values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup'); $values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh');
// API Token information. // API Token information.
$apiTokenRenewed = (bool) get_parameter('renewAPIToken'); $apiTokenRenewed = (bool) get_parameter('renewAPIToken');
$values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']); $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']);
@ -1562,8 +1565,8 @@ $autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console'
$autorefresh_list_out['operation/events/events'] = 'Events'; $autorefresh_list_out['operation/events/events'] = 'Events';
if (isset($autorefresh_list) === false) { if (isset($autorefresh_list) === false || empty($autorefresh_list) === true || empty($autorefresh_list[0]) === true) {
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'"); $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$id."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']); $autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list === null) { if ($autorefresh_list === null) {
$autorefresh_list[0] = __('None'); $autorefresh_list[0] = __('None');
@ -1645,9 +1648,13 @@ if ($new_user === true) {
html_print_input_hidden('json_profile', $json_profile); html_print_input_hidden('json_profile', $json_profile);
} }
echo '</div>';
echo '</form>'; echo '</form>';
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
echo '</div>'; echo '</div>';
$actionButtons = []; $actionButtons = [];
@ -1769,6 +1776,13 @@ if (is_metaconsole() === false) {
}); });
}); });
$("#button-uptbutton").click (function () {
console.log('aaaaaaaaaaaaa');
if($("#autorefresh_list option").length > 0) {
$('#autorefresh_list option').prop('selected', true);
}
});
$("input#checkbox-double_auth").change(function(e) { $("input#checkbox-double_auth").change(function(e) {
e.preventDefault(); e.preventDefault();
if (this.checked) { if (this.checked) {

View File

@ -803,7 +803,6 @@ foreach ($info as $user_id => $user_info) {
); );
} }
$data[4] .= '<br/>';
$data[4] .= '<br/>'; $data[4] .= '<br/>';
$total_profile++; $total_profile++;

View File

@ -763,23 +763,3 @@ html_print_div(
); );
html_print_table($userManagementTable); html_print_table($userManagementTable);
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
?>
<!--
<script>
paint_qrcode(
"
<?php
// echo ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente);
?>
",
"#qr_code_agent_view",
128,
128
);
</script>
-->

View File

@ -835,7 +835,10 @@ class DiscoveryTaskList extends HTML
$data[6] = html_print_image( $data[6] = html_print_image(
'images/cluster@os.svg', 'images/cluster@os.svg',
true, true,
['title' => __('Discovery Applications Microsoft SQL Server')] [
'title' => __('Discovery Applications Microsoft SQL Server'),
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.Microsoft SQL Server'); $data[6] .= __('Discovery.App.Microsoft SQL Server');
break; break;
@ -871,7 +874,7 @@ class DiscoveryTaskList extends HTML
$data[7] = ui_progress( $data[7] = ui_progress(
$task['status'], $task['status'],
'100%', '100%',
1.9, 1.2,
// Color. // Color.
'#ececec', '#ececec',
// Return. // Return.
@ -888,7 +891,8 @@ class DiscoveryTaskList extends HTML
'id' => $task['id_rt'], 'id' => $task['id_rt'],
'method' => 'taskProgress', 'method' => 'taskProgress',
], ],
] ],
''
); );
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<circle cx="10" cy="10" r="10" fill="#3F3F3F"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / web@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10,0 C4.4771525,0 0,4.4771525 0,10 C0,15.5228475 4.4771525,20 10,20 C15.5228475,20 20,15.5228475 20,10 C19.9945565,4.47940886 15.5205911,0.00544352451 10,0 Z M10.0288333,17.4971042 C10.0246667,17.4971042 10.0206042,17.4983125 10.0163333,17.4983125 C9.68185417,17.3901458 9.011375,16.3172917 8.56475,14.3237292 C9.04327083,14.3508125 9.52308333,14.375 10,14.375 C10.4774375,14.375 10.9581042,14.3508958 11.437375,14.3237292 C10.9950208,16.3143958 10.3361458,17.3863125 10.0288333,17.4971042 Z M10,11.875 C9.35577083,11.875 8.75960417,11.8472292 8.19702083,11.8032917 C8.15291667,11.2406875 8.125,10.6442292 8.125,10 C8.125,9.35577083 8.15277083,8.75960417 8.19670833,8.19702083 C8.7593125,8.15291667 9.35577083,8.125 10,8.125 C10.6442292,8.125 11.2403958,8.15277083 11.8029792,8.19670833 C11.8470833,8.7593125 11.875,9.35577083 11.875,10 C11.875,10.6442292 11.8472292,11.2403958 11.8032917,11.8029792 C11.2406875,11.8470833 10.6442292,11.875 10,11.875 Z M2.50289583,10.0288333 C2.50289583,10.0246667 2.5016875,10.0206042 2.5016875,10.0163333 C2.60985417,9.68185417 3.68270833,9.011375 5.67627083,8.56475 C5.64927083,9.04327083 5.625,9.52316667 5.625,10 C5.625,10.4774375 5.64910417,10.9581042 5.67627083,11.437375 C3.68560417,10.9950208 2.6136875,10.3361458 2.50289583,10.0288333 Z M9.97116667,2.50289583 C9.97533333,2.50289583 9.97939583,2.5016875 9.98366667,2.5016875 C10.3181458,2.60985417 10.988625,3.68270833 11.43525,5.67627083 C10.9567292,5.64927083 10.4768333,5.625 10,5.625 C9.5225625,5.625 9.04189583,5.64910417 8.562625,5.67627083 C9.00497917,3.68560417 9.66385417,2.6136875 9.97116667,2.50289583 Z M14.3237292,8.562625 C16.3143958,9.00497917 17.3862292,9.66385417 17.4971042,9.97116667 C17.4971042,9.97533333 17.4983125,9.97939583 17.4983125,9.98366667 C17.3901458,10.3181458 16.3172917,10.988625 14.3237292,11.43525 C14.3508125,10.9567292 14.375,10.4769167 14.375,10 C14.375,9.5225625 14.3508958,9.04189583 14.3237292,8.562625 Z M16.671,6.64397917 C15.8116964,6.34280615 14.9276165,6.11763659 14.0289375,5.9710625 C13.8823634,5.07238349 13.6571938,4.18830364 13.3560208,3.329 C14.7866526,4.05165344 15.9483466,5.21334744 16.671,6.64397917 L16.671,6.64397917 Z M6.64375,3.329 C6.34261768,4.18830554 6.11749674,5.07238609 5.97097917,5.9710625 C5.0723873,6.11755451 4.18838995,6.34264769 3.32916667,6.64375 C4.05172797,5.21324363 5.21327996,4.05163323 6.64375,3.329 L6.64375,3.329 Z M3.32916667,13.35625 C4.1884091,13.6574028 5.07243613,13.8825243 5.9710625,14.0290208 C6.11753664,14.9276164 6.34263021,15.8116153 6.64375,16.6708333 C5.21325958,15.948307 4.05169302,14.7867404 3.32916667,13.35625 Z M13.35625,16.6708333 C13.6573853,15.8115856 13.8825065,14.9275601 14.0290208,14.0289375 C14.9276665,13.8824423 15.8117189,13.6573493 16.671,13.35625 C15.9483668,14.78672 14.7867564,15.948272 13.35625,16.6708333 L13.35625,16.6708333 Z" id="Shape" fill="#3F3F3F"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -216,11 +216,8 @@ if ($get_double_auth_info_page) {
$html .= '</p>'; $html .= '</p>';
$html .= '</div>'; $html .= '</div>';
$html .= '<br>'; $html .= '<br>';
$html .= '<div class="center_align">'; $html .= '<div class="flex flex-space-around">';
$html .= html_print_button(__('Download the app'), 'google_authenticator_download', false, '', '', true); $html .= html_print_button(__('Download the app'), 'google_authenticator_download', false, '', '', true);
$html .= '</div>';
$html .= '<br>';
$html .= '<div class="center_align">';
$html .= html_print_button(__('Continue'), 'continue_to_generate', false, '', '', true); $html .= html_print_button(__('Continue'), 'continue_to_generate', false, '', '', true);
$html .= '</div>'; $html .= '</div>';
@ -311,11 +308,11 @@ if ($get_double_auth_generation_page) {
$html .= '<br>'; $html .= '<br>';
$html .= __('QR').': <br>'; $html .= __('QR').': <br>';
$html .= '<div id="qr-container"></div>'; $html .= '<div id="qr-container"></div>';
$html .= '<br>'; $html .= '<br><div class="flex flex-space-around">';
$html .= html_print_button(__('Refresh code'), 'continue_to_generate', false, '', '', true); $html .= html_print_button(__('Refresh code'), 'continue_to_generate', false, '', '', true);
$html .= '&nbsp;';
$html .= html_print_button(__('Continue'), 'continue_to_validate', false, '', '', true); $html .= html_print_button(__('Continue'), 'continue_to_validate', false, '', '', true);
$html .= '</div>'; $html .= '</div>';
$html .= '</div>';
ob_clean(); ob_clean();
?> ?>
@ -453,7 +450,7 @@ if ($get_double_auth_validation_page) {
$html .= html_print_input_text('code', '', '', 50, $secret_lenght, true); $html .= html_print_input_text('code', '', '', 50, $secret_lenght, true);
$html .= '<div id="code_input_message" class="red"></div>'; $html .= '<div id="code_input_message" class="red"></div>';
$html .= '<br><br>'; $html .= '<br><br>';
$html .= '<div id="button-container">'; $html .= '<div id="button-container" class="flex flex-space-around">';
$html .= html_print_button(__('Validate code'), 'continue_to_validate', false, '', '', true); $html .= html_print_button(__('Validate code'), 'continue_to_validate', false, '', '', true);
$html .= html_print_image('images/spinner.gif', true); $html .= html_print_image('images/spinner.gif', true);
$html .= '</div>'; $html .= '</div>';

View File

@ -91,9 +91,8 @@ $node_id = (int) get_parameter('node_id', 0);
if ($get_comments === true) { if ($get_comments === true) {
$event = get_parameter('event', false); $event = get_parameter('event', false);
$event_rep = (int) get_parameter('event_rep', 0); $event_rep = (int) get_parameter_post('event')['event_rep'];
$event_rep = get_parameter_post('event')['event_rep']; $group_rep = (int) get_parameter_post('event')['group_rep'];
$group_rep = get_parameter_post('event')['group_rep'];
if ($event === false) { if ($event === false) {
return __('Failed to retrieve comments'); return __('Failed to retrieve comments');
@ -126,7 +125,7 @@ if ($get_comments === true) {
} else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) { } else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) {
$whereGrouped = sprintf( $whereGrouped = sprintf(
'`id_extra` = "%s"', '`id_extra` = "%s"',
$event['id_extra'] io_safe_output($event['id_extra'])
); );
} else { } else {
$whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']); $whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']);

View File

@ -1390,7 +1390,7 @@ if (check_login()) {
false, false,
'offset', 'offset',
true, true,
'pagination-bottom', '',
'pagination_list_modules(offset_param)', 'pagination_list_modules(offset_param)',
[ [
'count' => '', 'count' => '',
@ -1692,6 +1692,18 @@ if (check_login()) {
$where = 'tagente_modulo.nombre LIKE "%%'.$search.'%%" AND '; $where = 'tagente_modulo.nombre LIKE "%%'.$search.'%%" AND ';
} }
if (str_contains($status, '6') === true) {
$expl = explode(',', $status);
$exist = array_search('6', $expl);
if (isset($exist) === true) {
unset($expl[$exist]);
}
array_push($expl, '1', '2');
$status = implode(',', $expl);
}
$where .= sprintf( $where .= sprintf(
'tagente_estado.estado IN (%s) 'tagente_estado.estado IN (%s)
AND tagente_modulo.delete_pending = 0', AND tagente_modulo.delete_pending = 0',
@ -1750,7 +1762,9 @@ if (check_login()) {
INNER JOIN tagente INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo' ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s',
$where
); );
$recordsTotal = db_get_value_sql($sql_count); $recordsTotal = db_get_value_sql($sql_count);
@ -1795,6 +1809,32 @@ if (check_login()) {
} }
} }
if (in_array(0, $servers_ids) === true) {
$sql = sprintf(
'SELECT
tagente_modulo.nombre,
tagente.alias,
tagente.id_agente,
tagente_estado.last_status_change,
tagente_estado.estado
FROM tagente_modulo
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s',
$where
);
$res_sql = db_get_all_rows_sql($sql);
foreach ($res_sql as $row_sql) {
$row_sql['server_name'] = __('Metaconsole');
$row_sql['server_url'] = $config['homeurl'];
array_push($data, $row_sql);
}
}
// Drop temporary table if exist. // Drop temporary table if exist.
db_process_sql('DROP TEMPORARY TABLE IF EXISTS temp_modules_status;'); db_process_sql('DROP TEMPORARY TABLE IF EXISTS temp_modules_status;');
@ -1852,7 +1892,9 @@ if (check_login()) {
$sql_count = sprintf( $sql_count = sprintf(
'SELECT COUNT(*) AS "total" 'SELECT COUNT(*) AS "total"
FROM temp_modules_status' FROM temp_modules_status
WHERE %s',
$where
); );
$recordsTotal = db_get_value_sql($sql_count); $recordsTotal = db_get_value_sql($sql_count);

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
* *
* ============================================================================ * ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list * Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -203,15 +203,23 @@ class ExternalTools extends HTML
} }
} }
html_print_div(['id' => 'layer_sound_alert']);
html_print_div(['id' => 'layer_sound_critical']);
html_print_div(['id' => 'layer_sound_warning']);
// Make the table for show the form. // Make the table for show the form.
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter-table-adv';
$table->id = 'commandsTable'; $table->id = 'commandsTable';
$table->data = []; $table->data = [];
$table->data[$i][0] = __('Sound for Alert fired'); $table->data[$i][] = html_print_label_input_block(
$table->data[$i][1] = html_print_select( __('Sound for Alert fired'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds, $sounds,
'sound_alert', 'sound_alert',
$config['sound_alert'], $config['sound_alert'],
@ -219,29 +227,34 @@ class ExternalTools extends HTML
'', '',
'', '',
true true
); ).html_print_anchor(
$table->data[$i][1] .= html_print_anchor(
[ [
'href' => 'javascript:toggleButton(\'alert\')', 'href' => 'javascript:toggleButton(\'alert\')',
'content' => html_print_image( 'content' => html_print_image(
'images/control_play_col.png', 'images/change-active.svg',
true, true,
[ [
'id' => 'button_sound_warning', 'id' => 'button_sound_alert',
'style' => 'vertical-align: middle;', 'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16', 'width' => '16',
'title' => __('Play sound'), 'title' => __('Play sound'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
), ),
], ],
true true
),
],
true
),
); );
$table->data[$i++][1] .= '<div id="layer_sound_alert"></div>';
$table->data[$i][0] = __('Sound for Monitor critical'); $table->data[$i++][] = html_print_label_input_block(
$table->data[$i][1] = html_print_select( __('Sound for Monitor critical'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds, $sounds,
'sound_critical', 'sound_critical',
$config['sound_critical'], $config['sound_critical'],
@ -249,29 +262,34 @@ class ExternalTools extends HTML
'', '',
'', '',
true true
); ).html_print_anchor(
$table->data[$i][1] .= html_print_anchor(
[ [
'href' => 'javascript:toggleButton(\'critical\')', 'href' => 'javascript:toggleButton(\'critical\')',
'content' => html_print_image( 'content' => html_print_image(
'images/control_play_col.png', 'images/change-active.svg',
true, true,
[ [
'id' => 'button_sound_warning', 'id' => 'button_sound_critical',
'style' => 'vertical-align: middle;', 'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16', 'width' => '16',
'title' => __('Play sound'), 'title' => __('Play sound'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
), ),
], ],
true true
),
],
true
),
); );
$table->data[$i++][1] .= '<div id="layer_sound_critical"></div>';
$table->data[$i][0] = __('Sound for Monitor warning'); $table->data[$i++][] = html_print_label_input_block(
$table->data[$i][1] = html_print_select( __('Sound for Monitor warning'),
html_print_div(
[
'class' => '',
'content' => html_print_select(
$sounds, $sounds,
'sound_warning', 'sound_warning',
$config['sound_warning'], $config['sound_warning'],
@ -279,56 +297,67 @@ class ExternalTools extends HTML
'', '',
'', '',
true true
); ).html_print_anchor(
$table->data[$i][1] .= html_print_anchor(
[ [
'href' => 'javascript:toggleButton(\'warning\')', 'href' => 'javascript:toggleButton(\'warning\')',
'content' => html_print_image( 'content' => html_print_image(
'images/control_play_col.png', 'images/change-active.svg',
true, true,
[ [
'id' => 'button_sound_warning', 'id' => 'button_sound_warning',
'style' => 'vertical-align: middle;', 'style' => 'vertical-align: middle; margin-left: 10px',
'width' => '16', 'width' => '16',
'title' => __('Play sound'), 'title' => __('Play sound'),
'class' => 'invert_filter', 'class' => 'invert_filter',
] ]
), ),
], ],
true true
),
],
true
),
); );
$table->data[$i++][1] .= '<div id="layer_sound_warning"></div>';
$table->data[$i][0] = __('Custom graphviz directory'); $table->data[$i][] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text( __('Custom graphviz directory'),
html_print_input_text(
'graphviz_bin_dir', 'graphviz_bin_dir',
$config['graphviz_bin_dir'], $config['graphviz_bin_dir'],
'', '',
25, 25,
255, 255,
true true
)
); );
$table->data[$i][0] = __('Traceroute path'); $table->data[$i++][] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true); __('Snmpget path'),
html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true)
);
$table->data[$i][0] = __('Ping path'); $table->data[$i][] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true); __('Traceroute path'),
html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true)
);
$table->data[$i++][] = html_print_label_input_block(
__('Ping path'),
html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true)
);
$table->data[$i][0] = __('Nmap path'); $table->data[$i][] = html_print_label_input_block(
$table->data[$i++][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true); __('Nmap path'),
html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true)
$table->data[$i][0] = __('Dig path'); );
$table->data[$i++][1] = html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true); $table->data[$i++][] = html_print_label_input_block(
__('Dig path'),
$table->data[$i][0] = __('Snmpget path'); html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true)
$table->data[$i++][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true); );
$table->data[$i][0] = html_print_div( $table->data[$i][0] = html_print_div(
[ [
'class' => 'title_custom_commands bolder float-left', 'class' => 'title_custom_commands bolder float-left',
'content' => __('Custom commands'), 'content' => '<label>'.__('Custom commands').'</label>',
], ],
true true
); );
@ -336,13 +365,13 @@ class ExternalTools extends HTML
[ [
'id' => 'add_button_custom_command', 'id' => 'add_button_custom_command',
'content' => html_print_image( 'content' => html_print_image(
'images/add.png', 'images/plus@svg.svg',
true, true,
[ [
'title' => __('Add new custom command'), 'title' => __('Add new custom command'),
'onclick' => 'manageCommandLines(event)', 'onclick' => 'manageCommandLines(event)',
'id' => 'img_add_button_custom_command', 'id' => 'img_add_button_custom_command',
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
), ),
@ -350,8 +379,8 @@ class ExternalTools extends HTML
true true
); );
$table->data[$i][0] = __('Command'); $table->data[$i][0] = '<div><label>'.__('Command').'</label></div>';
$table->data[$i++][1] = __('Parameters').ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true); $table->data[$i++][1] = '<div style="flex-direction: row;justify-content: flex-start;"><label>'.__('Parameters').'</label>'.ui_print_help_tip(__('Adding `_address_` macro will use agent\'s IP when perform the execution'), true, '', false, 'margin-top: 2px').'</div>';
$y = 1; $y = 1;
$iRow = $i; $iRow = $i;
@ -378,30 +407,27 @@ class ExternalTools extends HTML
} }
} }
$form = '<form id="form_setup" method="post" >'; $form = '<form class="max_floating_element_size" id="form_setup" method="POST" >';
$form .= '<fieldset>'; $form .= '<fieldset>';
$form .= '<legend>'.__('Options').'</legend>'; $form .= '<legend>'.__('Options').'</legend>';
$form .= html_print_input_hidden('update_paths', 1, true); $form .= html_print_input_hidden('update_paths', 1, true);
$form .= html_print_table($table, true); $form .= html_print_table($table, true);
$form .= '</fieldset>'; $form .= '</fieldset>';
$form .= html_print_div( $form .= '</form>';
[
'id' => '', html_print_action_buttons(
'class' => 'action-buttons', html_print_submit_button(
'style' => 'width: 100%',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
[ 'icon' => 'update' ], [
true 'icon' => 'update',
), 'form' => 'form_setup',
], ],
true true
)
); );
$form .= '</form>';
echo $form; echo $form;
} }
@ -436,15 +462,14 @@ class ExternalTools extends HTML
$output = html_print_div( $output = html_print_div(
[ [
'id' => 'delete_button_custom_'.$index, 'id' => 'delete_button_custom_'.$index,
'class' => '',
'content' => html_print_image( 'content' => html_print_image(
'images/delete.png', 'images/delete.svg',
true, true,
[ [
'title' => __('Delete this custom command'), 'title' => __('Delete this custom command'),
'onclick' => 'manageCommandLines(event)', 'onclick' => 'manageCommandLines(event)',
'id' => 'img_delete_button_custom_'.$index, 'id' => 'img_delete_button_custom_'.$index,
'class' => 'invert_filter', 'class' => 'main_menu_icon invert_filter',
] ]
), ),
], ],
@ -528,40 +553,59 @@ class ExternalTools extends HTML
// Form table. // Form table.
$table = new StdClass(); $table = new StdClass();
$table->class = 'fixed_filter_bar'; $table->class = 'fixed_filter_bar filter-table-adv pdd_15px';
$table->id = 'externalToolTable'; $table->id = 'externalToolTable';
$table->cellstyle['captions'][0] = 'width: 0'; $table->size[0] = '25%';
$table->cellstyle['captions'][1] = 'width: 0'; $table->size[1] = '25%';
$table->cellstyle['captions'][2] = 'width: 0'; $table->size[2] = '25%';
$table->size[3] = '25%';
$table->colspan = [];
$table->colspan[1][0] = 4;
// $table->cellclass[0][2] = 'snmpcolumn';
// $table->cellclass[0][2] = 'snmpcolumn';
// $table->cellclass[0][3] = 'snmpcolumn';
// $table->cellclass[0][3] = 'snmpcolumn';
$table->data = []; $table->data = [];
$table->data['captions'][0] = __('Operation'); $table->data[0][0] = html_print_label_input_block(
__('Operation'),
$table->data['inputs'][0] = html_print_select( html_print_select(
$commandList, $commandList,
'operation', 'operation',
$this->operation, $this->operation,
'mostrarColumns(this.value)', 'mostrarColumns(this.value)',
__('Please select'), __('Please select'),
0, 0,
true true,
false,
true,
'w100p',
false,
'width: 100%;'
)
); );
$table->data['captions'][1] = __('IP Adress'); $table->data[0][1] = html_print_label_input_block(
$table->data['inputs'][1] = html_print_select( __('IP Adress'),
html_print_select(
$ipsSelect, $ipsSelect,
'select_ips', 'select_ips',
$principal_ip, $principal_ip,
'', '',
'', '',
0, 0,
true true,
false,
true,
'w100p',
false,
'width: 100%;'
)
); );
$table->cellclass['captions'][2] = 'snmpcolumn'; $table->data[0][2] = html_print_label_input_block(
$table->cellclass['inputs'][2] = 'snmpcolumn'; __('SNMP Version'),
$table->data['captions'][2] = __('SNMP Version'); html_print_select(
$table->data['inputs'][2] = html_print_select(
[ [
'1' => 'v1', '1' => 'v1',
'2c' => 'v2c', '2c' => 'v2c',
@ -571,34 +615,41 @@ class ExternalTools extends HTML
'', '',
'', '',
0, 0,
true true,
false,
true,
'w100p',
false,
'width: 100%;'
),
['div_class' => 'snmpcolumn']
); );
$table->cellclass['captions'][3] = 'snmpcolumn'; $table->data[0][3] = html_print_label_input_block(
$table->cellclass['inputs'][3] = 'snmpcolumn'; __('SNMP Community'),
$table->data['captions'][3] = __('SNMP Community'); html_print_input_text(
$table->data['inputs'][3] = html_print_input_text(
'community', 'community',
$this->community, $this->community,
'', '',
50, 50,
255, 255,
true true,
false,
false,
'',
'w100p'
),
['div_class' => 'snmpcolumn']
); );
$table->data['inputs'][4] = html_print_div( $table->data[1][0] = html_print_submit_button(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Execute'), __('Execute'),
'submit', 'submit',
false, false,
[ [
'icon' => 'cog', 'icon' => 'cog',
'mode' => 'mini', 'mode' => 'mini',
], 'class' => 'float-right mrgn_right_10px',
true
),
], ],
true true
); );
@ -716,7 +767,7 @@ class ExternalTools extends HTML
*/ */
private function performExecution(string $command='', string $caption='') private function performExecution(string $command='', string $caption='')
{ {
$output = ''; $output = '<div class="white_box max_floating_element_size no_border">';
try { try {
// If caption is not added, don't show anything. // If caption is not added, don't show anything.
@ -736,7 +787,7 @@ class ExternalTools extends HTML
$output .= __('Command not response'); $output .= __('Command not response');
} }
$output .= '</pre>'; $output .= '</pre></div>';
if ($resultCode !== 0) { if ($resultCode !== 0) {
throw new Exception( throw new Exception(
@ -774,6 +825,8 @@ class ExternalTools extends HTML
{ {
$output = ''; $output = '';
echo '<div class="white_box max_floating_element_size no_border pdd_15px">';
if (validate_address($ip) === false) { if (validate_address($ip) === false) {
$output .= ui_print_error_message( $output .= ui_print_error_message(
__('The ip or dns name entered cannot be resolved'), __('The ip or dns name entered cannot be resolved'),
@ -938,6 +991,7 @@ class ExternalTools extends HTML
} }
} }
echo '</div>';
return $output; return $output;
} }

View File

@ -453,7 +453,7 @@ class ManageNetScanScripts extends Wizard
'delete', 'delete',
'images/delete.svg', 'images/delete.svg',
1, 1,
'width:40px;', '',
true, true,
[ [
'title' => __('Delete Script'), 'title' => __('Delete Script'),

View File

@ -868,7 +868,7 @@ class ModuleTemplates extends HTML
'delete_profile', 'delete_profile',
'images/delete.svg', 'images/delete.svg',
$row['id_np'], $row['id_np'],
'width:40px', '',
true, true,
[ [
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', 'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
@ -1156,7 +1156,7 @@ class ModuleTemplates extends HTML
'del_block_'.$id_group.'_', 'del_block_'.$id_group.'_',
'images/delete.svg', 'images/delete.svg',
1, 1,
'width: 40px', '',
true, true,
[ [
'title' => __('Delete this block'), 'title' => __('Delete this block'),
@ -1253,7 +1253,7 @@ class ModuleTemplates extends HTML
'del_module_'.$module['component_id'].'_', 'del_module_'.$module['component_id'].'_',
'images/delete.svg', 'images/delete.svg',
1, 1,
'width:40px;', '',
true, true,
[ [
'title' => __('Delete this module'), 'title' => __('Delete this module'),

View File

@ -393,7 +393,7 @@ class SatelliteAgent extends HTML
true, true,
[ [
'border' => '0', 'border' => '0',
'class' => 'action_button_img mrgn_lft_05em invert_filter', 'class' => 'main_menu_icon mrgn_lft_05em invert_filter',
'onclick' => 'disable_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $disable.'\',\''.$id_agente.'\')', 'onclick' => 'disable_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $disable.'\',\''.$id_agente.'\')',
] ]
); );
@ -405,7 +405,7 @@ class SatelliteAgent extends HTML
true, true,
[ [
'border' => '0', 'border' => '0',
'class' => 'action_button_img mrgn_lft_05em invert_filter', 'class' => 'main_menu_icon mrgn_lft_05em invert_filter',
'onclick' => 'delete_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $delete.'\',\''.$id_agente.'\')', 'onclick' => 'delete_agent(\''.$tmp->address.'\',\''.strip_tags($tmp->name).'\',\''.(int) $delete.'\',\''.$id_agente.'\')',
] ]
); );

View File

@ -259,7 +259,10 @@ class SnmpConsole extends HTML
'class' => 'snmp-td', 'class' => 'snmp-td',
], ],
'alert', 'alert',
'action', [
'text' => 'action',
'class' => 'table_action_buttons w120px',
],
[ [
'text' => 'm', 'text' => 'm',
'class' => 'mw60px pdd_0px', 'class' => 'mw60px pdd_0px',

View File

@ -121,6 +121,10 @@ class TipsWindow
} }
ui_require_css_file('tips_window'); ui_require_css_file('tips_window');
if ($config['style'] === 'pandora_black' && is_metaconsole() === false) {
ui_require_css_file('pandora_black');
}
ui_require_css_file('jquery.bxslider'); ui_require_css_file('jquery.bxslider');
ui_require_javascript_file('tipsWindow'); ui_require_javascript_file('tipsWindow');
ui_require_javascript_file('jquery.bxslider.min'); ui_require_javascript_file('jquery.bxslider.min');
@ -162,6 +166,7 @@ class TipsWindow
'url' => $initialTip['url'], 'url' => $initialTip['url'],
'files' => $initialTip['files'], 'files' => $initialTip['files'],
'id' => $initialTip['id'], 'id' => $initialTip['id'],
'totalTips' => $this->getTotalTipsShowUser(),
] ]
); );
} }
@ -434,7 +439,14 @@ class TipsWindow
'title', 'title',
'text', 'text',
'enable', 'enable',
'actions', [
'text' => 'edit',
'class' => 'table_action_buttons',
],
[
'text' => 'delete',
'class' => 'table_action_buttons',
],
]; ];
$columnNames = [ $columnNames = [
@ -442,7 +454,8 @@ class TipsWindow
__('Title'), __('Title'),
__('Text'), __('Text'),
__('Enable'), __('Enable'),
__('Actions'), __('Edit'),
__('Delete'),
]; ];
// Load datatables user interface. // Load datatables user interface.
@ -450,7 +463,9 @@ class TipsWindow
[ [
'id' => 'list_tips_windows', 'id' => 'list_tips_windows',
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'dom_elements' => 'lpfti',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'columns' => $columns, 'columns' => $columns,
'column_names' => $columnNames, 'column_names' => $columnNames,
'ajax_url' => $this->ajaxController, 'ajax_url' => $this->ajaxController,
@ -473,18 +488,19 @@ class TipsWindow
], ],
] ]
); );
echo '<div class="action-buttons w100p">'; echo '<div class="action-buttons w100p" style="width: 100%">';
echo '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create">'; $buttonCreate = html_print_button(
html_print_submit_button(
__('Create tip'), __('Create tip'),
'create', 'create',
false, false,
'window.location.replace("index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create")',
[ [
'class' => 'sub', 'class' => 'sub',
'icon' => 'create_file', 'icon' => 'plus',
] ],
true
); );
echo '</a>'; html_print_action_buttons($buttonCreate);
echo '</div>'; echo '</div>';
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); echo $e->getMessage();
@ -584,16 +600,15 @@ class TipsWindow
$data[$key]['title'] = io_safe_output($row['title']); $data[$key]['title'] = io_safe_output($row['title']);
$data[$key]['text'] = io_safe_output($row['text']); $data[$key]['text'] = io_safe_output($row['text']);
$data[$key]['url'] = io_safe_output($row['url']); $data[$key]['url'] = io_safe_output($row['url']);
$data[$key]['actions'] = '<div class="buttons_actions">'; $data[$key]['edit'] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&idTip='.$row['id'].'">';
$data[$key]['actions'] .= '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&idTip='.$row['id'].'">'; $data[$key]['edit'] .= html_print_image(
$data[$key]['actions'] .= html_print_image(
'images/edit.svg', 'images/edit.svg',
true, true,
['class' => 'main_menu_icon'] ['class' => 'main_menu_icon']
); );
$data[$key]['actions'] .= '</a>'; $data[$key]['edit'] .= '</a>';
$data[$key]['actions'] .= '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&action=delete">'; $data[$key]['delete'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&action=delete">';
$data[$key]['actions'] .= html_print_input_image( $data[$key]['delete'] .= html_print_input_image(
'button_delete_tip', 'button_delete_tip',
'images/delete.svg', 'images/delete.svg',
'', '',
@ -601,12 +616,11 @@ class TipsWindow
true, true,
[ [
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;', 'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
'class' => 'main_menu_icon', 'class' => 'main_menu_icon invert_filter',
] ]
); );
$data[$key]['actions'] .= html_print_input_hidden('idTip', $row['id'], true); $data[$key]['delete'] .= html_print_input_hidden('idTip', $row['id'], true);
$data[$key]['actions'] .= '</form>'; $data[$key]['delete'] .= '</form>';
$data[$key]['actions'] .= '</div>';
} }
if (empty($data) === true) { if (empty($data) === true) {
@ -679,14 +693,50 @@ class TipsWindow
</script>'; </script>';
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filter-table-adv';
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'width: 50%';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Images'); $table->data[0][0] = html_print_label_input_block(
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true); __('Language'),
$table->data[0][1] .= html_print_div( html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'id_lang',
'',
'',
'',
'0',
true,
false,
true,
false,
'width: 100%;'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Profile'),
html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true)
);
$table->data[1][0] = html_print_label_input_block(
__('Title'),
html_print_input_text('title', '', '', 35, 100, true)
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', '', '', 35, 100, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),
html_print_textarea('text', 5, 50, '', '', true),
);
$table->data[2][1] = html_print_label_input_block(
__('Enable'),
html_print_checkbox_switch('enable', true, true, true)
);
$inputImages = html_print_div(['id' => 'inputs_images'], true);
$inputImages .= html_print_div(
[ [
'id' => 'notices_images', 'id' => 'notices_images',
'class' => 'invisible', 'class' => 'invisible',
@ -694,41 +744,36 @@ class TipsWindow
], ],
true true
); );
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true); $inputImages .= html_print_div(
$table->data[1][0] = __('Language'); [
$table->data[1][1] = html_print_select_from_sql( 'id' => 'notices_images',
'SELECT id_language, name FROM tlanguage', 'class' => 'invisible empty_input_images',
'id_lang', 'content' => '<p>'.__('Please select a image').'</p>',
'', ],
'',
'',
'0',
true true
); );
$table->data[2][0] = __('Profile'); $inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
$table->data[2][1] = html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true);
$table->data[3][0] = __('Title');
$table->data[3][1] = html_print_input_text('title', '', '', 35, 100, true);
$table->data[4][0] = __('Text');
$table->data[4][1] = html_print_textarea('text', 5, 50, '', '', true);
$table->data[5][0] = __('Url');
$table->data[5][1] = html_print_input_text('url', '', '', 35, 100, true);
$table->data[6][0] = __('Enable');
$table->data[6][1] = html_print_checkbox_switch('enable', true, true, true);
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create&action=create" enctype="multipart/form-data">'; $table->data[3][0] = html_print_label_input_block(
__('Images'),
$inputImages
);
echo '<form method="post" class="max_floating_element_size" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=create&action=create" enctype="multipart/form-data">';
html_print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(
$actionButtons = html_print_submit_button(
__('Send'), __('Send'),
'submit_button', 'submit_button',
false, false,
[ [
'class' => 'sub', 'class' => 'sub',
'icon' => 'update', 'icon' => 'update',
] ],
true
); );
html_print_submit_button( $actionButtons .= html_print_submit_button(
__('Preview'), __('Preview'),
'preview_button', 'preview_button',
false, false,
@ -736,8 +781,11 @@ class TipsWindow
'class' => 'sub preview', 'class' => 'sub preview',
'id' => 'prev_button', 'id' => 'prev_button',
'icon' => 'preview', 'icon' => 'preview',
] ],
true
); );
html_print_action_buttons($actionButtons);
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
html_print_div(['id' => 'tips_window_modal_preview']); html_print_div(['id' => 'tips_window_modal_preview']);
@ -789,7 +837,7 @@ class TipsWindow
true, true,
[ [
'onclick' => 'deleteImage(this, \''.$value['id'].'\', \''.$namePath.'\')', 'onclick' => 'deleteImage(this, \''.$value['id'].'\', \''.$namePath.'\')',
'class' => 'remove-image', 'class' => 'remove-image main_menu_icon',
] ]
); );
$outputImagesTip .= html_print_div( $outputImagesTip .= html_print_div(
@ -811,16 +859,52 @@ class TipsWindow
</script>'; </script>';
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filter-table-adv';
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'width: 50%';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Images');
$table->data[0][1] .= $outputImagesTip; $table->data[0][0] = html_print_label_input_block(
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true); __('Language'),
$table->data[0][1] .= html_print_input_hidden('images_to_delete', '{}', true); html_print_select_from_sql(
$table->data[0][1] .= html_print_div( 'SELECT id_language, name FROM tlanguage',
'id_lang',
$tip['id_lang'],
'',
'',
'0',
true,
false,
true,
false,
'width: 100%;'
)
);
$table->data[0][1] = html_print_label_input_block(
__('Profile'),
html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true)
);
$table->data[1][0] = html_print_label_input_block(
__('Title'),
html_print_input_text('title', $tip['title'], '', 35, 100, true)
);
$table->data[1][1] = html_print_label_input_block(
__('Url'),
html_print_input_text('url', $tip['url'], '', 35, 100, true)
);
$table->data[2][0] = html_print_label_input_block(
__('Text'),
html_print_textarea('text', 5, 50, $tip['text'], '', true),
);
$table->data[2][1] = html_print_label_input_block(
__('Enable'),
html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true)
);
$inputImages = $outputImagesTip;
$inputImages .= html_print_div(['id' => 'inputs_images'], true);
$inputImages .= html_print_input_hidden('images_to_delete', '{}', true);
$inputImages .= html_print_div(
[ [
'id' => 'notices_images', 'id' => 'notices_images',
'class' => 'invisible', 'class' => 'invisible',
@ -828,41 +912,35 @@ class TipsWindow
], ],
true true
); );
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true); $inputImages .= html_print_div(
$table->data[1][0] = __('Language'); [
$table->data[1][1] = html_print_select_from_sql( 'id' => 'notices_images',
'SELECT id_language, name FROM tlanguage', 'class' => 'invisible empty_input_images',
'id_lang', 'content' => '<p>'.__('Please select a image').'</p>',
$tip['id_lang'], ],
'',
'',
'0',
true true
); );
$table->data[2][0] = __('Profile'); $inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
$table->data[2][1] = html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true);
$table->data[3][0] = __('Title');
$table->data[3][1] = html_print_input_text('title', $tip['title'], '', 35, 100, true);
$table->data[4][0] = __('Text');
$table->data[4][1] = html_print_textarea('text', 5, 50, $tip['text'], '', true);
$table->data[5][0] = __('Url');
$table->data[5][1] = html_print_input_text('url', $tip['url'], '', 35, 100, true);
$table->data[6][0] = __('Enable');
$table->data[6][1] = html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true);
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&action=edit&idTip='.$tip['id'].'" enctype="multipart/form-data">'; $table->data[3][0] = html_print_label_input_block(
__('Images'),
$inputImages
);
echo '<form class="max_floating_element_size" name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips&view=edit&action=edit&idTip='.$tip['id'].'" enctype="multipart/form-data">';
html_print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button( $actionButtons = html_print_submit_button(
__('Send'), __('Send'),
'submit_button', 'submit_button',
false, false,
[ [
'class' => 'sub', 'class' => 'sub',
'icon' => 'update', 'icon' => 'update',
] ],
true
); );
html_print_submit_button( $actionButtons .= html_print_submit_button(
__('Preview'), __('Preview'),
'preview_button', 'preview_button',
false, false,
@ -870,9 +948,12 @@ class TipsWindow
'class' => 'sub preview', 'class' => 'sub preview',
'id' => 'prev_button', 'id' => 'prev_button',
'icon' => 'preview', 'icon' => 'preview',
] ],
true
); );
html_print_action_buttons($actionButtons);
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
html_print_div(['id' => 'tips_window_modal_preview']); html_print_div(['id' => 'tips_window_modal_preview']);

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