Merge branch 'develop' into 'ent-10665-version-open-edicion-del-propio-usuario-y-gestion-de-usuarios-devuelve-error-500'
# Conflicts: # pandora_console/install.php
This commit is contained in:
commit
fd9dfcf08f
pandora_agents
pc
AIX
FreeBSD
HP-UX
Linux
NT4
SunOS
Win32
shellscript
aix
bsd-ipso
hp-ux
linux
mac_osx
openWRT
solaris
unix
AIX
DEBIAN
Darwin
dmg
pandora_agent.confFreeBSD
HP-UX
Linux
NT4
NetBSD
SunOS
pandora_agentpandora_agent.redhat.specpandora_agent.specpandora_agent_installerwin32
pandora_console
DEBIAN
general
godmode
images
include
ajax
class
config_process.phpfunctions_config.phpfunctions_events.phpfunctions_filemanager.phpfunctions_html.phpfunctions_menu.phpfunctions_netflow.phpfunctions_treeview.phpjavascript
lib/Dashboard
rest-api/models/VisualConsole/Items
styles
operation
pandora_console.redhat.specpandora_console.rhel7.specpandora_console.specpandora_console_installpandoradb_data.sqlviews/dashboard
pandora_server/DEBIAN
|
@ -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-230323
|
||||
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-230323"
|
||||
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 => '230323';
|
||||
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;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#
|
||||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.769
|
||||
%define release 230323
|
||||
%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 230323
|
||||
%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="230323"
|
||||
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
|
||||
{230323}
|
||||
{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 230323")
|
||||
#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 230323))"
|
||||
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-230323
|
||||
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-230323"
|
||||
pandora_version="7.0NG.770"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -30,7 +30,7 @@ require_once __DIR__.'/../include/functions_html.php';
|
|||
echo '<style>
|
||||
:root {';
|
||||
if ($config['style'] === 'pandora') {
|
||||
echo '--login-background-color: rgba(255, 255, 255, 0.2);';
|
||||
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
|
||||
echo '--login-label-color: #545454;';
|
||||
echo '--login-text-color: #000;';
|
||||
$style_theme = 'white-theme';
|
||||
|
@ -213,7 +213,7 @@ echo '<div class="login_page">';
|
|||
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',
|
||||
|
@ -238,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);
|
||||
}
|
||||
|
@ -472,17 +472,19 @@ html_print_csrf_hidden();
|
|||
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,
|
||||
[
|
||||
'class' => 'splash-logo',
|
||||
'alt' => 'splash',
|
||||
'border' => 0,
|
||||
],
|
||||
false,
|
||||
false
|
||||
);
|
||||
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">
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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,
|
||||
|
@ -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 {
|
||||
/*
|
||||
|
@ -986,7 +985,7 @@ if ($tab == 'tree') {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
|
@ -1038,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();
|
||||
|
|
|
@ -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>';
|
||||
|
|
|
@ -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>';
|
||||
|
|
|
@ -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>';
|
||||
|
|
|
@ -146,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,
|
||||
]
|
||||
);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -403,6 +403,32 @@ $table->data[$i++][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
$table->data[$i][] = html_print_label_input_block(
|
||||
__('Enable Sflow'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'activate_sflow',
|
||||
1,
|
||||
$config['activate_sflow'],
|
||||
$rbt_disabled,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
),
|
||||
);
|
||||
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('General network path'),
|
||||
html_print_input_text(
|
||||
'general_network_path',
|
||||
$config['general_network_path'],
|
||||
'',
|
||||
40,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->colspan[$i][] = 2;
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Timezone setup'),
|
||||
|
|
|
@ -386,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();
|
||||
|
@ -507,121 +519,133 @@ $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 = [];
|
||||
|
@ -682,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);
|
||||
|
@ -692,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);
|
||||
|
|
|
@ -43,7 +43,7 @@ $table->data = [];
|
|||
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
__('Data storage path'),
|
||||
html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true)
|
||||
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
|
||||
);
|
||||
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
|
@ -100,3 +100,9 @@ html_print_action_buttons(
|
|||
)
|
||||
);
|
||||
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>
|
|
@ -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>';
|
||||
|
|
|
@ -393,6 +393,7 @@ if ($create_user === true) {
|
|||
$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', '');
|
||||
|
||||
|
|
Binary file not shown.
After ![]() (image error) Size: 106 KiB |
Binary file not shown.
After ![]() (image error) Size: 5.3 KiB |
|
@ -26,6 +26,8 @@
|
|||
* ============================================================================
|
||||
*/
|
||||
|
||||
use PandoraFMS\Enterprise\Metaconsole\Node;
|
||||
|
||||
if (is_ajax() === true) {
|
||||
global $config;
|
||||
|
||||
|
@ -216,6 +218,12 @@ if (is_ajax() === true) {
|
|||
if ($getInfo === true) {
|
||||
enterprise_include_once('include/functions_agents.php');
|
||||
$id = get_parameter('id', 0);
|
||||
$id_server = get_parameter('id_server', 0);
|
||||
if (empty($id_server) === false) {
|
||||
$nd = new Node($id_server);
|
||||
$nd->connect();
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 3:
|
||||
case 2:
|
||||
|
@ -375,6 +383,10 @@ if (is_ajax() === true) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (empty($id_server) === false) {
|
||||
$nd->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -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',
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,8 +20,8 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230323';
|
||||
$pandora_version = 'v7.0NG.769';
|
||||
$build_version = 'PC230327';
|
||||
$pandora_version = 'v7.0NG.770';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
|
|
|
@ -260,6 +260,24 @@ function config_update_config()
|
|||
$error_update[] = __('Enable Netflow');
|
||||
}
|
||||
|
||||
if (config_update_value('activate_sflow', (bool) get_parameter('activate_sflow'), true) === false) {
|
||||
$error_update[] = __('Enable Sflow');
|
||||
}
|
||||
|
||||
if (config_update_value('general_network_path', get_parameter('general_network_path'), true) === false) {
|
||||
$error_update[] = __('General network path');
|
||||
} else {
|
||||
if (empty($config['netflow_name_dir']) === false && $config['netflow_name_dir'] !== '') {
|
||||
$path = get_parameter('general_network_path');
|
||||
config_update_value('netflow_path', $path.$config['netflow_name_dir']);
|
||||
}
|
||||
|
||||
if (empty($config['sflow_name_dir']) === false && $config['sflow_name_dir'] !== '') {
|
||||
$path = get_parameter('general_network_path');
|
||||
config_update_value('sflow_path', $path.$config['sflow_name_dir']);
|
||||
}
|
||||
}
|
||||
|
||||
$timezone = (string) get_parameter('timezone');
|
||||
if (empty($timezone) === true || config_update_value('timezone', $timezone, true) === false) {
|
||||
$error_update[] = __('Timezone setup');
|
||||
|
@ -1505,8 +1523,13 @@ function config_update_config()
|
|||
break;
|
||||
|
||||
case 'net':
|
||||
if (config_update_value('netflow_path', get_parameter('netflow_path'), true) === false) {
|
||||
$error_update[] = __('Data storage path');
|
||||
if (config_update_value('netflow_name_dir', get_parameter('netflow_name_dir'), true) === false) {
|
||||
$error_update[] = __('Name storage path');
|
||||
} else {
|
||||
if (empty($config['general_network_path']) === false && $config['general_network_path'] !== '') {
|
||||
$name = get_parameter('netflow_name_dir');
|
||||
config_update_value('netflow_path', $config['general_network_path'].$name);
|
||||
}
|
||||
}
|
||||
|
||||
if (config_update_value('netflow_interval', (int) get_parameter('netflow_interval'), true) === false) {
|
||||
|
@ -1542,6 +1565,49 @@ function config_update_config()
|
|||
}
|
||||
break;
|
||||
|
||||
case 'sflow':
|
||||
if (config_update_value('sflow_name_dir', get_parameter('sflow_name_dir'), true) === false) {
|
||||
$error_update[] = __('Sflow name dir');
|
||||
} else {
|
||||
if (empty($config['general_network_path']) === false && $config['general_network_path'] !== '') {
|
||||
$name = get_parameter('sflow_name_dir');
|
||||
config_update_value('sflow_path', $config['general_network_path'].$name);
|
||||
}
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_interval', (int) get_parameter('sflow_interval'), true) === false) {
|
||||
$error_update[] = __('Daemon interval');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_daemon', get_parameter('sflow_daemon'), true) === false) {
|
||||
$error_update[] = __('Daemon binary path');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_nfdump', get_parameter('sflow_nfdump'), true) === false) {
|
||||
$error_update[] = __('Nfdump binary path');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_nfexpire', get_parameter('sflow_nfexpire'), true) === false) {
|
||||
$error_update[] = __('Nfexpire binary path');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_max_resolution', (int) get_parameter('sflow_max_resolution'), true) === false) {
|
||||
$error_update[] = __('Maximum chart resolution');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_disable_custom_lvfilters', get_parameter('sflow_disable_custom_lvfilters'), true) === false) {
|
||||
$error_update[] = __('Disable custom live view filters');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_max_lifetime', (int) get_parameter('sflow_max_lifetime'), true) === false) {
|
||||
$error_update[] = __('Sflow max lifetime');
|
||||
}
|
||||
|
||||
if (config_update_value('sflow_get_ip_hostname', (int) get_parameter('sflow_get_ip_hostname'), true) === false) {
|
||||
$error_update[] = __('Name resolution for IP address');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'log':
|
||||
if (config_update_value('elasticsearch_ip', get_parameter('elasticsearch_ip'), true) === false) {
|
||||
$error_update[] = __('IP ElasticSearch server');
|
||||
|
@ -2565,7 +2631,7 @@ function config_process_config()
|
|||
}
|
||||
|
||||
if (!isset($config['custom_logo_login'])) {
|
||||
config_update_value('custom_logo_login', 'login_logo_v7.png');
|
||||
config_update_value('custom_logo_login', 'Pandora-FMS-1.png');
|
||||
}
|
||||
|
||||
if (!isset($config['custom_splash_login'])) {
|
||||
|
@ -2629,7 +2695,7 @@ function config_process_config()
|
|||
}
|
||||
|
||||
if (!isset($config['background_opacity'])) {
|
||||
config_update_value('background_opacity', 30);
|
||||
config_update_value('background_opacity', 20);
|
||||
}
|
||||
|
||||
if (!isset($config['meta_background_opacity'])) {
|
||||
|
@ -2649,7 +2715,7 @@ function config_process_config()
|
|||
}
|
||||
|
||||
if (!isset($config['meta_custom_logo_login'])) {
|
||||
config_update_value('meta_custom_logo_login', 'pandora_logo.png');
|
||||
config_update_value('meta_custom_logo_login', 'Pandora-FMS-1.png');
|
||||
}
|
||||
|
||||
if (!isset($config['meta_custom_splash_login'])) {
|
||||
|
@ -2776,6 +2842,28 @@ function config_process_config()
|
|||
config_update_value('activate_netflow', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['activate_sflow'])) {
|
||||
config_update_value('activate_sflow', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['general_network_path'])) {
|
||||
if ($is_windows) {
|
||||
$default = 'C:\PandoraFMS\Pandora_Server\data_in\\';
|
||||
} else {
|
||||
$default = '/var/spool/pandora/data_in/';
|
||||
}
|
||||
|
||||
config_update_value('general_network_path', $default);
|
||||
}
|
||||
|
||||
if (!isset($config['netflow_name_dir'])) {
|
||||
config_update_value('netflow_name_dir', 'netflow');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_name_dir'])) {
|
||||
config_update_value('sflow_name_dir', 'sflow');
|
||||
}
|
||||
|
||||
if (!isset($config['netflow_path'])) {
|
||||
if ($is_windows) {
|
||||
$default = 'C:\PandoraFMS\Pandora_Server\data_in\netflow';
|
||||
|
@ -2814,6 +2902,48 @@ function config_process_config()
|
|||
config_update_value('netflow_max_lifetime', '5');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_interval'])) {
|
||||
config_update_value('sflow_interval', SECONDS_10MINUTES);
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_daemon'])) {
|
||||
config_update_value('sflow_daemon', '/usr/bin/sfcapd');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_nfdump'])) {
|
||||
config_update_value('sflow_nfdump', '/usr/bin/nfdump');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_nfexpire'])) {
|
||||
config_update_value('sflow_nfexpire', '/usr/bin/nfexpire');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_max_resolution'])) {
|
||||
config_update_value('sflow_max_resolution', '50');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_disable_custom_lvfilters'])) {
|
||||
config_update_value('sflow_disable_custom_lvfilters', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_max_lifetime'])) {
|
||||
config_update_value('sflow_max_lifetime', '5');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_name_dir'])) {
|
||||
config_update_value('sflow_name_dir', 'sflow');
|
||||
}
|
||||
|
||||
if (!isset($config['sflow_path'])) {
|
||||
if ($is_windows) {
|
||||
$default = 'C:\PandoraFMS\Pandora_Server\data_in\sflow';
|
||||
} else {
|
||||
$default = '/var/spool/pandora/data_in/sflow';
|
||||
}
|
||||
|
||||
config_update_value('sflow_path', $default);
|
||||
}
|
||||
|
||||
if (!isset($config['auth'])) {
|
||||
config_update_value('auth', 'mysql');
|
||||
}
|
||||
|
|
|
@ -1494,7 +1494,8 @@ function events_get_all(
|
|||
break;
|
||||
|
||||
case EVENT_GROUP_REP_EXTRAIDS:
|
||||
// Group by events.
|
||||
// Group by events and ignore null.
|
||||
$sql_filters[] = 'AND te.id_extra IS NOT NULL AND te.id_extra <> ""';
|
||||
$group_by .= 'te.id_extra';
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -626,7 +626,7 @@ function filemanager_file_explorer(
|
|||
$table->width = '100%';
|
||||
$table->id = 'table_filemanager';
|
||||
|
||||
$table->class = (is_metaconsole() === true) ? 'databox_tactical' : 'info_table';
|
||||
$table->class = 'info_table';
|
||||
$table->title = '<span>'.__('Index of %s', $relative_directory).'</span>';
|
||||
$table->colspan = [];
|
||||
$table->data = [];
|
||||
|
@ -751,7 +751,7 @@ function filemanager_file_explorer(
|
|||
&& ($readOnly === false)
|
||||
) {
|
||||
$data[4] .= '<form method="post" action="'.$url.'" style="">';
|
||||
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter" src="images/delete.svg" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter main_menu_icon" src="../../images/delete.svg" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[4] .= html_print_input_hidden('filename', $fileinfo['realpath'], true);
|
||||
$data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'].$config['server_unique_identifier']), true);
|
||||
$data[4] .= html_print_input_hidden('delete_file', 1, true);
|
||||
|
@ -896,7 +896,7 @@ function filemanager_file_explorer(
|
|||
$uploadFileElements .= html_print_input_hidden('upload_file', 1, true);
|
||||
}
|
||||
|
||||
$uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, [ 'class' => 'submitButton', 'style' => 'float:right', 'icon' => 'next'], true);
|
||||
$uploadFileElements .= html_print_submit_button(__('Go'), 'go', false, [ 'class' => 'submitButton', 'style' => 'float:right; margin-top: 10px;', 'icon' => 'next'], true);
|
||||
$uploadFileElements .= html_print_input_hidden('real_directory', $real_directory, true);
|
||||
$uploadFileElements .= html_print_input_hidden('directory', $relative_directory, true);
|
||||
$uploadFileElements .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['server_unique_identifier']), true);
|
||||
|
|
|
@ -4788,13 +4788,16 @@ function html_print_input_file($name, $return=false, $options=false)
|
|||
if (isset($options['accept']) === true) {
|
||||
$output .= ' accept="'.$options['accept'].'"';
|
||||
}
|
||||
|
||||
$label = '';
|
||||
if (isset($options['label']) === true) {
|
||||
$label = $options['label'];
|
||||
}
|
||||
}
|
||||
|
||||
// Close input.
|
||||
$output .= '/>';
|
||||
if (is_metaconsole() === false) {
|
||||
$output .= ($options['caption'] ?? __('Select a file'));
|
||||
}
|
||||
$output .= ($options['caption'] ?? __('Select a file'));
|
||||
|
||||
$output .= '</label>';
|
||||
$output .= '<span class="inputFileSpan" id="span-'.$name.'"> </span>';
|
||||
|
|
|
@ -68,6 +68,11 @@ function menu_print_menu(&$menu)
|
|||
$sec2 = 'godmode/alerts/alert_commands';
|
||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||
} else if ($sec2 === 'operation/gis_maps/render_view') {
|
||||
$map_id = (int) get_parameter('map_id');
|
||||
if (empty($map_id) === false) {
|
||||
$sec2 .= '&map_id='.$map_id;
|
||||
}
|
||||
} else if ($sec2 === 'godmode/servers/discovery') {
|
||||
$wiz = (string) get_parameter('wiz');
|
||||
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
||||
|
@ -263,6 +268,7 @@ function menu_print_menu(&$menu)
|
|||
if (($sec2 == $subsec2 || $allsec2 == $subsec2
|
||||
|| $selected_submenu2) && isset($sub[$subsec2]['options'])
|
||||
&& (get_parameter_get($sub[$subsec2]['options']['name']) == $sub[$subsec2]['options']['value'])
|
||||
&& $main['id'] !== 'fav-menu'
|
||||
) {
|
||||
// If the subclass is selected and there are options and that options value is true.
|
||||
$class .= 'submenu_selected selected';
|
||||
|
@ -270,7 +276,7 @@ function menu_print_menu(&$menu)
|
|||
$menu2_selected = $sub['id'];
|
||||
$selected = true;
|
||||
$visible = true;
|
||||
} else if (($sec2 === $subsec2 || $allsec2 === $subsec2 || $selected_submenu2 === true) && isset($sub[$subsec2]['options']) === false) {
|
||||
} else if (($sec2 === $subsec2 || $allsec2 === $subsec2 || $selected_submenu2 === true) && isset($sub[$subsec2]['options']) === false && $main['id'] !== 'fav-menu') {
|
||||
$class .= 'submenu_selected selected';
|
||||
$selected = true;
|
||||
$menu_selected = true;
|
||||
|
@ -392,7 +398,7 @@ function menu_print_menu(&$menu)
|
|||
|
||||
$class = 'sub_subMenu';
|
||||
|
||||
if ($key == $sec2) {
|
||||
if ($key == $sec2 && $main['id'] !== 'fav-menu') {
|
||||
$class .= ' selected';
|
||||
}
|
||||
|
||||
|
|
|
@ -1025,9 +1025,29 @@ function netflow_get_command($options, $filter)
|
|||
// Build command.
|
||||
$command = io_safe_output($config['netflow_nfdump']).' -N';
|
||||
|
||||
// Netflow data path.
|
||||
if (isset($config['netflow_path']) && $config['netflow_path'] != '') {
|
||||
$command .= ' -R. -M '.$config['netflow_path'];
|
||||
if ($config['activate_sflow'] && $config['activate_netflow']) {
|
||||
if (isset($config['sflow_name_dir']) && $config['sflow_name_dir'] !== ''
|
||||
&& isset($config['netflow_name_dir']) && $config['netflow_name_dir'] !== ''
|
||||
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
|
||||
) {
|
||||
$command .= ' -R. -M '.$config['general_network_path'].$config['netflow_name_dir'].':'.$config['sflow_name_dir'];
|
||||
}
|
||||
} else {
|
||||
if ($config['activate_sflow']) {
|
||||
if (isset($config['sflow_name_dir']) && $config['sflow_name_dir'] !== ''
|
||||
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
|
||||
) {
|
||||
$command .= ' -R. -M '.$config['general_network_path'].$config['sflow_name_dir'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['activate_netflow']) {
|
||||
if (isset($config['netflow_name_dir']) && $config['netflow_name_dir'] !== ''
|
||||
&& isset($config['general_network_path']) && $config['general_network_path'] !== ''
|
||||
) {
|
||||
$command .= ' -R. -M '.$config['general_network_path'].$config['netflow_name_dir'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add options.
|
||||
|
@ -1035,7 +1055,6 @@ function netflow_get_command($options, $filter)
|
|||
|
||||
// Filter options.
|
||||
$command .= ' '.netflow_get_filter_arguments($filter);
|
||||
|
||||
return $command;
|
||||
}
|
||||
|
||||
|
|
|
@ -946,6 +946,20 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||
function widthGraph () {
|
||||
var parentWidth = $('.max-graph-tree-view').parent().width();
|
||||
$('.max-graph-tree-view').children().width(parentWidth + 5);
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'graph-counter',
|
||||
value: 1
|
||||
}).appendTo('#container');
|
||||
|
||||
|
||||
if ($('#graph-counter').val() == 1) {
|
||||
$('.max-graph-tree-view div.flot-x-axis').css('inset', '-25px').css('margin-top', '10px').css('margin-left', '10px');
|
||||
$('.max-graph-tree-view canvas.flot-base').css('height', '85px');
|
||||
$('#graph-counter').val(2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>";
|
||||
|
|
|
@ -269,6 +269,7 @@
|
|||
|
||||
$(this).change(function() {
|
||||
var id_os = this.value;
|
||||
$("select#id_os").select2("close");
|
||||
|
||||
var home_url;
|
||||
if (typeof settings == "undefined") home_url = "./";
|
||||
|
|
|
@ -1562,3 +1562,36 @@ function showManualThresholds(element) {
|
|||
$(".dashboard-input-threshold-critical").addClass("invisible_important");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {void}
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function type_change() {
|
||||
var type = document.getElementById("type").value;
|
||||
|
||||
switch (type) {
|
||||
case "3":
|
||||
$("#li_tags").hide();
|
||||
$("#li_groups").hide();
|
||||
$("#li_module_groups").hide();
|
||||
break;
|
||||
case "2":
|
||||
$("#li_tags").hide();
|
||||
$("#li_groups").hide();
|
||||
$("#li_module_groups").show();
|
||||
break;
|
||||
case "1":
|
||||
$("#li_tags").show();
|
||||
$("#li_groups").hide();
|
||||
$("#li_module_groups").hide();
|
||||
break;
|
||||
|
||||
default:
|
||||
case "0":
|
||||
$("#li_tags").hide();
|
||||
$("#li_groups").show();
|
||||
$("#li_module_groups").hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -652,10 +652,15 @@ var TreeController = {
|
|||
typeof element.icon != "undefined" &&
|
||||
element.icon.length > 0
|
||||
) {
|
||||
console.log("a");
|
||||
console.log(controller);
|
||||
$content.append(
|
||||
'<div class="node-icon"><div class="node-icon-container"><img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
"images/" +
|
||||
(treeController.meta != undefined &&
|
||||
treeController.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
element.icon +
|
||||
'" class="invert_filter"/></div></div>'
|
||||
);
|
||||
|
@ -679,7 +684,10 @@ var TreeController = {
|
|||
var $deleteBtn = $(
|
||||
'<a style="float: right; margin-top: 5px;"><img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
'images/delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
|
||||
(controller.meta != undefined && controller.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
'delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
|
||||
);
|
||||
$deleteBtn.click(function(event) {
|
||||
var ok_function = function() {
|
||||
|
@ -703,7 +711,10 @@ var TreeController = {
|
|||
var $updateicon = $(
|
||||
'<img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
'images/edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
|
||||
(controller.meta != undefined && controller.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
'edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
|
||||
);
|
||||
var $updatebtn = $(
|
||||
'<a style="float: right; margin-top: 5px;" href = "' +
|
||||
|
|
|
@ -474,7 +474,7 @@ class Manager implements PublicLogin
|
|||
"SELECT *
|
||||
FROM tdashboard
|
||||
WHERE id = %d
|
||||
AND (id_group IN (%s) AND id_user = '') OR id_user = '%s'",
|
||||
AND ((id_group IN (%s) AND id_user = '') OR id_user = '%s')",
|
||||
$this->dashboardId,
|
||||
$this->stringGroups,
|
||||
$config['id_user']
|
||||
|
@ -1047,6 +1047,7 @@ class Manager implements PublicLogin
|
|||
'hash' => self::generatePublicHash(),
|
||||
'publicLink' => $this->publicLink,
|
||||
'dashboardGroup' => $this->dashboardFields['id_group'],
|
||||
'dashboardUser' => $this->dashboardFields['id_user'],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -426,6 +426,10 @@ class Widget
|
|||
$className .= '\\'.$name;
|
||||
break;
|
||||
|
||||
case 'heatmap':
|
||||
$className .= '\HeatmapWidget';
|
||||
break;
|
||||
|
||||
default:
|
||||
$className = false;
|
||||
break;
|
||||
|
|
|
@ -269,7 +269,6 @@ class ModulesByStatus extends Widget
|
|||
'selected' => $status_selected,
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
'class' => 'overflow-hidden',
|
||||
'size' => count($status_fields),
|
||||
'select_all' => false,
|
||||
'required' => true,
|
||||
|
@ -488,6 +487,18 @@ class ModulesByStatus extends Widget
|
|||
$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',
|
||||
|
|
|
@ -0,0 +1,478 @@
|
|||
<?php
|
||||
/**
|
||||
* Widget Heatmap Pandora FMS Console
|
||||
*
|
||||
* @category Console Class
|
||||
* @package Pandora FMS
|
||||
* @subpackage Widget Heatmap
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* 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
|
||||
* 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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
namespace PandoraFMS\Dashboard;
|
||||
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/class/Heatmap.class.php';
|
||||
|
||||
use PandoraFMS\Heatmap;
|
||||
|
||||
/**
|
||||
* Heatmap Widgets.
|
||||
*/
|
||||
class HeatmapWidget extends Widget
|
||||
{
|
||||
|
||||
/**
|
||||
* Name widget.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Title widget.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* Page widget;
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $page;
|
||||
|
||||
/**
|
||||
* Class name widget.
|
||||
*
|
||||
* @var [type]
|
||||
*/
|
||||
protected $className;
|
||||
|
||||
/**
|
||||
* Values options for each widget.
|
||||
*
|
||||
* @var [type]
|
||||
*/
|
||||
protected $values;
|
||||
|
||||
/**
|
||||
* Configuration required.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $configurationRequired;
|
||||
|
||||
/**
|
||||
* Error load widget.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $loadError;
|
||||
|
||||
/**
|
||||
* Width.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $width;
|
||||
|
||||
/**
|
||||
* Heigth.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $height;
|
||||
|
||||
/**
|
||||
* Dashboard ID.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $dashboardId;
|
||||
|
||||
/**
|
||||
* Cell ID.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $cellId;
|
||||
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param integer $cellId Cell ID.
|
||||
* @param integer $dashboardId Dashboard ID.
|
||||
* @param integer $widgetId Widget ID.
|
||||
* @param integer|null $width New width.
|
||||
* @param integer|null $height New height.
|
||||
*/
|
||||
public function __construct(
|
||||
int $cellId,
|
||||
int $dashboardId=0,
|
||||
int $widgetId=0,
|
||||
?int $width=0,
|
||||
?int $height=0
|
||||
) {
|
||||
global $config;
|
||||
|
||||
// Includes.
|
||||
// WARNING: Do not edit. This chunk must be in the constructor.
|
||||
parent::__construct(
|
||||
$cellId,
|
||||
$dashboardId,
|
||||
$widgetId
|
||||
);
|
||||
|
||||
// Width.
|
||||
$this->width = $width;
|
||||
|
||||
// Height.
|
||||
$this->height = $height;
|
||||
|
||||
// Cell Id.
|
||||
$this->cellId = $cellId;
|
||||
|
||||
// Widget ID.
|
||||
$this->widgetId = $widgetId;
|
||||
|
||||
// Dashboard ID.
|
||||
$this->dashboardId = $dashboardId;
|
||||
|
||||
// Options.
|
||||
$this->values = $this->decoders($this->getOptionsWidget());
|
||||
|
||||
// Page.
|
||||
$this->page = basename(__FILE__);
|
||||
|
||||
// ClassName.
|
||||
$class = new \ReflectionClass($this);
|
||||
$this->className = $class->getShortName();
|
||||
|
||||
// Title.
|
||||
$this->title = __('Heatmap');
|
||||
|
||||
// Name.
|
||||
if (empty($this->name) === true) {
|
||||
$this->name = 'heatmap';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Decoders hack for retrocompability.
|
||||
*
|
||||
* @param array $decoder Values.
|
||||
*
|
||||
* @return array Returns the values with the correct key.
|
||||
*/
|
||||
public function decoders(array $decoder): array
|
||||
{
|
||||
$values = [];
|
||||
// Retrieve global - common inputs.
|
||||
$values = parent::decoders($decoder);
|
||||
|
||||
if (isset($decoder['search']) === true) {
|
||||
$values['search'] = $decoder['search'];
|
||||
}
|
||||
|
||||
if (isset($decoder['type']) === true) {
|
||||
$values['type'] = $decoder['type'];
|
||||
}
|
||||
|
||||
if (isset($decoder['groups']) === true) {
|
||||
$values['groups'] = $decoder['groups'];
|
||||
}
|
||||
|
||||
if (isset($decoder['tags']) === true) {
|
||||
$values['tags'] = $decoder['tags'];
|
||||
}
|
||||
|
||||
if (isset($decoder['module_groups']) === true) {
|
||||
$values['module_groups'] = $decoder['module_groups'];
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates inputs for form (specific).
|
||||
*
|
||||
* @return array Of inputs.
|
||||
*
|
||||
* @throws Exception On error.
|
||||
*/
|
||||
public function getFormInputs(): array
|
||||
{
|
||||
global $config;
|
||||
// Retrieve global - common inputs.
|
||||
$inputs = parent::getFormInputs();
|
||||
|
||||
$values = $this->values;
|
||||
|
||||
// Search.
|
||||
$inputs[] = [
|
||||
'label' => \__('Search'),
|
||||
'arguments' => [
|
||||
'name' => 'search',
|
||||
'type' => 'text',
|
||||
'class' => 'event-widget-input',
|
||||
'value' => $values['search'],
|
||||
'return' => true,
|
||||
'size' => 30,
|
||||
],
|
||||
];
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Type'),
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => [
|
||||
0 => __('Group agents'),
|
||||
1 => __('Group modules by tag'),
|
||||
2 => __('Group modules by module group'),
|
||||
3 => __('Group modules by agents'),
|
||||
],
|
||||
'name' => 'type',
|
||||
'selected' => $values['type'],
|
||||
'script' => 'type_change()',
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
// Filters.
|
||||
$inputs[] = [
|
||||
'label' => __('Groups'),
|
||||
'style' => ($values['type'] === '0') ? '' : 'display:none',
|
||||
'id' => 'li_groups',
|
||||
'arguments' => [
|
||||
'type' => 'select_groups',
|
||||
'name' => 'groups[]',
|
||||
'returnAllGroup' => true,
|
||||
'privilege' => 'AR',
|
||||
'selected' => explode(',', $values['groups'][0]),
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
],
|
||||
];
|
||||
|
||||
if (tags_has_user_acl_tags($config['id_user']) === false) {
|
||||
$tags = db_get_all_rows_sql(
|
||||
'SELECT id_tag, name FROM ttag WHERE id_tag ORDER BY name'
|
||||
);
|
||||
} else {
|
||||
$user_tags = tags_get_user_tags($config['id_user'], 'AR');
|
||||
if (empty($user_tags) === false) {
|
||||
$id_user_tags = array_keys($user_tags);
|
||||
$tags = db_get_all_rows_sql(
|
||||
'SELECT id_tag, name FROM ttag
|
||||
WHERE id_tag IN ('.implode(',', $id_user_tags).')
|
||||
ORDER BY name'
|
||||
);
|
||||
} else {
|
||||
$tags = db_get_all_rows_sql(
|
||||
'SELECT id_tag, name FROM ttag WHERE id_tag ORDER BY name'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Tag'),
|
||||
'style' => ($values['type'] === '1') ? '' : 'display:none',
|
||||
'id' => 'li_tags',
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $tags,
|
||||
'name' => 'tags[]',
|
||||
'selected' => explode(',', $values['tags'][0]),
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$module_groups_aux = db_get_all_rows_sql(
|
||||
'SELECT id_mg, name FROM tmodule_group ORDER BY name'
|
||||
);
|
||||
|
||||
$module_groups = [];
|
||||
foreach ($module_groups_aux as $key => $module_group) {
|
||||
$module_groups[$module_group['id_mg']] = $module_group['name'];
|
||||
}
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Module group'),
|
||||
'style' => ($values['type'] === '2') ? '' : 'display:none',
|
||||
'id' => 'li_module_groups',
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'fields' => $module_groups,
|
||||
'name' => 'module_groups[]',
|
||||
'selected' => explode(',', $values['module_groups'][0]),
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
'nothing' => __('Not assigned'),
|
||||
'nothing_value' => 0,
|
||||
],
|
||||
];
|
||||
|
||||
return $inputs;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Post for widget.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getPost(): array
|
||||
{
|
||||
// Retrieve global - common inputs.
|
||||
$values = parent::getPost();
|
||||
|
||||
$values['search'] = \get_parameter('search', '');
|
||||
$values['type'] = \get_parameter('type', 0);
|
||||
|
||||
switch ((int) $values['type']) {
|
||||
case 2:
|
||||
$values['module_groups'] = \get_parameter('module_groups', 0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$values['tags'] = \get_parameter('tags', 0);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
$values['groups'] = \get_parameter('groups', 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Do nothing.
|
||||
break;
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get description.
|
||||
*
|
||||
* @return string.
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return __('Heatmap');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Name.
|
||||
*
|
||||
* @return string.
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return 'heatmap';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get size Modal Configuration.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSizeModalConfiguration(): array
|
||||
{
|
||||
$size = [
|
||||
'width' => 500,
|
||||
'height' => 300,
|
||||
];
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draw widget.
|
||||
*
|
||||
* @return string;
|
||||
*/
|
||||
public function load()
|
||||
{
|
||||
global $config;
|
||||
|
||||
\ui_require_css_file('heatmap', 'include/styles/', true);
|
||||
|
||||
$values = $this->values;
|
||||
$search = (empty($values['search']) === false) ? $values['search'] : '';
|
||||
$type = (empty($values['type']) === false) ? $values['type'] : 0;
|
||||
$filter = [];
|
||||
if (isset($values['groups'])) {
|
||||
$filter = explode(',', $values['groups'][0]);
|
||||
}
|
||||
|
||||
if (isset($values['tags'])) {
|
||||
$filter = explode(',', $values['tags'][0]);
|
||||
}
|
||||
|
||||
if (isset($values['module_groups'])) {
|
||||
$filter = explode(',', $values['module_groups'][0]);
|
||||
}
|
||||
|
||||
// Control call flow.
|
||||
$heatmap = new Heatmap($type, $filter, null, 300, 400, 200, $search, 0, true);
|
||||
// AJAX controller.
|
||||
if (is_ajax() === true) {
|
||||
$method = get_parameter('method');
|
||||
|
||||
if ($method === 'drawWidget') {
|
||||
// Run.
|
||||
$heatmap->run();
|
||||
} else {
|
||||
if (method_exists($heatmap, $method) === true) {
|
||||
if ($heatmap->ajaxMethod($method) === true) {
|
||||
$heatmap->{$method}();
|
||||
} else {
|
||||
echo 'Unavailable method';
|
||||
}
|
||||
} else {
|
||||
echo 'Method not found';
|
||||
}
|
||||
|
||||
// Stop any execution.
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
// Run.
|
||||
$heatmap->run();
|
||||
|
||||
// Dialog.
|
||||
echo '<div id="config_dialog" style="padding:15px" class="invisible"></div>';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -226,7 +226,7 @@ final class DonutGraph extends Item
|
|||
'module_input' => true,
|
||||
'module_name' => 'moduleId',
|
||||
'module_none' => false,
|
||||
'get_only_string_modules' => true,
|
||||
'get_only_string_modules' => false,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -235,14 +235,13 @@ final class DonutGraph extends Item
|
|||
'label' => __('Module'),
|
||||
'arguments' => [
|
||||
'type' => 'autocomplete_module',
|
||||
'fields' => $fields,
|
||||
'name' => 'moduleId',
|
||||
'selected' => $values['moduleId'],
|
||||
'return' => true,
|
||||
'sort' => false,
|
||||
'agent_id' => $values['agentId'],
|
||||
'metaconsole_id' => $values['metaconsoleId'],
|
||||
'get_only_string_modules' => true,
|
||||
'get_only_string_modules' => false,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ div#login_f {
|
|||
|
||||
#ver_num {
|
||||
width: 100%;
|
||||
color: #dddddd;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: 350;
|
||||
font-size: 10px;
|
||||
|
|
|
@ -530,15 +530,6 @@ ul li {
|
|||
width: 35px;
|
||||
}
|
||||
|
||||
/* Menu height: 601px, 720px, 735px */
|
||||
@media screen and (max-height: 750px) {
|
||||
.menu li,
|
||||
.menu li a,
|
||||
.menu li div {
|
||||
min-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-height: 750px) {
|
||||
.operation {
|
||||
padding-top: 10px;
|
||||
|
|
|
@ -130,8 +130,8 @@
|
|||
</div>
|
||||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.769';
|
||||
$build = '230313';
|
||||
$version = '7.0NG.770';
|
||||
$build = '230327';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -230,10 +230,15 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che
|
|||
'title' => __('Standby'),
|
||||
'text' => __('Standby'),
|
||||
],
|
||||
[
|
||||
'title' => __('Operations'),
|
||||
'text' => __('Operations'),
|
||||
],
|
||||
);
|
||||
|
||||
$columns = array_merge(
|
||||
['standby'],
|
||||
['force'],
|
||||
$columns
|
||||
);
|
||||
|
||||
|
@ -270,7 +275,11 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che
|
|||
$column_names,
|
||||
['text' => 'Module'],
|
||||
['text' => 'Template'],
|
||||
['text' => 'Operation'],
|
||||
[
|
||||
'title' => __('Actions'),
|
||||
'text' => __('Actions'),
|
||||
'style' => 'min-width: 15%;',
|
||||
],
|
||||
['text' => 'Last fired'],
|
||||
['text' => 'Status']
|
||||
);
|
||||
|
@ -279,25 +288,12 @@ if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) che
|
|||
$columns,
|
||||
['agent_module_name'],
|
||||
['template_name'],
|
||||
['operation'],
|
||||
['actions'],
|
||||
['last_fired'],
|
||||
['status']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($print_agent === true) {
|
||||
array_push(
|
||||
$column_names,
|
||||
['text' => 'Agent']
|
||||
);
|
||||
|
||||
$columns = array_merge(
|
||||
$columns,
|
||||
['agent_name']
|
||||
);
|
||||
}
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) {
|
||||
array_unshift(
|
||||
|
@ -315,22 +311,6 @@ if (is_metaconsole() === false) {
|
|||
$columns
|
||||
);
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], $id_group, 'AW') === true || (bool) check_acl($config['id_user'], $id_group, 'LM') === true) {
|
||||
array_push(
|
||||
$column_names,
|
||||
[
|
||||
'title' => __('Actions'),
|
||||
'text' => __('Actions'),
|
||||
'style' => 'min-width: 15%;',
|
||||
]
|
||||
);
|
||||
|
||||
$columns = array_merge(
|
||||
$columns,
|
||||
['actions']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
|
|
|
@ -375,10 +375,12 @@ $table->data[1][0] = html_print_label_input_block(
|
|||
html_print_select($fields, 'os', $os, '', 'All', 0, true)
|
||||
);
|
||||
|
||||
$pre_fields = policies_get_policies(false, ['id', 'name']);
|
||||
$fields = [];
|
||||
foreach ($pre_fields as $value) {
|
||||
$fields[$value['id']] = $value['name'];
|
||||
if (function_exists('policies_get_policies') === true) {
|
||||
$pre_fields = policies_get_policies(false, ['id', 'name']);
|
||||
$fields = [];
|
||||
foreach ($pre_fields as $value) {
|
||||
$fields[$value['id']] = $value['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
|
|
|
@ -791,7 +791,7 @@ function print_table(
|
|||
html_print_table($table);
|
||||
|
||||
if (count($selected_interfaces) > $config['block_size']) {
|
||||
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, 'pagination-bottom');
|
||||
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, '');
|
||||
}
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No search parameters')]);
|
||||
|
|
|
@ -1481,12 +1481,13 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) {
|
|||
|
||||
|
||||
// Omnishell.
|
||||
$tasks = count_tasks_agent($id_agente);
|
||||
|
||||
if ($tasks === true) {
|
||||
$omnishellTab = enterprise_hook('omnishell_tab');
|
||||
if ($omnishellTab == -1) {
|
||||
$omnishellTab = '';
|
||||
if (function_exists('count_tasks_agent')) {
|
||||
$tasks = count_tasks_agent($id_agente);
|
||||
if ($tasks === true) {
|
||||
$omnishellTab = enterprise_hook('omnishell_tab');
|
||||
if ($omnishellTab == -1) {
|
||||
$omnishellTab = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,23 +21,35 @@ global $config;
|
|||
|
||||
require_once 'include/functions_gis.php';
|
||||
|
||||
// ui_require_javascript_file('openlayers.pandora');
|
||||
$buttons['gis_maps_list'] = [
|
||||
'active' => true,
|
||||
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
||||
'images/list.png',
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
['title' => __('GIS Maps list')]
|
||||
[
|
||||
'title' => __('GIS Maps list'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('GIS Maps'),
|
||||
'images/op_gis.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('GIS Maps'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$own_info = get_user_info($config['id_user']);
|
||||
|
|
|
@ -116,33 +116,34 @@ $controls = [
|
|||
|
||||
$layers = gis_get_layers($idMap);
|
||||
|
||||
// Render map
|
||||
// Render map.
|
||||
$has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_id'], 'MW')
|
||||
|| check_acl_restricted_all($config['id_user'], $map['group_id'], 'MM');
|
||||
|
||||
$buttons = [];
|
||||
|
||||
$buttons['gis_maps_list'] = [
|
||||
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
||||
'images/list.png',
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('GIS Maps list'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
if ($config['pure'] == 0) {
|
||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'&pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>';
|
||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'&pure=1">'.html_print_image('images/fullscreen@svg.svg', true, ['title' => __('Full screen mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
} else {
|
||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/normalscreen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']).'</a>';
|
||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/exit_fullscreen@svg.svg', true, ['title' => __('Back to normal mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
}
|
||||
|
||||
if ($has_management_acl) {
|
||||
if ($has_management_acl === true) {
|
||||
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
|
||||
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
|
||||
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
|
||||
).'" target="_blank">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public GIS map'), 'class' => 'invert_filter']).'</a>';
|
||||
).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
}
|
||||
|
||||
$times = [
|
||||
|
@ -170,17 +171,27 @@ $status = [
|
|||
$buttons[]['text'] = "<div class='mrgn_top_6px'>".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'</div>';
|
||||
|
||||
if ($has_management_acl) {
|
||||
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>';
|
||||
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
$buttons['setup']['godmode'] = 1;
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Map').' » '.__('Map').' '.$map['map_name'],
|
||||
'images/op_gis.png',
|
||||
false,
|
||||
'render_view_tab',
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('GIS Maps'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);';
|
||||
|
|
|
@ -41,6 +41,7 @@ if ($agent_a === false && $agent_w === false) {
|
|||
}
|
||||
|
||||
require_once $config['homedir'].'/include/class/Heatmap.class.php';
|
||||
use PandoraFMS\Heatmap;
|
||||
|
||||
$pure = (bool) get_parameter('pure', false);
|
||||
$type = get_parameter('type', 0);
|
||||
|
@ -61,6 +62,8 @@ if ($group_sent === true) {
|
|||
$group = (int) get_parameter('group', true);
|
||||
}
|
||||
|
||||
$dashboard = (bool) get_parameter('dashboard', false);
|
||||
|
||||
$is_ajax = is_ajax();
|
||||
if ($is_ajax === false && $pure === false) {
|
||||
$viewtab['config'] = '<a id="config" href="">'.html_print_image(
|
||||
|
@ -191,6 +194,7 @@ if ($is_ajax === false && $pure === true) {
|
|||
html_print_input_hidden('type', $type);
|
||||
html_print_input_hidden('search', $search);
|
||||
html_print_input_hidden('filter', implode(',', $filter));
|
||||
html_print_input_hidden('dashboard', $dashboard);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
@ -229,7 +233,7 @@ if ($is_ajax === false && $pure === true) {
|
|||
// Control call flow.
|
||||
try {
|
||||
// Heatmap construct.
|
||||
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group);
|
||||
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard);
|
||||
} catch (Exception $e) {
|
||||
if (is_ajax() === true) {
|
||||
echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]);
|
||||
|
|
|
@ -643,7 +643,7 @@ if (empty($table->data) === true) {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ if ($access_console_node === true) {
|
|||
$sub['operation/inventory/inventory']['refr'] = 0;
|
||||
}
|
||||
|
||||
if ($config['activate_netflow']) {
|
||||
if ($config['activate_netflow'] || $config['activate_sflow']) {
|
||||
$sub['network_traffic'] = [
|
||||
'text' => __('Network'),
|
||||
'id' => 'Network',
|
||||
|
@ -213,34 +213,20 @@ if ($access_console_node === true) {
|
|||
'subtype' => 'nolink',
|
||||
'refr' => 0,
|
||||
];
|
||||
|
||||
// Initialize the submenu.
|
||||
$netflow_sub = [];
|
||||
|
||||
$netflow_sub = array_merge(
|
||||
$netflow_sub,
|
||||
[
|
||||
'operation/netflow/netflow_explorer' => [
|
||||
'text' => __('Netflow explorer'),
|
||||
'id' => 'Netflow explorer',
|
||||
],
|
||||
'operation/netflow/nf_live_view' => [
|
||||
'text' => __('Netflow Live View'),
|
||||
'id' => 'Netflow Live View',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$netflow_sub = array_merge(
|
||||
$netflow_sub,
|
||||
[
|
||||
'operation/network/network_usage_map' => [
|
||||
'text' => __('Network usage map'),
|
||||
'id' => 'Network usage map',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$netflow_sub = [
|
||||
'operation/netflow/netflow_explorer' => [
|
||||
'text' => __('Netflow explorer'),
|
||||
'id' => 'Netflow explorer',
|
||||
],
|
||||
'operation/netflow/nf_live_view' => [
|
||||
'text' => __('Netflow Live View'),
|
||||
'id' => 'Netflow Live View',
|
||||
],
|
||||
'operation/network/network_usage_map' => [
|
||||
'text' => __('Network usage map'),
|
||||
'id' => 'Network usage map',
|
||||
],
|
||||
];
|
||||
$sub['network_traffic']['sub2'] = $netflow_sub;
|
||||
}
|
||||
|
||||
|
@ -411,7 +397,7 @@ if ($access_console_node === true) {
|
|||
// INI GIS Maps.
|
||||
if ($config['activate_gis']) {
|
||||
$sub['gismaps']['text'] = __('GIS Maps');
|
||||
$sub['gismaps']['id'] = 'GIS Maps';
|
||||
$sub['gismaps']['id'] = 'GIS_Maps';
|
||||
$sub['gismaps']['type'] = 'direct';
|
||||
$sub['gismaps']['subtype'] = 'nolink';
|
||||
$sub2 = [];
|
||||
|
@ -632,7 +618,7 @@ if ($favorite_menu !== false) {
|
|||
$sub[$section]['text'] = __(str_replace('_', ' ', $section));
|
||||
$sub[$section]['type'] = 'direct';
|
||||
$sub[$section]['subtype'] = 'nolink';
|
||||
$sub[$section]['id'] = $row['section'];
|
||||
$sub[$section]['id'] = $row['section'].'-fav-menu';
|
||||
|
||||
$sub2[$row['url']]['text'] = io_safe_output($row['label']);
|
||||
$sub[$section]['sub2'] = $sub2;
|
||||
|
|
|
@ -62,7 +62,13 @@ require_once 'include/functions_visual_map.php';
|
|||
|
||||
$hash = (string) get_parameter('hash');
|
||||
$visualConsoleId = (int) get_parameter('id_layout');
|
||||
$config['id_user'] = (string) get_parameter('id_user');
|
||||
$userAccessMaintenance = null;
|
||||
if (empty($config['id_user']) === true) {
|
||||
$config['id_user'] = (string) get_parameter('id_user');
|
||||
} else {
|
||||
$userAccessMaintenance = $config['id_user'];
|
||||
}
|
||||
|
||||
$refr = (int) get_parameter('refr', ($config['refr'] ?? null));
|
||||
|
||||
if (!isset($config['pure'])) {
|
||||
|
@ -179,6 +185,7 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||
|
||||
<script type="text/javascript">
|
||||
var container = document.getElementById("visual-console-container");
|
||||
var user = "<?php echo $userAccessMaintenance; ?>";
|
||||
var props = <?php echo (string) $visualConsole; ?>;
|
||||
var items = <?php echo '['.implode(',', $visualConsoleItems).']'; ?>;
|
||||
var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>";
|
||||
|
@ -282,7 +289,9 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||
);
|
||||
|
||||
if(props.maintenanceMode != null) {
|
||||
visualConsoleManager.visualConsole.enableMaintenanceMode();
|
||||
if(props.maintenanceMode.user !== user) {
|
||||
visualConsoleManager.visualConsole.enableMaintenanceMode();
|
||||
}
|
||||
}
|
||||
|
||||
var controls = document.getElementById('vc-controls');
|
||||
|
|
|
@ -118,8 +118,12 @@ if ($aclRead === false && $aclWrite === false && $aclManage === false) {
|
|||
|
||||
// Render map.
|
||||
$options = [];
|
||||
$baseUrlList = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
|
||||
if (is_metaconsole() === true) {
|
||||
$baseUrlList = 'index.php?sec=screen&sec2=screens/screens&action=visualmap';
|
||||
}
|
||||
|
||||
$options['consoles_list']['text'] = '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">'.html_print_image(
|
||||
$options['consoles_list']['text'] = '<a href="'.$baseUrlList.'">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
|
@ -142,11 +146,17 @@ if ($aclWrite === true || $aclManage === true) {
|
|||
);
|
||||
|
||||
$baseUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='.$action;
|
||||
if (is_metaconsole() === true) {
|
||||
$baseUrl = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&action2='.$action;
|
||||
}
|
||||
|
||||
$hash = md5($config['dbpass'].$visualConsoleId.$config['id_user']);
|
||||
|
||||
$options['public_link']['text'] = '<a href="'.ui_get_full_url(
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$visualConsoleId.'&refr='.$refr.'&id_user='.$config['id_user']
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$visualConsoleId.'&refr='.$refr.'&id_user='.$config['id_user'],
|
||||
false,
|
||||
false,
|
||||
false
|
||||
).'" target="_blank">'.html_print_image(
|
||||
'images/item-icon.svg',
|
||||
true,
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230323
|
||||
%define version 7.0NG.770
|
||||
%define release 1
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230323
|
||||
%define version 7.0NG.770
|
||||
%define release 1
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Pandora FMS Console
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.769
|
||||
%define release 230323
|
||||
%define version 7.0NG.770
|
||||
%define release 1
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.769"
|
||||
PI_VERSION="7.0NG.770"
|
||||
FORCE=0
|
||||
DESTDIR=""
|
||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||
|
|
|
@ -72,6 +72,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('stats_interval', '60'),
|
||||
('activate_gis', '0'),
|
||||
('activate_netflow', '0'),
|
||||
('activate_sflow', '0'),
|
||||
('timezone', 'Europe/Berlin'),
|
||||
('string_purge', 7),
|
||||
('audit_purge', 15),
|
||||
|
@ -87,6 +88,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('netflow_daemon', '/usr/bin/nfcapd'),
|
||||
('netflow_nfdump', '/usr/bin/nfdump'),
|
||||
('netflow_max_resolution', '50'),
|
||||
('sflow_interval', '3600'),
|
||||
('sflow_daemon', '/usr/bin/sfcapd'),
|
||||
('sflow_nfdump', '/usr/bin/nfdump'),
|
||||
('sflow_max_resolution', '50'),
|
||||
('event_fields', 'mini_severity,evento,estado,agent_name,timestamp'),
|
||||
('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,last_status_change,graph,warn,data,timestamp'),
|
||||
('list_ACL_IPs_for_API', '127.0.0.1'),
|
||||
|
|
|
@ -260,7 +260,7 @@ if (isset($config['public_dashboard']) === true
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) {
|
||||
if ($dashboardUser !== $config['id_user'] && check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) {
|
||||
$buttons = [
|
||||
'back_to_dashboard_list' => $back_to_dashboard_list,
|
||||
'fullscreen' => $fullscreen,
|
||||
|
|
|
@ -212,7 +212,7 @@ if (empty($dashboards) === true) {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.769-230323
|
||||
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-230323"
|
||||
pandora_version="7.0NG.770"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue