Merge remote-tracking branch 'origin/develop' into ent-3578-ACL-visual-consol-not-working-properly

Former-commit-id: 506c3611ff578c95f07753113d1bc46d80069c95
This commit is contained in:
Luis Calvo 2019-03-08 12:04:57 +01:00
commit 5d33d7468e
162 changed files with 3847 additions and 3174 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas # (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.731 # Version 7.0NG.732
# This program is Free Software, you can redistribute it and/or modify it # This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software # under the terms of the GNU General Public Licence as published by the Free Software

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.731-190226 Version: 7.0NG.732-190307
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads # Semaphore used to control the number of threads
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.731'; use constant AGENT_VERSION => '7.0NG.732';
use constant AGENT_BUILD => '190226'; use constant AGENT_BUILD => '190307';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent #Pandora FMS Linux Agent
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.731 %define version 7.0NG.732
%define release 190226 %define release 190307
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent #Pandora FMS Linux Agent
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.731 %define version 7.0NG.732
%define release 190226 %define release 190307
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas # (c) 2006-2017 Artica Soluciones Tecnologicas
# Version 7.0NG.731 # Version 7.0NG.732
# This program is Free Software, you can redistribute it and/or modify it # This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software # under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes} {Yes}
AppName AppName
{Pandora FMS Windows Agent v7.0NG.731} {Pandora FMS Windows Agent v7.0NG.732}
ApplicationID ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F} {17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190226} {190307}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.731(Build 190226)") #define PANDORA_VERSION ("7.0NG.732(Build 190307)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.731(Build 190226))" VALUE "ProductVersion", "(7.0NG.732(Build 190307))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.731-190226 Version: 7.0NG.732-190307
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -1199,13 +1199,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 24); INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 25);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '731'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '732');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
@ -1900,14 +1900,16 @@ CREATE TABLE IF NOT EXISTS `tevent_extended` (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `tgis_map_layer_groups` -- Table `tgis_map_layer_groups`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tgis_map_layer_groups` ( CREATE TABLE `tgis_map_layer_groups` (
`layer_id` INT NOT NULL, `layer_id` int(11) NOT NULL,
`group_id` MEDIUMINT(4) UNSIGNED NOT NULL, `group_id` mediumint(4) unsigned NOT NULL,
`agent_id` INT(10) UNSIGNED NOT NULL COMMENT 'Used to link the position to the group', `agent_id` int(10) unsigned NOT NULL COMMENT 'Used to link the position to the group',
PRIMARY KEY (`layer_id`,`group_id`), PRIMARY KEY (`layer_id`,`group_id`),
FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE, KEY `group_id` (`group_id`),
FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE, KEY `agent_id` (`agent_id`),
FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE CONSTRAINT `tgis_map_layer_groups_ibfk_1` FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE,
CONSTRAINT `tgis_map_layer_groups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
CONSTRAINT `tgis_map_layer_groups_ibfk_3` FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- -----------------------------------------------------

View File

@ -1,16 +1,19 @@
<?php <?php
// Pandora FMS - http://pandorafms.com /**
// ================================================== * Pandora FMS - http://pandorafms.com
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas * ==================================================
// Please see http://pandorafms.org for full contribution list * Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// This program is free software; you can redistribute it and/or * Please see http://pandorafms.org for full contribution list
// modify it under the terms of the GNU General Public License * This program is free software; you can redistribute it and/or
// as published by the Free Software Foundation; version 2 * modify it under the terms of the GNU General Public License
// This program is distributed in the hope that it will be useful, * as published by the Free Software Foundation; version 2
// but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
if (isset($_SERVER['REQUEST_TIME'])) { if (isset($_SERVER['REQUEST_TIME'])) {
$time = $_SERVER['REQUEST_TIME']; $time = $_SERVER['REQUEST_TIME'];
} else { } else {
@ -26,7 +29,7 @@ if (!$config['MR']) {
$config['MR'] = 0; $config['MR'] = 0;
} }
echo '<a class="white_bold footer" target="_blank" href="'.$config['homeurl'].$license_file.'">'; echo '<a class="footer" target="_blank" href="'.$config['homeurl'].$license_file.'">';
require_once $config['homedir'].'/include/functions_update_manager.php'; require_once $config['homedir'].'/include/functions_update_manager.php';
@ -40,9 +43,9 @@ if ($current_package == 0) {
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR'])); echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
echo '</a><br />'; echo '</a> ';
echo '<a class="white footer">'.__('Page generated at').' '.date($config['date_format']); echo '<a class="footer">'.__('Page generated at').' '.date($config['date_format']);
echo '</a><br /><span style="color:#eff">&reg; '.get_copyright_notice().'</span>'; echo '</a><br /><span>&reg; '.get_copyright_notice().'</span>';
if (isset($config['debug'])) { if (isset($config['debug'])) {
$cache_info = []; $cache_info = [];

View File

@ -1,7 +1,7 @@
<?php <?php
// Pandora FMS - http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
@ -19,52 +19,43 @@ require_once 'include/functions_notifications.php';
config_check(); config_check();
?> ?>
<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; margin-top: 0px; height: 100%" border="0">
<tr>
<td style="width:90%;">
<a href="index.php?sec=main">
<?php
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
if (!defined('PANDORA_ENTERPRISE')) { <div id="header_table">
$logo_title = get_product_name().' Opensource'; <div id="header_table_inner">
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png'; <?php
// ======= Notifications Discovery ===============================================
$notifications_numbers = notifications_get_counters();
$header_discovery = '<div id="header_discovery">'.notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
).'</div>';
// ======= Alerts ===============================================
$check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, 'PM');
$check_minor_release_available = db_check_minor_relase_available();
if ($check_minor_release_available) {
if (users_is_admin($config['id_user'])) {
if ($config['language'] == 'es') {
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
} else { } else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) { set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available');
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo; }
}
} }
$logo_title = get_product_name().' Enterprise';
}
echo html_print_image( // Chat messages
$custom_logo, $header_chat = "<div id='header_chat'><span id='icon_new_messages_chat' style='display: none;'>";
true, $header_chat .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>";
[ $header_chat .= html_print_image('images/header_chat_gray.png', true, ['title' => __('New chat message')]);
'alt' => $logo_title, $header_chat .= '</a></span></div>';
'border' => '0',
]
);
?>
</a>
</td>
<td style="min-width:200px;">
<?php
$table = new stdClass();
$table->id = 'header_table';
$table->class = 'none';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = [];
$table->data = [];
$table->style['clippy'] = $table->style[1] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = $table->style['notifications'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
$table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;';
$table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
$table->width = '100%';
$table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = '';
// Search
$acl_head_search = true; $acl_head_search = true;
if ($config['acl_enterprise'] == 1 && !users_is_admin()) { if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
$acl_head_search = db_get_sql( $acl_head_search = db_get_sql(
@ -76,8 +67,6 @@ config_check();
} }
if ($acl_head_search) { if ($acl_head_search) {
$table->data[0][11] = ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
// Search bar // Search bar
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">'; $search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) { if (!isset($config['search_keywords'])) {
@ -107,52 +96,10 @@ config_check();
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />"; $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>'; $search_bar .= '</form>';
$table->data[0]['searchbar'] = $search_bar; $header_searchbar = '<div id="header_searchbar">'.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
$header_searchbar .= $search_bar.'</div>';
} }
if ($config['show_qr_code_header'] == 0) {
$show_qr_code_header = 'display: none;';
} else {
$show_qr_code_header = 'display: inline;';
}
$table->data[0]['qr'] = '<div style="'.$show_qr_code_header.'" id="qr_code_container" style="">'.'<a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon.png',
true,
[
'alt' => __('QR Code of the page'),
'title' => __('QR Code of the page'),
]
).'</a>'.'</div>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
echo "<div id='qrcode_container_image'></div>";
echo '</div>';
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
$table->data[0]['clippy'] = '<a href="javascript: show_clippy();">'.html_print_image(
'images/clippy_icon.png',
true,
[
'id' => 'clippy',
'class' => 'clippy',
'alt' => __('%s assistant', get_product_name()),
'title' => __(
'%s assistant',
get_product_name()
),
]
).'</a>';
}
// ======= Autorefresh code ============================= // ======= Autorefresh code =============================
$autorefresh_txt = ''; $autorefresh_txt = '';
@ -183,7 +130,7 @@ config_check();
} }
if ($do_refresh) { if ($do_refresh) {
$autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_gray.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
if ($_GET['refr']) { if ($_GET['refr']) {
$autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)'; $autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
@ -199,101 +146,97 @@ config_check();
$autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">'; $autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">';
if ($_GET['refr']) { if ($_GET['refr']) {
$autorefresh_link_open_txt = '<a class="white autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">'; $autorefresh_link_open_txt = '<a class="autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">';
} else { } else {
$autorefresh_link_open_txt = '<a>'; $autorefresh_link_open_txt = '<a>';
} }
$autorefresh_link_close = '</a>'; $autorefresh_link_close = '</a>';
$display_counter = 'display:block';
} else { } else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_disabled_gray.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false; $ignored_params['refr'] = false;
$autorefresh_link_open_img = ''; $autorefresh_link_open_img = '';
$autorefresh_link_open_txt = ''; $autorefresh_link_open_txt = '';
$autorefresh_link_close = ''; $autorefresh_link_close = '';
$display_counter = 'display:none';
} }
} else { } else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_disabled_gray.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false; $ignored_params['refr'] = false;
$autorefresh_link_open_img = ''; $autorefresh_link_open_img = '';
$autorefresh_link_open_txt = ''; $autorefresh_link_open_txt = '';
$autorefresh_link_close = ''; $autorefresh_link_close = '';
$display_counter = 'display:none';
} }
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close; $header_autorefresh = '<div id="header_autorefresh">'.$autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close.'</div>';
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional; $header_autorefresh_counter = '<div id="header_autorefresh_counter" style="'.$display_counter.'">'.$autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional.'</div>';
// ======================================================
$pandora_management = check_acl($config['id_user'], 0, 'PM');
// Main help icon
if (!$config['disable_help']) { // qr
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image( if ($config['show_qr_code_header'] == 0) {
'images/header_help.png', $show_qr_code_header = 'display: none;';
} else {
$show_qr_code_header = 'display: inline;';
}
$header_qr = '<div id="header_qr" style="'.$show_qr_code_header.'"><div id="qr_code_container"><a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon_gray.png',
true, true,
[ [
'title' => __('Main help'), 'alt' => __('QR Code of the page'),
'id' => 'helpmodal', 'title' => __('QR Code of the page'),
'class' => 'modalpopup',
] ]
).'</a>'; ).'</a></div></div>';
}
$notifications_numbers = notifications_get_counters();
$table->data[0]['notifications'] = notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
);
// Logout
$table->data[0][5] = '<a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';
$table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$table->data[0][5] .= '</a>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
echo "<div id='qrcode_container_image'></div>";
echo '</div>';
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
// User // User
if (is_user_admin($config['id_user']) == 1) { if (is_user_admin($config['id_user']) == 1) {
$table->data[0][6] = html_print_image('images/header_user_admin.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']); $header_user = html_print_image('images/header_user_admin_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} else { } else {
$table->data[0][6] = html_print_image('images/header_user.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']); $header_user = html_print_image('images/header_user_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} }
$table->data[0][6] = '<a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$table->data[0][6].'</a>'; $header_user = '<div id="header_user"><a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$header_user.'<span> ('.$config['id_user'].')</span></a></div>';
$table->data[0][7] = '<a href="index.php?sec=workspace&amp;sec2=operation/users/user_edit" class="white_bold"> ('.$config['id_user'].')</a>'; // Logout
$header_logout = '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';
$header_logout .= html_print_image('images/header_logout_gray.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$header_logout .= '</a></div>';
// Chat messages echo '<div class="header_left">'.$header_autorefresh, $header_autorefresh_counter, $header_qr, $header_chat.'</div>
$table->data[0][8] = "<span id='icon_new_messages_chat' style='display: none;'>"; <div class="header_center">'.$header_searchbar, $header_discovery.'</div>
$table->data[0][8] .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>"; <div class="header_right">'.$header_user, $header_logout.'</div>';
$table->data[0][8] .= html_print_image('images/header_chat.png', true, ['title' => __('New chat message')]);
$table->data[0][8] .= '</a>';
$table->data[0][8] .= '</span>';
html_print_table($table);
unset($table);
?> ?>
</td> </div> <!-- Closes #table_header_inner -->
<!-- </div> <!-- Closes #table_header -->
<td style="text-align:center">
<?php
echo "<a href='index.php?sec=main'>";
if (isset($config['custom_logo'])) {
echo html_print_image('images/custom_logo/'.$config['custom_logo'], true, ['height' => '60', 'width' => '139', 'alt' => 'Logo']);
}
echo '</a>';
?>
</td>
-->
</tr>
</table>
<!-- Notifications content wrapper--> <!-- Notifications content wrapper-->
<div id='notification-content' style='display:none;' /></div> <div id='notification-content' style='display:none;' /></div>
<!-- Old style div wrapper -->
<div id="alert_messages" style="display: none"></div>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
@ -538,7 +481,6 @@ config_check();
?> ?>
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
<?php <?php
if ($select[0]['time_autorefresh']) { if ($select[0]['time_autorefresh']) {
@ -580,6 +522,7 @@ config_check();
<?php <?php
if ($_GET['refr']) { if ($_GET['refr']) {
?> ?>
$("#header_autorefresh").css('padding-right', '5px');
var refr_time = <?php echo (int) get_parameter('refr', 0); ?>; var refr_time = <?php echo (int) get_parameter('refr', 0); ?>;
var t = new Date(); var t = new Date();
t.setTime (t.getTime () + t.setTime (t.getTime () +
@ -600,7 +543,6 @@ config_check();
$("a.autorefresh").click (function () { $("a.autorefresh").click (function () {
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
$("select#ref").change (function () { $("select#ref").change (function () {
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
$(document).attr ("location", href + this.value); $(document).attr ("location", href + this.value);

View File

@ -80,7 +80,7 @@ if (!empty($all_data)) {
$data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1); $data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1);
} }
?> ?>
<table border="0" width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="25%" style="padding-right: 20px;" valign="top"> <td width="25%" style="padding-right: 20px;" valign="top">

View File

@ -16,16 +16,80 @@ if (! isset($config['id_user'])) {
exit(); exit();
} }
?>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
var menuType_value = localStorage.getItem("menuType");
if (menuType_value == 'classic') {
$('#menu_full').removeClass('menu_full_collapsed').addClass('menu_full_classic');
$('.logo_icon').css('display','none');
$('.logo_full').css('display','block');
$('div#title_menu').removeClass('title_menu_collapsed').addClass('title_menu_classic');
$('div#page').removeClass('page_collapsed').addClass('page_classic');
$('#header_table').removeClass('header_table_collapsed').addClass('header_table_classic');
$('#button_collapse').removeClass('button_collapsed').addClass('button_classic');
$('ul.submenu').css('left', '214px');
$('li.menu_icon').removeClass('menu_icon_collapsed').addClass("no_hidden_menu");
}
else{
if(menuType_value != 'collapsed'){
localStorage.setItem("menuType", "collapsed");
}
$('#menu_full').removeClass('menu_full_classic').addClass('menu_full_collapsed');
$('.logo_full').css('display','none');
$('.logo_icon').css('display','block');
$('div#title_menu').removeClass('title_menu_classic').addClass('title_menu_collapsed');
$('div#page').removeClass('page_classic').addClass('page_collapsed');
$('#header_table').removeClass('header_table_classic').addClass('header_table_collapsed');
$('#button_collapse').removeClass('button_classic').addClass('button_collapsed');
$('ul.submenu').css('left', '59px');
$('li.menu_icon').removeClass("no_hidden_menu").addClass('menu_icon_collapsed');
}
});
// Set the height of the menu.
$(window).on('load', function (){
$("#menu_full").height($("#container").height());
});
</script>
<?php
$autohidden_menu = 0; $autohidden_menu = 0;
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) { if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
$autohidden_menu = 1; $autohidden_menu = 1;
} }
$menu_container_id = '';
// Menu container prepared to autohide menu // Menu container prepared to autohide menu
echo '<div id="'.$menu_container_id.'">'; echo '<div id="menu_full">';
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (!defined('PANDORA_ENTERPRISE')) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_green.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo'])) {
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']);
}
if (isset($config['custom_logo_collapsed'])) {
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']);
}
echo '</a></div>';
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>'; // echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
require 'operation/menu.php'; require 'operation/menu.php';
@ -45,16 +109,14 @@ if (check_acl($config['id_user'], 0, 'AW')
require 'godmode/menu.php'; require 'godmode/menu.php';
echo '<div id="button_collapse" class="button_collapse"></div>';
// require ("links_menu.php"); // require ("links_menu.php");
echo '</div>'; echo '</div>';
// menu_container // menu_container
ui_require_jquery_file('cookie'); ui_require_jquery_file('cookie');
$config_fixed_menu = false;
if (isset($config['fixed_menu'])) {
$config_fixed_menu = $config['fixed_menu'];
}
$config_fixed_header = false; $config_fixed_header = false;
if (isset($config['fixed_header'])) { if (isset($config['fixed_header'])) {
$config_fixed_header = $config['fixed_header']; $config_fixed_header = $config['fixed_header'];
@ -64,25 +126,35 @@ if (isset($config['fixed_header'])) {
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$('#button_collapse').on('click', function() {
if($('#menu_full').hasClass('menu_full_classic')){
localStorage.setItem("menuType", "collapsed");
$('ul.submenu').css('left', '59px');
}
else if($('#menu_full').hasClass('menu_full_collapsed')){
localStorage.setItem("menuType", "classic");
$('ul.submenu').css('left', '214px');
}
$('.logo_full').toggle();
$('.logo_icon').toggle();
$('#menu_full').toggleClass('menu_full_classic menu_full_collapsed');
$('#button_collapse').toggleClass('button_classic button_collapsed');
$('div#title_menu').toggleClass('title_menu_classic title_menu_collapsed');
$('div#page').toggleClass('page_classic page_collapsed');
$('#header_table').toggleClass('header_table_classic header_table_collapsed');
$('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed");
});
var autohidden_menu = <?php echo $autohidden_menu; ?>; var autohidden_menu = <?php echo $autohidden_menu; ?>;
var fixed_menu = <?php echo json_encode((bool) $config_fixed_menu); ?>;
var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>; var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
var id_user = "<?php echo $config['id_user']; ?>"; var id_user = "<?php echo $config['id_user']; ?>";
var cookie_name = id_user + '-pandora_menu_state'; var cookie_name = id_user + '-pandora_menu_state';
var cookie_name_encoded = btoa(cookie_name); var cookie_name_encoded = btoa(cookie_name);
var click_display = "<?php echo $config['click_display']; ?>"; var click_display = "<?php echo $config['click_display']; ?>";
var classic_menu = parseInt("<?php echo $config['classic_menu']; ?>");
if ((isNaN(classic_menu)) || (classic_menu == 0)) {
classic_menu = false;
}
else {
classic_menu = true;
}
if (classic_menu) {
autohidden_menu = 1;
}
var menuState = $.cookie(cookie_name_encoded); var menuState = $.cookie(cookie_name_encoded);
if (!menuState) { if (!menuState) {
@ -109,236 +181,7 @@ function close_submenus () {
$('div.menu>ul>li.selected>ul').addClass('invisible'); $('div.menu>ul>li.selected>ul').addClass('invisible');
} }
$(document).ready( function() {
//Daniel maya 02/06/2016 Fixed menu position--INI
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
}else{
$('div#menu')
.css('z-index', '9000')
}
if (fixed_header) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
$('#menu_tab_frame_view').css('margin-top','20px')
}
//Daniel maya 02/06/2016 Fixed menu position--END
/*
$("img.toggle").click (function (e) {
//In case the links gets activated, we don't want to follow link
e.preventDefault();
var menuItem = $(this).parent();
var submenu = menuItem.children("ul");
if (submenu.is(":visible")) {
submenu.slideUp();
if (typeof menuState[menuItem.attr('id')] != 'undefined')
delete menuState[menuItem.attr('id')];
}
else {
submenu.slideDown();
menuState[menuItem.attr('id')] = 1;
}
$.cookie(cookie_name_encoded, JSON.stringify(menuState), {expires: 7});
});
//Cerrar aqui los comentarios cuando esté el menu terminado
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('left', '0')
.css('top', $('div#head').innerHeight() + 'px')
.css('height', '100%')
.css('overflow', 'hidden')
.hover(function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'auto').children('div').css('width', 'auto');
}
}, function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'hidden').children('div').css('width', '100%');
}
})
.children('div')
.css('margin-bottom', $('div#head').innerHeight() + 'px');
if (!fixed_header) {
$(window).scroll(function () {
if ($(this).scrollTop() <= $('div#head').innerHeight()) {
$('div#menu').css('top', $('div#head').innerHeight() - $(this).scrollTop() + 'px' );
} else {
$('div#menu').css('top', '0');
}
});
}
}
function show_menu () {
$('#menu_container').animate({"left": "+=80px"}, 200, function () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'auto');
}
});
//show_menu_pretty();
}
function show_menu_pretty() {
open_submenus();
$('div.menu ul li').css('background-position', '');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').show();
$('.titop').css('color', 'white');
$('.bg3').css('color', 'white');
$('.bg4').css('color', 'white');
}
function hide_menu () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'hidden');
}
$('#menu_container').animate({"left": "-=80px"}, 100);
//hide_menu_pretty();
}
function hide_menu_pretty() {
close_submenus();
$('div.menu li').css('background-position', '85px 5px');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').hide();
$('.titop').css('color', $('.titop').css('background-color'));
$('.bg3').css('color', $('.bg3').css('background-color'));
$('.bg4').css('color', $('.bg4').css('background-color'));
}
*/
if (autohidden_menu) {
//handlerIn, handlerOut);
//openTime = 0;
//handsIn = 0;
//$('#main').css('margin-left', '50px');
//hide_menu_pretty();
/*
$('#menu').hover(function() {
handsIn = 1;
if (openTime == 0) {
show_menu();
openTime = new Date().getTime();
}
}).mouseleave(function() {
handsIn = 0;
setTimeout(function() {
openedTime = new Date().getTime() - openTime;
if(openedTime > 3000 && handsIn == 0) {
hide_menu();
openTime = 0;
}
}, 3500);
});
*/
handsInMenu = 0;
openTimeMenu = 0;
if (classic_menu) {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('div#menu').css('top', '80px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
$('#menu').mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}
}, 2500);
});
}
else {
if(!click_display){
$('#menu').mouseenter(function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 2500);
});
}else{
$(document).ready(function() {
$('#menu').on("click", function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 5500);
});
});
}
}
}
else {
$('div#title_menu').hide();
if(!click_display){
$('#menu').mouseenter(function() {
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('ul.submenu').css('left', '44px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
}
}, 2500);
});
}
}
});
/* ]]> */ /* ]]> */
</script> </script>
@ -348,12 +191,90 @@ $(document).ready( function() {
handsIn = 0; handsIn = 0;
handsIn2 = 0; handsIn2 = 0;
/**
* Positionate the submenu elements. Add a negative top.
*
* @param int index It is the position of li.menu_icon in the ul.
* @param string id_submenu It is the id of first level submenu.
* @param string id_submenu2 It is the id of second level submenu.
* @param int item_height It is the height of a menu item (28 o 35).
*
* @return (int) The position (in px).
*/
function menu_calculate_top(index, id_submenu, id_submenu2, item_height){
var level1 = index;
var level2 = $('#'+id_submenu+' ul.submenu > li').length;
var level3 = $('#'+id_submenu2+' > li.sub_subMenu').length;
var item_height = item_height;
level2--;
if (id_submenu2 !== false) {
// If level3 is set, the position is calculated like box is in the center.
// wiouth considering level2 box can be moved.
level3--;
total = (level1 + level3);
comp = level3;
} else {
total = (level1 + level2);
comp = level2;
}
// Positionate in the middle
if (total > 12 && ((total < 18) || ((level1 - comp) <= 4))) {
return - ( Math.floor(comp / 2) * item_height);
}
// Positionate in the bottom
if (total >= 18) {
return (- comp * item_height);
}
// return 0 by default
return 0;
}
/**
* Get the menu items to be positioned.
*
* @param string item It is the selector of the current element.
*
* @return Add the top position in a inline style.
*/
function get_menu_items(item){
var item_height = parseInt(item.css('min-height'));
var id_submenu = item.attr('id');
var id_submenu2 = false;
var index = item.index();
if(item.parent().hasClass('godmode')){
index = index+6; // This is because the menu has divided in two parts.
}
var top_submenu = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
top_submenu = top_submenu+'px';
$('#'+id_submenu+' ul.submenu').css('top', top_submenu);
$('.has_submenu').mouseenter(function() {
id_submenu2 = item.attr('id');
id_submenu2 = $('#'+id_submenu2+' ul.submenu2').attr('id');
var top_submenu2 = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
top_submenu2 = top_submenu2+'px';
$('#'+id_submenu2).css('top', top_submenu2);
});
}
/*
* Show and hide submenus
*/
if(!click_display){ if(!click_display){
$('.menu_icon').mouseenter(function() { $('.menu_icon').mouseenter(function() {
table_hover = $(this); table_hover = $(this);
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
if( typeof(table_noHover) != 'undefined') if( typeof(table_noHover) != 'undefined')
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
$("ul#sub"+table_noHover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
@ -364,7 +285,7 @@ $(document).ready( function() {
opened = new Date().getTime() - openTime; opened = new Date().getTime() - openTime;
if(opened > 3000 && handsIn == 0) { if(opened > 3000 && handsIn == 0) {
openTime = 4000; openTime = 4000;
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
} }
}, 2500); }, 2500);
}); });
@ -379,6 +300,7 @@ $(document).ready( function() {
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
}).mouseleave(function() { }).mouseleave(function() {
table_noHover = $(this); table_noHover = $(this);
handsIn = 0; handsIn = 0;
@ -386,7 +308,7 @@ $(document).ready( function() {
opened = new Date().getTime() - openTime; opened = new Date().getTime() - openTime;
if(opened > 5000 && handsIn == 0) { if(opened > 5000 && handsIn == 0) {
openTime = 6000; openTime = 6000;
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
} }
}, 5500); }, 5500);
}); });
@ -399,12 +321,13 @@ $(document).ready( function() {
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
}); });
} }
}); });
} }
- $('.has_submenu').mouseenter(function() { $('.has_submenu').mouseenter(function() {
table_hover2 = $(this); table_hover2 = $(this);
handsIn2 = 1; handsIn2 = 1;
openTime2 = new Date().getTime(); openTime2 = new Date().getTime();
@ -425,8 +348,7 @@ $(document).ready( function() {
}); });
$(document).ready(function() { $(document).ready(function() {
if (!classic_menu) {
//Daniel maya 02/06/2016 Display menu with click --INI
if(!click_display){ if(!click_display){
$('#container').click(function() { $('#container').click(function() {
openTime = 4000; openTime = 4000;
@ -434,10 +356,6 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
}else{ }else{
$('#main').click(function() { $('#main').click(function() {
@ -446,46 +364,16 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
} }
//Daniel maya 02/06/2016 Display menu with click --END
}
else {
if(!click_display){
$('#container').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '145px');
$('ul.submenu').css('left', '144px');
});
}else{
$('#main').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '145px');
$('ul.submenu').css('left', '144px');
});
}
}
if (classic_menu) {
$('div.menu>ul>li>ul>li>a').click(function() { $('div.menu>ul>li>ul>li>a').click(function() {
openTime = 4000; openTime = 4000;
if( typeof(table_hover) != 'undefined') if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('ul.submenu').css('left', '144px');
}); });
$('div.menu>ul>li>ul>li>ul>li>a').click(function() { $('div.menu>ul>li>ul>li>ul>li>a').click(function() {
@ -494,36 +382,8 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('ul.submenu').css('left', '144px');
});
}
else {
$('div.menu>ul>li>ul>li>a').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
$('div.menu>ul>li>ul>li>ul>li>a').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
}
});
</script> </script>

View File

@ -0,0 +1,113 @@
<html>
<head>
<style>
#alert_messages_na{
-moz-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
position:fixed;
width:700px;
background:white;
left:50%;
top:20%;
margin-left:-350px;
}
.modalheade{
text-align:center;
width:100%;
height:37px;
left:0px;
background-color:#82b92e;
}
.modalheadertex{
color:white;
position:relative;
font-family:Nunito;
font-size:13pt;
top:8px;
}
.modalconten{
color:black;
background:white;
}
.modalcontentim{
float:left;
margin-left:30px;
margin-top:30px;
margin-bottom:30px;
}
.modalcontenttex{
float:left;
text-align:justify;
color:black;
font-size: 9.5pt;
line-height:13pt;
margin-top:40px;
width:430px;
margin-left:30px;
}
.modalwikibutto{
cursor:pointer;
text-align:center;
margin-right:45px;
float:right;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
margin-bottom:30px;
border-radius: 3px;
width:170px;
height:30px;
border: 1px solid #82b92e;
margin-top:8%;
background-color:#82b92e;
}
.modalwikibuttontex{
color:#ffffff;
font-family:Nunito;
font-size:10pt;
position:relative;
top:6px;
}
#opacity{
background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
}
</style>
</head>
<body>
<div id="alert_messages_na">
<div class='modalheade'>
<span class='modalheadertex'>
<?php echo __('Database error'); ?>
</span>
</div>
<div class='modalconten'>
<img class='modalcontentim' src='<?php echo $config['homeurl']; ?>/images/mysqlerr.png'>
<div class='modalcontenttex'>
<?php
echo __('Failure to connect to Database server, please check the configuration file config.php or contact system administrator if you need assistance.');
?>
</div>
</div>
<a href='https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration' target='_blank'>
<div class='modalwikibutto cerrar'>
<span class='modalwikibuttontex'> <?php echo __('Documentation'); ?></span>
</div>
</a>
</div>
<div id="opacity"></div>
</body>
</html>

View File

@ -431,7 +431,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
str_replace('"', '', $str_warning), str_replace('"', '', $str_warning),
'', '',
10, 10,
255, 1024,
true, true,
$disabledBecauseInPolicy, $disabledBecauseInPolicy,
false, false,
@ -484,7 +484,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
str_replace('"', '', $str_critical), str_replace('"', '', $str_critical),
'', '',
10, 10,
255, 1024,
true, true,
$disabledBecauseInPolicy, $disabledBecauseInPolicy,
false, false,

View File

@ -562,7 +562,7 @@ $table->data['edit1'][1] = '<table width="100%">';
'', '',
'', '',
5, 5,
255, 1024,
true true
); );
$table->data['edit1'][1] .= '</td>'; $table->data['edit1'][1] .= '</td>';
@ -631,7 +631,7 @@ $table->data['edit1'][1] = '<table width="100%">';
'', '',
'', '',
5, 5,
255, 1024,
true true
); );
$table->data['edit1'][3] .= '</td>'; $table->data['edit1'][3] .= '</td>';

View File

@ -190,7 +190,7 @@ $table->data[4][1] .= html_print_input_text(
$str_warning, $str_warning,
'', '',
5, 5,
64, 1024,
true true
).'</span>'; ).'</span>';
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>';
@ -225,7 +225,7 @@ $table->data[5][1] .= html_print_input_text(
$str_critical, $str_critical,
'', '',
5, 5,
64, 1024,
true true
).'</span>'; ).'</span>';
$table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>';

View File

@ -112,6 +112,7 @@ $edit_file = get_parameter('edit_file', false);
$update_file = get_parameter('update_file', false); $update_file = get_parameter('update_file', false);
$plugin_command = get_parameter('plugin_command', ''); $plugin_command = get_parameter('plugin_command', '');
$tab = get_parameter('tab', ''); $tab = get_parameter('tab', '');
$deploy_plugin = get_parameter('deploy_plugin', 0);
if ($view != '') { if ($view != '') {
$form_id = $view; $form_id = $view;
@ -192,9 +193,8 @@ if ($filemanager) {
// If is win compatible and the compatibility must be unix // If is win compatible and the compatibility must be unix
if ($is_win_compatible !== false && $compatibility == 'unix') { if ($is_win_compatible !== false && $compatibility == 'unix') {
$contentFile = str_replace("\r\n", "\n", $contentFile); $contentFile = str_replace("\r\n", "\n", $contentFile);
} } else if ($is_win_compatible === false && $compatibility == 'windows') {
// If is unix compatible and the compatibility must be win // If is unix compatible and the compatibility must be win
else if ($is_win_compatible === false && $compatibility == 'windows') {
$contentFile = str_replace("\n", "\r\n", $contentFile); $contentFile = str_replace("\n", "\r\n", $contentFile);
} }
@ -268,12 +268,16 @@ if ($filemanager) {
// ===================================================================== // =====================================================================
$sec = 'gservers'; $sec = 'gservers';
if (($create != '') or ($view != '')) { if (($create != '') || ($view != '')) {
enterprise_hook('open_meta_frame'); enterprise_hook('open_meta_frame');
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
components_meta_print_header(); components_meta_print_header();
$sec = 'advanced'; $sec = 'advanced';
$management_allowed = is_management_allowed();
if (!$management_allowed) {
ui_print_warning_message(__('To manage plugin you must activate centralized management'));
}
} else { } else {
if ($create != '') { if ($create != '') {
ui_print_page_header( ui_print_page_header(
@ -292,6 +296,16 @@ if (($create != '') or ($view != '')) {
true true
); );
} }
$management_allowed = !is_central_policies_on_node();
if (!$management_allowed) {
ui_print_warning_message(
__(
'This console is not manager of this environment,
please manage this feature from centralized manager console (Metaconsole).'
)
);
}
} }
@ -564,9 +578,53 @@ if (($create != '') or ($view != '')) {
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
components_meta_print_header(); components_meta_print_header();
$sec = 'advanced'; $sec = 'advanced';
$management_allowed = is_management_allowed();
if (!$management_allowed) {
ui_print_warning_message(__('To manage plugin you must activate centralized management'));
}
if (!$config['metaconsole_deploy_plugin_server'] && $management_allowed) {
$deploy_plugin_server = true;
echo '<div id="deploy_messages" style="display: none">';
echo '<span>'.__('The previous configuration of plugins has been imported from the nodes. Please check that the definitions are correct.').'</br></br>'.'<b>'.__('Note:').'</b>'.__(
'These definitions will not be operational until you manually
copy the files from the nodes to the atachment/plugin/ directory of the meta console.'
).'</br></br>'.__('You can find more information at:')."<a href='https://wiki.pandorafms.com'>https://wiki.pandorafms.com</a>".'</span>';
echo '</div>';
?>
<script type="text/javascript">
$(document).ready(function () {
$("#deploy_messages").dialog({
resizable: true,
draggable: true,
modal: true,
height: 220,
title: '<?php echo __('Warning'); ?>',
width: 528,
overlay: {
opacity: 0.5,
background: "black"
}
});
});
</script>
<?php
config_update_value('metaconsole_deploy_plugin_server', 1);
}
} else { } else {
ui_print_page_header(__('Plug-ins registered on %s', get_product_name()), 'images/gm_servers.png', false, '', true); ui_print_page_header(__('Plug-ins registered on %s', get_product_name()), 'images/gm_servers.png', false, '', true);
$management_allowed = !is_central_policies_on_node();
if (!$management_allowed) {
ui_print_warning_message(
__(
'This console is not manager of this environment,
please manage this feature from centralized manager console (Metaconsole).'
)
);
}
$is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'; $is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN';
if ($is_windows) { if ($is_windows) {
echo '<div class="notify">'; echo '<div class="notify">';
@ -576,9 +634,8 @@ if (($create != '') or ($view != '')) {
} }
// Update plugin // Update plugin.
if (isset($_GET['update_plugin'])) { if (isset($_GET['update_plugin'])) {
// if modified any parameter
$plugin_id = get_parameter('update_plugin', 0); $plugin_id = get_parameter('update_plugin', 0);
$plugin_name = get_parameter('form_name', ''); $plugin_name = get_parameter('form_name', '');
$plugin_description = get_parameter('form_description', ''); $plugin_description = get_parameter('form_description', '');
@ -709,11 +766,14 @@ if (($create != '') or ($view != '')) {
$result = db_process_sql_delete('tplugin', ['id' => $plugin_id]); $result = db_process_sql_delete('tplugin', ['id' => $plugin_id]);
if (!is_metaconsole()) {
if (!$result) { if (!$result) {
ui_print_error_message(__('Problem deleting plugin')); ui_print_error_message(__('Problem deleting plugin'));
} else { } else {
ui_print_success_message(__('Plugin deleted successfully')); ui_print_success_message(__('Plugin deleted successfully'));
} }
}
if ($plugin_id != 0) { if ($plugin_id != 0) {
// Delete all the modules with this plugin // Delete all the modules with this plugin
@ -737,6 +797,153 @@ if (($create != '') or ($view != '')) {
policies_change_delete_pending_module($policies_id['id']); policies_change_delete_pending_module($policies_id['id']);
} }
} }
if (is_metaconsole()) {
enterprise_include_once('include/functions_plugins.php');
$result = plugins_delete_plugin($plugin_id);
if (!$result) {
ui_print_error_message(__('Problem deleting plugin'));
} else {
ui_print_success_message(__('Plugin deleted successfully'));
}
}
}
}
if ($deploy_plugin) {
if (is_metaconsole()) {
enterprise_include_once('include/functions_plugins.php');
$result = plugins_deploy_plugin($deploy_plugin);
if (!$result) {
ui_print_error_message(__('Problem deploying plugin'));
} else {
ui_print_success_message(__('Plugin deployed successfully'));
}
}
}
if ($deploy_plugin_server) {
$setup = db_get_all_rows_in_table('tmetaconsole_setup');
// recorremos todos los nodos.
foreach ($setup as $key => $value) {
// Obtenemos los plugins de la meta.
$all_plugin_meta = db_get_all_rows_sql('SELECT SQL_NO_CACHE * FROM tplugin', false, false);
// Conectamos con el nodo.
if (metaconsole_connect($value) == NOERR) {
$values = [];
// Obtenemos los plugin del nodo.
$node_plugin_server = db_get_all_rows_sql('SELECT SQL_NO_CACHE * FROM tplugin', false, false);
foreach ($node_plugin_server as $key2 => $plugin) {
// Comprobamos si el id esta meta y nodo al mismo tiempo.
$key_exists = array_search($plugin['id'], array_column($all_plugin_meta, 'id'));
if ($key_exists !== false) {
// Si el plugin tiene el mismo id pero diferentes datos.
if ($all_plugin_meta[$key_exists] != $plugin) {
$old_id = $plugin['id'];
$new_id = ($plugin['id'] + (1000 * $value['id']));
// El plugin del nodo pasa a tener otro id y otro nombre.
$plugin['id'] = $new_id;
$plugin['name'] = $plugin['name'].'_'.$value['server_name'];
$result_update = db_process_sql_update(
'tplugin',
[
'id' => $new_id,
'name' => $plugin['name'],
],
['id' => $old_id]
);
if ($result_update) {
db_process_sql_update(
'tagente_modulo',
['id_plugin' => $new_id],
['id_plugin' => $old_id]
);
db_process_sql_update(
'tnetwork_component',
['id_plugin' => $new_id],
['id_plugin' => $old_id]
);
db_process_sql_update(
'tpolicy_modules',
['id_plugin' => $new_id],
['id_plugin' => $old_id]
);
}
// New plugins to insert in the metaconsole.
$values[$plugin['id']] = $plugin;
}
} else {
// Exists in the node, but does not exist in the metaconsole.
$values[$plugin['id']] = $plugin;
}
}
// Restore to metaconsole.
metaconsole_restore_db();
// Insert in metaconsole.
if (!empty($values)) {
foreach ($values as $key2 => $val) {
// Insert into metaconsole.
$result_insert = db_process_sql_insert('tplugin', $val);
}
}
}
}
$all_plugin_meta = db_get_all_rows_sql('SELECT SQL_NO_CACHE * FROM tplugin', false, false);
foreach ($setup as $key => $value) {
if (metaconsole_connect($value) == NOERR) {
$all_plugin_node = db_get_all_rows_sql('SELECT SQL_NO_CACHE * FROM tplugin', false, false);
$array_diff = array_diff(array_column($all_plugin_meta, 'id'), array_column($all_plugin_node, 'id'));
foreach ($array_diff as $key2 => $pluginid) {
$other = [];
$plugin_meta = $all_plugin_meta[$key2];
unset($plugin_meta['id']);
$other['name'] = urlencode($plugin_meta['name']);
$other['description'] = urlencode($plugin_meta['description']);
$other['max_timeout'] = $plugin_meta['max_timeout'];
$other['max_retries'] = $plugin_meta['max_retries'];
$other['execute'] = urlencode($plugin_meta['execute']);
$other['net_dst_opt'] = $plugin_meta['net_dst_opt'];
$other['net_port_opt'] = $plugin_meta['net_port_opt'];
$other['user_opt'] = $plugin_meta['user_opt'];
$other['pass_opt'] = $plugin_meta['pass_opt'];
$other['plugin_type'] = $plugin_meta['plugin_type'];
$other['macros'] = urlencode($plugin_meta['macros']);
$other['parameters'] = urlencode($plugin_meta['parameters']);
$other = implode('%7C', $other);
$auth_token = json_decode($value['auth_token']);
$url = $value['server_url'].'include/api.php?op=set&op2=push_plugin'.'&id='.$pluginid.'&other_mode=url_encode_separator_%7C&other='.$other."&apipass=$auth_token->api_password"."&user=$auth_token->console_user&pass=$auth_token->console_password";
$file_path = realpath($plugin_meta['execute']);
$post = '';
if (file_exists($file_path)) {
$post = ['file' => curl_file_create($file_path)];
}
$curlObj = curl_init();
curl_setopt($curlObj, CURLOPT_URL, $url);
curl_setopt($curlObj, CURLOPT_POST, 1);
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $post);
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false);
$api_result = curl_exec($curlObj);
curl_close($curlObj);
}
}
// restore to metaconsole
metaconsole_restore_db();
} }
} }
@ -753,7 +960,10 @@ if (($create != '') or ($view != '')) {
echo '<th>'.__('Name').'</th>'; echo '<th>'.__('Name').'</th>';
echo '<th>'.__('Type').'</th>'; echo '<th>'.__('Type').'</th>';
echo '<th>'.__('Command').'</th>'; echo '<th>'.__('Command').'</th>';
echo "<th style='width: 90px;'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>'; if ($management_allowed) {
echo "<th style='width: 120px;'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>';
}
$color = 0; $color = 0;
foreach ($rows as $row) { foreach ($rows as $row) {
@ -767,7 +977,10 @@ if (($create != '') or ($view != '')) {
echo '<tr>'; echo '<tr>';
echo "<td class=$tdcolor>"; echo "<td class=$tdcolor>";
if ($management_allowed) {
echo "<b><a href='index.php?sec=$sec&sec2=godmode/servers/plugin&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>"; echo "<b><a href='index.php?sec=$sec&sec2=godmode/servers/plugin&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>";
}
echo $row['name']; echo $row['name'];
echo '</a></b></td>'; echo '</a></b></td>';
echo "<td class=$tdcolor>"; echo "<td class=$tdcolor>";
@ -780,6 +993,7 @@ if (($create != '') or ($view != '')) {
echo "</td><td class=$tdcolor>"; echo "</td><td class=$tdcolor>";
echo $row['execute']; echo $row['execute'];
echo '</td>'; echo '</td>';
if ($management_allowed) {
echo "<td class='$tdcolor' align='center'>"; echo "<td class='$tdcolor' align='center'>";
// Show it is locket // Show it is locket
@ -804,7 +1018,13 @@ if (($create != '') or ($view != '')) {
echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>&nbsp;&nbsp;'; echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&view=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>&nbsp;&nbsp;';
echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&kill_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."' onclick='javascript: if (!confirm(\"".__('All the modules that are using this plugin will be deleted').'. '.__('Are you sure?')."\")) return false;'>".html_print_image('images/cross.png', true, ['border' => '0']).'</a>'; echo "<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&kill_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."' onclick='javascript: if (!confirm(\"".__('All the modules that are using this plugin will be deleted').'. '.__('Are you sure?')."\")) return false;'>".html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
if (is_metaconsole()) {
echo "&nbsp;&nbsp;&nbsp;<a href='index.php?sec=$sec&sec2=godmode/servers/plugin&tab=$tab&deploy_plugin=".$row['id'].'&tab=plugins&pure='.$config['pure']."'>".html_print_image('images/deploy.png', true, ['title' => __('Deploy'), 'width' => '21 px']).'</a>&nbsp;&nbsp;';
}
echo '</td>'; echo '</td>';
}
echo '</tr>'; echo '</tr>';
} }
@ -813,12 +1033,15 @@ if (($create != '') or ($view != '')) {
ui_print_info_message(['no_close' => true, 'message' => __('There are no plugins in the system') ]); ui_print_info_message(['no_close' => true, 'message' => __('There are no plugins in the system') ]);
} }
if ($management_allowed) {
echo "<table width='100%'>"; echo "<table width='100%'>";
echo '<tr><td align=right>'; echo '<tr><td align=right>';
echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create=1&pure=".$config['pure']."'>"; echo "<form name=plugin method='post' action='index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create=1&pure=".$config['pure']."'>";
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>"; echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
echo '</td></tr></table>'; echo '</td></tr></table>';
echo '<div id="deploy_messages" style="display: none">';
}
// The '%s' will be replaced in the javascript code of the function 'show_locked_dialog' // The '%s' will be replaced in the javascript code of the function 'show_locked_dialog'
echo "<div id='dialog_locked' title='".__('List of modules and components created by "%s" ')."' style='display: none; text-align: left;'>"; echo "<div id='dialog_locked' title='".__('List of modules and components created by "%s" ')."' style='display: none; text-align: left;'>";
@ -828,7 +1051,6 @@ if (($create != '') or ($view != '')) {
} }
ui_require_javascript_file('pandora_modules'); ui_require_javascript_file('pandora_modules');
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -594,7 +594,7 @@ $table_other->data[3][1] = html_print_input_text(
); );
$table_other->data[5][0] = __('Use realtime statistics'); $table_other->data[5][0] = __('Use realtime statistics');
$table_other->data[5][1] = html_print_checkbox_toogle_switch( $table_other->data[5][1] = html_print_checkbox_switch(
'realtimestats', 'realtimestats',
1, 1,
$config['realtimestats'], $config['realtimestats'],
@ -616,7 +616,7 @@ $table_other->data[6][1] = html_print_input_text(
); );
$table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true); $table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true);
$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true); $table_other->data[7][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true);
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory'); $table_other->data[8][0] = __('Max. recommended number of files in attachment directory');
$table_other->data[8][0] .= ui_print_help_tip( $table_other->data[8][0] .= ui_print_help_tip(
@ -633,7 +633,7 @@ $table_other->data[8][1] = html_print_input_text(
); );
$table_other->data[9][0] = __('Delete not init modules'); $table_other->data[9][0] = __('Delete not init modules');
$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true); $table_other->data[9][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true);
$table_other->data[10][0] = __('Big Operation Step to purge old data'); $table_other->data[10][0] = __('Big Operation Step to purge old data');
$table_other->data[10][0] .= ui_print_help_tip( $table_other->data[10][0] .= ui_print_help_tip(

View File

@ -43,15 +43,15 @@ if (is_ajax()) {
if ($type_auth != 'mysql') { if ($type_auth != 'mysql') {
// Fallback to local authentication // Fallback to local authentication
$row = []; $row = [];
$row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true); $row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed. Only available when \'Save password\' is enabled.'), true);
$row['control'] = html_print_checkbox_toogle_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); $row['control'] = html_print_checkbox_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true);
$table->data['fallback_local_auth'] = $row; $table->data['fallback_local_auth'] = $row;
if (enterprise_installed()) { if (enterprise_installed()) {
// Autocreate remote users // Autocreate remote users
$row = []; $row = [];
$row['name'] = __('Autocreate remote users'); $row['name'] = __('Autocreate remote users');
$row['control'] = html_print_checkbox_toogle_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).'&nbsp;&nbsp;'; $row['control'] = html_print_checkbox_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).'&nbsp;&nbsp;';
$table->data['autocreate_remote_users'] = $row; $table->data['autocreate_remote_users'] = $row;
add_enterprise_auth_autocreate_profiles($table, $type_auth); add_enterprise_auth_autocreate_profiles($table, $type_auth);
@ -89,7 +89,7 @@ if (is_ajax()) {
// Start TLS // Start TLS
$row = []; $row = [];
$row['name'] = __('Start TLS'); $row['name'] = __('Start TLS');
$row['control'] = html_print_checkbox_toogle_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true); $row['control'] = html_print_checkbox_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true);
$table->data['ldap_start_tls'] = $row; $table->data['ldap_start_tls'] = $row;
// Base DN // Base DN
@ -135,7 +135,7 @@ if (is_ajax()) {
$row = []; $row = [];
$row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true); $row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true);
$row['control'] = html_print_input_hidden('double_auth_enabled', 0); $row['control'] = html_print_input_hidden('double_auth_enabled', 0);
$row['control'] .= html_print_checkbox_toogle_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); $row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true);
$table->data['double_auth_enabled'] = $row; $table->data['double_auth_enabled'] = $row;
// Session timeout // Session timeout

View File

@ -82,17 +82,17 @@ $sources['sql'] = __('Database');
$table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true); $table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true);
$table->data[10][0] = __('Automatic check for updates'); $table->data[10][0] = __('Automatic check for updates');
$table->data[10][1] = html_print_checkbox_toogle_switch('autoupdate', 1, $config['autoupdate'], true); $table->data[10][1] = html_print_checkbox_switch('autoupdate', 1, $config['autoupdate'], true);
echo "<div id='dialog' title='".__('Enforce https Information')."' style='display:none;'>"; echo "<div id='dialog' title='".__('Enforce https Information')."' style='display:none;'>";
echo "<p style='text-align: center;'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>'; echo "<p style='text-align: center;'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>';
echo '</div>'; echo '</div>';
$table->data[11][0] = __('Enforce https'); $table->data[11][0] = __('Enforce https');
$table->data[11][1] = html_print_checkbox_toogle_switch_extended('https', 1, $config['https'], false, '', '', true); $table->data[11][1] = html_print_checkbox_switch_extended('https', 1, $config['https'], false, '', '', true);
$table->data[12][0] = __('Use cert of SSL'); $table->data[12][0] = __('Use cert of SSL');
$table->data[12][1] = html_print_checkbox_toogle_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true); $table->data[12][1] = html_print_checkbox_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true);
$table->rowstyle[13] = 'display: none;'; $table->rowstyle[13] = 'display: none;';
$table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true); $table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true);
@ -114,7 +114,7 @@ $table->data[16][0] = __('API password').ui_print_help_tip(__('Please be careful
$table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true); $table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true);
$table->data[17][0] = __('Enable GIS features'); $table->data[17][0] = __('Enable GIS features');
$table->data[17][1] = html_print_checkbox_toogle_switch('activate_gis', 1, $config['activate_gis'], true); $table->data[17][1] = html_print_checkbox_switch('activate_gis', 1, $config['activate_gis'], true);
$table->data[19][0] = __('Enable Netflow'); $table->data[19][0] = __('Enable Netflow');
$rbt_disabled = false; $rbt_disabled = false;
@ -123,7 +123,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
$table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true); $table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true);
} }
$table->data[19][1] = html_print_checkbox_toogle_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true); $table->data[19][1] = html_print_checkbox_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true);
$zone_name = [ $zone_name = [
@ -202,15 +202,15 @@ $table->data[28][1] = html_print_input_text('public_url', $config['public_url'],
$table->data[29][0] = __('Referer security'); $table->data[29][0] = __('Referer security');
$table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true); $table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true);
$table->data[29][1] = html_print_checkbox_toogle_switch('referer_security', 1, $config['referer_security'], true); $table->data[29][1] = html_print_checkbox_switch('referer_security', 1, $config['referer_security'], true);
$table->data[30][0] = __('Event storm protection'); $table->data[30][0] = __('Event storm protection');
$table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true); $table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true);
$table->data[30][1] = html_print_checkbox_toogle_switch('event_storm_protection', 1, $config['event_storm_protection'], true); $table->data[30][1] = html_print_checkbox_switch('event_storm_protection', 1, $config['event_storm_protection'], true);
$table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true); $table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true);
$table->data[31][1] = html_print_checkbox_toogle_switch('command_snapshot', 1, $config['command_snapshot'], true); $table->data[31][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true);
$table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true); $table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true);
$table->data[32][1] = html_print_input_text( $table->data[32][1] = html_print_input_text(
@ -250,7 +250,7 @@ $table->data['tutorial_mode'][1] = html_print_select(
$config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1; $config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1;
$table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true); $table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true);
$table->data[34][1] = html_print_checkbox_toogle_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true); $table->data[34][1] = html_print_checkbox_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true);
$table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true); $table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true);
$table->data[35][1] = html_print_input_text( $table->data[35][1] = html_print_input_text(
@ -263,7 +263,7 @@ $table->data[35][1] = html_print_input_text(
); );
$table->data[36][0] = __('Include agents manually disabled'); $table->data[36][0] = __('Include agents manually disabled');
$table->data[36][1] = html_print_checkbox_toogle_switch('include_agents', 1, $config['include_agents'], true); $table->data[36][1] = html_print_checkbox_switch('include_agents', 1, $config['include_agents'], true);
$table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true); $table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true);
$table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true); $table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true);

View File

@ -75,7 +75,7 @@ $table_behaviour->data[$row][1] = html_print_select($values, 'vc_refr', $config[
$row++; $row++;
$table_behaviour->data[$row][0] = __('Paginated module view'); $table_behaviour->data[$row][0] = __('Paginated module view');
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( $table_behaviour->data[$row][1] = html_print_checkbox_switch(
'paginate_module', 'paginate_module',
1, 1,
$config['paginate_module'], $config['paginate_module'],
@ -84,7 +84,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
$row++; $row++;
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format'); $table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( $table_behaviour->data[$row][1] = html_print_checkbox_switch(
'render_proc', 'render_proc',
1, 1,
$config['render_proc'], $config['render_proc'],
@ -102,7 +102,7 @@ $row++;
// Daniel maya 02/06/2016 Display menu with click --INI // Daniel maya 02/06/2016 Display menu with click --INI
$table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true); $table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( $table_behaviour->data[$row][1] = html_print_checkbox_switch(
'click_display', 'click_display',
1, 1,
$config['click_display'], $config['click_display'],
@ -120,15 +120,6 @@ if (enterprise_installed()) {
$row++; $row++;
} }
$table_behaviour->data[$row][0] = __('Classic menu mode').ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true);
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
'classic_menu',
1,
$config['classic_menu'],
true
);
$row++;
echo '<fieldset>'; echo '<fieldset>';
echo '<legend>'.__('Behaviour configuration').'</legend>'; echo '<legend>'.__('Behaviour configuration').'</legend>';
html_print_table($table_behaviour); html_print_table($table_behaviour);
@ -227,15 +218,24 @@ $table_styles->data[$row][1] = html_print_select(
$table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'login_background_preview', false, '', 'class="sub camera logo_preview"', true); $table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'login_background_preview', false, '', 'class="sub camera logo_preview"', true);
$row++; $row++;
$table_styles->data[$row][0] = __('Custom logo (header)').ui_print_help_icon('custom_logo', true);
/**
* Print a select for the custom logos.
*
* @param string $name This is the name for the select
* @param string $logo This is the option in $config (path)
* @return string Print the select
*/
function logo_custom_enterprise($name, $logo)
{
if (enterprise_installed()) { if (enterprise_installed()) {
$ent_files = list_files('enterprise/images/custom_logo', 'png', 1, 0); $ent_files = list_files('enterprise/images/custom_logo', 'png', 1, 0);
$open_files = list_files('images/custom_logo', 'png', 1, 0); $open_files = list_files('images/custom_logo', 'png', 1, 0);
$table_styles->data[$row][1] = html_print_select( $select = html_print_select(
array_merge($ent_files, $open_files), array_merge($ent_files, $open_files),
'custom_logo', $name,
$config['custom_logo'], $logo,
'', '',
'', '',
'', '',
@ -246,11 +246,12 @@ if (enterprise_installed()) {
$open, $open,
'width:240px' 'width:240px'
); );
return $select;
} else { } else {
$table_styles->data[$row][1] = html_print_select( $select = html_print_select(
list_files('images/custom_logo', 'png', 1, 0), list_files('images/custom_logo', 'png', 1, 0),
'custom_logo', $name,
$config['custom_logo'], $logo,
'', '',
'', '',
'', '',
@ -261,11 +262,21 @@ if (enterprise_installed()) {
$open, $open,
'width:240px' 'width:240px'
); );
return $select;
}
} }
$table_styles->data[$row][0] = __('Custom logo (menu)').ui_print_help_icon('custom_logo', true);
$table_styles->data[$row][1] = logo_custom_enterprise('custom_logo', $config['custom_logo']);
$table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true, false, $open, 'visualmodal'); $table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true, false, $open, 'visualmodal');
$row++; $row++;
$table_styles->data[$row][0] = __('Custom logo collapsed (menu)').ui_print_help_icon('custom_logo_collapsed', true);
$table_styles->data[$row][1] = logo_custom_enterprise('custom_logo_collapsed', $config['custom_logo_collapsed']);
$table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'custom_logo_collapsed_preview', $open, '', 'class="sub camera logo_preview"', true, false, $open, 'visualmodal');
$row++;
$table_styles->data[$row][0] = __('Custom logo (header white background)'); $table_styles->data[$row][0] = __('Custom logo (header white background)');
if (enterprise_installed()) { if (enterprise_installed()) {
$ent_files = list_files('enterprise/images/custom_logo', 'png', 1, 0); $ent_files = list_files('enterprise/images/custom_logo', 'png', 1, 0);
@ -491,7 +502,7 @@ if (enterprise_installed()) {
if (enterprise_installed()) { if (enterprise_installed()) {
$table_styles->data[$row][0] = __('Disable logo in graphs'); $table_styles->data[$row][0] = __('Disable logo in graphs');
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $table_styles->data[$row][1] = html_print_checkbox_switch(
'fixed_graph', 'fixed_graph',
1, 1,
$config['fixed_graph'], $config['fixed_graph'],
@ -507,7 +518,7 @@ if (enterprise_installed()) {
*/ */
$table_styles->data[$row][0] = __('Disable helps'); $table_styles->data[$row][0] = __('Disable helps');
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $table_styles->data[$row][1] = html_print_checkbox_switch(
'disable_help', 'disable_help',
1, 1,
$config['disable_help'], $config['disable_help'],
@ -516,7 +527,7 @@ $table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
$row++; $row++;
$table_styles->data[$row][0] = __('Fixed header'); $table_styles->data[$row][0] = __('Fixed header');
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $table_styles->data[$row][1] = html_print_checkbox_switch(
'fixed_header', 'fixed_header',
1, 1,
$config['fixed_header'], $config['fixed_header'],
@ -524,18 +535,10 @@ $table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
); );
$row++; $row++;
$table_styles->data[$row][0] = __('Fixed menu');
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
'fixed_menu',
1,
$config['fixed_menu'],
true
);
$row++;
// For 5.1 Autohidden menu feature // For 5.1 Autohidden menu feature
$table_styles->data['autohidden'][0] = __('Autohidden menu'); $table_styles->data['autohidden'][0] = __('Autohidden menu');
$table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch( $table_styles->data['autohidden'][1] = html_print_checkbox_switch(
'autohidden_menu', 'autohidden_menu',
1, 1,
$config['autohidden_menu'], $config['autohidden_menu'],
@ -543,7 +546,7 @@ $table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch(
); );
$table_styles->data[$row][0] = __('Visual effects and animation'); $table_styles->data[$row][0] = __('Visual effects and animation');
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $table_styles->data[$row][1] = html_print_checkbox_switch(
'visual_animation', 'visual_animation',
1, 1,
$config['visual_animation'], $config['visual_animation'],
@ -567,7 +570,7 @@ $table_gis->size[0] = '50%';
$table_gis->data = []; $table_gis->data = [];
$table_gis->data[$row][0] = __('GIS Labels').ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true); $table_gis->data[$row][0] = __('GIS Labels').ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
$table_gis->data[$row][1] = html_print_checkbox_toogle_switch( $table_gis->data[$row][1] = html_print_checkbox_switch(
'gis_label', 'gis_label',
1, 1,
$config['gis_label'], $config['gis_label'],
@ -680,7 +683,7 @@ $table_font->data[$row][1] = html_print_input_text(
$row++; $row++;
$table_font->data[$row][0] = __('Show unit along with value in reports').ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true); $table_font->data[$row][0] = __('Show unit along with value in reports').ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true);
$table_font->data[$row][1] = html_print_checkbox_toogle_switch( $table_font->data[$row][1] = html_print_checkbox_switch(
'simple_module_value', 'simple_module_value',
1, 1,
$config['simple_module_value'], $config['simple_module_value'],
@ -778,7 +781,7 @@ $table_chars->data[$row][1] = html_print_input_text(
$row++; $row++;
$table_chars->data[$row][0] = __('Use round corners'); $table_chars->data[$row][0] = __('Use round corners');
$table_chars->data[$row][1] = html_print_checkbox_toogle_switch( $table_chars->data[$row][1] = html_print_checkbox_switch(
'round_corner', 'round_corner',
1, 1,
$config['round_corner'], $config['round_corner'],
@ -947,7 +950,7 @@ $table_other->data[$row][0] = __('Show report info with description').ui_print_h
__('Custom report description info. It will be applied to all reports and templates by default.'), __('Custom report description info. It will be applied to all reports and templates by default.'),
true true
); );
$table_other->data[$row][1] = html_print_checkbox_toogle_switch( $table_other->data[$row][1] = html_print_checkbox_switch(
'custom_report_info', 'custom_report_info',
1, 1,
$config['custom_report_info'], $config['custom_report_info'],
@ -1061,7 +1064,7 @@ $table_other->data['custom_report_front-footer'][1] = html_print_textarea(
$table_other->data[$row][0] = __('Show QR Code icon in the header'); $table_other->data[$row][0] = __('Show QR Code icon in the header');
$table_other->data[$row][1] = html_print_checkbox_toogle_switch( $table_other->data[$row][1] = html_print_checkbox_switch(
'show_qr_code_header', 'show_qr_code_header',
1, 1,
$config['show_qr_code_header'], $config['show_qr_code_header'],
@ -1099,7 +1102,7 @@ $table_other->data[$row][0] .= ui_print_help_tip(
__('Show the group name instead the group icon.'), __('Show the group name instead the group icon.'),
true true
); );
$table_other->data[$row][1] = html_print_checkbox_toogle_switch( $table_other->data[$row][1] = html_print_checkbox_switch(
'show_group_name', 'show_group_name',
1, 1,
$config['show_group_name'], $config['show_group_name'],
@ -1473,6 +1476,11 @@ $(".logo_preview").click (function(e) {
icon_path = homeUrlEnt + "images/custom_logo/" + icon_name; icon_path = homeUrlEnt + "images/custom_logo/" + icon_name;
options.grayed = true; options.grayed = true;
break; break;
case 'button-custom_logo_collapsed_preview':
icon_name = $("select#custom_logo_collapsed option:selected").val();
icon_path = homeUrlEnt + "images/custom_logo/" + icon_name;
options.grayed = true;
break;
case 'button-custom_logo_white_bg_preview': case 'button-custom_logo_white_bg_preview':
icon_name = $("select#custom_logo_white_bg option:selected").val(); icon_name = $("select#custom_logo_white_bg option:selected").val();
icon_path = homeUrlEnt + "images/custom_logo/" + icon_name; icon_path = homeUrlEnt + "images/custom_logo/" + icon_name;

View File

@ -30,6 +30,7 @@ require_once __DIR__.'/Wizard.main.php';
require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_users.php';
require_once $config['homedir'].'/include/functions_reports.php'; require_once $config['homedir'].'/include/functions_reports.php';
require_once $config['homedir'].'/include/functions_cron.php'; require_once $config['homedir'].'/include/functions_cron.php';
enterprise_include('include/functions_tasklist.php');
/** /**
* Defined as wizard to guide user to explore running tasks. * Defined as wizard to guide user to explore running tasks.
@ -72,6 +73,9 @@ class DiscoveryTaskList extends Wizard
/** /**
* Implements run method. * Implements run method.
* *
* @param string $message Redirected input.
* @param boolean $status Redirected input.
*
* @return mixed Returns null if wizard is ongoing. Result if done. * @return mixed Returns null if wizard is ongoing. Result if done.
*/ */
public function run($message='', $status=null) public function run($message='', $status=null)
@ -115,43 +119,39 @@ class DiscoveryTaskList extends Wizard
if (enterprise_installed()) { if (enterprise_installed()) {
// This check only applies to enterprise users. // This check only applies to enterprise users.
// Check if DiscoveryCronTasks is running. Warn user if not. enterprise_hook('tasklist_checkrunning');
if ($config['cron_last_run'] == 0
|| (get_system_time() - $config['cron_last_run']) > 3600
) {
$message_conf_cron = __('DiscoveryConsoleTasks is not running properly').'. ';
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
$message_conf_cron .= __('Discovery relies on a proper setup of cron, the time-based scheduling service');
$message_conf_cron .= '. '.__('Please, add the following line to your crontab file:');
$message_conf_cron .= '<b><pre style="color: #333;">* * * * * &lt;user&gt; wget -q -O - --no-check-certificate ';
$message_conf_cron .= str_replace(
ENTERPRISE_DIR.'/meta/',
'',
ui_get_full_url(false)
);
$message_conf_cron .= ENTERPRISE_DIR.'/'.EXTENSIONS_DIR;
$message_conf_cron .= '/cron/cron.php &gt;&gt; ';
$message_conf_cron .= $config['homedir'].'/pandora_console.log</pre></b>';
}
if (isset($config['cron_last_run']) === true
&& $config['cron_last_run'] > 0
) {
$message_conf_cron .= '<p style="color: #333;">'.__('Last execution').': ';
$message_conf_cron .= date('Y/m/d H:i:s', $config['cron_last_run']).'</p>';
$message_conf_cron .= '<p style="color: #333;">';
$message_conf_cron .= __('Please check process is no locked.').'</p>';
}
ui_print_warning_message($message_conf_cron, '', false);
}
}
$ret = $this->showListConsoleTask(); $ret = $this->showListConsoleTask();
} else {
$ret = false;
}
$ret2 = $this->showList(); $ret2 = $this->showList();
if ($ret === false && $ret2 === false) { if ($ret === false && $ret2 === false) {
include_once $config['homedir'].'/general/firts_task/recon_view.php'; include_once $config['homedir'].'/general/firts_task/recon_view.php';
} else {
$form = [
'form' => [
'method' => 'POST',
'action' => ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery'
),
],
'inputs' => [
[
'arguments' => [
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
'attributes' => 'class="sub cancel"',
'return' => true,
],
],
],
];
$this->printForm($form);
} }
return $ret; return $ret;
@ -237,7 +237,7 @@ class DiscoveryTaskList extends Wizard
$id_console_task = (int) get_parameter('id_console_task'); $id_console_task = (int) get_parameter('id_console_task');
if ($id_console_task !== null) { if ($id_console_task !== null) {
cron_task_run($id_console_task, true); enterprise_include('cron_task_run', $id_console_task, true);
// Trick to avoid double execution. // Trick to avoid double execution.
header('Location: '.$this->url); header('Location: '.$this->url);
} }
@ -306,16 +306,13 @@ class DiscoveryTaskList extends Wizard
return false; return false;
} }
// Get all recon servers. // Get all discovery servers.
$servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3'); $servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3');
if ($servers === false) { if ($servers === false) {
$servers = []; $servers = [];
ui_print_error_message(__('Discovery Server is disabled')); ui_print_error_message(__('Discovery Server is disabled'));
return false; $check = db_get_all_rows_sql('SELECT * FROM trecon_task');
} else { return (bool) $check;
$recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task');
if ($recon_task === false) {
return false;
} else { } else {
include_once $config['homedir'].'/include/functions_graph.php'; include_once $config['homedir'].'/include/functions_graph.php';
include_once $config['homedir'].'/include/functions_servers.php'; include_once $config['homedir'].'/include/functions_servers.php';
@ -340,33 +337,8 @@ class DiscoveryTaskList extends Wizard
} }
} }
foreach ($servers as $serverItem) { $recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task');
$id_server = $serverItem['id_server'];
$server_name = servers_get_name($id_server);
$recon_tasks = db_get_all_rows_field_filter(
'trecon_task',
'id_recon_server',
$id_server
);
$user_groups = implode(',', array_keys(users_get_groups())); $user_groups = implode(',', array_keys(users_get_groups()));
$defined_tasks = db_get_all_rows_filter(
'tuser_task_scheduled',
'id_grupo IN ('.$user_groups.')'
);
if (isset($tasks_console) === true
&& is_array($tasks_console) === true
) {
foreach ($tasks_console as $key => $value) {
$value['parameters'] = unserialize(
$value['parameters']
);
$value['type'] = 'Cron';
array_push($recon_tasks, $value);
}
}
// Show network tasks for Recon Server. // Show network tasks for Recon Server.
if ($recon_tasks === false) { if ($recon_tasks === false) {
@ -392,31 +364,52 @@ class DiscoveryTaskList extends Wizard
$table->head[1] = __('Task name'); $table->head[1] = __('Task name');
$table->align[1] = 'left'; $table->align[1] = 'left';
$table->head[2] = __('Interval'); $table->head[2] = __('Server name');
$table->align[2] = 'left'; $table->align[2] = 'left';
$table->head[3] = __('Network'); $table->head[3] = __('Interval');
$table->align[3] = 'left'; $table->align[3] = 'left';
$table->head[4] = __('Status'); $table->head[4] = __('Network');
$table->align[4] = 'left'; $table->align[4] = 'left';
$table->head[5] = __('Task type'); $table->head[5] = __('Status');
$table->align[5] = 'left'; $table->align[5] = 'left';
$table->head[6] = __('Progress'); $table->head[6] = __('Task type');
$table->align[6] = 'left'; $table->align[6] = 'left';
$table->head[7] = __('Updated at'); $table->head[7] = __('Progress');
$table->align[7] = 'left'; $table->align[7] = 'left';
$table->head[8] = __('Operations'); $table->head[8] = __('Updated at');
$table->align[8] = 'left'; $table->align[8] = 'left';
$table->head[9] = __('Operations');
$table->align[9] = 'left';
foreach ($recon_tasks as $task) { foreach ($recon_tasks as $task) {
$data = []; $data = [];
$server_name = servers_get_name($task['id_recon_server']);
if ($task['disabled'] == 0) { // By default.
$subnet = $task['subnet'];
// Exceptions: IPAM.
$ipam = false;
if ($task['id_recon_script'] != null) {
$recon_script_name = db_get_value('name', 'trecon_script', 'id_recon_script', $task['id_recon_script']);
if (io_safe_output($recon_script_name) == 'IPAM Recon'
&& enterprise_installed()
) {
$subnet_obj = json_decode($task['macros'], true);
$subnet = $subnet_obj['1']['value'];
$tipam_task_id = db_get_value('id', 'tipam_network', 'id_recon_task', $task['id_rt']);
$ipam = true;
}
}
if ($task['disabled'] == 0 && $server_name !== '') {
$data[0] = '<a href="'.ui_get_full_url( $data[0] = '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&server_id='.$id_server.'&force='.$task['id_rt'] 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&server_id='.$id_server.'&force='.$task['id_rt']
).'">'; ).'">';
@ -433,54 +426,51 @@ class DiscoveryTaskList extends Wizard
$data[1] = '<b>'.$task['name'].'</b>'; $data[1] = '<b>'.$task['name'].'</b>';
$data[2] = $server_name;
if ($task['interval_sweep'] > 0) { if ($task['interval_sweep'] > 0) {
$data[2] = human_time_description_raw( $data[3] = human_time_description_raw(
$task['interval_sweep'] $task['interval_sweep']
); );
} else { } else {
$data[2] = __('Manual'); $data[3] = __('Manual');
} }
if ($task['id_recon_script'] == 0) { if ($task['id_recon_script'] == 0 || $ipam === true) {
$data[3] = $task['subnet']; $data[4] = $subnet;
} else { } else {
$data[3] = '-'; $data[4] = '-';
} }
if ($task['status'] <= 0) { if ($task['status'] <= 0) {
$data[4] = __('Done'); $data[5] = __('Done');
} else { } else {
$data[4] = __('Pending'); $data[5] = __('Pending');
} }
if ($task['id_recon_script'] == 0) { if ($task['id_recon_script'] == 0) {
// Discovery NetScan. // Discovery NetScan.
$data[5] = html_print_image( $data[6] = html_print_image(
'images/network.png', 'images/network.png',
true, true,
['title' => __('Discovery NetScan')] ['title' => __('Discovery NetScan')]
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$data[5] .= network_profiles_get_name( $data[6] .= network_profiles_get_name(
$task['id_network_profile'] $task['id_network_profile']
); );
} else { } else {
// APP recon task. // APP recon task.
$data[5] = html_print_image( $data[6] = html_print_image(
'images/plugin.png', 'images/plugin.png',
true true
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$data[5] .= db_get_sql( $data[6] .= $recon_script_name;
sprintf(
'SELECT name FROM trecon_script WHERE id_recon_script = %d',
$task['id_recon_script']
)
);
} }
if ($task['status'] <= 0 || $task['status'] > 100) { if ($task['status'] <= 0 || $task['status'] > 100) {
$data[6] = '-'; $data[7] = '-';
} else { } else {
$data[6] = progress_bar( $data[7] = progress_bar(
$task['status'], $task['status'],
100, 100,
20, 20,
@ -490,12 +480,12 @@ class DiscoveryTaskList extends Wizard
} }
if ($task['utimestamp'] > 0) { if ($task['utimestamp'] > 0) {
$data[7] = ui_print_timestamp( $data[8] = ui_print_timestamp(
$task['utimestamp'], $task['utimestamp'],
true true
); );
} else { } else {
$data[7] = __('Not executed yet'); $data[8] = __('Not executed yet');
} }
if (check_acl( if (check_acl(
@ -504,8 +494,25 @@ class DiscoveryTaskList extends Wizard
'PM' 'PM'
) )
) { ) {
// Check if is a H&D, Cloud or Application. if ($ipam === true) {
$data[8] = '<a href="'.ui_get_full_url( $data[9] = '<a href="'.ui_get_full_url(
sprintf(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=edit&id=%d',
$tipam_task_id
)
).'">'.html_print_image(
'images/config.png',
true
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=delete&id='.$tipam_task_id
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
true
).'</a>';
} else {
// Check if is a H&D, Cloud or Application or IPAM.
$data[9] = '<a href="'.ui_get_full_url(
sprintf( sprintf(
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
$this->getTargetWiz($task), $this->getTargetWiz($task),
@ -515,52 +522,30 @@ class DiscoveryTaskList extends Wizard
'images/config.png', 'images/config.png',
true true
).'</a>'; ).'</a>';
$data[8] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt'] 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png', 'images/cross.png',
true true
).'</a>'; ).'</a>';
}
} else { } else {
$data[8] = ''; $data[9] = '';
} }
array_push($table->data, $data); array_push($table->data, $data);
} }
echo '<h2>'.__('Server tasks').'</h2>';
if (empty($table->data)) { if (empty($table->data)) {
echo '<div class="nf">'.__('Server').' '.$server_name.' '.__('has no recon tasks assigned').'</div>'; echo '<div class="nf">'.__('Server').' '.$server_name.' '.__('has no discovery tasks assigned').'</div>';
return false;
} else { } else {
echo '<h2>'.__('Server task').'</h2>';
html_print_table($table); html_print_table($table);
} }
unset($table); unset($table);
} }
}
}
$form = [
'form' => [
'method' => 'POST',
'action' => ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery'
),
],
'inputs' => [
[
'arguments' => [
'name' => 'submit',
'label' => __('Go back'),
'type' => 'submit',
'attributes' => 'class="sub cancel"',
'return' => true,
],
],
],
];
$this->printForm($form);
return true; return true;
} }
@ -573,385 +558,7 @@ class DiscoveryTaskList extends Wizard
*/ */
public function showListConsoleTask() public function showListConsoleTask()
{ {
global $config; return enterprise_hook('tasklist_showListConsoleTask', [$this]);
check_login();
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
'ACL Violation',
'Trying to access recon task viewer'
);
include 'general/noaccess.php';
return false;
}
$read_perms = check_acl(
$config['id_user'],
0,
'RR'
);
$write_perms = check_acl(
$config['id_user'],
0,
'RW'
);
$manage_perms = check_acl(
$config['id_user'],
0,
'RM'
);
$manage_pandora = check_acl(
$config['id_user'],
0,
'PM'
);
$url = 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&';
$user_groups = implode(
',',
array_keys(users_get_groups())
);
$defined_tasks = db_get_all_rows_filter(
'tuser_task_scheduled',
'id_grupo IN ('.$user_groups.')'
);
if (!check_acl($config['id_user'], 0, 'PM')) {
$read_tasks = [];
foreach ($defined_tasks as $task) {
$function_name = db_get_value(
'function_name',
'tuser_task',
'id',
$task['id_user_task']
);
if (($function_name != 'cron_task_execute_custom_script')
&& ($function_name != 'cron_task_do_backup')
) {
$read_tasks[] = $task;
}
}
$defined_tasks = $read_tasks;
if (empty($defined_tasks)) {
$defined_tasks = false;
}
}
if ($defined_tasks !== false) {
echo '<h2>'.__('Console task').'</h2>';
$table = new stdClass();
$table->class = 'databox data';
$table->width = '100%';
$table->data = [];
$table->head = [];
$table->head[0] = '';
$table->head[1] = __('User');
$table->head[2] = __('Task');
$table->head[3] = __('Scheduled');
$table->head[4] = __('Next execution');
$table->head[5] = __('Last run');
$table->head[6] = __('Group');
$table->head[7] = __('Operations');
$table->align[7] = 'left';
foreach ($defined_tasks as $task) {
$data = [];
$function_name = db_get_value(
'function_name',
'tuser_task',
'id',
$task['id_user_task']
);
switch ($function_name) {
case 'cron_task_generate_report':
if ($write_perms || $manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
$report = reports_get_report($args[0]);
// Check ACL in reports_get_report return false.
if ($report === false) {
continue;
}
$email = $args[1];
$data[2] .= '<br>- '.__('Report').": <a href='index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=".$args[0]."'>";
$data[2] .= $report['name'].'</a>';
$data[2] .= '<br>- '.__('Email').": <a href='mailto:".$email."'>";
$data[2] .= ui_print_truncate_text(
$email,
60,
false
).'</a>';
break;
case 'cron_task_generate_report_by_template':
if ($write_perms || $manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
$filter = [];
$filter['id_report'] = $args[0];
$template = db_get_row_filter(
'treport_template',
$filter,
false
);
// Check ACL in reports_get_report return false.
if ($template === false) {
continue;
}
$agents_id = $args[1];
$id_group = $args[2];
$report_per_agent = $args[0];
$report_name = $args[3];
$email = $args[4];
$data[2] .= '<br>- '.__('Template').": <a href='index.php?sec=reporting&sec2=operation/reporting/reporting_viewer";
$data[2] .= '&id='.$args[0]."'>".$template['name'].'</a>';
$data[2] .= '<br>- '.__('Agents').': '.$agents_id.'</a>';
$data[2] .= '<br>- '.__('Report per agent').': '.$report_per_agent.'</a>';
$data[2] .= '<br>- '.__('Report name').': '.$report_name.'</a>';
$data[2] .= '<br>- '.__('Email').": <a href='mailto:".$email."'>".$email.'</a>';
break;
case 'cron_task_execute_custom_script':
if ($manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
$data[2] .= '<br>- '.__('Custom script').': '.$args[0];
break;
case 'cron_task_save_report_to_disk':
if ($write_perms || $manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
$report = reports_get_report($args[0]);
// Check ACL in reports_get_report return false.
if ($report === false) {
continue;
}
$path = $args[1];
$data[2] .= '<br>- '.__('Report').": <a href='index.php?sec=reporting&sec2=operation/reporting/reporting_viewer";
$data[2] .= '&id='.$args[0]."'>".$report['name'].'</a>';
$data[2] .= '<br>- '.__('Path').': '.$path.'</a>';
break;
case 'cron_task_save_xml_report_to_disk':
if ($write_perms || $manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value('name', 'tuser_task', 'id', $task['id_user_task']);
$args = unserialize($task['args']);
$report = reports_get_report($args[0]);
// Check ACL in reports_get_report return false.
if ($report === false) {
continue;
}
$path = $args[1];
$data[2] .= '<br>- '.__('Report').": <a href='index.php?sec=reporting&sec2=operation/reporting/reporting_viewer";
$data[2] .= '&id='.$args[0]."'>".$report['name'].'</a>';
$data[2] .= '<br>- '.__('Path').': '.$path.'</a>';
break;
case 'cron_task_do_backup':
if ($manage_pandora) {
$data[0] = '<a href="'.$url;
$data[0] .= 'force_run=1&id_console_task='.$task['id'].'">';
$data[0] .= html_print_image(
'images/target.png',
true,
['title' => __('Force run')]
);
$data[0] .= '</a>';
} else {
$data[0] = '';
}
$data[1] = $task['id_usuario'];
$data[2] = db_get_value(
'name',
'tuser_task',
'id',
$task['id_user_task']
);
$args = unserialize($task['args']);
break;
default:
// Ignore.
break;
}
$data[3] = cron_get_scheduled_string($task['scheduled']);
$data[4] = date('Y/m/d H:i:s', $args['first_execution']);
$data[5] = empty($task['last_run']) ? __('Never') : date('Y/m/d H:i:s', $task['last_run']);
$data[6] = ui_print_group_icon($task['id_grupo'], true);
if ($function_name == 'cron_task_do_backup' || $function_name == 'cron_task_execute_custom_script') {
if ($manage_pandora) {
$data[7] = '<a href="'.ui_get_full_url(
sprintf(
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
$this->getTargetWiz(['description' => 'console_task']),
$task['id']
)
).'">';
$data[7] .= html_print_image(
'images/config.png',
true,
['title' => __('Edit')]
).'</a>';
}
if ($manage_pandora) {
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_console_task=1&id_console_task='.$task['id'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[7] .= html_print_image(
'images/cross.png',
true,
['title' => __('Delete')]
);
$data[7] .= '</a>';
}
} else {
if ($write_perms || $manage_pandora) {
$data[7] = '<a href="'.ui_get_full_url(
sprintf(
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
$this->getTargetWiz(['description' => 'console_task']),
$task['id']
)
).'">';
$data[7] .= html_print_image(
'images/config.png',
true,
['title' => __('Edit')]
).'</a>';
}
if ($manage_perms || $manage_pandora) {
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_console_task=1&id_console_task='.$task['id'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[7] .= html_print_image(
'images/cross.png',
true,
['title' => __('Delete')]
);
$data[7] .= '</a>';
}
}
array_push($table->data, $data);
}
html_print_table($table);
} else {
return false;
}
return true;
} }

View File

@ -29,6 +29,7 @@
require_once __DIR__.'/Wizard.main.php'; require_once __DIR__.'/Wizard.main.php';
require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_users.php';
enterprise_include('include/class/CSVImportAgents.class.php'); enterprise_include('include/class/CSVImportAgents.class.php');
enterprise_include_once('include/functions_hostdevices.php');
/** /**
* Wizard section Host&devices. * Wizard section Host&devices.
@ -476,6 +477,10 @@ class HostDevices extends Wizard
$task_url = '&task='.$this->task['id_rt']; $task_url = '&task='.$this->task['id_rt'];
} }
$breadcrum[] = [
'link' => 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd',
'label' => __($this->label),
];
for ($i = 0; $i < $this->maxPagesNetScan; $i++) { for ($i = 0; $i < $this->maxPagesNetScan; $i++) {
$breadcrum[] = [ $breadcrum[] = [
'link' => 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd&mode=netscan&page='.$i.$task_url, 'link' => 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd&mode=netscan&page='.$i.$task_url,
@ -710,9 +715,6 @@ $("select#interval_manual_defined").change(function() {
// XXX: Could be improved validating inputs before continue (JS) // XXX: Could be improved validating inputs before continue (JS)
// Print NetScan page 0. // Print NetScan page 0.
$this->printForm($form); $this->printForm($form);
$this->printGoBackButton(
$this->url.'&page='.($this->page - 1).$task_url
);
} }
} }
@ -779,266 +781,17 @@ $("select#interval_manual_defined").change(function() {
]; ];
} }
if (enterprise_installed()) {
// Feature configuration. // Feature configuration.
// Input: SNMP enabled. $extra = enterprise_hook('hd_showextrainputs', [$this]);
$form['inputs'][] = [ if (is_array($extra) === true) {
'label' => __('SNMP enabled'), $form['inputs'] = array_merge(
'arguments' => [ $form['inputs'],
'name' => 'snmp_enabled', $extra['inputs']
'type' => 'switch', );
'return' => true, $form['js'] = $extra['js'];
'value' => (isset($this->task['snmp_enabled'])) ? $this->task['snmp_enabled'] : 1, }
'onclick' => 'extraSNMP();', }
],
];
// SNMP CONFIGURATION.
$form['inputs'][] = [
'hidden' => 1,
'block_id' => 'snmp_extra',
'block_content' => [
[
'label' => __('SNMP version'),
'arguments' => [
'name' => 'snmp_version',
'fields' => [
'1' => 'v. 1',
'2c' => 'v. 2c',
'3' => 'v. 3',
],
'type' => 'select',
'script' => 'SNMPExtraShow(this.value)',
'selected' => $this->task['snmp_version'],
'return' => true,
],
],
],
];
// SNMP Options pack v1.
$form['inputs'][] = [
'hidden' => 1,
'block_id' => 'snmp_options_basic',
'block_content' => [
[
'label' => '<b>'.__('SNMP Default community').'</b>'.ui_print_help_tip(
__(
'You can specify several values, separated by commas, for example: public,mysecret,1234'
),
true
),
'arguments' => [
'name' => 'community',
'type' => 'text',
'value' => $this->task['snmp_community'],
'size' => 25,
'return' => true,
],
],
],
];
// SNMP Options pack v3.
$form['inputs'][] = [
'hidden' => 1,
'block_id' => 'snmp_options_v3',
'block_content' => [
[
'label' => '<b>'.__('Context').'</b>',
'arguments' => [
'name' => 'snmp_context',
'type' => 'text',
'value' => $this->task['snmp_community'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Auth user').'</b>',
'arguments' => [
'name' => 'snmp_auth_user',
'type' => 'text',
'value' => $this->task['snmp_auth_user'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Auth password').'</b>'.ui_print_help_tip(
__(
'The pass length must be eight character minimum.'
),
true
),
'arguments' => [
'name' => 'snmp_auth_pass',
'type' => 'password',
'value' => $this->task['snmp_auth_pass'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Privacy method').'</b>',
'arguments' => [
'name' => 'snmp_privacy_method',
'type' => 'select',
'fields' => [
'DES' => __('DES'),
'AES' => __('AES'),
],
'selected' => $this->task['snmp_privacy_method'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Privacy pass').'</b>'.ui_print_help_tip(
__(
'The pass length must be eight character minimum.'
),
true
),
'arguments' => [
'name' => 'snmp_privacy_pass',
'type' => 'password',
'value' => $this->task['snmp_privacy_pass'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Auth method').'</b>',
'arguments' => [
'name' => 'snmp_auth_method',
'type' => 'select',
'fields' => [
'MD5' => __('MD5'),
'SHA' => __('SHA'),
],
'selected' => $this->task['snmp_auth_method'],
'size' => 15,
'return' => true,
],
],
[
'label' => '<b>'.__('Security level').'</b>',
'arguments' => [
'name' => 'snmp_security_level',
'type' => 'select',
'fields' => [
'noAuthNoPriv' => __('Not auth and not privacy method'),
'authNoPriv' => __('Auth and not privacy method'),
'authPriv' => __('Auth and privacy method'),
],
'selected' => $this->task['snmp_security_level'],
'size' => 15,
'return' => true,
],
],
],
];
// Input: WMI enabled.
$form['inputs'][] = [
'label' => __('WMI enabled'),
'arguments' => [
'name' => 'wmi_enabled',
'type' => 'switch',
'value' => (isset($this->task['wmi_enabled'])) ? $this->task['wmi_enabled'] : 0,
'return' => true,
'onclick' => 'toggleWMI();',
],
];
// WMI CONFIGURATION.
$form['inputs'][] = [
'block_id' => 'wmi_extra',
'hidden' => 1,
'block_content' => [
[
'label' => '<b>'.__('WMI Auth. strings').'</b>'.ui_print_help_tip(
__(
'Auth strings must be defined as user%pass, comma separated as many you need.'
),
true
),
'arguments' => [
'name' => 'auth_strings',
'type' => 'text',
'value' => $this->task['auth_strings'],
'return' => true,
],
],
],
];
// Input: Enforce os detection.
$form['inputs'][] = [
'label' => __('OS detection'),
'arguments' => [
'name' => 'os_detect',
'type' => 'switch',
'return' => true,
'value' => (isset($this->task['os_detect'])) ? $this->task['os_detect'] : 1,
],
];
// Input: Name resolution.
$form['inputs'][] = [
'label' => __('Name resolution'),
'arguments' => [
'name' => 'resolve_names',
'type' => 'switch',
'return' => true,
'value' => (isset($this->task['resolve_names'])) ? $this->task['resolve_names'] : 0,
],
];
// Input: Parent detection.
$form['inputs'][] = [
'label' => __('Parent detection'),
'arguments' => [
'name' => 'parent_detection',
'type' => 'switch',
'return' => true,
'value' => (isset($this->task['parent_detection'])) ? $this->task['parent_detection'] : 1,
],
];
// Input: Parent recursion.
$form['inputs'][] = [
'label' => __('Parent recursion'),
'arguments' => [
'name' => 'parent_recursion',
'type' => 'switch',
'return' => true,
'value' => (isset($this->task['parent_recursion'])) ? $this->task['parent_recursion'] : 1,
],
];
// Input: VLAN enabled.
$form['inputs'][] = [
'label' => __('VLAN enabled'),
'arguments' => [
'name' => 'vlan_enabled',
'type' => 'switch',
'return' => true,
'value' => (isset($this->task['vlan_enabled'])) ? $this->task['vlan_enabled'] : 1,
],
];
// Submit button. // Submit button.
$form['inputs'][] = [ $form['inputs'][] = [
@ -1051,57 +804,6 @@ $("select#interval_manual_defined").change(function() {
], ],
]; ];
$form['js'] = '
function SNMPExtraShow(target) {
$("#snmp_options_basic").hide();
$("#snmp_options_v3").hide();
if (document.getElementsByName("snmp_enabled")[0].checked) {
$("#snmp_extra").show();
if (target == 3) {
$("#snmp_options_v3").show();
} else {
$("#snmp_options_basic").show();
}
}
}
function extraSNMP() {
if (document.getElementsByName("snmp_enabled")[0].checked) {
SNMPExtraShow($("#snmp_version").val());
$("#snmp_extra").show();
} else {
// Hide unusable sections
$("#snmp_extra").hide();
$("#snmp_options_basic").hide();
$("#snmp_options_v3").hide();
// Disable snmp dependant checks
if (document.getElementsByName("parent_recursion")[0].checked)
$("input[name=parent_recursion]").click();
if (document.getElementsByName("parent_detection")[0].checked)
$("input[name=parent_detection]").click();
if (document.getElementsByName("vlan_enabled")[0].checked)
$("input[name=vlan_enabled]").click();
}
}
function toggleWMI() {
if (document.getElementsByName("wmi_enabled")[0].checked)
$("#wmi_extra").show();
else
$("#wmi_extra").hide();
}
$(function() {
SNMPExtraShow($("#snmp_version").val());
toggleWMI();
});
';
$form['form'] = [ $form['form'] = [
'method' => 'POST', 'method' => 'POST',
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).'&task='.$this->task['id_rt'], 'action' => $this->url.'&mode=netscan&page='.($this->page + 1).'&task='.$this->task['id_rt'],

View File

@ -1,11 +1,39 @@
<?php <?php
/** /**
* Interfaz tope gama que obliga a implementar metodos. * Extension to schedule tasks on Pandora FMS Console
*
* @category Wizard
* @package Pandora FMS
* @subpackage Wizard skel
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 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.
* ============================================================================
*/ */
define('CLOUDWIZARD_AWS_DESCRIPTION', 'Discovery.Cloud.AWS.EC2'); define('CLOUDWIZARD_AWS_DESCRIPTION', 'Discovery.Cloud.AWS.EC2');
/**
* Global Wizard generic class. Needs to be inherited.
*
* Used in Hostdevices class, Applications class and others, is the core of
* Discovery proyect.
*/
class Wizard class Wizard
{ {
@ -17,9 +45,9 @@ class Wizard
public $breadcrum; public $breadcrum;
/** /**
* Undocumented variable * Current page
* *
* @var [type] * @var integer
*/ */
public $page; public $page;
@ -498,6 +526,8 @@ class Wizard
/** /**
* Prints a go back button redirecting to main page. * Prints a go back button redirecting to main page.
* *
* @param string $url Optional target url.
*
* @return void * @return void
*/ */
public function printGoBackButton($url=null) public function printGoBackButton($url=null)

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

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