Merge conflict solution
This commit is contained in:
commit
3057e67d1f
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, AIX version
|
||||
# Version 7.0NG.770, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, FreeBSD Version
|
||||
# Version 7.0NG.770, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, Solaris Version
|
||||
# Version 7.0NG.770, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (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
|
||||
# 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.769, AIX version
|
||||
# Version 7.0NG.770, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.769
|
||||
# Version 7.0NG.770
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.769, HPUX Version
|
||||
# Version 7.0NG.770, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769
|
||||
# Version 7.0NG.770
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769
|
||||
# Version 7.0NG.770
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769
|
||||
# Version 7.0NG.770
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.769, Solaris version
|
||||
# Version 7.0NG.770, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, AIX version
|
||||
# Version 7.0NG.770, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.769-230315
|
||||
Version: 7.0NG.770
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.769"
|
||||
VERSION="7.0NG.770"
|
||||
fi
|
||||
|
||||
# Path for the generated DMG file
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||
</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">
|
||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||
</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()" />
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||
|
||||
<key>CFBundleVersion</key> <string>7.0NG.769</string>
|
||||
<key>CFBundleGetInfoString</key> <string>7.0NG.769 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||
<key>CFBundleShortVersionString</key> <string>7.0NG.769</string>
|
||||
<key>CFBundleVersion</key> <string>7.0NG.770</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.770</string>
|
||||
|
||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, FreeBSD Version
|
||||
# Version 7.0NG.770, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, GNU/Linux
|
||||
# Version 7.0NG.770, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, NetBSD Version
|
||||
# Version 7.0NG.770, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.769, Solaris Version
|
||||
# Version 7.0NG.770, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1022,8 +1022,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.769';
|
||||
use constant AGENT_BUILD => '230315';
|
||||
use constant AGENT_VERSION => '7.0NG.770';
|
||||
use constant AGENT_BUILD => '230327';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -3749,6 +3749,7 @@ sub module_plugin ($) {
|
|||
|
||||
# Do not save the output if there was an error
|
||||
if ($? != 0) {
|
||||
log_message ('error', "plugin execution '". $command ."' exited with error code " . $?);
|
||||
return ();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.769
|
||||
%define release 230315
|
||||
%define version 7.0NG.770
|
||||
%define release 1
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.769
|
||||
%define release 230315
|
||||
%define version 7.0NG.770
|
||||
%define release 1
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_BUILD="230315"
|
||||
PI_VERSION="7.0NG.770"
|
||||
PI_BUILD="230327"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (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
|
||||
# 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
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.769}
|
||||
{Pandora FMS Windows Agent v7.0NG.770}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230315}
|
||||
{230327}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
|
|||
{No}
|
||||
|
||||
Windows,Executable
|
||||
{<%AppName%>-<%Version%>-Setup<%Ext%>}
|
||||
{<%AppName%>-Setup<%Ext%>}
|
||||
|
||||
Windows,FileDescription
|
||||
{<%AppName%> <%Version%> Setup}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#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_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
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"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.769-230315
|
||||
Version: 7.0NG.770
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.769-230315"
|
||||
pandora_version="7.0NG.770"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -240,7 +240,28 @@ function pandora_files_repo_operation()
|
|||
}
|
||||
|
||||
// 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.'/';
|
||||
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
|
||||
|
|
|
@ -441,84 +441,95 @@ function quickShellSettings()
|
|||
}
|
||||
|
||||
// Form. Using old style.
|
||||
echo '<fieldset>';
|
||||
echo '<fieldset class="margin-bottom-10">';
|
||||
echo '<legend>'.__('Quickshell').'</legend>';
|
||||
|
||||
$t = new StdClass();
|
||||
$t->data = [];
|
||||
$t->width = '100%';
|
||||
$t->class = 'databox filters';
|
||||
$t->class = 'filter-table-adv';
|
||||
$t->data = [];
|
||||
$t->style = [];
|
||||
$t->style[0] = 'font-weight: bold; width: 40%;';
|
||||
$t->style[0] = 'width: 50%;';
|
||||
|
||||
$t->data[0][0] = __('Gotty path');
|
||||
$t->data[0][1] = html_print_input_text(
|
||||
'gotty',
|
||||
$config['gotty'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[0][] = html_print_label_input_block(
|
||||
__('Gotty path'),
|
||||
html_print_input_text(
|
||||
'gotty',
|
||||
$config['gotty'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$t->data[1][0] = __('Gotty host');
|
||||
$t->data[1][1] = html_print_input_text(
|
||||
'gotty_host',
|
||||
$config['gotty_host'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[0][] = html_print_label_input_block(
|
||||
__('Gotty host'),
|
||||
html_print_input_text(
|
||||
'gotty_host',
|
||||
$config['gotty_host'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$t->data[2][0] = __('Gotty ssh port');
|
||||
$t->data[2][1] = html_print_input_text(
|
||||
'gotty_ssh_port',
|
||||
$config['gotty_ssh_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[1][] = html_print_label_input_block(
|
||||
__('Gotty ssh port'),
|
||||
html_print_input_text(
|
||||
'gotty_ssh_port',
|
||||
$config['gotty_ssh_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$t->data[3][0] = __('Gotty telnet port');
|
||||
$t->data[3][1] = html_print_input_text(
|
||||
'gotty_telnet_port',
|
||||
$config['gotty_telnet_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[1][] = html_print_label_input_block(
|
||||
__('Gotty telnet port'),
|
||||
html_print_input_text(
|
||||
'gotty_telnet_port',
|
||||
$config['gotty_telnet_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$hidden = new StdClass();
|
||||
$hidden = new stdClass();
|
||||
$hidden->data = [];
|
||||
$hidden->width = '100%';
|
||||
$hidden->class = 'databox filters';
|
||||
$hidden->class = 'filter-table-adv';
|
||||
$hidden->data = [];
|
||||
$hidden->style[0] = 'font-weight: bold;width: 40%;';
|
||||
$hidden->style[0] = 'width: 50%;';
|
||||
|
||||
$hidden->data[0][0] = __('Gotty user');
|
||||
$hidden->data[0][1] = html_print_input_text(
|
||||
'gotty_user',
|
||||
$config['gotty_user'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$hidden->data[0][] = html_print_label_input_block(
|
||||
__('Gotty user'),
|
||||
html_print_input_text(
|
||||
'gotty_user',
|
||||
$config['gotty_user'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$hidden->data[1][0] = __('Gotty password');
|
||||
$hidden->data[1][1] = html_print_input_password(
|
||||
'gotty_pass',
|
||||
io_output_password($config['gotty_pass']),
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$hidden->data[0][] = html_print_label_input_block(
|
||||
__('Gotty password'),
|
||||
html_print_input_password(
|
||||
'gotty_pass',
|
||||
io_output_password($config['gotty_pass']),
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
$hidden->data[1][1] .= ui_print_reveal_password('gotty_pass', true);
|
||||
|
||||
html_print_table($t);
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
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` = 'solaris@os.svg' WHERE `id_os` = 2;
|
||||
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,
|
||||
PRIMARY KEY (`id`));
|
||||
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('legacy_database_ha', 1);
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -27,10 +27,27 @@ require_once __DIR__.'/../include/functions_ui.php';
|
|||
require_once __DIR__.'/../include/functions.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']) {
|
||||
// form#login_form, div.login_data {
|
||||
echo '<style>
|
||||
div.container_login {
|
||||
div.container_login {
|
||||
animation: container_login 3s ease;
|
||||
}
|
||||
|
||||
|
@ -120,7 +137,13 @@ if (empty($config['background_opacity']) === false) {
|
|||
$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.
|
||||
$custom_fields = [
|
||||
|
@ -147,7 +170,7 @@ foreach ($custom_fields as $field) {
|
|||
$docs_logo = ui_get_docs_logo();
|
||||
$support_logo = ui_get_support_logo();
|
||||
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>';
|
||||
|
||||
|
@ -185,12 +208,12 @@ echo '</div>';
|
|||
|
||||
echo '<div class="container_login">';
|
||||
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.'">';
|
||||
if (is_metaconsole() === true) {
|
||||
if (!isset($config['custom_logo_login'])) {
|
||||
html_print_image(
|
||||
'enterprise/images/custom_logo_login/login_logo.png',
|
||||
'enterprise/images/custom_logo_login/Pandora-FMS-1.png',
|
||||
false,
|
||||
[
|
||||
'class' => 'login_logo',
|
||||
|
@ -215,13 +238,13 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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>';
|
||||
} else {
|
||||
echo '<div class="login_nick">';
|
||||
echo '<div class="login_nick '.$style_theme.'">';
|
||||
html_print_input_text_extended(
|
||||
'nick',
|
||||
'',
|
||||
|
@ -307,10 +330,11 @@ switch ($login_screen) {
|
|||
'',
|
||||
false,
|
||||
'',
|
||||
'autocomplete="off" placeholder="'.__('User').'"'
|
||||
'autocomplete="off" class="input" placeholder=" "'
|
||||
);
|
||||
echo '<label for="nick" class="placeholder">'.__('User').'</label>';
|
||||
echo '</div>';
|
||||
echo '<div class="login_pass">';
|
||||
echo '<div class="login_pass '.$style_theme.'">';
|
||||
html_print_input_text_extended(
|
||||
'pass',
|
||||
'',
|
||||
|
@ -320,20 +344,18 @@ switch ($login_screen) {
|
|||
'',
|
||||
false,
|
||||
'',
|
||||
'autocomplete="off" placeholder="'.__('Password').'"',
|
||||
'autocomplete="off" class="input " placeholder=" " style="background-image: url(images/enable.svg);"',
|
||||
false,
|
||||
true
|
||||
);
|
||||
echo '<label for="pass" class="placeholder">'.__('Password').'</label>';
|
||||
echo '</div>';
|
||||
echo '<div class="login_button">';
|
||||
html_print_submit_button(
|
||||
__('Login'),
|
||||
__('Let's go'),
|
||||
'login_button',
|
||||
false,
|
||||
[
|
||||
'fixed_id' => 'submit-login_button',
|
||||
'icon' => 'signin',
|
||||
]
|
||||
['fixed_id' => 'submit-login_button']
|
||||
);
|
||||
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>';
|
||||
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 class="login_button">';
|
||||
// html_print_submit_button(__('Check code').' >', 'login_button', false, 'class="next_login"');
|
||||
html_print_submit_button(__('Check code').' >', '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>';
|
||||
break;
|
||||
|
||||
|
@ -425,78 +468,79 @@ html_print_csrf_hidden();
|
|||
|
||||
echo '</form></div>';
|
||||
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><span class="span1">';
|
||||
echo '<div><span class="span1">';
|
||||
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
if ($config['custom_title1_login']) {
|
||||
echo io_safe_output($config['custom_title1_login']);
|
||||
} else {
|
||||
echo __('WELCOME TO %s', get_product_name());
|
||||
echo __('ONE TOOL TO RULE THEM ALL');
|
||||
}
|
||||
} else {
|
||||
echo __('WELCOME TO %s', get_product_name());
|
||||
echo __('ONE TOOL TO RULE THEM ALL');
|
||||
}
|
||||
|
||||
echo '</span></div>';
|
||||
echo '<div><span class="span2">';
|
||||
echo '</span></div>';
|
||||
echo '<div><span class="span2">';
|
||||
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
if ($config['custom_title2_login']) {
|
||||
echo io_safe_output($config['custom_title2_login']);
|
||||
} else {
|
||||
echo __('NEXT GENERATION');
|
||||
}
|
||||
} else {
|
||||
echo __('NEXT GENERATION');
|
||||
}
|
||||
|
||||
echo '</span></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 '</span></div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ if (!$double_auth_enabled
|
|||
background: "black"
|
||||
},
|
||||
width: 500,
|
||||
height: 400,
|
||||
height: 'auto',
|
||||
close: function (event, ui) {
|
||||
// Abort the ajax request
|
||||
if (typeof request != 'undefined'){
|
||||
|
|
|
@ -487,21 +487,18 @@ 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_div(
|
||||
[
|
||||
'content' => ui_print_group_icon(
|
||||
$grupo,
|
||||
true,
|
||||
'',
|
||||
($id_agente === 0) ? 'display: none;' : '',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'after_input_icon'
|
||||
),
|
||||
],
|
||||
true
|
||||
$tableAgent->data['primary_group'][0] .= '<span id="group_preview">';
|
||||
$tableAgent->data['primary_group'][0] .= ui_print_group_icon(
|
||||
$grupo,
|
||||
true,
|
||||
'',
|
||||
($id_agente === 0) ? 'display: none;' : '',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'after_input_icon'
|
||||
);
|
||||
$tableAgent->data['primary_group'][0] .= '</span>';
|
||||
|
||||
$tableAgent->data['caption_interval'][0] = __('Interval');
|
||||
// $tableAgent->rowstyle['interval'] = 'width: 260px';
|
||||
|
@ -974,7 +971,7 @@ foreach ($fields as $field) {
|
|||
$data_field[1] .= html_print_textarea(
|
||||
'customvalue_'.$field['id_field'].'[]',
|
||||
2,
|
||||
65,
|
||||
1000,
|
||||
$link_text,
|
||||
'class="min-height-30px w100p"',
|
||||
true
|
||||
|
@ -985,7 +982,7 @@ foreach ($fields as $field) {
|
|||
$data_field[1] .= html_print_textarea(
|
||||
'customvalue_'.$field['id_field'].'[]',
|
||||
2,
|
||||
65,
|
||||
1000,
|
||||
$link_url,
|
||||
'class="min-height-30px w100p"',
|
||||
true
|
||||
|
@ -994,7 +991,7 @@ foreach ($fields as $field) {
|
|||
$customContent = html_print_textarea(
|
||||
'customvalue_'.$field['id_field'],
|
||||
2,
|
||||
65,
|
||||
1000,
|
||||
$custom_value,
|
||||
'class="min-height-30px w100p"',
|
||||
true
|
||||
|
@ -1039,7 +1036,7 @@ if (empty($fields) === false) {
|
|||
'',
|
||||
true,
|
||||
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'
|
||||
);
|
||||
}
|
||||
|
|
|
@ -827,12 +827,6 @@ if ($id_agente) {
|
|||
'link' => '',
|
||||
'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',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -57,14 +57,33 @@ if ($id_field) {
|
|||
$combo_values = $field['combo_values'] ? $field['combo_values'] : '';
|
||||
$is_combo_enable = $config['is_combo_enable'];
|
||||
$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 {
|
||||
ui_print_page_header(__('Create agent custom field'), 'images/custom_field.png', false, '', true, '');
|
||||
$header_title = __('Create agent custom field');
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox';
|
||||
$table->id = 'configure_field';
|
||||
ui_print_standard_header(
|
||||
$header_title,
|
||||
'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 "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>';
|
||||
|
@ -82,80 +101,96 @@ 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 '</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[0][0] = __('Name');
|
||||
$table->data[1][0] = html_print_input_text(
|
||||
'name',
|
||||
$name,
|
||||
'',
|
||||
35,
|
||||
100,
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text(
|
||||
'name',
|
||||
$name,
|
||||
'',
|
||||
35,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Pass type').ui_print_help_tip(
|
||||
__('The fields with pass type enabled will be displayed like html input type pass in html'),
|
||||
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'),
|
||||
true
|
||||
);
|
||||
$table->data[2][2] = __('Link type');
|
||||
|
||||
$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',
|
||||
1,
|
||||
$display_on_front,
|
||||
true
|
||||
);
|
||||
$table->data[3][2] = html_print_checkbox_switch_extended(
|
||||
'is_link_enabled',
|
||||
1,
|
||||
$is_link_enabled,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[4][0] = __('Enabled combo');
|
||||
$table->data[5][0] = html_print_checkbox_switch_extended(
|
||||
'is_combo_enable',
|
||||
0,
|
||||
$config['is_combo_enable'],
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Display on front').ui_print_help_tip(
|
||||
__('The fields with display on front enabled will be displayed into the agent details'),
|
||||
true
|
||||
),
|
||||
html_print_checkbox_switch(
|
||||
'display_on_front',
|
||||
1,
|
||||
$display_on_front,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$table->cellstyle[4][1] = 'display: none;';
|
||||
$table->cellstyle[5][1] = 'display: none;';
|
||||
|
||||
$table->data[4][1] = __('Combo values').ui_print_help_tip(
|
||||
__('Set values separated by comma'),
|
||||
true
|
||||
);
|
||||
$table->data[5][1] = html_print_textarea(
|
||||
'combo_values',
|
||||
3,
|
||||
65,
|
||||
io_safe_output($combo_values),
|
||||
'',
|
||||
true
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Link type'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'is_link_enabled',
|
||||
1,
|
||||
$is_link_enabled,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$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
|
||||
)
|
||||
);
|
||||
|
||||
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Enabled combo'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'is_combo_enable',
|
||||
0,
|
||||
$config['is_combo_enable'],
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Combo values').ui_print_help_tip(
|
||||
__('Set values separated by comma'),
|
||||
true
|
||||
),
|
||||
html_print_textarea(
|
||||
'combo_values',
|
||||
3,
|
||||
65,
|
||||
io_safe_output($combo_values),
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '<form class="max_floating_element_size" name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
|
||||
html_print_table($table);
|
||||
|
||||
if ($id_field > 0) {
|
||||
|
@ -194,65 +229,65 @@ echo '</form>';
|
|||
<script>
|
||||
$(document).ready (function () {
|
||||
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);
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
|
||||
$('input[type=checkbox][name=is_password_type]').change(function (e) {
|
||||
dialog_message("#message_set_password");
|
||||
$('input[type=checkbox][name=is_password_type]').prop('checked', false);
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
e.preventDefault();
|
||||
});
|
||||
$('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)){
|
||||
dialog_message("#message_set_combo");
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-4').show();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('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)){
|
||||
dialog_message("#message_set_combo");
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-3').show();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('entra');
|
||||
$('#configure_field-3').hide();
|
||||
}
|
||||
|
||||
if ($('input[type=checkbox][name=is_link_enabled]').is(":checked") === true) {
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-2').hide();
|
||||
} else {
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-3').show();
|
||||
$('#configure_field-2').show();
|
||||
}
|
||||
|
||||
$('input[type=checkbox][name=is_link_enabled]').change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-2').hide();
|
||||
$('#configure_field-3').hide();
|
||||
} else{
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-2').show();
|
||||
$('#configure_field-3').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=checkbox][name=is_combo_enable]').change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
dialog_message("#message_no_set_password");
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-5').hide();
|
||||
}
|
||||
else{
|
||||
$('#configure_field-4').hide();
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-5').show();
|
||||
}
|
||||
});
|
||||
$('input[type=checkbox][name=is_password_type]').change(function () {
|
||||
if( $(this).is(":checked")){
|
||||
dialog_message("#message_no_set_combo");
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-5').hide();
|
||||
}
|
||||
else{
|
||||
$('#configure_field-3').show();
|
||||
$('#configure_field-5').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -225,7 +225,7 @@ if (db_get_num_rows($sql) == 0) {
|
|||
} else {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox info_trable';
|
||||
$table->class = 'databox info_table max_floating_element_size';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->styleTable = '';
|
||||
|
|
|
@ -794,7 +794,7 @@ if ($agents !== false) {
|
|||
// Agent name column (1). Agent name.
|
||||
$agentNameColumn = html_print_anchor(
|
||||
[
|
||||
'href' => ui_get_full_url($agentNameUrl),
|
||||
'href' => ui_get_full_url($agentViewUrl),
|
||||
'title' => $agent['nombre'],
|
||||
'content' => ui_print_truncate_text($agent['alias'], 'agent_medium').implode('', $additionalDataAgentName),
|
||||
],
|
||||
|
@ -866,7 +866,6 @@ if ($agents !== false) {
|
|||
// Operating System icon column.
|
||||
$osIconColumn = html_print_div(
|
||||
[
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'content' => ui_print_os_icon($agent['id_os'], false, true),
|
||||
],
|
||||
true
|
||||
|
@ -885,7 +884,6 @@ if ($agents !== false) {
|
|||
// Group icon and name column.
|
||||
$agentGroupIconColumn = html_print_div(
|
||||
[
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'content' => ui_print_group_icon($agent['id_grupo'], true),
|
||||
],
|
||||
true
|
||||
|
@ -907,12 +905,12 @@ if ($agents !== false) {
|
|||
$agentDisableEnableTitle = __('Enable agent');
|
||||
$agentDisableEnableAction = 'enable_agent';
|
||||
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
|
||||
$agentDisableEnableIcon = 'change-pause.svg';
|
||||
$agentDisableEnableIcon = 'change-active.svg';
|
||||
} else {
|
||||
$agentDisableEnableTitle = __('Disable agent');
|
||||
$agentDisableEnableAction = 'disable_agent';
|
||||
$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(
|
||||
|
|
|
@ -1117,7 +1117,7 @@ $modalCreateModule .= html_print_div(
|
|||
'class' => 'action-buttons-right-forced',
|
||||
'content' => html_print_submit_button(
|
||||
__('Create'),
|
||||
'create_module',
|
||||
'modal_button_create',
|
||||
false,
|
||||
[
|
||||
'icon' => 'next',
|
||||
|
@ -1142,7 +1142,6 @@ html_print_div(
|
|||
<script type="text/javascript">
|
||||
|
||||
function create_module_dialog(){
|
||||
console.log('Entra');
|
||||
$('#modal').dialog({
|
||||
title: '<?php echo __('Create Module'); ?>',
|
||||
resizable: true,
|
||||
|
|
|
@ -445,79 +445,75 @@ $tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width
|
|||
$tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').' ';
|
||||
|
||||
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['warning_threshold'][0] .= html_print_input_text(
|
||||
'min_warning',
|
||||
$min_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$tableBasicThresholds->data['warning_threshold'][1] .= html_print_input_text(
|
||||
'max_warning',
|
||||
$max_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</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(
|
||||
'min_warning',
|
||||
$min_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$tableBasicThresholds->data['warning_threshold'][1] .= html_print_input_text(
|
||||
'max_warning',
|
||||
$max_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
|
||||
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'normal_warning', __('Normal'), ($percentage_warning && $warning_inverse) === false, false, '', '', true, false, '', 'radius-normal_warning'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'warning_inverse', __('Inverse interval'), $warning_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-warning_inverse'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'percentage_warning', __('Percentage'), $percentage_warning, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_warning'),
|
||||
],
|
||||
[ 'class' => 'margin-top-10' ],
|
||||
true
|
||||
);
|
||||
}
|
||||
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'normal_warning', __('Normal'), ($percentage_warning && $warning_inverse) === false, false, '', '', true, false, '', 'radius-normal_warning'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'warning_inverse', __('Inverse interval'), $warning_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-warning_inverse'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'percentage_warning', __('Percentage'), $percentage_warning, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_warning'),
|
||||
],
|
||||
[ 'class' => 'margin-top-10' ],
|
||||
true
|
||||
);
|
||||
|
||||
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
|
||||
$basicThresholdsIntervalWarning = [];
|
||||
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
|
||||
'warning_inverse_string',
|
||||
1,
|
||||
$warning_inverse,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
$basicThresholdsIntervalWarning = [];
|
||||
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
|
||||
'warning_inverse_string',
|
||||
1,
|
||||
$warning_inverse,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
|
||||
$tableBasicThresholds->rowclass['caption_switch_warning_inverse_string'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_switch_warning_inverse_string'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $basicThresholdsIntervalWarning),
|
||||
],
|
||||
true
|
||||
);
|
||||
$tableBasicThresholds->rowclass['caption_switch_warning_inverse_string'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_switch_warning_inverse_string'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $basicThresholdsIntervalWarning),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_str_warning">('.__('Str.').')</span>';
|
||||
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
||||
'str_warning',
|
||||
str_replace('"', '', $str_warning),
|
||||
'',
|
||||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
}
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_str_warning">('.__('Str.').')</span>';
|
||||
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
||||
'str_warning',
|
||||
str_replace('"', '', $str_warning),
|
||||
'',
|
||||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
|
||||
|
||||
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
|
||||
|
@ -532,87 +528,84 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
|
|||
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
|
||||
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').' ';
|
||||
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['critical_threshold'][0] .= html_print_input_text(
|
||||
'min_critical',
|
||||
$min_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$tableBasicThresholds->data['critical_threshold'][1] .= html_print_input_text(
|
||||
'max_critical',
|
||||
$max_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</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(
|
||||
'min_critical',
|
||||
$min_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$tableBasicThresholds->data['critical_threshold'][1] .= html_print_input_text(
|
||||
'max_critical',
|
||||
$max_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'normal_critical', __('Normal'), ($percentage_critical && $critical_inverse) === false, false, '', '', true, false, '', 'radius-normal_critical'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'critical_inverse', __('Inverse interval'), $critical_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-critical_inverse'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'percentage_critical', __('Percentage'), $percentage_critical, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_critical'),
|
||||
],
|
||||
[ 'class' => 'margin-top-10' ],
|
||||
true
|
||||
);
|
||||
}
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'normal_critical', __('Normal'), ($percentage_critical && $critical_inverse) === false, false, '', '', true, false, '', 'radius-normal_critical'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'critical_inverse', __('Inverse interval'), $critical_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-critical_inverse'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'percentage_critical', __('Percentage'), $percentage_critical, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_critical'),
|
||||
],
|
||||
[ 'class' => 'margin-top-10' ],
|
||||
true
|
||||
);
|
||||
|
||||
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
|
||||
$basicThresholdsIntervalCritical = [];
|
||||
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
|
||||
'critical_inverse_string',
|
||||
1,
|
||||
$critical_inverse,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
|
||||
$tableBasicThresholds->rowclass['caption_switch_critical_inverse_string'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_switch_critical_inverse_string'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $basicThresholdsIntervalCritical),
|
||||
],
|
||||
true
|
||||
);
|
||||
$basicThresholdsIntervalCritical = [];
|
||||
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
|
||||
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
|
||||
'critical_inverse_string',
|
||||
1,
|
||||
$critical_inverse,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_div(
|
||||
[
|
||||
'id' => 'percentage_critical',
|
||||
'content' => $divPercentageContent,
|
||||
],
|
||||
true
|
||||
);
|
||||
$tableBasicThresholds->rowclass['caption_switch_critical_inverse_string'] = 'field_half_width';
|
||||
$tableBasicThresholds->data['caption_switch_critical_inverse_string'][0] = html_print_div(
|
||||
[
|
||||
'class' => 'margin-top-10',
|
||||
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
|
||||
'content' => implode('', $basicThresholdsIntervalCritical),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_str_critical">('.__('Str.').')</span>';
|
||||
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
|
||||
'str_critical',
|
||||
str_replace('"', '', $str_critical),
|
||||
'',
|
||||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
}
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_div(
|
||||
[
|
||||
'id' => 'percentage_critical',
|
||||
'content' => $divPercentageContent,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_str_critical">('.__('Str.').')</span>';
|
||||
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
|
||||
'str_critical',
|
||||
str_replace('"', '', $str_critical),
|
||||
'',
|
||||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
|
||||
$table_simple->rowstyle['thresholds_table'] = 'margin-top: 15px;height: 340px;width: 100%';
|
||||
$table_simple->cellclass['thresholds_table'][0] = 'table_section half_section_left';
|
||||
|
@ -1623,6 +1616,11 @@ ui_require_jquery_file('json');
|
|||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
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 () {
|
||||
jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) {
|
||||
tag_name = $(value).html();
|
||||
|
|
|
@ -123,7 +123,7 @@ $table->data[1][0] = html_print_label_input_block(
|
|||
'w100p',
|
||||
false,
|
||||
'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']);
|
||||
|
@ -162,7 +162,7 @@ $table->data[1][1] = html_print_label_input_block(
|
|||
'w100p',
|
||||
false,
|
||||
'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(
|
||||
|
|
|
@ -679,7 +679,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'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> ';
|
||||
|
@ -757,7 +757,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'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);
|
||||
|
@ -772,7 +772,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'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'].'\')',
|
||||
]
|
||||
);
|
||||
|
|
|
@ -122,24 +122,24 @@ $sec = (is_metaconsole() === true) ? 'advanced' : 'galertas';
|
|||
// case delete_templete action is performed.
|
||||
if (!$delete_template) {
|
||||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
alerts_meta_print_header();
|
||||
} else {
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
ui_print_standard_header(
|
||||
__('Alerts'),
|
||||
'images/gm_alerts.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alert templates'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
'link' => '',
|
||||
'label' => __('Alerts'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Alert templates'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if ($update_template) {
|
||||
|
|
|
@ -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(
|
||||
__('Default action').ui_print_help_tip(
|
||||
__('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(
|
||||
__('Condition type'),
|
||||
html_print_select(
|
||||
|
|
|
@ -132,7 +132,8 @@ $table->data[1][1] = '<a href="javascript:">'.html_print_image(
|
|||
[
|
||||
'id' => 'right',
|
||||
'title' => __('Add fields to select'),
|
||||
'style' => 'rotate: 180deg; width: 40px',
|
||||
'style' => 'rotate: 180deg;',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$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',
|
||||
'title' => __('Delete fields to select'),
|
||||
'style' => 'width: 40px',
|
||||
'style' => '',
|
||||
]
|
||||
).'</a>';
|
||||
|
||||
|
@ -169,6 +170,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
|
|||
[
|
||||
'onclick' => 'sortUpDown(\'up\');',
|
||||
'title' => __('Move up selected fields'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$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\');',
|
||||
'title' => __('Move down selected fields'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$table->data[1][2] .= '</div></div>';
|
||||
|
|
|
@ -445,7 +445,7 @@ if ($is_management_allowed === true
|
|||
if ($aviable_name === true) {
|
||||
$values = [
|
||||
'nombre' => $name,
|
||||
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
|
||||
'icon' => $icon,
|
||||
'parent' => $id_parent,
|
||||
'disabled' => $alerts_disabled,
|
||||
'custom_id' => $custom_id,
|
||||
|
@ -513,7 +513,7 @@ if ($is_management_allowed === true && $update_group === true) {
|
|||
if ($aviable_name === true) {
|
||||
$values = [
|
||||
'nombre' => $name,
|
||||
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
|
||||
'icon' => $icon,
|
||||
'parent' => ($id_parent == -1) ? 0 : $id_parent,
|
||||
'disabled' => !$alerts_enabled,
|
||||
'custom_id' => $custom_id,
|
||||
|
@ -718,7 +718,7 @@ if ($is_management_allowed === true
|
|||
'tfavmenu_user',
|
||||
[
|
||||
'id_element' => $id_group,
|
||||
'section' => 'Tactic_group',
|
||||
'section' => 'Groups',
|
||||
'id_user' => $config['id_user'],
|
||||
]
|
||||
);
|
||||
|
@ -741,12 +741,11 @@ if ($is_management_allowed === true
|
|||
|
||||
// Credential store is loaded previously in this document to avoid
|
||||
// process group tree - list forms.
|
||||
ui_print_spinner(__('Loading'));
|
||||
if ($tab == 'tree') {
|
||||
/*
|
||||
* Group tree view.
|
||||
*/
|
||||
|
||||
ui_print_spinner(__('Loading'));
|
||||
echo "<div id='tree-controller-recipient'></div>";
|
||||
} else {
|
||||
/*
|
||||
|
@ -906,7 +905,6 @@ if ($tab == 'tree') {
|
|||
|
||||
foreach ($groups as $key => $group) {
|
||||
$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()) {
|
||||
$url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'].'&tab=groups';
|
||||
} else {
|
||||
|
@ -915,7 +913,7 @@ if ($tab == 'tree') {
|
|||
|
||||
$table->data[$key][0] = $group['id_grupo'];
|
||||
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 {
|
||||
$table->data[$key][1] = $group['nombre'];
|
||||
}
|
||||
|
@ -926,7 +924,7 @@ if ($tab == 'tree') {
|
|||
true,
|
||||
[
|
||||
'style' => '',
|
||||
'class' => 'bot',
|
||||
'class' => 'bot main_menu_icon invert_filter',
|
||||
'alt' => io_safe_input($group['nombre']),
|
||||
'title' => io_safe_input($group['nombre']),
|
||||
],
|
||||
|
@ -987,7 +985,7 @@ if ($tab == 'tree') {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
|
@ -1039,6 +1037,7 @@ $tab = 'group_edition';
|
|||
|
||||
<script type="text/javascript">
|
||||
var treeController = TreeController.getController();
|
||||
treeController.meta = <?php echo (is_metaconsole() === true) ? 1 : 0; ?>;
|
||||
|
||||
if (typeof treeController.recipient != 'undefined' && treeController.recipient.length > 0)
|
||||
treeController.recipient.empty();
|
||||
|
|
|
@ -72,14 +72,14 @@ if (is_metaconsole() === false) {
|
|||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Tactic group'),
|
||||
'label' => __('Tactical group view'),
|
||||
],
|
||||
],
|
||||
[
|
||||
'id_element' => $id_group,
|
||||
'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group,
|
||||
'label' => groups_get_name($id_group),
|
||||
'section' => 'Tactic_group',
|
||||
'section' => 'Groups',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ try {
|
|||
[
|
||||
'id' => 'list_agents_tactical',
|
||||
'class' => 'info_table',
|
||||
'style' => 'width: 100%',
|
||||
'style' => 'width: 99%',
|
||||
'columns' => $columns,
|
||||
'column_names' => $columnNames,
|
||||
'return' => true,
|
||||
|
@ -196,6 +196,7 @@ try {
|
|||
'method' => 'getAgentsByGroup',
|
||||
'id_group' => $id_group,
|
||||
],
|
||||
'dom_elements' => 'lpfti',
|
||||
'no_sortable_columns' => [-1],
|
||||
'order' => [
|
||||
'field' => 'alias',
|
||||
|
|
|
@ -306,21 +306,37 @@ $onheader['snmp'] = $snmptab;
|
|||
$onheader['satellite'] = $satellitetab;
|
||||
$onheader['services'] = $servicestab;
|
||||
|
||||
|
||||
// Header.
|
||||
if (is_metaconsole() === false) {
|
||||
ui_print_page_header(
|
||||
__('Bulk operations').' » '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
true,
|
||||
$onheader,
|
||||
false,
|
||||
'massivemodal'
|
||||
);
|
||||
} else {
|
||||
massive_meta_print_header();
|
||||
}
|
||||
ui_print_standard_header(
|
||||
__('Bulk operations').' - '.$options[$option],
|
||||
'images/gm_massive_operations.png',
|
||||
false,
|
||||
$help_header,
|
||||
false,
|
||||
[
|
||||
$agentstab,
|
||||
$modulestab,
|
||||
$pluginstab,
|
||||
$userstab,
|
||||
$alertstab,
|
||||
$policiestab,
|
||||
$snmptab,
|
||||
$satellitetab,
|
||||
$servicestab,
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Configuration'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Bulk operations'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
// Checks if the PHP configuration is correctly.
|
||||
if ((get_cfg_var('max_execution_time') != 0)
|
||||
|
|
|
@ -364,6 +364,11 @@ if ($access_console_node === true) {
|
|||
$sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow');
|
||||
$sub2['godmode/setup/setup§ion=net']['refr'] = 0;
|
||||
}
|
||||
|
||||
if ((bool) $config['activate_sflow'] === true) {
|
||||
$sub2['godmode/setup/setup§ion=sflow']['text'] = __('Sflow');
|
||||
$sub2['godmode/setup/setup§ion=sflow']['refr'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sub2['godmode/setup/setup§ion=ehorus']['text'] = __('eHorus');
|
||||
|
|
|
@ -297,7 +297,7 @@ if (!empty($table->data)) {
|
|||
html_print_input_hidden('multiple_delete', 1);
|
||||
ui_pagination($count_network_templates, false, $offset);
|
||||
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'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
|
|
@ -56,9 +56,13 @@ ui_print_standard_header(
|
|||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Netflow'),
|
||||
'label' => __('Resources'),
|
||||
],
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Netflow filters'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
|
||||
|
@ -211,7 +215,6 @@ $buttons = html_print_submit_button(
|
|||
true
|
||||
);
|
||||
|
||||
// hd($filters);
|
||||
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.'">';
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
|
|
|
@ -445,7 +445,7 @@ if (!empty($graphs)) {
|
|||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
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'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</form>';
|
||||
|
|
|
@ -115,6 +115,7 @@ $exception_condition_value = 10;
|
|||
$modulegroup = 0;
|
||||
$period = SECONDS_1DAY;
|
||||
$search = '';
|
||||
$full_text = 0;
|
||||
$log_number = 1000;
|
||||
// Added support for projection graphs.
|
||||
$period_pg = SECONDS_5DAY;
|
||||
|
@ -316,6 +317,7 @@ switch ($action) {
|
|||
$source = $es['source'];
|
||||
$search = $es['search'];
|
||||
$log_number = empty($es['log_number']) ? $log_number : $es['log_number'];
|
||||
$full_text = empty($es['full_text']) ? 0 : $es['full_text'];
|
||||
break;
|
||||
|
||||
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%">
|
||||
<?php
|
||||
if (defined('METACONSOLE')) {
|
||||
echo '<thead>
|
||||
<tr>
|
||||
<th align=center colspan=5>
|
||||
'.__('Item Editor').'
|
||||
</th>
|
||||
</tr>
|
||||
</thead>';
|
||||
}
|
||||
?>
|
||||
<tbody>
|
||||
<tr id="row_type" class="datos">
|
||||
<td class="bolder w220px">
|
||||
|
@ -1324,6 +1315,14 @@ $class = 'databox filters';
|
|||
<td >
|
||||
<?php
|
||||
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>
|
||||
</tr>
|
||||
|
|
|
@ -201,139 +201,86 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
|
|||
|
||||
$urlFilter = '&agent_filter='.$agentFilter.'&module_filter='.$moduleFilter.'&type_filter='.$typeFilter;
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->size[0] = '33%';
|
||||
$table->size[1] = '33%';
|
||||
$table->size[1] = '33%';
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Agents'),
|
||||
html_print_select(
|
||||
$agents,
|
||||
'agent_filter',
|
||||
$agentFilter,
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Modules'),
|
||||
html_print_select(
|
||||
$modules,
|
||||
'module_filter',
|
||||
$moduleFilter,
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('Type'),
|
||||
html_print_select(
|
||||
$types,
|
||||
'type_filter',
|
||||
$typeFilter,
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">';
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'filter',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= html_print_input_hidden('action', 'filter', true);
|
||||
$form .= '</form>';
|
||||
|
||||
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(
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->size[0] = '33%';
|
||||
$table->size[1] = '33%';
|
||||
$table->size[1] = '33%';
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Agents'),
|
||||
html_print_select(
|
||||
$agents,
|
||||
'agent_filter',
|
||||
$agentFilter,
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data[0][2] = __('Modules');
|
||||
$table->data[0][3] = html_print_select(
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Modules'),
|
||||
html_print_select(
|
||||
$modules,
|
||||
'module_filter',
|
||||
$moduleFilter,
|
||||
'',
|
||||
__('All'),
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data[0][4] = __('Type');
|
||||
$table->data[0][5] = html_print_select(
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('Type'),
|
||||
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',
|
||||
true,
|
||||
false,
|
||||
'class="sub upd"',
|
||||
true
|
||||
).html_print_input_hidden('action', 'filter', true);
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:100%'
|
||||
)
|
||||
);
|
||||
$form = '<form method="post" action ="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&id_report='.$idReport.'">';
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'filter',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= html_print_input_hidden('action', 'filter', true);
|
||||
$form .= '</form>';
|
||||
|
||||
$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'));
|
||||
}
|
||||
ui_toggle($form, __('Filters'), '', '', false);
|
||||
|
||||
$where = '1=1';
|
||||
if ($typeFilter != '0') {
|
||||
|
@ -412,16 +359,9 @@ $table->style[0] = 'text-align: right;';
|
|||
|
||||
if ($items) {
|
||||
$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';
|
||||
$arrow_up = 'images/sort_up_black.png';
|
||||
$arrow_down = 'images/sort_down_black.png';
|
||||
}
|
||||
$table->class = 'info_table';
|
||||
$arrow_up = 'images/sort_up_black.png';
|
||||
$arrow_down = 'images/sort_down_black.png';
|
||||
|
||||
$table->size = [];
|
||||
$table->size[0] = '5px';
|
||||
|
@ -717,90 +657,65 @@ 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 ($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
|
||||
);
|
||||
|
||||
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 "<form id='form_delete' 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>';
|
||||
echo '</form>';
|
||||
}
|
||||
} else {
|
||||
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 id='form_delete' 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="action-buttons w100p">';
|
||||
html_print_input_hidden('ids_items_to_delete', '');
|
||||
$ActionButtons[] = html_print_submit_button(
|
||||
__('Delete'),
|
||||
'delete_btn',
|
||||
false,
|
||||
[
|
||||
'class' => 'sub ok',
|
||||
'icon' => 'next',
|
||||
],
|
||||
true
|
||||
);
|
||||
html_print_action_buttons(
|
||||
implode('', $ActionButtons),
|
||||
['type' => 'form_action']
|
||||
);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
}
|
||||
echo '<div class="action-buttons w100p">';
|
||||
html_print_input_hidden('ids_items_to_delete', '');
|
||||
$ActionButtons[] = html_print_submit_button(
|
||||
__('Delete'),
|
||||
'delete_btn',
|
||||
false,
|
||||
[
|
||||
'class' => 'sub ok',
|
||||
'icon' => 'next',
|
||||
],
|
||||
true
|
||||
);
|
||||
html_print_action_buttons(
|
||||
implode('', $ActionButtons),
|
||||
['type' => 'form_action']
|
||||
);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
|
||||
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(
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Sort selected items from position: '),
|
||||
html_print_select_style(
|
||||
[
|
||||
'before' => __('Move before to'),
|
||||
'after' => __('Move after to'),
|
||||
],
|
||||
'move_to',
|
||||
'',
|
||||
'',
|
||||
'width:100%',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data[1][2] = html_print_input_text_extended(
|
||||
true,
|
||||
)
|
||||
);
|
||||
$table->data[1][2] = html_print_label_input_block(
|
||||
__('Position'),
|
||||
html_print_input_text_extended(
|
||||
'position_to_sort',
|
||||
1,
|
||||
'text-position_to_sort',
|
||||
|
@ -811,93 +726,42 @@ if (defined('METACONSOLE')) {
|
|||
"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);
|
||||
).html_print_input_hidden('ids_items_to_sort', '', 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->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Sort selected items from position: '),
|
||||
html_print_select_style(
|
||||
[
|
||||
'before' => __('Move before to'),
|
||||
'after' => __('Move after to'),
|
||||
],
|
||||
'move_to',
|
||||
'',
|
||||
'width:100%',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
)
|
||||
);
|
||||
$table->data[1][2] = html_print_label_input_block(
|
||||
__('Position'),
|
||||
html_print_input_text_extended(
|
||||
'position_to_sort',
|
||||
1,
|
||||
'text-position_to_sort',
|
||||
'',
|
||||
3,
|
||||
10,
|
||||
$form = "<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();'>";
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Sort'),
|
||||
'sort_submit',
|
||||
false,
|
||||
"only_numbers('position_to_sort');",
|
||||
'',
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
).html_print_input_hidden('ids_items_to_sort', '', true)
|
||||
);
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= html_print_input_hidden('action', 'sort_items', true);
|
||||
$form .= '</form>';
|
||||
|
||||
$form = "<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();'>";
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Sort'),
|
||||
'sort_submit',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'search',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= html_print_input_hidden('action', 'sort_items', true);
|
||||
$form .= '</form>';
|
||||
|
||||
ui_toggle($form, __('Sort items'), '', '', false);
|
||||
}
|
||||
ui_toggle($form, __('Sort items'), '', '', false);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
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(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Delete selected items from position: '),
|
||||
html_print_select_style(
|
||||
[
|
||||
'above' => __('Delete above to'),
|
||||
'below' => __('Delete below to'),
|
||||
|
@ -909,8 +773,11 @@ if (defined('METACONSOLE')) {
|
|||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
$table->data[1][2] = html_print_input_text_extended(
|
||||
)
|
||||
);
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Poisition'),
|
||||
html_print_input_text_extended(
|
||||
'position_to_delete',
|
||||
1,
|
||||
'text-position_to_delete',
|
||||
|
@ -921,75 +788,33 @@ if (defined('METACONSOLE')) {
|
|||
"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->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Delete selected items from position: '),
|
||||
html_print_select_style(
|
||||
[
|
||||
'above' => __('Delete above to'),
|
||||
'below' => __('Delete below to'),
|
||||
],
|
||||
'delete_m',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Poisition'),
|
||||
html_print_input_text_extended(
|
||||
'position_to_delete',
|
||||
1,
|
||||
'text-position_to_delete',
|
||||
'',
|
||||
3,
|
||||
10,
|
||||
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
|
||||
method='post'>";
|
||||
$form .= html_print_input_hidden('ids_items_to_delete', '', true);
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Delete'),
|
||||
'delete_submit',
|
||||
false,
|
||||
"only_numbers('position_to_delete');",
|
||||
'',
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'delete',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= '</form>';
|
||||
ui_toggle($form, __('Delete items'), '', '', false);
|
||||
|
||||
$form = "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=".$idReport."'
|
||||
method='post'>";
|
||||
$form .= html_print_input_hidden('ids_items_to_delete', '', true);
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Delete'),
|
||||
'delete_submit',
|
||||
false,
|
||||
[
|
||||
'class' => 'mini',
|
||||
'icon' => 'delete',
|
||||
'mode' => 'secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$form .= '</form>';
|
||||
ui_toggle($form, __('Delete items'), '', '', false);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -70,21 +70,13 @@ $table->head = [];
|
|||
$table->data = [];
|
||||
$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->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->size[2] = '50%';
|
||||
$table->size[3] = '50%';
|
||||
}
|
||||
|
||||
$table->class = 'filter-table-adv databox';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
$table->size[2] = '50%';
|
||||
$table->size[3] = '50%';
|
||||
|
||||
|
||||
$write_groups = users_get_groups_for_select(
|
||||
false,
|
||||
|
@ -95,35 +87,20 @@ $write_groups = users_get_groups_for_select(
|
|||
'id_grupo'
|
||||
);
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$table->data['name'][0] = __('Name');
|
||||
$table->data['name'][1] = html_print_input_text(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text(
|
||||
'name',
|
||||
$reportName,
|
||||
__('Name'),
|
||||
80,
|
||||
false,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
true
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['group'][0] = __('Group');
|
||||
} else {
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text(
|
||||
'name',
|
||||
$reportName,
|
||||
__('Name'),
|
||||
false,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// If the report group is not among the
|
||||
// RW groups (special permission) we add it.
|
||||
|
@ -137,9 +114,10 @@ if (users_can_manage_group_all('RW') === true) {
|
|||
$return_all_group = true;
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$table->data['group'][1] = '<div class="w290px inline">';
|
||||
$table->data['group'][1] .= html_print_input(
|
||||
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'select_groups',
|
||||
'id_user' => $config['id_user'],
|
||||
|
@ -153,28 +131,23 @@ if (is_metaconsole() === true) {
|
|||
'return' => true,
|
||||
'required' => true,
|
||||
]
|
||||
);
|
||||
$table->data['group'][1] .= '</div>';
|
||||
} else {
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
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->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']
|
||||
|| is_user_admin($config['id_user'])
|
||||
|
@ -185,13 +158,12 @@ if ($report_id_user == $config['id_user']
|
|||
'group_edit' => __('The next group can edit the report'),
|
||||
'user_edit' => __('Only the user and admin user can edit the report'),
|
||||
];
|
||||
if (is_metaconsole() === true) {
|
||||
$table->data['access'][0] = __('Write Access');
|
||||
$table->data['access'][0] .= ui_print_help_tip(
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('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.'),
|
||||
true
|
||||
);
|
||||
$table->data['access'][1] = html_print_select(
|
||||
),
|
||||
html_print_select(
|
||||
$type_access,
|
||||
'type_access',
|
||||
$type_access_selected,
|
||||
|
@ -199,16 +171,18 @@ if ($report_id_user == $config['id_user']
|
|||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
$class = ' invisible_important ';
|
||||
if ($type_access_selected == 'group_edit') {
|
||||
$class = '';
|
||||
}
|
||||
$options['div_class'] = 'invisible_important';
|
||||
$options['div_id'] = 'group_edit';
|
||||
if ($type_access_selected == 'group_edit') {
|
||||
$options['div_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(
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'RW',
|
||||
false,
|
||||
|
@ -218,48 +192,9 @@ if ($report_id_user == $config['id_user']
|
|||
'',
|
||||
'',
|
||||
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(
|
||||
__('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
|
||||
),
|
||||
html_print_select(
|
||||
$type_access,
|
||||
'type_access',
|
||||
$type_access_selected,
|
||||
'change_type_access(this)',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$options['div_class'] = 'invisible_important';
|
||||
$options['div_id'] = 'group_edit';
|
||||
if ($type_access_selected == 'group_edit') {
|
||||
$options['div_class'] = '';
|
||||
}
|
||||
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
'RW',
|
||||
false,
|
||||
'id_group_edit',
|
||||
$id_group_edit,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
),
|
||||
$options
|
||||
);
|
||||
}
|
||||
),
|
||||
$options
|
||||
);
|
||||
}
|
||||
|
||||
if ($enterpriseEnable) {
|
||||
|
@ -268,91 +203,41 @@ if ($enterpriseEnable) {
|
|||
$non_interactive_check = $non_interactive;
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$table->data['interactive_report'][0] = __('Non interactive report');
|
||||
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Non interactive report'),
|
||||
html_print_checkbox_switch(
|
||||
'non_interactive',
|
||||
1,
|
||||
$non_interactive_check,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Non interactive report'),
|
||||
html_print_checkbox_switch(
|
||||
'non_interactive',
|
||||
1,
|
||||
$non_interactive_check,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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 (is_metaconsole() === true) {
|
||||
$table->data['cover'][0] = __('Generate cover page in PDF render');
|
||||
$table->data['cover'][1] = html_print_checkbox_switch(
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Generate cover page in PDF render'),
|
||||
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(
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Generate index in PDF render'),
|
||||
html_print_checkbox_switch(
|
||||
'index_render',
|
||||
1,
|
||||
$index_render,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Generate cover page in PDF render'),
|
||||
html_print_checkbox_switch(
|
||||
'cover_page_render',
|
||||
1,
|
||||
$cover_page_render,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Generate index in PDF render'),
|
||||
html_print_checkbox_switch(
|
||||
'index_render',
|
||||
1,
|
||||
$index_render,
|
||||
true
|
||||
)
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
echo '<form class="" method="post">';
|
||||
html_print_table($table);
|
||||
|
||||
|
|
|
@ -713,13 +713,14 @@ switch ($action) {
|
|||
|
||||
$table_aux = new stdClass();
|
||||
$table_aux->width = '100%';
|
||||
if (is_metaconsole()) {
|
||||
$table_aux->class = 'databox filters';
|
||||
$table_aux->class = 'filter-table-adv';
|
||||
$table_aux->size[0] = '30%';
|
||||
$table_aux->size[1] = '30%';
|
||||
$table_aux->size[2] = '30%';
|
||||
|
||||
$table_aux->colspan[0][0] = 4;
|
||||
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
|
||||
|
||||
$table_aux->data[0][1] = html_print_select_groups(
|
||||
$table_aux->data[0][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
$access,
|
||||
true,
|
||||
|
@ -737,116 +738,56 @@ switch ($action) {
|
|||
false,
|
||||
false,
|
||||
'id_grupo'
|
||||
).'<br>';
|
||||
)
|
||||
);
|
||||
|
||||
$table_aux->data[0][2] = '<b>'.__('Free text for search: ');
|
||||
$table_aux->data[0][2] .= ui_print_help_tip(
|
||||
$table_aux->data[0][1] = html_print_label_input_block(
|
||||
__('Free text for search: ').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(
|
||||
),
|
||||
html_print_input_text(
|
||||
__('search'),
|
||||
$search,
|
||||
'',
|
||||
30,
|
||||
'',
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table_aux->class = 'filter-table-adv';
|
||||
$table_aux->size[0] = '30%';
|
||||
$table_aux->size[1] = '30%';
|
||||
$table_aux->size[2] = '30%';
|
||||
|
||||
$table_aux->data[0][0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select_groups(
|
||||
false,
|
||||
$access,
|
||||
true,
|
||||
'id_group',
|
||||
$id_group,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'id_grupo'
|
||||
)
|
||||
);
|
||||
|
||||
$table_aux->data[0][1] = html_print_label_input_block(
|
||||
__('Free text for search: ').ui_print_help_tip(
|
||||
__('Search by report name or description, list matches.'),
|
||||
true
|
||||
),
|
||||
html_print_input_text(
|
||||
__('search'),
|
||||
$search,
|
||||
'',
|
||||
30,
|
||||
'',
|
||||
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';
|
||||
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 .= html_print_table($table_aux, true);
|
||||
$searchForm .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'search_submit',
|
||||
false,
|
||||
[
|
||||
'mode' => 'mini',
|
||||
'icon' => 'search',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$searchForm .= '</form>';
|
||||
$searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
|
||||
$searchForm .= html_print_table($table_aux, true);
|
||||
$searchForm .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'search_submit',
|
||||
false,
|
||||
[
|
||||
'mode' => 'mini',
|
||||
'icon' => 'search',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$searchForm .= '</form>';
|
||||
|
||||
ui_toggle(
|
||||
$searchForm,
|
||||
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||
'filter_form',
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
}
|
||||
ui_toggle(
|
||||
$searchForm,
|
||||
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||
'filter_form',
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
ui_require_jquery_file('ajaxqueue');
|
||||
|
@ -1656,11 +1597,13 @@ switch ($action) {
|
|||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$full_text = (integer) get_parameter('full_text', 0);
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
||||
$es['source'] = $source;
|
||||
$es['id_agents'] = $agents_to_report;
|
||||
$es['search'] = $search;
|
||||
$es['full_text'] = $full_text;
|
||||
$es['log_number'] = $log_number;
|
||||
|
||||
$values['external_source'] = json_encode($es);
|
||||
|
@ -2601,11 +2544,13 @@ switch ($action) {
|
|||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$full_text = (integer) get_parameter('full_text', 0);
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
||||
$es['source'] = $source;
|
||||
$es['id_agents'] = $agents_to_report;
|
||||
$es['search'] = $search;
|
||||
$es['full_text'] = $full_text;
|
||||
$es['log_number'] = $log_number;
|
||||
|
||||
$values['external_source'] = json_encode($es);
|
||||
|
|
|
@ -137,8 +137,6 @@ echo $formHidden;
|
|||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
|
||||
|
||||
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
|
@ -369,69 +367,65 @@ $(document).ready (function () {
|
|||
$("#button-getsize").click(function(event){
|
||||
event.preventDefault();
|
||||
if ($('#imagen').attr('src') != '') {
|
||||
if (parseInt($('#imagen').width()) < 1024){
|
||||
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html(1024);
|
||||
if (parseInt($('#imagen').width()) < 1024){
|
||||
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html(1024);
|
||||
} else{
|
||||
$('input[name=width]').val($('#imagen').width());
|
||||
$('#preimagew').html($('#imagen').width());
|
||||
}
|
||||
|
||||
if (parseInt($('#imagen').height()) < 768){
|
||||
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html(768);
|
||||
} else{
|
||||
$('input[name=height]').val($('#imagen').height());
|
||||
$('#preimageh').html($('#imagen').height());
|
||||
}
|
||||
} else {
|
||||
original_image=new Image();
|
||||
url_hack_metaconsole = metaconsole_url();
|
||||
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
|
||||
if (parseInt(original_image.width) < 1024){
|
||||
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html(1024);
|
||||
} else {
|
||||
$('input[name=width]').val(original_image.height);
|
||||
$('#preimagew').html(original_image.height);
|
||||
}
|
||||
if (parseInt(original_image.height) < 768){
|
||||
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html(768);
|
||||
} else {
|
||||
$('input[name=height]').val(original_image.height);
|
||||
$('#preimageh').html(original_image.height);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$('input[name=width]').val($('#imagen').width());
|
||||
$('#preimagew').html($('#imagen').width());
|
||||
}
|
||||
if (parseInt($('#imagen').height()) < 768){
|
||||
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html(768);
|
||||
}
|
||||
else{
|
||||
$('input[name=height]').val($('#imagen').height());
|
||||
$('#preimageh').html($('#imagen').height());
|
||||
}
|
||||
}
|
||||
else{
|
||||
original_image=new Image();
|
||||
url_hack_metaconsole = metaconsole_url();
|
||||
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
|
||||
if (parseInt(original_image.width) < 1024){
|
||||
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html(1024);
|
||||
}
|
||||
else{
|
||||
$('input[name=width]').val(original_image.height);
|
||||
$('#preimagew').html(original_image.height);
|
||||
}
|
||||
if (parseInt(original_image.height) < 768){
|
||||
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html(768);
|
||||
}
|
||||
else{
|
||||
$('input[name=height]').val(original_image.height);
|
||||
$('#preimageh').html(original_image.height);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$( "input[type=submit]" ).click(function( event ) {
|
||||
if (parseInt($('input[name=width]').val()) < 1024){
|
||||
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html('1024');
|
||||
var x = 1;
|
||||
}
|
||||
$( "button[type=submit]" ).click(function( event ) {
|
||||
console.log('aaaaaaaaaaa');
|
||||
if (parseInt($('input[name=width]').val()) < 1024){
|
||||
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
$('#preimagew').html('1024');
|
||||
var x = 1;
|
||||
}
|
||||
|
||||
if (parseInt($('input[name=height]').val()) < 768){
|
||||
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html('768');
|
||||
var y = 1;
|
||||
}
|
||||
|
||||
if (x || y){
|
||||
return false;
|
||||
}
|
||||
if (parseInt($('input[name=height]').val()) < 768){
|
||||
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
|
||||
$('input[name=height]').val('768');
|
||||
$('#preimageh').html('768');
|
||||
var y = 1;
|
||||
}
|
||||
|
||||
if (x || y){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
//Preload image size and activate auto image size changer when user click over a image in the selector
|
||||
|
|
|
@ -63,7 +63,7 @@ if (empty($idVisualConsole) === true) {
|
|||
$idVisualConsole = get_parameter('id', 0);
|
||||
}
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === false) {
|
||||
$action_name_parameter = 'action';
|
||||
} else {
|
||||
$action_name_parameter = 'action2';
|
||||
|
@ -93,7 +93,6 @@ $activeTab = get_parameterBetweenListValues(
|
|||
'data'
|
||||
);
|
||||
|
||||
|
||||
// Visual console creation tab and actions.
|
||||
if (empty($idVisualConsole)) {
|
||||
$visualConsole = null;
|
||||
|
@ -137,7 +136,6 @@ $refr = (int) get_parameter('refr', $config['vc_refr']);
|
|||
|
||||
$id_layout = 0;
|
||||
|
||||
|
||||
// Save/Update data in DB
|
||||
global $statusProcessInDB;
|
||||
if (empty($statusProcessInDB)) {
|
||||
|
@ -786,7 +784,7 @@ if (isset($config['vc_refr']) and $config['vc_refr'] != 0) {
|
|||
$view_refresh = '300';
|
||||
}
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === false) {
|
||||
$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;
|
||||
} else {
|
||||
|
@ -798,14 +796,18 @@ if (!defined('METACONSOLE')) {
|
|||
$hash = User::generatePublicHash();
|
||||
|
||||
$buttons = [];
|
||||
|
||||
$buttons['consoles_list'] = [
|
||||
'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>',
|
||||
];
|
||||
$buttons['public_link'] = [
|
||||
'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'] = [
|
||||
'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>',
|
||||
];
|
||||
|
||||
if ($idVisualConsole === false) {
|
||||
if (empty($idVisualConsole) === true) {
|
||||
$buttons = ['data' => $buttons['data']];
|
||||
// Show only the data tab
|
||||
// If it is a fail try, reset the values
|
||||
|
@ -850,9 +852,8 @@ if ($idVisualConsole === false) {
|
|||
$buttons[$activeTab]['active'] = true;
|
||||
|
||||
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
|
||||
|
||||
ui_print_standard_header(
|
||||
$visualConsoleName,
|
||||
($visualConsoleName ?? ''),
|
||||
'images/visual_console.png',
|
||||
false,
|
||||
$tab_builder,
|
||||
|
|
|
@ -65,7 +65,7 @@ switch ($action) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->class = 'info_table';
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
$table->head[0] = __('Map connection name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[3] = __('Delete');
|
||||
|
@ -84,7 +84,7 @@ if ($mapsConnections !== false) {
|
|||
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&action=edit_connection_map&id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>',
|
||||
ui_print_group_icon($mapsConnection['group_id'], true),
|
||||
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=gis&id_connection_map='.$mapsConnection['id_tmap_connection'].'&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';
|
||||
}
|
||||
|
@ -95,6 +95,14 @@ html_print_table($table);
|
|||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
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_submit_button(__('Create'), '', false, 'class="sub next"');
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Create'),
|
||||
'',
|
||||
false,
|
||||
['icon' => 'wand'],
|
||||
true
|
||||
)
|
||||
);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
|
|
@ -55,7 +55,7 @@ $iconData[] = html_print_select(
|
|||
$iconData[] = html_print_div(
|
||||
[
|
||||
'id' => 'icon_image',
|
||||
'class' => 'inverse_filter main_menu_icon',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
'style' => 'margin-left: 10px',
|
||||
'content' => ui_print_os_icon($idOS, false, true),
|
||||
],
|
||||
|
|
|
@ -69,7 +69,6 @@ if ($is_management_allowed === true) {
|
|||
$table->head[4] = '';
|
||||
}
|
||||
|
||||
$table->align[1] = 'center';
|
||||
if ($is_management_allowed === true) {
|
||||
$table->align[4] = 'center';
|
||||
}
|
||||
|
@ -100,7 +99,7 @@ $table->data = [];
|
|||
foreach ($osList as $os) {
|
||||
$data = [];
|
||||
$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_metaconsole() === true) {
|
||||
$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(
|
||||
[
|
||||
'href' => $hrefDelete,
|
||||
'class' => 'inverse_filter main_menu_icon',
|
||||
'class' => 'invert_filter main_menu_icon',
|
||||
'content' => html_print_image('images/delete.svg', true),
|
||||
],
|
||||
true
|
||||
|
@ -147,17 +146,41 @@ foreach ($osList as $os) {
|
|||
$table->data[] = $data;
|
||||
}
|
||||
|
||||
$tablePagination = '';
|
||||
if (isset($data) === true) {
|
||||
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 {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
|
||||
}
|
||||
|
||||
$buttons = '';
|
||||
if (is_metaconsole() === true) {
|
||||
echo '<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."'>";
|
||||
html_print_submit_button(__('Create OS'), '', false, 'class="sub next"');
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
$buttons .= '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
|
||||
$buttons .= html_print_submit_button(
|
||||
__('Create OS'),
|
||||
'',
|
||||
false,
|
||||
['icon' => 'next'],
|
||||
true
|
||||
);
|
||||
$buttons .= '</form>';
|
||||
}
|
||||
|
||||
html_print_action_buttons(
|
||||
$buttons,
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
|
|
|
@ -254,188 +254,187 @@ if ($config['history_db_enabled'] == 1) {
|
|||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->data = [];
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->size[0] = '70%';
|
||||
$table->size[1] = '30%';
|
||||
|
||||
$table->data[1][0] = __('Max. days before delete events');
|
||||
$table->data[1][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['event_purge']->max,
|
||||
'name' => 'event_purge',
|
||||
'value' => $config['event_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['event_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Max. days before delete events'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['event_purge']->max,
|
||||
'name' => 'event_purge',
|
||||
'value' => $config['event_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['event_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Max. days before delete traps');
|
||||
$table->data[2][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['trap_purge']->max,
|
||||
'name' => 'trap_purge',
|
||||
'value' => $config['trap_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['trap_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Max. days before delete traps'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['trap_purge']->max,
|
||||
'name' => 'trap_purge',
|
||||
'value' => $config['trap_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['trap_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Max. days before delete audit events');
|
||||
$table->data[3][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['audit_purge']->max,
|
||||
'name' => 'audit_purge',
|
||||
'value' => $config['audit_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['audit_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Max. days before delete audit events'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['audit_purge']->max,
|
||||
'name' => 'audit_purge',
|
||||
'value' => $config['audit_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['audit_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Max. days before delete string data');
|
||||
$table->data[4][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['string_purge']->max,
|
||||
'name' => 'string_purge',
|
||||
'value' => $config['string_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['string_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Max. days before delete string data'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['string_purge']->max,
|
||||
'name' => 'string_purge',
|
||||
'value' => $config['string_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['string_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[5][0] = __('Max. days before delete GIS data');
|
||||
$table->data[5][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['gis_purge']->max,
|
||||
'name' => 'gis_purge',
|
||||
'value' => $config['gis_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['gis_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Max. days before delete GIS data'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['gis_purge']->max,
|
||||
'name' => 'gis_purge',
|
||||
'value' => $config['gis_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['gis_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[6][0] = __('Max. days before purge');
|
||||
$table->data[6][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_purge']->max,
|
||||
'name' => 'days_purge',
|
||||
'value' => $config['days_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_purge']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Max. days before purge'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_purge']->max,
|
||||
'name' => 'days_purge',
|
||||
'value' => $config['days_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[7][0] = __('Max. days before compact data');
|
||||
$table->data[7][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_compact']->max,
|
||||
'name' => 'days_compact',
|
||||
'value' => $config['days_compact'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_compact']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Max. days before compact data'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_compact']->max,
|
||||
'name' => 'days_compact',
|
||||
'value' => $config['days_compact'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_compact']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[8][0] = __('Max. days before delete unknown modules');
|
||||
$table->data[8][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_delete_unknown']->max,
|
||||
'name' => 'days_delete_unknown',
|
||||
'value' => $config['days_delete_unknown'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_delete_unknown']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Max. days before delete unknown modules'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_delete_unknown']->max,
|
||||
'name' => 'days_delete_unknown',
|
||||
'value' => $config['days_delete_unknown'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_delete_unknown']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$table->data[9][0] = __('Max. days before delete not initialized modules');
|
||||
$table->data[9][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_delete_not_initialized']->max,
|
||||
'name' => 'days_delete_not_initialized',
|
||||
'value' => $config['days_delete_not_initialized'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_delete_not_initialized']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Max. days before delete not initialized modules'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_delete_not_initialized']->max,
|
||||
'name' => 'days_delete_not_initialized',
|
||||
'value' => $config['days_delete_not_initialized'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_delete_not_initialized']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[10][0] = __('Max. days before delete autodisabled agents');
|
||||
$table->data[10][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_autodisable_deletion']->max,
|
||||
'name' => 'days_autodisable_deletion',
|
||||
'value' => $config['days_autodisable_deletion'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_autodisable_deletion']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table->data[4][1] = html_print_label_input_block(
|
||||
__('Max. days before delete autodisabled agents'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['days_autodisable_deletion']->max,
|
||||
'name' => 'days_autodisable_deletion',
|
||||
'value' => $config['days_autodisable_deletion'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['days_autodisable_deletion']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[11][0] = __('Retention period of past special days');
|
||||
$table->data[11][1] = html_print_input_text(
|
||||
'num_past_special_days',
|
||||
$config['num_past_special_days'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[12][0] = __('Max. macro data fields');
|
||||
$table->data[12][1] = html_print_input_text(
|
||||
'max_macro_fields',
|
||||
$config['max_macro_fields'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'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'],
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Retention period of past special days'),
|
||||
html_print_input_text(
|
||||
'num_past_special_days',
|
||||
$config['num_past_special_days'],
|
||||
'',
|
||||
5,
|
||||
false,
|
||||
5,
|
||||
true
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[5][1] = html_print_label_input_block(
|
||||
__('Max. macro data fields'),
|
||||
html_print_input_text(
|
||||
'max_macro_fields',
|
||||
$config['max_macro_fields'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'onChange="change_macro_fields()"'
|
||||
)
|
||||
);
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|
@ -459,86 +458,94 @@ if ($config['history_db_enabled'] == 1) {
|
|||
|
||||
$table_historical = new StdClass();
|
||||
$table_historical->width = '100%';
|
||||
$table_historical->class = 'databox filters';
|
||||
$table_historical->class = 'filter-table-adv';
|
||||
$table_historical->data = [];
|
||||
$table_historical->style[0] = 'font-weight: bold';
|
||||
|
||||
$table_historical->size[0] = '70%';
|
||||
$table_historical->size[1] = '30%';
|
||||
$table_historical->size[0] = '50%';
|
||||
$table_historical->size[1] = '50%';
|
||||
|
||||
enterprise_hook('enterprise_warnings_history_days');
|
||||
|
||||
$table_historical->data[0][0] = __('Max. days before purge');
|
||||
$table_historical->data[0][1] = html_print_input_text(
|
||||
'historical_days_purge',
|
||||
$config_history['days_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_historical->data[0][0] = html_print_label_input_block(
|
||||
__('Max. days before purge'),
|
||||
html_print_input_text(
|
||||
'historical_days_purge',
|
||||
$config_history['days_purge'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_historical->data[1][0] = __('Max. days before compact data');
|
||||
$table_historical->data[1][1] = html_print_input_text(
|
||||
'historical_days_compact',
|
||||
$config_history['days_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_historical->data[0][1] = html_print_label_input_block(
|
||||
__('Max. days before compact data'),
|
||||
html_print_input_text(
|
||||
'historical_days_compact',
|
||||
$config_history['days_compact'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_historical->data[2][1] = html_print_input_text(
|
||||
'historical_step_compact',
|
||||
$config_history['step_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_historical->data[1][0] = html_print_label_input_block(
|
||||
__('Compact interpolation in hours (1 Fine-20 bad)'),
|
||||
html_print_input_text(
|
||||
'historical_step_compact',
|
||||
$config_history['step_compact'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_historical->data[3][0] = __('Max. days before delete events');
|
||||
$table_historical->data[3][1] = html_print_input_text(
|
||||
'historical_event_purge',
|
||||
$config_history['event_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_historical->data[1][1] = html_print_label_input_block(
|
||||
__('Max. days before delete events'),
|
||||
html_print_input_text(
|
||||
'historical_event_purge',
|
||||
$config_history['event_purge'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_historical->data[4][0] = __('Max. days before delete string data');
|
||||
$table_historical->data[4][1] = html_print_input_text(
|
||||
'historical_string_purge',
|
||||
$config_history['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_historical->data[2][0] = html_print_label_input_block(
|
||||
__('Max. days before delete string data'),
|
||||
html_print_input_text(
|
||||
'historical_string_purge',
|
||||
$config_history['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_historical->data[4][1] .= html_print_input_hidden(
|
||||
$table_historical->data[2][0] .= html_print_input_hidden(
|
||||
'historical_history_db_enabled',
|
||||
0,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table->data[] = [
|
||||
$table->data[6][0] = html_print_label_input_block(
|
||||
__('Max. days before delete old messages'),
|
||||
html_print_input_text(
|
||||
'delete_old_messages',
|
||||
$config['delete_old_messages'],
|
||||
'',
|
||||
5,
|
||||
false,
|
||||
5,
|
||||
true
|
||||
),
|
||||
];
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$table->data[] = [
|
||||
$table->data[6][1] = html_print_label_input_block(
|
||||
__('Max. days before delete old network matrix data'),
|
||||
html_print_input(
|
||||
[
|
||||
|
@ -549,55 +556,71 @@ $table->data[] = [
|
|||
'value' => $config['delete_old_network_matrix'],
|
||||
'return' => true,
|
||||
'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->width = '100%';
|
||||
$table_other->class = 'databox filters';
|
||||
$table_other->class = 'filter-table-adv';
|
||||
$table_other->data = [];
|
||||
$table_other->style[0] = 'font-weight: bold';
|
||||
|
||||
$table_other->size[0] = '70%';
|
||||
$table_other->size[1] = '30%';
|
||||
$i = 0;
|
||||
$table_other->data[$i][0] = __('Item limit for realtime reports');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['report_limit']->max,
|
||||
'name' => 'report_limit',
|
||||
'value' => $config['report_limit'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['report_limit']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table_other->size[0] = '50%';
|
||||
$table_other->size[1] = '50%';
|
||||
|
||||
$table_other->data[0][0] = html_print_label_input_block(
|
||||
__('Item limit for realtime reports'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['report_limit']->max,
|
||||
'name' => 'report_limit',
|
||||
'value' => $config['report_limit'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['report_limit']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Limit of events per query');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => 10000,
|
||||
'name' => 'events_per_query',
|
||||
'value' => $config['events_per_query'],
|
||||
'return' => true,
|
||||
'style' => 'width:50px',
|
||||
]
|
||||
$table_other->data[0][1] = html_print_label_input_block(
|
||||
__('Limit of events per query'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => 10000,
|
||||
'name' => 'events_per_query',
|
||||
'value' => $config['events_per_query'],
|
||||
'return' => true,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'step_compact',
|
||||
$config['step_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_other->data[1][0] = html_print_label_input_block(
|
||||
__('Compact interpolation in hours (1 Fine-20 bad)'),
|
||||
html_print_input_text(
|
||||
'step_compact',
|
||||
$config['step_compact'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$intervals = [];
|
||||
|
@ -610,140 +633,172 @@ $intervals[SECONDS_1WEEK] = __('Last week');
|
|||
$intervals[SECONDS_2WEEK] = __('2 weeks');
|
||||
$intervals[SECONDS_1MONTH] = __('Last month');
|
||||
|
||||
$table_other->data[$i][0] = __('Default hours for event view');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['event_view_hr']->max,
|
||||
'name' => 'event_view_hr',
|
||||
'value' => $config['event_view_hr'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['event_view_hr']->min,
|
||||
'style' => 'width:43px',
|
||||
]
|
||||
$table_other->data[1][1] = html_print_label_input_block(
|
||||
__('Default hours for event view'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['event_view_hr']->max,
|
||||
'name' => 'event_view_hr',
|
||||
'value' => $config['event_view_hr'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['event_view_hr']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Use realtime statistics');
|
||||
$table_other->data[$i++][1] = html_print_checkbox_switch(
|
||||
'realtimestats',
|
||||
1,
|
||||
$config['realtimestats'],
|
||||
true
|
||||
$table_other->data[2][0] = html_print_label_input_block(
|
||||
__('Use realtime statistics'),
|
||||
html_print_checkbox_switch(
|
||||
'realtimestats',
|
||||
1,
|
||||
$config['realtimestats'],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Batch statistics period (secs)');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'stats_interval',
|
||||
$config['stats_interval'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_other->data[2][1] = html_print_label_input_block(
|
||||
__('Batch statistics period (secs)'),
|
||||
html_print_input_text(
|
||||
'stats_interval',
|
||||
$config['stats_interval'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Use agent access graph');
|
||||
$table_other->data[$i++][1] = 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[$i++][1] = html_print_input_text(
|
||||
'num_files_attachment',
|
||||
$config['num_files_attachment'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_other->data[3][0] = html_print_label_input_block(
|
||||
__('Use agent access graph'),
|
||||
html_print_checkbox_switch(
|
||||
'agentaccess',
|
||||
1,
|
||||
$config['agentaccess'],
|
||||
true,
|
||||
$disable_agentaccess
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Delete not init modules');
|
||||
$table_other->data[$i++][1] = 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[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
|
||||
'name' => 'big_operation_step_datos_purge',
|
||||
'value' => $config['big_operation_step_datos_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
|
||||
'style' => 'width:50px',
|
||||
]
|
||||
$table_other->data[3][1] = html_print_label_input_block(
|
||||
__('Max. recommended number of files in attachment directory'),
|
||||
html_print_input_text(
|
||||
'num_files_attachment',
|
||||
$config['num_files_attachment'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
$table_other->data[$i][0] = __('Small Operation Step to purge old data');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
|
||||
'name' => 'small_operation_step_datos_purge',
|
||||
'value' => $config['small_operation_step_datos_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
|
||||
'style' => 'width:50px',
|
||||
]
|
||||
$table_other->data[4][0] = html_print_label_input_block(
|
||||
__('Delete not init modules'),
|
||||
html_print_checkbox_switch(
|
||||
'delete_notinit',
|
||||
1,
|
||||
$config['delete_notinit'],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Graph container - Max. Items');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'max_graph_container',
|
||||
$config['max_graph_container'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_other->data[4][1] = html_print_label_input_block(
|
||||
__('Big Operation Step to purge old data'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
|
||||
'name' => 'big_operation_step_datos_purge',
|
||||
'value' => $config['big_operation_step_datos_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Events response max. execution');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'max_execution_event_response',
|
||||
$config['max_execution_event_response'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
$table_other->data[5][0] = html_print_label_input_block(
|
||||
__('Small Operation Step to purge old data'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
|
||||
'name' => 'small_operation_step_datos_purge',
|
||||
'value' => $config['small_operation_step_datos_purge'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Row limit in csv log');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['row_limit_csv']->max,
|
||||
'name' => 'row_limit_csv',
|
||||
'value' => $config['row_limit_csv'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['row_limit_csv']->min,
|
||||
'style' => 'width:63px',
|
||||
]
|
||||
$table_other->data[5][1] = html_print_label_input_block(
|
||||
__('Graph container - Max. Items'),
|
||||
html_print_input_text(
|
||||
'max_graph_container',
|
||||
$config['max_graph_container'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('SNMP walk binary');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'snmpwalk',
|
||||
$config['snmpwalk'],
|
||||
'',
|
||||
50,
|
||||
10,
|
||||
true
|
||||
$table_other->data[6][0] = html_print_label_input_block(
|
||||
__('Events response max. execution'),
|
||||
html_print_input_text(
|
||||
'max_execution_event_response',
|
||||
$config['max_execution_event_response'],
|
||||
'',
|
||||
false,
|
||||
5,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[6][1] = html_print_label_input_block(
|
||||
__('Row limit in csv log'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => $performance_variables_control['row_limit_csv']->max,
|
||||
'name' => 'row_limit_csv',
|
||||
'value' => $config['row_limit_csv'],
|
||||
'return' => true,
|
||||
'min' => $performance_variables_control['row_limit_csv']->min,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table_other->data[7][0] = html_print_label_input_block(
|
||||
__('SNMP walk binary'),
|
||||
html_print_input_text(
|
||||
'snmpwalk',
|
||||
$config['snmpwalk'],
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$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).'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$i][0] = __('SNMP walk binary (fallback)').$tip;
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'snmpwalk_fallback',
|
||||
$config['snmpwalk_fallback'],
|
||||
'',
|
||||
50,
|
||||
10,
|
||||
true
|
||||
|
||||
$table_other->data[7][1] = html_print_label_input_block(
|
||||
__('SNMP walk binary (fallback)').$tip,
|
||||
html_print_input_text(
|
||||
'snmpwalk_fallback',
|
||||
$config['snmpwalk_fallback'],
|
||||
'',
|
||||
false,
|
||||
10,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$tip = ui_print_help_tip(
|
||||
|
@ -754,41 +809,45 @@ $tip = ui_print_help_tip(
|
|||
true
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('WMI binary');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'wmiBinary',
|
||||
$config['wmiBinary'],
|
||||
'',
|
||||
50,
|
||||
50,
|
||||
true
|
||||
$table_other->data[8][0] = html_print_label_input_block(
|
||||
__('WMI binary'),
|
||||
html_print_input_text(
|
||||
'wmiBinary',
|
||||
$config['wmiBinary'],
|
||||
'',
|
||||
false,
|
||||
50,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
// Agent Wizard defaults.
|
||||
$defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults']));
|
||||
$tableSnmpWizard = new stdClass();
|
||||
$tableSnmpWizard->width = '100%';
|
||||
$tableSnmpWizard->class = 'databox filters';
|
||||
$tableSnmpWizard->class = 'filter-table-adv';
|
||||
$tableSnmpWizard->data = [];
|
||||
$tableSnmpWizard->style[0] = 'font-weight: bold';
|
||||
$tableSnmpWizard->style[2] = 'font-weight: bold';
|
||||
$tableSnmpWizard->size[0] = '30%';
|
||||
$tableSnmpWizard->size[2] = '30%';
|
||||
$tableSnmpWizard->size[0] = '50%';
|
||||
$tableSnmpWizard->size[1] = '50%';
|
||||
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
foreach ($defaultAgentWizardOptions as $key => $value) {
|
||||
$tableSnmpWizard->data[$i][$j++] = $key;
|
||||
$tableSnmpWizard->data[$i][$j++] = html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true);
|
||||
if ($j >= 3) {
|
||||
$j = 0;
|
||||
$i++;
|
||||
if ($i > 1) {
|
||||
$i = 0;
|
||||
$j++;
|
||||
}
|
||||
|
||||
$tableSnmpWizard->data[$j][$i] = html_print_label_input_block(
|
||||
$key,
|
||||
html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true)
|
||||
);
|
||||
$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>';
|
||||
html_print_table($table_status);
|
||||
echo '</fieldset>';
|
||||
|
@ -817,18 +876,14 @@ echo '</fieldset>';
|
|||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
),
|
||||
]
|
||||
$actionButtons = html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
);
|
||||
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
|
||||
echo '</form>';
|
||||
?>
|
||||
|
||||
|
|
|
@ -154,6 +154,20 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
|||
).'</a>',
|
||||
];
|
||||
}
|
||||
|
||||
if ($config['activate_sflow']) {
|
||||
$buttons['sflow'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=sflow').'">'.html_print_image(
|
||||
'images/op_recon.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Sflow'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$buttons['integria'] = [
|
||||
|
@ -277,6 +291,12 @@ switch ($section) {
|
|||
$help_header = 'setup_netflow_tab';
|
||||
break;
|
||||
|
||||
case 'sflow':
|
||||
$buttons['sflow']['active'] = true;
|
||||
$subpage = __('Sflow');
|
||||
$help_header = 'setup_flow_tab';
|
||||
break;
|
||||
|
||||
case 'ehorus':
|
||||
$buttons['ehorus']['active'] = true;
|
||||
$subpage = __('eHorus');
|
||||
|
@ -410,6 +430,10 @@ switch ($section) {
|
|||
include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
|
||||
break;
|
||||
|
||||
case 'sflow':
|
||||
include_once $config['homedir'].'/godmode/setup/setup_sflow.php';
|
||||
break;
|
||||
|
||||
case 'vis':
|
||||
include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
|
||||
break;
|
||||
|
|
|
@ -43,7 +43,7 @@ if (is_ajax() === true) {
|
|||
$table = new StdClass();
|
||||
$table->data = [];
|
||||
$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->style['name'] = 'font-weight: bold';
|
||||
|
||||
|
@ -94,7 +94,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_server'] = $row;
|
||||
|
||||
|
@ -107,7 +111,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
10,
|
||||
100,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_port'] = $row;
|
||||
|
||||
|
@ -126,7 +134,10 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_version'] = $row;
|
||||
|
||||
|
@ -189,12 +200,12 @@ if (is_ajax() === true) {
|
|||
$alt = '',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$row['control'] .= ui_print_reveal_password(
|
||||
'ldap_admin_pass',
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w400px-important'
|
||||
);
|
||||
|
||||
$table->data['ldap_admin_pass'] = $row;
|
||||
|
||||
// Ldapsearch timeout.
|
||||
|
@ -208,7 +219,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
10,
|
||||
10,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_search_timeout'] = $row;
|
||||
|
||||
|
@ -239,7 +254,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_server_secondary'] = $row;
|
||||
|
||||
|
@ -252,7 +271,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
10,
|
||||
100,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_port_secondary'] = $row;
|
||||
|
||||
|
@ -271,7 +294,10 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w400px'
|
||||
);
|
||||
$table->data['ldap_version_secondary'] = $row;
|
||||
|
||||
|
@ -334,11 +360,10 @@ if (is_ajax() === true) {
|
|||
$alt = '',
|
||||
60,
|
||||
100,
|
||||
true
|
||||
);
|
||||
$row['control'] .= ui_print_reveal_password(
|
||||
'ldap_admin_pass_secondary',
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'w400px-important'
|
||||
);
|
||||
$table->data['ldap_admin_pass_secondary'] = $row;
|
||||
break;
|
||||
|
@ -407,7 +432,11 @@ if (is_ajax() === true) {
|
|||
'',
|
||||
10,
|
||||
10,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w400px'
|
||||
);
|
||||
$table->data['session_timeout'] = $row;
|
||||
|
||||
|
@ -421,7 +450,7 @@ require_once $config['homedir'].'/include/functions_profile.php';
|
|||
$table = new StdClass();
|
||||
$table->data = [];
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
$table->size['name'] = '30%';
|
||||
$table->style['name'] = 'font-weight: bold';
|
||||
|
||||
|
@ -459,12 +488,15 @@ $row['control'] = html_print_select(
|
|||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w400px'
|
||||
);
|
||||
$table->data['auth'] = $row;
|
||||
|
||||
// Form.
|
||||
echo '<form id="form_setup" method="post">';
|
||||
echo '<form id="form_setup" class="max_floating_element_size" method="post">';
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
html_print_input_hidden('update_config', 1);
|
||||
|
@ -478,17 +510,14 @@ html_print_csrf_hidden();
|
|||
|
||||
html_print_table($table);
|
||||
html_print_div([ 'id' => 'table_auth_result' ]);
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
),
|
||||
]
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '</form>';
|
||||
|
|
|
@ -74,82 +74,98 @@ $table_remote->data = [];
|
|||
$table_remote->width = '100%';
|
||||
$table_remote->styleTable = 'margin-bottom: 10px;';
|
||||
$table_remote->id = 'ehorus-remote-setup';
|
||||
$table_remote->class = 'databox filters';
|
||||
$table_remote->size['name'] = '30%';
|
||||
$table_remote->style['name'] = 'font-weight: bold';
|
||||
$table_remote->style['control'] = 'display: flex;align-items: center;';
|
||||
$table_remote->class = 'databox filters filter-table-adv';
|
||||
$table_remote->size['ehorus_hostname'] = '50%';
|
||||
$table_remote->size['ehorus_port'] = '50%';
|
||||
|
||||
// Enable eHorus user configuration.
|
||||
$row = [];
|
||||
$row['name'] = ('eHorus configuration at user level');
|
||||
$row['control'] = html_print_checkbox_switch('ehorus_user_level_conf', 1, $config['ehorus_user_level_conf'], true);
|
||||
$row['ehorus_user_level_conf'] = html_print_label_input_block(
|
||||
__('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;
|
||||
|
||||
// User.
|
||||
$row = [];
|
||||
$row['name'] = __('User');
|
||||
$row['control'] = html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true);
|
||||
$table_remote->data['ehorus_user'] = $row;
|
||||
$row['ehorus_user'] = html_print_label_input_block(
|
||||
__('User'),
|
||||
html_print_input_text('ehorus_user', $config['ehorus_user'], '', 30, 100, true),
|
||||
['div_class' => 'ehorus-remote-setup-ehorus_user']
|
||||
);
|
||||
|
||||
// Pass.
|
||||
$row = [];
|
||||
$row['name'] = __('Password');
|
||||
$row['control'] = html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true);
|
||||
$row['control'] .= ui_print_reveal_password('ehorus_pass', true);
|
||||
$row['ehorus_pass'] = html_print_label_input_block(
|
||||
__('Password'),
|
||||
html_print_input_password('ehorus_pass', io_output_password($config['ehorus_pass']), '', 30, 100, true),
|
||||
['div_class' => 'ehorus-remote-setup-ehorus_user']
|
||||
);
|
||||
$table_remote->data['ehorus_pass'] = $row;
|
||||
|
||||
// Directory hostname.
|
||||
$row = [];
|
||||
$row['name'] = __('API Hostname');
|
||||
$row['control'] = html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true);
|
||||
$table_remote->data['ehorus_hostname'] = $row;
|
||||
$row['ehorus_hostname'] = html_print_label_input_block(
|
||||
__('API Hostname'),
|
||||
html_print_input_text('ehorus_hostname', $config['ehorus_hostname'], '', 30, 100, true)
|
||||
);
|
||||
|
||||
// Directory port.
|
||||
$row = [];
|
||||
$row['name'] = __('API Port');
|
||||
$row['control'] = html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true);
|
||||
$row['ehorus_port'] = html_print_label_input_block(
|
||||
__('API Port'),
|
||||
html_print_input_text('ehorus_port', $config['ehorus_port'], '', 6, 100, true)
|
||||
);
|
||||
$table_remote->data['ehorus_port'] = $row;
|
||||
|
||||
// Request timeout.
|
||||
$row = [];
|
||||
$row['name'] = __('Request timeout');
|
||||
$row['control'] = html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true);
|
||||
$row['ehorus_req_timeout'] = html_print_label_input_block(
|
||||
__('Request timeout'),
|
||||
html_print_input_text('ehorus_req_timeout', $config['ehorus_req_timeout'], '', 3, 10, true)
|
||||
);
|
||||
$table_remote->data['ehorus_req_timeout'] = $row;
|
||||
|
||||
// Test.
|
||||
$row = [];
|
||||
$row['name'] = __('Test');
|
||||
$row['control'] = html_print_button(
|
||||
__('Start'),
|
||||
'test-ehorus',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'secondary mini',
|
||||
],
|
||||
true
|
||||
$test_start = '<span id="test-ehorus-spinner" class="invisible"> '.html_print_image('images/spinner.gif', true).'</span>';
|
||||
$test_start .= '<span id="test-ehorus-success" class="invisible"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
|
||||
$test_start .= '<span id="test-ehorus-failure" class="invisible"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
|
||||
$test_start .= ' <span id="test-ehorus-message" class="invisible"></span>';
|
||||
$row['ehorus_test'] = html_print_label_input_block(
|
||||
__('Test'),
|
||||
html_print_button(
|
||||
__('Start'),
|
||||
'test-ehorus',
|
||||
false,
|
||||
'',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'secondary mini',
|
||||
'style' => 'width: 115px;',
|
||||
],
|
||||
true
|
||||
).$test_start
|
||||
);
|
||||
$row['control'] .= '<span id="test-ehorus-spinner" class="invisible"> '.html_print_image('images/spinner.gif', true).'</span>';
|
||||
$row['control'] .= '<span id="test-ehorus-success" class="invisible"> '.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
|
||||
$row['control'] .= '<span id="test-ehorus-failure" class="invisible"> '.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
|
||||
$row['control'] .= ' <span id="test-ehorus-message" class="invisible"></span>';
|
||||
$table_remote->data['ehorus_test'] = $row;
|
||||
|
||||
// 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">';
|
||||
if ($config['style'] === 'pandora_black' && is_metaconsole() === true) {
|
||||
html_print_image(
|
||||
'include/ehorus/images/ehorus-logo.png',
|
||||
false,
|
||||
['class' => 'w400px']
|
||||
['class' => 'w400px mrgn_top_15px']
|
||||
);
|
||||
} else {
|
||||
html_print_image(
|
||||
'include/ehorus/images/ehorus-logo-grey.png',
|
||||
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);
|
||||
}
|
||||
|
||||
echo "<form method='post'>";
|
||||
echo "<form method='post' class='max_floating_element_size'>";
|
||||
// Form enable.
|
||||
echo '<div id="form_enable">';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
|
@ -195,17 +211,14 @@ echo '</div>';
|
|||
|
||||
echo '</fieldset>';
|
||||
echo '</div>';
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
),
|
||||
]
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
)
|
||||
);
|
||||
echo '</form>';
|
||||
|
||||
|
@ -220,8 +233,8 @@ if(!$('input:checkbox[name="ehorus_enabled"]').is(':checked'))
|
|||
|
||||
if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
|
||||
{
|
||||
$('#ehorus-remote-setup-ehorus_user').hide();
|
||||
$('#ehorus-remote-setup-ehorus_pass').hide()
|
||||
$('.ehorus-remote-setup-ehorus_user').hide();
|
||||
$('.ehorus-remote-setup-ehorus_pass').hide()
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,13 +247,13 @@ if($('input:checkbox[name="ehorus_user_level_conf"]').is(':checked'))
|
|||
}
|
||||
|
||||
var hideUserPass = function () {
|
||||
$('#ehorus-remote-setup-ehorus_user').hide();
|
||||
$('#ehorus-remote-setup-ehorus_pass').hide();
|
||||
$('.ehorus-remote-setup-ehorus_user').hide();
|
||||
$('.ehorus-remote-setup-ehorus_pass').hide();
|
||||
}
|
||||
|
||||
var showUserPass = function () {
|
||||
$('#ehorus-remote-setup-ehorus_user').show();
|
||||
$('#ehorus-remote-setup-ehorus_pass').show();
|
||||
$('.ehorus-remote-setup-ehorus_user').show();
|
||||
$('.ehorus-remote-setup-ehorus_pass').show();
|
||||
}
|
||||
|
||||
var handleEnable = function (event) {
|
||||
|
|
|
@ -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
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -269,52 +269,102 @@ $table_remote->data = [];
|
|||
$table_remote->width = '100%';
|
||||
$table_remote->styleTable = 'margin-bottom: 10px;';
|
||||
$table_remote->id = 'integria-remote-setup';
|
||||
$table_remote->class = 'databox filters';
|
||||
$table_remote->size['name'] = '30%';
|
||||
$table_remote->style['name'] = 'font-weight: bold';
|
||||
$table_remote->style['control'] = 'display: flex;align-items: center;';
|
||||
$table_remote->class = 'databox filters filter-table-adv';
|
||||
$table_remote->size['hostname'] = '50%';
|
||||
$table_remote->size['api_pass'] = '50%';
|
||||
|
||||
// Enable eHorus user configuration.
|
||||
// Enable Integria user configuration.
|
||||
$row = [];
|
||||
$row['name'] = ('Integria configuration at user level');
|
||||
$row['control'] = html_print_checkbox_switch('integria_user_level_conf', 1, $config['integria_user_level_conf'], true);
|
||||
$row['user_level'] = html_print_label_input_block(
|
||||
__('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;
|
||||
|
||||
// Integria user.
|
||||
$row = [];
|
||||
$row['name'] = __('User');
|
||||
$row['control'] = html_print_input_text('integria_user', $config['integria_user'], '', 30, 100, true);
|
||||
$table_remote->data['integria_user'] = $row;
|
||||
$row['user'] = html_print_label_input_block(
|
||||
__('User'),
|
||||
html_print_input_text(
|
||||
'integria_user',
|
||||
$config['integria_user'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
),
|
||||
['div_class' => 'integria-remote-setup-integria_user']
|
||||
);
|
||||
|
||||
// Integria password.
|
||||
$row = [];
|
||||
$row['name'] = __('Password');
|
||||
$row['control'] = html_print_input_password('integria_pass', io_output_password($config['integria_pass']), '', 30, 100, true);
|
||||
$row['control'] .= ui_print_reveal_password('integria_pass', true);
|
||||
$row['password'] = html_print_label_input_block(
|
||||
__('Password'),
|
||||
html_print_input_password(
|
||||
'integria_pass',
|
||||
io_output_password($config['integria_pass']),
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
),
|
||||
['div_class' => 'integria-remote-setup-integria_pass']
|
||||
);
|
||||
$table_remote->data['integria_pass'] = $row;
|
||||
|
||||
// Integria hostname.
|
||||
$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['control'] = html_print_input_text('integria_hostname', $config['integria_hostname'], '', 30, 100, true);
|
||||
$table_remote->data['integria_hostname'] = $row;
|
||||
$row['hostname'] = html_print_label_input_block(
|
||||
__('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),
|
||||
html_print_input_text(
|
||||
'integria_hostname',
|
||||
$config['integria_hostname'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
),
|
||||
['div_class' => 'integria-remote-setup-integria_hostname']
|
||||
);
|
||||
|
||||
// API password.
|
||||
$row = [];
|
||||
$row['name'] = __('API Password');
|
||||
$row['control'] = html_print_input_password('integria_api_pass', io_output_password($config['integria_api_pass']), '', 30, 100, true);
|
||||
$row['control'] .= ui_print_reveal_password('integria_api_pass', true);
|
||||
$row['api_pass'] = html_print_label_input_block(
|
||||
__('API Password'),
|
||||
html_print_input_password(
|
||||
'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;
|
||||
|
||||
// Request timeout.
|
||||
$row = [];
|
||||
$row['name'] = __('Request timeout');
|
||||
$row['control'] = html_print_input_text('integria_req_timeout', $config['integria_req_timeout'], '', 3, 10, true);
|
||||
$row['req_timeout'] = html_print_label_input_block(
|
||||
__('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;
|
||||
|
||||
$row = [];
|
||||
$row['name'] = __('Inventory');
|
||||
$row['control'] = html_print_button(
|
||||
$row['control'] = __('Inventory');
|
||||
$row['control'] .= html_print_button(
|
||||
__('Sync inventory'),
|
||||
'sync-inventory',
|
||||
false,
|
||||
|
@ -336,120 +386,132 @@ $table_alert_settings->data = [];
|
|||
$table_alert_settings->width = '100%';
|
||||
$table_alert_settings->styleTable = 'margin-bottom: 10px;';
|
||||
$table_alert_settings->id = 'integria-cr-settings-setup';
|
||||
$table_alert_settings->class = 'databox filters';
|
||||
$table_alert_settings->size['name'] = '30%';
|
||||
$table_alert_settings->style['name'] = 'font-weight: bold';
|
||||
$table_alert_settings->class = 'databox filters filter-table-adv';
|
||||
$table_alert_settings->size[0] = '50%';
|
||||
$table_alert_settings->size[1] = '50%';
|
||||
|
||||
// Alert incident title.
|
||||
$row = [];
|
||||
$row['name'] = __('Title');
|
||||
$row['control'] = html_print_input_text(
|
||||
'incident_title',
|
||||
$config['incident_title'],
|
||||
__('Name'),
|
||||
50,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Title'),
|
||||
html_print_input_text(
|
||||
'incident_title',
|
||||
$config['incident_title'],
|
||||
__('Name'),
|
||||
50,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_incident_title'] = $row;
|
||||
|
||||
// Alert incident description.
|
||||
$row = [];
|
||||
$row['name'] = __('Ticket body');
|
||||
$row['control'] = html_print_textarea(
|
||||
'incident_content',
|
||||
7,
|
||||
25,
|
||||
$config['incident_content'],
|
||||
'',
|
||||
true
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Ticket body'),
|
||||
html_print_textarea(
|
||||
'incident_content',
|
||||
3,
|
||||
25,
|
||||
$config['incident_content'],
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_incident_content'] = $row;
|
||||
$table_alert_settings->data[0] = $row;
|
||||
|
||||
// Alert default group.
|
||||
$row = [];
|
||||
$row['name'] = __('Group');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_group_values,
|
||||
'default_group',
|
||||
$config['default_group'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select(
|
||||
$integria_group_values,
|
||||
'default_group',
|
||||
$config['default_group'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_def_group'] = $row;
|
||||
|
||||
// Alert default criticity.
|
||||
$row = [];
|
||||
$row['name'] = __('Priority');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_criticity_values,
|
||||
'default_criticity',
|
||||
$config['default_criticity'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Priority'),
|
||||
html_print_select(
|
||||
$integria_criticity_values,
|
||||
'default_criticity',
|
||||
$config['default_criticity'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_def_criticity'] = $row;
|
||||
$table_alert_settings->data[1] = $row;
|
||||
|
||||
// Alert default owner.
|
||||
$row = [];
|
||||
$row['name'] = __('Owner');
|
||||
$row['control'] = html_print_autocomplete_users_from_integria(
|
||||
'default_owner',
|
||||
$config['default_owner'],
|
||||
true
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Owner'),
|
||||
html_print_autocomplete_users_from_integria(
|
||||
'default_owner',
|
||||
$config['default_owner'],
|
||||
true,
|
||||
'30',
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
),
|
||||
['div_class' => 'inline']
|
||||
);
|
||||
|
||||
$table_alert_settings->data['custom_response_def_owner'] = $row;
|
||||
|
||||
// Alert default incident type.
|
||||
$row = [];
|
||||
$row['name'] = __('Type');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_types_values,
|
||||
'incident_type',
|
||||
$config['incident_type'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Type'),
|
||||
html_print_select(
|
||||
$integria_types_values,
|
||||
'incident_type',
|
||||
$config['incident_type'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_incident_type'] = $row;
|
||||
$table_alert_settings->data[2] = $row;
|
||||
|
||||
// Alert default incident status.
|
||||
$row = [];
|
||||
$row['name'] = __('Status');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_status_values,
|
||||
'incident_status',
|
||||
$config['incident_status'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Status'),
|
||||
html_print_select(
|
||||
$integria_status_values,
|
||||
'incident_status',
|
||||
$config['incident_status'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_alert_settings->data['custom_response_incident_status'] = $row;
|
||||
$table_alert_settings->data[3] = $row;
|
||||
|
||||
// Custom response settings.
|
||||
$table_cr_settings = new StdClass();
|
||||
|
@ -457,126 +519,138 @@ $table_cr_settings->data = [];
|
|||
$table_cr_settings->width = '100%';
|
||||
$table_cr_settings->styleTable = 'margin-bottom: 10px;';
|
||||
$table_cr_settings->id = 'integria-cr-settings-setup';
|
||||
$table_cr_settings->class = 'databox filters';
|
||||
$table_cr_settings->size['name'] = '30%';
|
||||
$table_cr_settings->style['name'] = 'font-weight: bold';
|
||||
$table_cr_settings->class = 'databox filters filter-table-adv';
|
||||
$table_cr_settings->size[0] = '50%';
|
||||
$table_cr_settings->size[1] = '50%';
|
||||
|
||||
// Custom response incident title.
|
||||
$row = [];
|
||||
$row['name'] = __('Title');
|
||||
$row['control'] = html_print_input_text(
|
||||
'cr_incident_title',
|
||||
$config['cr_incident_title'],
|
||||
__('Name'),
|
||||
50,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Title'),
|
||||
html_print_input_text(
|
||||
'cr_incident_title',
|
||||
$config['cr_incident_title'],
|
||||
__('Name'),
|
||||
50,
|
||||
100,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_cr_settings->data['custom_response_incident_title'] = $row;
|
||||
|
||||
// Custom response incident description.
|
||||
$row = [];
|
||||
$row['name'] = __('Ticket body');
|
||||
$row['control'] = html_print_textarea(
|
||||
'cr_incident_content',
|
||||
7,
|
||||
25,
|
||||
$config['cr_incident_content'],
|
||||
'',
|
||||
true
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Ticket body'),
|
||||
html_print_textarea(
|
||||
'cr_incident_content',
|
||||
3,
|
||||
25,
|
||||
$config['cr_incident_content'],
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table_cr_settings->data['custom_response_incident_content'] = $row;
|
||||
$table_cr_settings->data[0] = $row;
|
||||
|
||||
// Custom response default group.
|
||||
$row = [];
|
||||
$row['name'] = __('Group');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_group_values,
|
||||
'cr_default_group',
|
||||
$config['cr_default_group'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Group'),
|
||||
html_print_select(
|
||||
$integria_group_values,
|
||||
'cr_default_group',
|
||||
$config['cr_default_group'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_cr_settings->data['custom_response_def_group'] = $row;
|
||||
|
||||
// Custom response default criticity.
|
||||
$row = [];
|
||||
$row['name'] = __('Priority');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_criticity_values,
|
||||
'cr_default_criticity',
|
||||
$config['cr_default_criticity'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Priority'),
|
||||
html_print_select(
|
||||
$integria_criticity_values,
|
||||
'cr_default_criticity',
|
||||
$config['cr_default_criticity'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_cr_settings->data['custom_response_def_criticity'] = $row;
|
||||
$table_cr_settings->data[1] = $row;
|
||||
|
||||
// Custom response default owner.
|
||||
$row = [];
|
||||
$row['name'] = __('Owner');
|
||||
$row['control'] = html_print_autocomplete_users_from_integria(
|
||||
'cr_default_owner',
|
||||
$config['cr_default_owner'],
|
||||
true
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Owner'),
|
||||
html_print_autocomplete_users_from_integria(
|
||||
'cr_default_owner',
|
||||
$config['cr_default_owner'],
|
||||
true,
|
||||
'30',
|
||||
false,
|
||||
false,
|
||||
'w100p'
|
||||
),
|
||||
['div_class' => 'inline']
|
||||
);
|
||||
|
||||
$table_cr_settings->data['custom_response_def_owner'] = $row;
|
||||
|
||||
// Custom response default incident type.
|
||||
$row = [];
|
||||
$row['name'] = __('Type');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_types_values,
|
||||
'cr_incident_type',
|
||||
$config['cr_incident_type'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[1] = html_print_label_input_block(
|
||||
__('Type'),
|
||||
html_print_select(
|
||||
$integria_types_values,
|
||||
'cr_incident_type',
|
||||
$config['cr_incident_type'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_cr_settings->data['custom_response_incident_type'] = $row;
|
||||
$table_cr_settings->data[2] = $row;
|
||||
|
||||
// Custom response default incident status.
|
||||
$row = [];
|
||||
$row['name'] = __('Status');
|
||||
$row['control'] = html_print_select(
|
||||
$integria_status_values,
|
||||
'cr_incident_status',
|
||||
$config['cr_incident_status'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
$row[0] = html_print_label_input_block(
|
||||
__('Status'),
|
||||
html_print_select(
|
||||
$integria_status_values,
|
||||
'cr_incident_status',
|
||||
$config['cr_incident_status'],
|
||||
'',
|
||||
__('Select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false
|
||||
)
|
||||
);
|
||||
$table_cr_settings->data['custom_response_incident_status'] = $row;
|
||||
$table_cr_settings->data[3] = $row;
|
||||
|
||||
// Test.
|
||||
$row = [];
|
||||
$row['name'] = __('Test');
|
||||
$row['control'] = html_print_button(
|
||||
$row['control'] = __('Test');
|
||||
$row['control'] .= html_print_button(
|
||||
__('Start'),
|
||||
'test-integria',
|
||||
false,
|
||||
|
@ -594,12 +668,12 @@ $row['control'] .= ' <span id="test-integria-message" class="invisible"></s
|
|||
$table_remote->data['integria_test'] = $row;
|
||||
|
||||
// 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">';
|
||||
html_print_image(
|
||||
'images/integria_logo.svg',
|
||||
false,
|
||||
['class' => 'w400px' ]
|
||||
['class' => 'w400px mrgn_top_15px']
|
||||
);
|
||||
echo '</a>';
|
||||
echo '<br />';
|
||||
|
@ -611,7 +685,7 @@ echo 'https://integriaims.com';
|
|||
echo '</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<form method='post'>";
|
||||
echo "<form method='post' class='max_floating_element_size'>";
|
||||
html_print_input_hidden('update_config', 1);
|
||||
|
||||
// Form enable.
|
||||
|
@ -632,7 +706,7 @@ echo '</div>';
|
|||
if ($has_connection != false) {
|
||||
// Form alert default settings.
|
||||
echo '<div id="form_alert_settings">';
|
||||
echo '<fieldset>';
|
||||
echo '<fieldset class="mrgn_top_15px">';
|
||||
echo '<legend>'.__('Alert default values').' '.ui_print_help_icon('alert_macros', true).'</legend>';
|
||||
|
||||
html_print_table($table_alert_settings);
|
||||
|
@ -642,7 +716,7 @@ if ($has_connection != false) {
|
|||
|
||||
// Form custom response default settings.
|
||||
echo '<div id="form_custom_response_settings">';
|
||||
echo '<fieldset>';
|
||||
echo '<fieldset class="mrgn_top_15px">';
|
||||
echo '<legend>'.__('Event custom response default values').' '.ui_print_help_icon('alert_macros', true).'</legend>';
|
||||
|
||||
html_print_table($table_cr_settings);
|
||||
|
@ -650,33 +724,24 @@ if ($has_connection != false) {
|
|||
echo '</fieldset>';
|
||||
echo '</div>';
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
),
|
||||
]
|
||||
$update_button = html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update and continue'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
),
|
||||
]
|
||||
$update_button = html_print_submit_button(
|
||||
__('Update and continue'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'update'],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
html_print_action_buttons($update_button);
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
@ -686,8 +751,8 @@ echo '</form>';
|
|||
|
||||
if($('input:checkbox[name="integria_user_level_conf"]').is(':checked'))
|
||||
{
|
||||
$('#integria-remote-setup-integria_user').hide();
|
||||
$('#integria-remote-setup-integria_pass').hide()
|
||||
$('.integria-remote-setup-integria_user').hide();
|
||||
$('.integria-remote-setup-integria_pass').hide()
|
||||
}
|
||||
|
||||
var handleUserLevel = function(event) {
|
||||
|
@ -726,13 +791,13 @@ echo '</form>';
|
|||
}
|
||||
|
||||
var hideUserPass = function () {
|
||||
$('#integria-remote-setup-integria_user').hide();
|
||||
$('#integria-remote-setup-integria_pass').hide();
|
||||
$('.integria-remote-setup-integria_user').hide();
|
||||
$('.integria-remote-setup-integria_pass').hide();
|
||||
}
|
||||
|
||||
var showUserPass = function () {
|
||||
$('#integria-remote-setup-integria_user').show();
|
||||
$('#integria-remote-setup-integria_pass').show();
|
||||
$('.integria-remote-setup-integria_user').show();
|
||||
$('.integria-remote-setup-integria_pass').show();
|
||||
}
|
||||
|
||||
var handleEnable = function (event) {
|
||||
|
|
|
@ -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
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,46 +37,72 @@ $update = (bool) get_parameter('update');
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->border = 0;
|
||||
$table->cellspacing = 3;
|
||||
$table->cellpadding = 5;
|
||||
$table->class = 'databox filters';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
$table->data[0][0] = '<b>'.__('Data storage path').'</b>';
|
||||
$table->data[0][1] = html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true);
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
__('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[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true);
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
__('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[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true);
|
||||
$table->data[1][] = html_print_label_input_block(
|
||||
__('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[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true);
|
||||
$table->data[1][] = html_print_label_input_block(
|
||||
__('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[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true);
|
||||
$table->data[2][] = html_print_label_input_block(
|
||||
__('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[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
|
||||
$table->data[2][] = html_print_label_input_block(
|
||||
__('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[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true);
|
||||
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>';
|
||||
$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(
|
||||
__('Disable custom live view filters'),
|
||||
html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], 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;";
|
||||
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true);
|
||||
|
||||
echo '<form id="netflow_setup" method="post">';
|
||||
$table->data[4][] = html_print_label_input_block(
|
||||
__('Name resolution for IP address'),
|
||||
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);
|
||||
|
||||
// Update button.
|
||||
echo '<div class="action-buttons w100p">';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
|
||||
echo '</div></form>';
|
||||
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=netflow_name_dir]").on("input", function() {
|
||||
$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));
|
||||
});
|
||||
</script>
|
|
@ -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
|
@ -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
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* 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&section=websocket_engine&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>';
|
||||
|
||||
$t = new StdClass();
|
||||
$t->data = [];
|
||||
$t->width = '100%';
|
||||
$t->class = 'databox filters';
|
||||
$t->class = 'databox filter-table-adv';
|
||||
$t->data = [];
|
||||
$t->style[0] = 'font-weight: bold';
|
||||
|
||||
$t->data[0][0] = __('Bind address');
|
||||
$t->data[0][1] = html_print_input_text(
|
||||
'ws_bind_address',
|
||||
$config['ws_bind_address'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[0][] = html_print_label_input_block(
|
||||
__('Bind address'),
|
||||
html_print_input_text(
|
||||
'ws_bind_address',
|
||||
$config['ws_bind_address'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$t->data[1][0] = __('Bind port');
|
||||
$t->data[1][2] = html_print_input_text(
|
||||
'ws_port',
|
||||
$config['ws_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[0][] = html_print_label_input_block(
|
||||
__('Bind port'),
|
||||
html_print_input_text(
|
||||
'ws_port',
|
||||
$config['ws_port'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$t->data[2][0] = __('WebSocket proxy url');
|
||||
$t->data[2][2] = html_print_input_text(
|
||||
'ws_proxy_url',
|
||||
$config['ws_proxy_url'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
$t->data[1][] = html_print_label_input_block(
|
||||
__('WebSocket proxy url'),
|
||||
html_print_input_text(
|
||||
'ws_proxy_url',
|
||||
$config['ws_proxy_url'],
|
||||
'',
|
||||
30,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($t);
|
||||
|
||||
|
||||
echo '</fieldset>';
|
||||
|
||||
if (function_exists('quickShellSettings') === true) {
|
||||
quickShellSettings();
|
||||
}
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons w100p',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
),
|
||||
]
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '</form>';
|
||||
|
|
|
@ -1885,7 +1885,7 @@ if ($create_alert || $update_alert) {
|
|||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->align = [];
|
||||
|
||||
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';
|
||||
|
@ -1983,7 +1983,7 @@ if ($create_alert || $update_alert) {
|
|||
[
|
||||
'alt' => __('Duplicate'),
|
||||
'title' => __('Duplicate'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'class' => 'main_menu_icon',
|
||||
]
|
||||
),
|
||||
],
|
||||
|
@ -2001,7 +2001,7 @@ if ($create_alert || $update_alert) {
|
|||
[
|
||||
'alt' => __('Update'),
|
||||
'border' => 0,
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'class' => 'main_menu_icon',
|
||||
]
|
||||
),
|
||||
],
|
||||
|
@ -2031,6 +2031,7 @@ if ($create_alert || $update_alert) {
|
|||
true,
|
||||
[
|
||||
'title' => __('Delete action'),
|
||||
'class' => 'main_menu_icon',
|
||||
]
|
||||
),
|
||||
'onClick' => 'delete_snmp_alert('.$row['id_as'].')',
|
||||
|
|
|
@ -50,7 +50,7 @@ try {
|
|||
[
|
||||
'id' => $tableId,
|
||||
'class' => 'info_table',
|
||||
'style' => 'width: 100%',
|
||||
'style' => 'width: 99%',
|
||||
'columns' => $columns,
|
||||
'column_names' => $column_names,
|
||||
'ajax_url' => 'include/ajax/update_manager',
|
||||
|
@ -66,12 +66,13 @@ try {
|
|||
[
|
||||
'label' => __('Free search'),
|
||||
'type' => 'text',
|
||||
'class' => 'mw250px',
|
||||
'class' => 'w400px',
|
||||
'id' => 'free_search',
|
||||
'name' => 'free_search',
|
||||
],
|
||||
],
|
||||
],
|
||||
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ',
|
||||
]
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -256,133 +256,158 @@ 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);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
|
||||
$i = 0;
|
||||
$table->style[$i] = 'font-weight: bolder;width:250px';
|
||||
$table->class = 'databox filters filter-table-adv';
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$url_update_manager = update_manager_get_url();
|
||||
|
||||
$table->data[$i][0] = __('Warp Update URL');
|
||||
$table->data[$i++][1] = html_print_input_text(
|
||||
'url_update_manager',
|
||||
$url_update_manager,
|
||||
__('URL update manager'),
|
||||
80,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Warp Update URL'),
|
||||
html_print_input_text(
|
||||
'url_update_manager',
|
||||
$url_update_manager,
|
||||
__('URL update manager'),
|
||||
80,
|
||||
255,
|
||||
true,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Use secured Warp Update');
|
||||
$table->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'switch',
|
||||
'name' => 'secure_update_manager',
|
||||
'value' => ($secure_update_manager ?? 1),
|
||||
]
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Use secured Warp Update'),
|
||||
html_print_input(
|
||||
[
|
||||
'type' => 'switch',
|
||||
'name' => 'secure_update_manager',
|
||||
'value' => ($secure_update_manager ?? 1),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Proxy server');
|
||||
$table->data[$i++][1] = html_print_input_text(
|
||||
'update_manager_proxy_server',
|
||||
$update_manager_proxy_server,
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Proxy server'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
html_print_input_text(
|
||||
'update_manager_proxy_server',
|
||||
$update_manager_proxy_server,
|
||||
__('Proxy server'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Proxy port');
|
||||
$table->data[$i++][1] = html_print_input_text(
|
||||
'update_manager_proxy_port',
|
||||
$update_manager_proxy_port,
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Proxy port'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
html_print_input_text(
|
||||
'update_manager_proxy_port',
|
||||
$update_manager_proxy_port,
|
||||
__('Proxy port'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Proxy user');
|
||||
$table->data[$i++][1] = html_print_input_text(
|
||||
'update_manager_proxy_user',
|
||||
$update_manager_proxy_user,
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Proxy user'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
html_print_input_text(
|
||||
'update_manager_proxy_user',
|
||||
$update_manager_proxy_user,
|
||||
__('Proxy user'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Proxy password');
|
||||
$table->data[$i++][1] = html_print_input_password(
|
||||
'update_manager_proxy_password',
|
||||
$update_manager_proxy_password,
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Proxy password'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
html_print_input_password(
|
||||
'update_manager_proxy_password',
|
||||
$update_manager_proxy_password,
|
||||
__('Proxy password'),
|
||||
80,
|
||||
60,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Allow no-consecutive patches');
|
||||
$table->data[$i++][1] = html_print_switch(
|
||||
[
|
||||
'name' => 'allow_offline_patches',
|
||||
'value' => $allow_offline_patches,
|
||||
'return' => true,
|
||||
]
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Allow no-consecutive patches'),
|
||||
html_print_switch(
|
||||
[
|
||||
'name' => 'allow_offline_patches',
|
||||
'value' => $allow_offline_patches,
|
||||
'return' => true,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Limit to LTS updates');
|
||||
$table->data[$i++][1] = html_print_switch(
|
||||
[
|
||||
'name' => 'lts_updates',
|
||||
'value' => $lts_updates,
|
||||
'return' => true,
|
||||
]
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
__('Limit to LTS updates'),
|
||||
html_print_switch(
|
||||
[
|
||||
'name' => 'lts_updates',
|
||||
'value' => $lts_updates,
|
||||
'return' => true,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$table->data[$i][0] = __('Registration ID');
|
||||
$table->data[$i++][1] = '<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>';
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Registration ID'),
|
||||
'<i>'.($config['pandora_uid'] ?? __('Not registred yet')).'</i>'
|
||||
);
|
||||
|
||||
if (update_manager_verify_registration() === true && users_is_admin()) {
|
||||
$table->data[$i][0] = __('Cancel registration');
|
||||
$table->data[$i][1] = '<a href="';
|
||||
$url = '<a href="';
|
||||
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'
|
||||
);
|
||||
} 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'
|
||||
);
|
||||
}
|
||||
|
||||
$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()) {
|
||||
$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').' '.html_print_radio_button('identification_reminder', 1, '', $config['identification_reminder'], true).' ';
|
||||
$table->data[$i++][1] .= __('No').' '.html_print_radio_button('identification_reminder', 0, '', $config['identification_reminder'], true);
|
||||
|
||||
$table->data[4][1] = html_print_label_input_block(
|
||||
__('%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).'
|
||||
'.__('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('update_config', 1);
|
||||
html_print_table($table);
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
'class="sub upd"'
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
['icon' => 'wand'],
|
||||
true
|
||||
)
|
||||
);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
|
|
@ -392,6 +392,8 @@ if ($create_user === true) {
|
|||
$values['timezone'] = (string) get_parameter('timezone');
|
||||
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
|
||||
$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', '');
|
||||
$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_custom_view'] = (int) get_parameter('default_custom_view');
|
||||
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
|
||||
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh');
|
||||
// API Token information.
|
||||
$apiTokenRenewed = (bool) get_parameter('renewAPIToken');
|
||||
$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';
|
||||
|
||||
|
||||
if (isset($autorefresh_list) === false) {
|
||||
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'");
|
||||
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 = '".$id."'");
|
||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||
if ($autorefresh_list === null) {
|
||||
$autorefresh_list[0] = __('None');
|
||||
|
@ -1645,9 +1648,13 @@ if ($new_user === true) {
|
|||
html_print_input_hidden('json_profile', $json_profile);
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
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>';
|
||||
|
||||
$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) {
|
||||
e.preventDefault();
|
||||
if (this.checked) {
|
||||
|
|
|
@ -451,9 +451,9 @@ if ($delete_user === true) {
|
|||
}
|
||||
}
|
||||
|
||||
$filter_group = (int) get_parameter('filter_group', 0);
|
||||
$filter_search = get_parameter('filter_search', '');
|
||||
$search = (bool) get_parameter('search', false);
|
||||
$filter_group = (int) get_parameter('filter_group', 0);
|
||||
$filter_search = get_parameter('filter_search', '');
|
||||
$search = (bool) get_parameter('search', false);
|
||||
|
||||
if (($filter_group == 0) && ($filter_search == '')) {
|
||||
$search = false;
|
||||
|
@ -803,7 +803,6 @@ foreach ($info as $user_id => $user_info) {
|
|||
);
|
||||
}
|
||||
|
||||
$data[4] .= '<br/>';
|
||||
$data[4] .= '<br/>';
|
||||
|
||||
$total_profile++;
|
||||
|
|
|
@ -763,23 +763,3 @@ html_print_div(
|
|||
);
|
||||
|
||||
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>
|
||||
-->
|
|
@ -835,7 +835,10 @@ class DiscoveryTaskList extends HTML
|
|||
$data[6] = html_print_image(
|
||||
'images/cluster@os.svg',
|
||||
true,
|
||||
['title' => __('Discovery Applications Microsoft SQL Server')]
|
||||
[
|
||||
'title' => __('Discovery Applications Microsoft SQL Server'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.Microsoft SQL Server');
|
||||
break;
|
||||
|
@ -871,7 +874,7 @@ class DiscoveryTaskList extends HTML
|
|||
$data[7] = ui_progress(
|
||||
$task['status'],
|
||||
'100%',
|
||||
1.9,
|
||||
1.2,
|
||||
// Color.
|
||||
'#ececec',
|
||||
// Return.
|
||||
|
@ -888,7 +891,8 @@ class DiscoveryTaskList extends HTML
|
|||
'id' => $task['id_rt'],
|
||||
'method' => 'taskProgress',
|
||||
],
|
||||
]
|
||||
],
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
|
@ -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 |
|
@ -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 |
|
@ -216,11 +216,8 @@ if ($get_double_auth_info_page) {
|
|||
$html .= '</p>';
|
||||
$html .= '</div>';
|
||||
$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 .= '</div>';
|
||||
$html .= '<br>';
|
||||
$html .= '<div class="center_align">';
|
||||
$html .= html_print_button(__('Continue'), 'continue_to_generate', false, '', '', true);
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -311,11 +308,11 @@ if ($get_double_auth_generation_page) {
|
|||
$html .= '<br>';
|
||||
$html .= __('QR').': <br>';
|
||||
$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 .= html_print_button(__('Continue'), 'continue_to_validate', false, '', '', true);
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
ob_clean();
|
||||
?>
|
||||
|
@ -453,7 +450,7 @@ if ($get_double_auth_validation_page) {
|
|||
$html .= html_print_input_text('code', '', '', 50, $secret_lenght, true);
|
||||
$html .= '<div id="code_input_message" class="red"></div>';
|
||||
$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_image('images/spinner.gif', true);
|
||||
$html .= '</div>';
|
||||
|
|
|
@ -91,9 +91,8 @@ $node_id = (int) get_parameter('node_id', 0);
|
|||
|
||||
if ($get_comments === true) {
|
||||
$event = get_parameter('event', false);
|
||||
$event_rep = (int) get_parameter('event_rep', 0);
|
||||
$event_rep = get_parameter_post('event')['event_rep'];
|
||||
$group_rep = get_parameter_post('event')['group_rep'];
|
||||
$event_rep = (int) get_parameter_post('event')['event_rep'];
|
||||
$group_rep = (int) get_parameter_post('event')['group_rep'];
|
||||
|
||||
if ($event === false) {
|
||||
return __('Failed to retrieve comments');
|
||||
|
@ -126,7 +125,7 @@ if ($get_comments === true) {
|
|||
} else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) {
|
||||
$whereGrouped = sprintf(
|
||||
'`id_extra` = "%s"',
|
||||
$event['id_extra']
|
||||
io_safe_output($event['id_extra'])
|
||||
);
|
||||
} else {
|
||||
$whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']);
|
||||
|
|
|
@ -1390,7 +1390,7 @@ if (check_login()) {
|
|||
false,
|
||||
'offset',
|
||||
true,
|
||||
'pagination-bottom',
|
||||
'',
|
||||
'pagination_list_modules(offset_param)',
|
||||
[
|
||||
'count' => '',
|
||||
|
@ -1692,6 +1692,18 @@ if (check_login()) {
|
|||
$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(
|
||||
'tagente_estado.estado IN (%s)
|
||||
AND tagente_modulo.delete_pending = 0',
|
||||
|
@ -1750,7 +1762,9 @@ if (check_login()) {
|
|||
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'
|
||||
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
||||
WHERE %s',
|
||||
$where
|
||||
);
|
||||
$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.
|
||||
db_process_sql('DROP TEMPORARY TABLE IF EXISTS temp_modules_status;');
|
||||
|
||||
|
@ -1852,7 +1892,9 @@ if (check_login()) {
|
|||
|
||||
$sql_count = sprintf(
|
||||
'SELECT COUNT(*) AS "total"
|
||||
FROM temp_modules_status'
|
||||
FROM temp_modules_status
|
||||
WHERE %s',
|
||||
$where
|
||||
);
|
||||
|
||||
$recordsTotal = db_get_value_sql($sql_count);
|
||||
|
|
|
@ -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
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -203,132 +203,161 @@ 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.
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->id = 'commandsTable';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
$table->data[$i][0] = __('Sound for Alert fired');
|
||||
$table->data[$i][1] = html_print_select(
|
||||
$sounds,
|
||||
'sound_alert',
|
||||
$config['sound_alert'],
|
||||
'replaySound(\'alert\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[$i][1] .= html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'alert\')',
|
||||
'content' => html_print_image(
|
||||
'images/control_play_col.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_warning',
|
||||
'style' => 'vertical-align: middle;',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[$i++][1] .= '<div id="layer_sound_alert"></div>';
|
||||
|
||||
$table->data[$i][0] = __('Sound for Monitor critical');
|
||||
$table->data[$i][1] = html_print_select(
|
||||
$sounds,
|
||||
'sound_critical',
|
||||
$config['sound_critical'],
|
||||
'replaySound(\'critical\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[$i][1] .= html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'critical\')',
|
||||
'content' => html_print_image(
|
||||
'images/control_play_col.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_warning',
|
||||
'style' => 'vertical-align: middle;',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[$i++][1] .= '<div id="layer_sound_critical"></div>';
|
||||
|
||||
$table->data[$i][0] = __('Sound for Monitor warning');
|
||||
$table->data[$i][1] = html_print_select(
|
||||
$sounds,
|
||||
'sound_warning',
|
||||
$config['sound_warning'],
|
||||
'replaySound(\'warning\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[$i][1] .= html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'warning\')',
|
||||
'content' => html_print_image(
|
||||
'images/control_play_col.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_warning',
|
||||
'style' => 'vertical-align: middle;',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[$i++][1] .= '<div id="layer_sound_warning"></div>';
|
||||
|
||||
$table->data[$i][0] = __('Custom graphviz directory');
|
||||
$table->data[$i++][1] = html_print_input_text(
|
||||
'graphviz_bin_dir',
|
||||
$config['graphviz_bin_dir'],
|
||||
'',
|
||||
25,
|
||||
255,
|
||||
true
|
||||
$table->data[$i][] = html_print_label_input_block(
|
||||
__('Sound for Alert fired'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_select(
|
||||
$sounds,
|
||||
'sound_alert',
|
||||
$config['sound_alert'],
|
||||
'replaySound(\'alert\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
).html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'alert\')',
|
||||
'content' => html_print_image(
|
||||
'images/change-active.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_alert',
|
||||
'style' => 'vertical-align: middle; margin-left: 10px',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Traceroute path');
|
||||
$table->data[$i++][1] = html_print_input_text('traceroute_path', $this->pathTraceroute, '', 40, 255, true);
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Sound for Monitor critical'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_select(
|
||||
$sounds,
|
||||
'sound_critical',
|
||||
$config['sound_critical'],
|
||||
'replaySound(\'critical\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
).html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'critical\')',
|
||||
'content' => html_print_image(
|
||||
'images/change-active.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_critical',
|
||||
'style' => 'vertical-align: middle; margin-left: 10px',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Ping path');
|
||||
$table->data[$i++][1] = html_print_input_text('ping_path', $this->pathPing, '', 40, 255, true);
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Sound for Monitor warning'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => '',
|
||||
'content' => html_print_select(
|
||||
$sounds,
|
||||
'sound_warning',
|
||||
$config['sound_warning'],
|
||||
'replaySound(\'warning\');',
|
||||
'',
|
||||
'',
|
||||
true
|
||||
).html_print_anchor(
|
||||
[
|
||||
'href' => 'javascript:toggleButton(\'warning\')',
|
||||
'content' => html_print_image(
|
||||
'images/change-active.svg',
|
||||
true,
|
||||
[
|
||||
'id' => 'button_sound_warning',
|
||||
'style' => 'vertical-align: middle; margin-left: 10px',
|
||||
'width' => '16',
|
||||
'title' => __('Play sound'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
),
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Nmap path');
|
||||
$table->data[$i++][1] = html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true);
|
||||
$table->data[$i][] = html_print_label_input_block(
|
||||
__('Custom graphviz directory'),
|
||||
html_print_input_text(
|
||||
'graphviz_bin_dir',
|
||||
$config['graphviz_bin_dir'],
|
||||
'',
|
||||
25,
|
||||
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(
|
||||
__('Snmpget path'),
|
||||
html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Snmpget path');
|
||||
$table->data[$i++][1] = html_print_input_text('snmpget_path', $this->pathSnmpget, '', 40, 255, true);
|
||||
$table->data[$i][] = html_print_label_input_block(
|
||||
__('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][] = html_print_label_input_block(
|
||||
__('Nmap path'),
|
||||
html_print_input_text('nmap_path', $this->pathNmap, '', 40, 255, true)
|
||||
);
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Dig path'),
|
||||
html_print_input_text('dig_path', $this->pathDig, '', 40, 255, true)
|
||||
);
|
||||
|
||||
$table->data[$i][0] = html_print_div(
|
||||
[
|
||||
'class' => 'title_custom_commands bolder float-left',
|
||||
'content' => __('Custom commands'),
|
||||
'content' => '<label>'.__('Custom commands').'</label>',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
@ -336,13 +365,13 @@ class ExternalTools extends HTML
|
|||
[
|
||||
'id' => 'add_button_custom_command',
|
||||
'content' => html_print_image(
|
||||
'images/add.png',
|
||||
'images/plus@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Add new custom command'),
|
||||
'onclick' => 'manageCommandLines(event)',
|
||||
'id' => 'img_add_button_custom_command',
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
|
||||
]
|
||||
),
|
||||
|
@ -350,8 +379,8 @@ class ExternalTools extends HTML
|
|||
true
|
||||
);
|
||||
|
||||
$table->data[$i][0] = __('Command');
|
||||
$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][0] = '<div><label>'.__('Command').'</label></div>';
|
||||
$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;
|
||||
$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 .= '<legend>'.__('Options').'</legend>';
|
||||
$form .= html_print_input_hidden('update_paths', 1, true);
|
||||
$form .= html_print_table($table, true);
|
||||
$form .= '</fieldset>';
|
||||
$form .= html_print_div(
|
||||
[
|
||||
'id' => '',
|
||||
'class' => 'action-buttons',
|
||||
'style' => 'width: 100%',
|
||||
'content' => html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[ 'icon' => 'update' ],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$form .= '</form>';
|
||||
|
||||
html_print_action_buttons(
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
[
|
||||
'icon' => 'update',
|
||||
'form' => 'form_setup',
|
||||
],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo $form;
|
||||
}
|
||||
|
||||
|
@ -436,15 +462,14 @@ class ExternalTools extends HTML
|
|||
$output = html_print_div(
|
||||
[
|
||||
'id' => 'delete_button_custom_'.$index,
|
||||
'class' => '',
|
||||
'content' => html_print_image(
|
||||
'images/delete.png',
|
||||
'images/delete.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete this custom command'),
|
||||
'onclick' => 'manageCommandLines(event)',
|
||||
'id' => 'img_delete_button_custom_'.$index,
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
),
|
||||
],
|
||||
|
@ -528,77 +553,103 @@ class ExternalTools extends HTML
|
|||
|
||||
// Form table.
|
||||
$table = new StdClass();
|
||||
$table->class = 'fixed_filter_bar';
|
||||
$table->class = 'fixed_filter_bar filter-table-adv pdd_15px';
|
||||
$table->id = 'externalToolTable';
|
||||
$table->cellstyle['captions'][0] = 'width: 0';
|
||||
$table->cellstyle['captions'][1] = 'width: 0';
|
||||
$table->cellstyle['captions'][2] = 'width: 0';
|
||||
$table->size[0] = '25%';
|
||||
$table->size[1] = '25%';
|
||||
$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['captions'][0] = __('Operation');
|
||||
|
||||
$table->data['inputs'][0] = html_print_select(
|
||||
$commandList,
|
||||
'operation',
|
||||
$this->operation,
|
||||
'mostrarColumns(this.value)',
|
||||
__('Please select'),
|
||||
0,
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Operation'),
|
||||
html_print_select(
|
||||
$commandList,
|
||||
'operation',
|
||||
$this->operation,
|
||||
'mostrarColumns(this.value)',
|
||||
__('Please select'),
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%;'
|
||||
)
|
||||
);
|
||||
|
||||
$table->data['captions'][1] = __('IP Adress');
|
||||
$table->data['inputs'][1] = html_print_select(
|
||||
$ipsSelect,
|
||||
'select_ips',
|
||||
$principal_ip,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('IP Adress'),
|
||||
html_print_select(
|
||||
$ipsSelect,
|
||||
'select_ips',
|
||||
$principal_ip,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%;'
|
||||
)
|
||||
);
|
||||
|
||||
$table->cellclass['captions'][2] = 'snmpcolumn';
|
||||
$table->cellclass['inputs'][2] = 'snmpcolumn';
|
||||
$table->data['captions'][2] = __('SNMP Version');
|
||||
$table->data['inputs'][2] = html_print_select(
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('SNMP Version'),
|
||||
html_print_select(
|
||||
[
|
||||
'1' => 'v1',
|
||||
'2c' => 'v2c',
|
||||
],
|
||||
'select_version',
|
||||
$this->snmp_version,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'w100p',
|
||||
false,
|
||||
'width: 100%;'
|
||||
),
|
||||
['div_class' => 'snmpcolumn']
|
||||
);
|
||||
|
||||
$table->data[0][3] = html_print_label_input_block(
|
||||
__('SNMP Community'),
|
||||
html_print_input_text(
|
||||
'community',
|
||||
$this->community,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'w100p'
|
||||
),
|
||||
['div_class' => 'snmpcolumn']
|
||||
);
|
||||
|
||||
$table->data[1][0] = html_print_submit_button(
|
||||
__('Execute'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'1' => 'v1',
|
||||
'2c' => 'v2c',
|
||||
],
|
||||
'select_version',
|
||||
$this->snmp_version,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
|
||||
$table->cellclass['captions'][3] = 'snmpcolumn';
|
||||
$table->cellclass['inputs'][3] = 'snmpcolumn';
|
||||
$table->data['captions'][3] = __('SNMP Community');
|
||||
$table->data['inputs'][3] = html_print_input_text(
|
||||
'community',
|
||||
$this->community,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data['inputs'][4] = html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Execute'),
|
||||
'submit',
|
||||
false,
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
),
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini',
|
||||
'class' => 'float-right mrgn_right_10px',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
@ -716,7 +767,7 @@ class ExternalTools extends HTML
|
|||
*/
|
||||
private function performExecution(string $command='', string $caption='')
|
||||
{
|
||||
$output = '';
|
||||
$output = '<div class="white_box max_floating_element_size no_border">';
|
||||
|
||||
try {
|
||||
// If caption is not added, don't show anything.
|
||||
|
@ -736,7 +787,7 @@ class ExternalTools extends HTML
|
|||
$output .= __('Command not response');
|
||||
}
|
||||
|
||||
$output .= '</pre>';
|
||||
$output .= '</pre></div>';
|
||||
|
||||
if ($resultCode !== 0) {
|
||||
throw new Exception(
|
||||
|
@ -774,6 +825,8 @@ class ExternalTools extends HTML
|
|||
{
|
||||
$output = '';
|
||||
|
||||
echo '<div class="white_box max_floating_element_size no_border pdd_15px">';
|
||||
|
||||
if (validate_address($ip) === false) {
|
||||
$output .= ui_print_error_message(
|
||||
__('The ip or dns name entered cannot be resolved'),
|
||||
|
@ -938,6 +991,7 @@ class ExternalTools extends HTML
|
|||
}
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ class ManageNetScanScripts extends Wizard
|
|||
'delete',
|
||||
'images/delete.svg',
|
||||
1,
|
||||
'width:40px;',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete Script'),
|
||||
|
|
|
@ -868,7 +868,7 @@ class ModuleTemplates extends HTML
|
|||
'delete_profile',
|
||||
'images/delete.svg',
|
||||
$row['id_np'],
|
||||
'width:40px',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
|
||||
|
@ -1156,7 +1156,7 @@ class ModuleTemplates extends HTML
|
|||
'del_block_'.$id_group.'_',
|
||||
'images/delete.svg',
|
||||
1,
|
||||
'width: 40px',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete this block'),
|
||||
|
@ -1253,7 +1253,7 @@ class ModuleTemplates extends HTML
|
|||
'del_module_'.$module['component_id'].'_',
|
||||
'images/delete.svg',
|
||||
1,
|
||||
'width:40px;',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete this module'),
|
||||
|
|
|
@ -393,7 +393,7 @@ class SatelliteAgent extends HTML
|
|||
true,
|
||||
[
|
||||
'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.'\')',
|
||||
]
|
||||
);
|
||||
|
@ -405,7 +405,7 @@ class SatelliteAgent extends HTML
|
|||
true,
|
||||
[
|
||||
'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.'\')',
|
||||
]
|
||||
);
|
||||
|
|
|
@ -259,7 +259,10 @@ class SnmpConsole extends HTML
|
|||
'class' => 'snmp-td',
|
||||
],
|
||||
'alert',
|
||||
'action',
|
||||
[
|
||||
'text' => 'action',
|
||||
'class' => 'table_action_buttons w120px',
|
||||
],
|
||||
[
|
||||
'text' => 'm',
|
||||
'class' => 'mw60px pdd_0px',
|
||||
|
|
|
@ -121,6 +121,10 @@ class TipsWindow
|
|||
}
|
||||
|
||||
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_javascript_file('tipsWindow');
|
||||
ui_require_javascript_file('jquery.bxslider.min');
|
||||
|
@ -157,11 +161,12 @@ class TipsWindow
|
|||
View::render(
|
||||
'dashboard/tipsWindow',
|
||||
[
|
||||
'title' => $initialTip['title'],
|
||||
'text' => $initialTip['text'],
|
||||
'url' => $initialTip['url'],
|
||||
'files' => $initialTip['files'],
|
||||
'id' => $initialTip['id'],
|
||||
'title' => $initialTip['title'],
|
||||
'text' => $initialTip['text'],
|
||||
'url' => $initialTip['url'],
|
||||
'files' => $initialTip['files'],
|
||||
'id' => $initialTip['id'],
|
||||
'totalTips' => $this->getTotalTipsShowUser(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -434,7 +439,14 @@ class TipsWindow
|
|||
'title',
|
||||
'text',
|
||||
'enable',
|
||||
'actions',
|
||||
[
|
||||
'text' => 'edit',
|
||||
'class' => 'table_action_buttons',
|
||||
],
|
||||
[
|
||||
'text' => 'delete',
|
||||
'class' => 'table_action_buttons',
|
||||
],
|
||||
];
|
||||
|
||||
$columnNames = [
|
||||
|
@ -442,7 +454,8 @@ class TipsWindow
|
|||
__('Title'),
|
||||
__('Text'),
|
||||
__('Enable'),
|
||||
__('Actions'),
|
||||
__('Edit'),
|
||||
__('Delete'),
|
||||
];
|
||||
|
||||
// Load datatables user interface.
|
||||
|
@ -450,7 +463,9 @@ class TipsWindow
|
|||
[
|
||||
'id' => 'list_tips_windows',
|
||||
'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,
|
||||
'column_names' => $columnNames,
|
||||
'ajax_url' => $this->ajaxController,
|
||||
|
@ -473,18 +488,19 @@ class TipsWindow
|
|||
],
|
||||
]
|
||||
);
|
||||
echo '<div class="action-buttons w100p">';
|
||||
echo '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&view=create">';
|
||||
html_print_submit_button(
|
||||
echo '<div class="action-buttons w100p" style="width: 100%">';
|
||||
$buttonCreate = html_print_button(
|
||||
__('Create tip'),
|
||||
'create',
|
||||
false,
|
||||
'window.location.replace("index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&view=create")',
|
||||
[
|
||||
'class' => 'sub',
|
||||
'icon' => 'create_file',
|
||||
]
|
||||
'icon' => 'plus',
|
||||
],
|
||||
true
|
||||
);
|
||||
echo '</a>';
|
||||
html_print_action_buttons($buttonCreate);
|
||||
echo '</div>';
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
|
@ -584,16 +600,15 @@ class TipsWindow
|
|||
$data[$key]['title'] = io_safe_output($row['title']);
|
||||
$data[$key]['text'] = io_safe_output($row['text']);
|
||||
$data[$key]['url'] = io_safe_output($row['url']);
|
||||
$data[$key]['actions'] = '<div class="buttons_actions">';
|
||||
$data[$key]['actions'] .= '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&view=edit&idTip='.$row['id'].'">';
|
||||
$data[$key]['actions'] .= html_print_image(
|
||||
$data[$key]['edit'] = '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&view=edit&idTip='.$row['id'].'">';
|
||||
$data[$key]['edit'] .= html_print_image(
|
||||
'images/edit.svg',
|
||||
true,
|
||||
['class' => 'main_menu_icon']
|
||||
);
|
||||
$data[$key]['actions'] .= '</a>';
|
||||
$data[$key]['actions'] .= '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&action=delete">';
|
||||
$data[$key]['actions'] .= html_print_input_image(
|
||||
$data[$key]['edit'] .= '</a>';
|
||||
$data[$key]['delete'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&action=delete">';
|
||||
$data[$key]['delete'] .= html_print_input_image(
|
||||
'button_delete_tip',
|
||||
'images/delete.svg',
|
||||
'',
|
||||
|
@ -601,12 +616,11 @@ class TipsWindow
|
|||
true,
|
||||
[
|
||||
'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]['actions'] .= '</form>';
|
||||
$data[$key]['actions'] .= '</div>';
|
||||
$data[$key]['delete'] .= html_print_input_hidden('idTip', $row['id'], true);
|
||||
$data[$key]['delete'] .= '</form>';
|
||||
}
|
||||
|
||||
if (empty($data) === true) {
|
||||
|
@ -679,14 +693,50 @@ class TipsWindow
|
|||
</script>';
|
||||
$table = new stdClass();
|
||||
$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[0][0] = __('Images');
|
||||
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
|
||||
$table->data[0][1] .= html_print_div(
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Language'),
|
||||
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',
|
||||
'class' => 'invisible',
|
||||
|
@ -694,41 +744,36 @@ class TipsWindow
|
|||
],
|
||||
true
|
||||
);
|
||||
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
|
||||
$table->data[1][0] = __('Language');
|
||||
$table->data[1][1] = html_print_select_from_sql(
|
||||
'SELECT id_language, name FROM tlanguage',
|
||||
'id_lang',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'0',
|
||||
$inputImages .= html_print_div(
|
||||
[
|
||||
'id' => 'notices_images',
|
||||
'class' => 'invisible empty_input_images',
|
||||
'content' => '<p>'.__('Please select a image').'</p>',
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[2][0] = __('Profile');
|
||||
$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);
|
||||
$inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
|
||||
|
||||
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=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§ion=welcome_tips&view=create&action=create" enctype="multipart/form-data">';
|
||||
html_print_table($table);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_submit_button(
|
||||
|
||||
$actionButtons = html_print_submit_button(
|
||||
__('Send'),
|
||||
'submit_button',
|
||||
false,
|
||||
[
|
||||
'class' => 'sub',
|
||||
'icon' => 'update',
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
html_print_submit_button(
|
||||
$actionButtons .= html_print_submit_button(
|
||||
__('Preview'),
|
||||
'preview_button',
|
||||
false,
|
||||
|
@ -736,8 +781,11 @@ class TipsWindow
|
|||
'class' => 'sub preview',
|
||||
'id' => 'prev_button',
|
||||
'icon' => 'preview',
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons($actionButtons);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
html_print_div(['id' => 'tips_window_modal_preview']);
|
||||
|
@ -789,7 +837,7 @@ class TipsWindow
|
|||
true,
|
||||
[
|
||||
'onclick' => 'deleteImage(this, \''.$value['id'].'\', \''.$namePath.'\')',
|
||||
'class' => 'remove-image',
|
||||
'class' => 'remove-image main_menu_icon',
|
||||
]
|
||||
);
|
||||
$outputImagesTip .= html_print_div(
|
||||
|
@ -811,16 +859,52 @@ class TipsWindow
|
|||
</script>';
|
||||
$table = new stdClass();
|
||||
$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[0][0] = __('Images');
|
||||
$table->data[0][1] .= $outputImagesTip;
|
||||
$table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
|
||||
$table->data[0][1] .= html_print_input_hidden('images_to_delete', '{}', true);
|
||||
$table->data[0][1] .= html_print_div(
|
||||
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Language'),
|
||||
html_print_select_from_sql(
|
||||
'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',
|
||||
'class' => 'invisible',
|
||||
|
@ -828,41 +912,35 @@ class TipsWindow
|
|||
],
|
||||
true
|
||||
);
|
||||
$table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
|
||||
$table->data[1][0] = __('Language');
|
||||
$table->data[1][1] = html_print_select_from_sql(
|
||||
'SELECT id_language, name FROM tlanguage',
|
||||
'id_lang',
|
||||
$tip['id_lang'],
|
||||
'',
|
||||
'',
|
||||
'0',
|
||||
$inputImages .= html_print_div(
|
||||
[
|
||||
'id' => 'notices_images',
|
||||
'class' => 'invisible empty_input_images',
|
||||
'content' => '<p>'.__('Please select a image').'</p>',
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[2][0] = __('Profile');
|
||||
$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);
|
||||
$inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
|
||||
|
||||
echo '<form name="grupo" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=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§ion=welcome_tips&view=edit&action=edit&idTip='.$tip['id'].'" enctype="multipart/form-data">';
|
||||
html_print_table($table);
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_submit_button(
|
||||
$actionButtons = html_print_submit_button(
|
||||
__('Send'),
|
||||
'submit_button',
|
||||
false,
|
||||
[
|
||||
'class' => 'sub',
|
||||
'icon' => 'update',
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
html_print_submit_button(
|
||||
$actionButtons .= html_print_submit_button(
|
||||
__('Preview'),
|
||||
'preview_button',
|
||||
false,
|
||||
|
@ -870,9 +948,12 @@ class TipsWindow
|
|||
'class' => 'sub preview',
|
||||
'id' => 'prev_button',
|
||||
'icon' => 'preview',
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
html_print_action_buttons($actionButtons);
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
html_print_div(['id' => 'tips_window_modal_preview']);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue