Merge branch 'develop' into '825-La-pantalla-de-login-con-mysql-parado/no-configurado-no-se-ve-correctamente'

# Conflicts:
#   pandora_console/general/login_page.php
This commit is contained in:
Enrique Camargo 2017-05-18 15:23:20 +02:00
commit 2ccd799cbd
107 changed files with 947 additions and 299 deletions
pandora_agents
pandora_console
pandora_server

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.702
# Version 7.0NG.703
# 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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.702-170511
Version: 7.0NG.703-170518
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.702, GNU/Linux
# Version 7.0NG.703, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@ -46,6 +46,12 @@ agent_name_cmd __rand__
#Parent agent_name
#parent_agent_name caprica
# By default, agent takes machine alias
#agent_alias
# To define agent alias by specific command, define 'agent_alias_cmd'.
#agent_alias_cmd
# Agent description
#description This is a demo agent for Linux

View File

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

View File

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

View File

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

View File

@ -40,8 +40,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.702';
use constant AGENT_BUILD => '170511';
use constant AGENT_VERSION => '7.0NG.703';
use constant AGENT_BUILD => '170518';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -135,9 +135,10 @@ my %DefaultConf = (
'interval' => 300,
'debug' => 0,
'agent_name' => '',
'agent_alias' => hostname(),
'agent_alias' => '',
'ehorus_conf' => undef,
'agent_name_cmd' => '',
'agent_alias_cmd' => '',
'description' => '',
'group' => '',
'group_id' => undef,
@ -802,6 +803,23 @@ sub read_config (;$) {
# Module, plugin and collection definitions
parse_conf_modules(\@file);
# If agent_alias_cmd is defined, agent_alias is set by command result.
if ($Conf{'agent_alias'} eq '') {
if ($Conf{'agent_alias_cmd'} ne '') {
my $result = `$Conf{'agent_alias_cmd'}`;
# Use only the first line.
my ($temp_agent_alias, $remain2) = split(/\n/, $result);
chomp ($temp_agent_alias);
# Remove white spaces of the first and last.
$temp_agent_alias =~ s/^ *(.*?) *$/$1/;
$Conf{'agent_alias'} = $temp_agent_alias if ($temp_agent_alias ne '');
} else {
$Conf{'agent_alias'} = hostname();
}
}
# If agent_name_cmd is defined, agent_name is set by command result.
if ($Conf{'agent_name'} eq '') {

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.702
%define release 170511
%define version 7.0NG.703
%define release 170518
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.702
%define release 170511
%define version 7.0NG.703
%define release 170518
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2014 Artica Soluciones Tecnologicas
# Version 7.0NG.702
# Version 7.0NG.703
# 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

View File

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

View File

@ -368,7 +368,7 @@ Pandora_Module::getDataOutput (Pandora_Data *data) {
}
if (this->has_limits) {
if (value >= this->max || value <= this->min) {
if (value > this->max || value < this->min) {
pandoraLog ("The returned value was not in the interval on module %s",
this->module_name.c_str ());
throw Value_Error ();
@ -1789,5 +1789,9 @@ Pandora_Module::getIntensiveMatch () {
return this->intensive_match;
}
bool
Pandora_Module::getAsync () {
return this->async;
}

View File

@ -91,7 +91,7 @@ namespace Pandora_Modules {
MODULE_TCPCHECK, /**< The module checks whether a tcp port is open */
MODULE_REGEXP, /**< The module searches a file for matches of a regular expression */
MODULE_PLUGIN, /**< Plugin */
MODULE_PING, /**< Ping module */
MODULE_PING, /**< Ping module */
MODULE_SNMPGET /**< SNMP get module */
} Module_Kind;
@ -238,6 +238,7 @@ namespace Pandora_Modules {
void setTimeout (int timeout);
int getTimeout ();
string getSave ();
bool getAsync ();
virtual string getXml ();

View File

@ -52,6 +52,17 @@ Pandora_Module_Proc::Pandora_Module_Proc (string name, string process_name)
this->retries = 3;
this->start_delay = 5000;
this->retry_delay = 2000;
this->thread = 0;
}
/**
* Destroys a Pandora_Module_Service object.
*/
Pandora_Module_Proc::~Pandora_Module_Proc () {
// Close the thread if module is async
if (this->thread) {
TerminateThread(this->thread, 0);
}
}
string

View File

@ -38,6 +38,7 @@ namespace Pandora_Modules {
int retry_delay;
public:
Pandora_Module_Proc (string name, string process_name);
~Pandora_Module_Proc ();
string getProcessName () const;
string getStartCommand () const;

View File

@ -49,6 +49,16 @@ Pandora_Module_Service::Pandora_Module_Service (string name, string service_name
this->thread = 0;
this->watchdog = false;
}
/**
* Destroys a Pandora_Module_Service object.
*/
Pandora_Module_Service::~Pandora_Module_Service () {
// Close the thread if module is async
if (this->thread) {
TerminateThread(this->thread, 0);
}
}
string
Pandora_Module_Service::getServiceName () const {

View File

@ -36,6 +36,7 @@ namespace Pandora_Modules {
bool watchdog;
public:
Pandora_Module_Service (string name, string service_name);
~Pandora_Module_Service ();
void run ();
string getServiceName () const;

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.702(Build 170511)")
#define PANDORA_VERSION ("7.0NG.703(Build 170518)")
string pandora_path;
string pandora_dir;

View File

@ -228,6 +228,15 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
key_values->push_back (kv);
continue;
}
/*Check if is a agent_alias_cmd"*/
pos = buffer.find("agent_alias_cmd");
if (pos != string::npos){
Key_Value kv;
kv.parseLineByPosition(buffer, 15);
key_values->push_back (kv);
continue;
}
/*Check if is a collection*/
pos = buffer.find("file_collection");

View File

@ -76,6 +76,7 @@ Pandora_Windows_Service::setValues (const char * svc_name,
this->service_description = (char *) svc_description;
execution_number = 0;
this->modules = NULL;
this->broker_modules = NULL;
this->conf = NULL;
this->interval = 60000;
this->timestamp = 0;
@ -105,6 +106,10 @@ Pandora_Windows_Service::~Pandora_Windows_Service () {
if (this->modules != NULL) {
delete this->modules;
}
if (this->broker_modules != NULL) {
delete this->broker_modules;
}
pandoraLog ("Pandora agent stopped");
}
@ -136,10 +141,10 @@ Pandora_Windows_Service::pandora_init_broker (string file_conf) {
this->conf = Pandora::Pandora_Agent_Conf::getInstance ();
this->conf->setFile (file_conf);
if (this->modules != NULL) {
delete this->modules;
if (this->broker_modules != NULL) {
delete this->broker_modules;
}
this->modules = new Pandora_Module_List (file_conf);
this->broker_modules = new Pandora_Module_List (file_conf);
pandoraDebug ("Pandora broker agent started");
}
@ -208,9 +213,14 @@ Pandora_Windows_Service::check_broker_agents(string *all_conf){
void
Pandora_Windows_Service::pandora_init () {
pandora_init(true);
}
void
Pandora_Windows_Service::pandora_init (bool reload_modules) {
string conf_file, interval, debug, disable_logfile, intensive_interval, util_dir, path, env;
string udp_server_enabled, udp_server_port, udp_server_addr, udp_server_auth_addr;
string agent_name, agent_name_cmd, agent_alias, pandora_agent;
string agent_name, agent_name_cmd, agent_alias, agent_alias_cmd, pandora_agent;
string proxy_mode, server_ip;
string *all_conf;
int pos, num;
@ -224,7 +234,7 @@ Pandora_Windows_Service::pandora_init () {
this->conf = Pandora::Pandora_Agent_Conf::getInstance ();
this->conf->setFile (all_conf);
if (this->modules != NULL) {
if (this->modules != NULL && reload_modules) {
delete this->modules;
}
@ -255,9 +265,40 @@ Pandora_Windows_Service::pandora_init () {
this->setSleepTime (this->intensive_interval);
// Read modules
this->modules = new Pandora_Module_List (conf_file);
if (reload_modules) {
this->modules = new Pandora_Module_List (conf_file);
}
delete []all_conf;
// Get the agent alias.
agent_alias = conf->getValue ("agent_alias");
if (agent_alias == "") {
agent_alias_cmd = conf->getValue ("agent_alias_cmd");
if (agent_alias_cmd != "") {
agent_alias_cmd = "cmd.exe /c \"" + agent_alias_cmd + "\"";
static string temp_agent_alias = getAgentNameFromCmdExec(agent_alias_cmd);
// Delete new line and carriage return.
pos = temp_agent_alias.find("\n");
if(pos != string::npos) {
temp_agent_alias.erase(pos, temp_agent_alias.size () - pos);
}
pos = temp_agent_alias.find("\r");
if(pos != string::npos) {
temp_agent_alias.erase(pos, temp_agent_alias.size () - pos);
}
// Remove leading and trailing white spaces.
temp_agent_alias = trim(temp_agent_alias);
if (temp_agent_alias != "") {
agent_alias = temp_agent_alias;
}
} else {
agent_alias = Pandora_Windows_Info::getSystemName ();
}
}
this->conf->setValue("agent_alias", agent_alias);
// Get the agent name.
agent_name = conf->getValue ("agent_name");
if (agent_name == "") {
@ -299,13 +340,6 @@ Pandora_Windows_Service::pandora_init () {
this->conf->setValue("agent_name", agent_name);
}
// Get the agent alias.
agent_alias = conf->getValue ("agent_alias");
if (agent_alias == "") {
agent_alias = Pandora_Windows_Info::getSystemName ();
this->conf->setValue("agent_alias", agent_alias);
}
pandora_agent = "PANDORA_AGENT=" + agent_name;
putenv(pandora_agent.c_str());
@ -1834,19 +1868,19 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
server_addr = conf->getValue ("server_ip");
if (this->modules != NULL) {
this->modules->goFirst ();
if (this->broker_modules != NULL) {
this->broker_modules->goFirst ();
while (! this->modules->isLast ()) {
while (! this->broker_modules->isLast ()) {
Pandora_Module *module;
module = this->modules->getCurrentValue ();
module = this->broker_modules->getCurrentValue ();
/* Check preconditions */
if (module->evaluatePreconditions () == 0) {
pandoraDebug ("Preconditions not matched for module %s", module->getName ().c_str ());
module->setNoOutput ();
this->modules->goNext ();
this->broker_modules->goNext ();
continue;
}
@ -1854,15 +1888,23 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
if (module->checkCron (module->getInterval (), atoi (conf->getValue ("interval").c_str())) == 0) {
pandoraDebug ("Cron not matched for module %s", module->getName ().c_str ());
module->setNoOutput ();
this->modules->goNext ();
this->broker_modules->goNext ();
continue;
}
/* Check async */
if (module->getAsync()) {
pandoraDebug ("Forbidden async module %s in broker agents", module->getName ().c_str ());
module->setNoOutput ();
this->broker_modules->goNext ();
continue;
}
pandoraDebug ("Run %s", module->getName ().c_str ());
module->run ();
if (! module->hasOutput ()) {
module->setNoOutput ();
this->modules->goNext ();
this->broker_modules->goNext ();
continue;
}
@ -1875,7 +1917,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
intensive_match = module->evaluateIntensiveConditions ();
if (intensive_match == module->getIntensiveMatch () && module->getTimestamp () + module->getInterval () * this->interval_sec > this->run_time) {
module->setNoOutput ();
this->modules->goNext ();
this->broker_modules->goNext ();
continue;
}
module->setIntensiveMatch (intensive_match);
@ -1890,7 +1932,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
/* At least one module has data */
data_flag = 1;
this->modules->goNext ();
this->broker_modules->goNext ();
}
}
@ -1898,7 +1940,7 @@ Pandora_Windows_Service::pandora_run_broker (string config) {
// Send the XML
if (!server_addr.empty ()) {
this->sendXml (this->modules);
this->sendXml (this->broker_modules);
}
}
@ -2037,7 +2079,7 @@ Pandora_Windows_Service::pandora_run (int forced_run) {
/* Reload the original configuration */
if (num != 0) {
pandora_init ();
pandora_init (false);
}
/* Reset time reference if necessary */

View File

@ -42,6 +42,7 @@ namespace Pandora {
private:
Pandora_Agent_Conf *conf;
Pandora_Module_List *modules;
Pandora_Module_List *broker_modules;
long execution_number;
string agent_name;
string alias;
@ -98,6 +99,7 @@ namespace Pandora {
void pandora_run (int forced_run);
void pandora_run ();
void pandora_init ();
void pandora_init (bool reload_modules);
long interval;
long interval_sec;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.702(Build 170511))"
VALUE "ProductVersion", "(7.0NG.703(Build 170518))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,10 +1,10 @@
package: pandorafms-console
Version: 7.0NG.702-170511
Version: 7.0NG.703-170518
Architecture: all
Priority: optional
Section: admin
Installed-Size: 42112
Maintainer: Artica ST <deptec@artica.es>
Homepage: http://pandorafms.org/
Depends: php5, php5-snmp, php5-gd, php5-mysql, php-db, php5-xmlrpc, php-gettext, php5-curl, graphviz, dbconfig-common, php5-ldap, mysql-client | virtual-mysql-client
Depends: php5.6 | php5, php5.6-snmp | php5-snmp, php5.6-gd | php5-gd, php5.6-mysql | php5-mysql, php-db, php5.6-xmlrpc | php5-xmlrpc, php-gettext, php5.6-curl | php5-curl, graphviz, dbconfig-common, php5.6-ldap | php5-ldap, mysql-client | virtual-mysql-client
Description: Pandora FMS is an Open Source monitoring tool. It monitor your systems and applications, and allows you to control the status of any element of them. The web console is the graphical user interface (GUI) to manage the pool and to generate reports and graphs from the Pandora FMS monitoring process.

View File

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

View File

@ -15,7 +15,7 @@ if(!enterprise_installed()){
$open=true;
}
$tipo = $_GET['message'];
$tipo = $_POST['message'];
echo "
<div class='modalheader'>
@ -185,7 +185,7 @@ echo "
</div>";
if($open){
echo "<div class='modalgobutton gopandora'>
<span class='modalokbuttontext'>About Enterprise</span>
<span class='modalgobuttontext'>About Enterprise</span>
</div>";
}

View File

@ -32,7 +32,15 @@ if (!$config["MR"]) {
echo '<a class="white_bold footer" target="_blank" href="' . $config["homeurl"] . $license_file. '">';
echo sprintf(__('Pandora FMS %s - Build %s - MR %s', $pandora_version, $build_version, $config["MR"]));
if($current_package == 0){
$build_package_version = $build_version;
}
else{
$build_package_version = $current_package;
}
echo sprintf(__('Pandora FMS %s - Build %s - MR %s', $pandora_version, $build_package_version, $config["MR"]));
echo '</a><br />';
echo '<a class="white footer">'. __('Page generated at') . ' '. date('F j, Y h:i a'); //Always use timestamp here

View File

@ -83,12 +83,19 @@ echo '<div id="header_login">';
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="pandora_console">';
}
echo '</div>';
echo '<div id="list_icon_docs_support"><ul>';
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
echo '<li>' . __('Docs') . '</li>';
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
echo '<li>' . __('Support') . '</li>';
echo '</ul></div>';
echo '<div id="list_icon_docs_support"><ul>';
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
echo '<li>' . __('Docs') . '</li>';
if (defined ('PANDORA_ENTERPRISE')) {
echo '<li id="li_margin_left"><a href="https://support.artica.es" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
} else {
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="images/icono_support.png" alt="support pandora"></a></li>';
}
echo '<li>' . __('Support') . '</li>';
echo '</ul></div>';
echo '</div>';
echo '<div class="container_login">';

View File

@ -159,8 +159,7 @@ if ($create_agent) {
$intervalo = (string) get_parameter_post ("intervalo", SECONDS_5MINUTES);
$comentarios = (string) get_parameter_post ("comentarios", '');
$modo = (int) get_parameter_post ("modo");
$id_parent = (string) get_parameter_post ("id_parent",'');
$id_parent = (int) agents_get_agent_id ($id_parent);
$id_parent = (int) get_parameter_post ("id_agent_parent");
$server_name = (string) get_parameter_post ("server_name");
$id_os = (int) get_parameter_post ("id_os");
$disabled = (int) get_parameter_post ("disabled");
@ -690,8 +689,7 @@ if ($update_agent) { // if modified some agent paramenter
$id_os = (int) get_parameter_post ("id_os");
$disabled = (bool) get_parameter_post ("disabled");
$server_name = (string) get_parameter_post ("server_name", "");
$parent_name = (string) get_parameter_post ("id_parent");
$id_parent = (int) agents_get_agent_id ($parent_name);
$id_parent = (int) get_parameter_post ("id_agent_parent");
$custom_id = (string) get_parameter_post ("custom_id", "");
$cascade_protection = (int) get_parameter_post ("cascade_protection", 0);
$cascade_protection_module = (int) get_parameter ("cascade_protection_module", 0);

View File

@ -99,6 +99,7 @@ if ($agent_to_delete) {
if ($enable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 0), array('id_agente' => $enable_agent));
$alias = agents_get_alias($enable_agent);
if ($result) {
// Update the agent from the metaconsole cache
@ -106,10 +107,10 @@ if ($enable_agent) {
$values = array('disabled' => 0);
enterprise_hook ('agent_update_from_cache', array($enable_agent, $values));
db_pandora_audit("Agent management", 'Enable ' . $enable_agent);
db_pandora_audit("Agent management", 'Enable ' . $alias);
}
else {
db_pandora_audit("Agent management", 'Fail to enable ' . $enable_agent);
db_pandora_audit("Agent management", 'Fail to enable ' . $alias);
}
ui_print_result_message ($result,
@ -118,6 +119,7 @@ if ($enable_agent) {
if ($disable_agent) {
$result = db_process_sql_update('tagente', array('disabled' => 1), array('id_agente' => $disable_agent));
$alias = agents_get_alias($disable_agent);
if ($result) {
// Update the agent from the metaconsole cache
@ -125,10 +127,10 @@ if ($disable_agent) {
$values = array('disabled' => 1);
enterprise_hook ('agent_update_from_cache', array($disable_agent, $values));
db_pandora_audit("Agent management", 'Disable ' . $disable_agent);
db_pandora_audit("Agent management", 'Disable ' . $alias);
}
else {
db_pandora_audit("Agent management", 'Fail to disable ' . $disable_agent);
db_pandora_audit("Agent management", 'Fail to disable ' . $alias);
}
ui_print_result_message ($result,

View File

@ -882,6 +882,9 @@ $(document).ready (function () {
$('#dynamic_interval_select').change (function() {
disabled_status(disabledBecauseInPolicy);
});
$('#dynamic_interval').change (function() {
disabled_status(disabledBecauseInPolicy);
});
disabled_two_tailed(disabledBecauseInPolicy);
$('#checkbox-dynamic_two_tailed').change (function() {
@ -929,7 +932,7 @@ $(document).ready (function () {
//readonly and add class input
function disabled_status (disabledBecauseInPolicy) {
if($('#dynamic_interval_select').val() != 0){
if($('#dynamic_interval_select').val() != 0 && $('#dynamic_interval').val() != 0){
$('#text-min_warning').prop('readonly', true);
$('#text-min_warning').addClass('readonly');
$('#text-max_warning').prop('readonly', true);

View File

@ -633,8 +633,6 @@ echo '</form>';
if ($id_downtime > 0) {
echo "<td valign=top style='width:300px;padding-left:20px;'>";
// Show available agents to include into downtime
echo '<h4>' . __('Available agents') . ':</h4>';
$filter_group = (int) get_parameter("filter_group", 0);
@ -707,7 +705,8 @@ if ($id_downtime > 0) {
echo "<br /><br />";
html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false);
echo "</form>";
// Show available agents to include into downtime
echo '<h4>' . __('Available agents') . ':</h4>';
echo "<form method=post action='index.php?sec=estado&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>";
echo html_print_select ($agents, "id_agents[]", -1, '', _("Any"), -2, false, true, true, '', false, 'width: 180px;');

View File

@ -129,7 +129,8 @@ if (!$delete_template) {
alerts_meta_print_header ();
}
else {
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true);
//~ ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true);
ui_print_page_header (__('Alerts')." &raquo; ". __('Alert templates'), "images/gm_alerts.png", false, "", true);
}
}

View File

@ -59,9 +59,12 @@ if ($a_template !== false) {
alerts_meta_print_header();
}
else {
//~ ui_print_page_header (__('Alerts') .
//~ ' &raquo; ' . __('Configure alert template'), "",
//~ false, "alerts_config", true);
ui_print_page_header (__('Alerts') .
' &raquo; ' . __('Configure alert template'), "",
false, "alerts_config", true);
false, "", true);
}
}
else {

View File

@ -1497,13 +1497,11 @@ function set_static_graph_status(idElement, image, status) {
set_static_graph_status(idElement, image, data);
if($('#'+idElement+' table').css('float') == 'right' || $('#'+idElement+ ' table').css('float') == 'left'){
$('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2);
$('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2);
}
else{
$('#'+idElement+ ' img').css('margin-left',parseInt($('#'+idElement).css('width'))/2 - parseInt($('#'+idElement+ ' img').css('width'))/2);
$('#'+idElement+ ' img').css('margin-left', parseInt($('#'+idElement).css('width'))/2 - parseInt($('#'+idElement+ ' img').css('width'))/2);
}
}
});
@ -1849,11 +1847,9 @@ function get_image_url(img_src) {
});
}
function set_color_line_status(lines, line, id_data, values) {
function set_color_line_status(lines, id_data, values) {
metaconsole = $("input[name='metaconsole']").val();
var parameter = Array();
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
parameter.push ({name: "action", value: "get_color_line"});
@ -1875,7 +1871,6 @@ function set_color_line_status(lines, line, id_data, values) {
"node_end": id_data,
"color": color };
lines.push(line);
refresh_lines(lines, 'background', true);
@ -2250,7 +2245,7 @@ function createItem(type, values, id_data) {
lines.push(line);
set_color_line_status(lines, line, id_data, values);
set_color_line_status(lines, id_data, values);
refresh_lines(lines, 'background', true);
}
@ -2446,7 +2441,7 @@ function updateDB_visual(type, idElement , values, event, top, left) {
if (typeof(values['parent']) != 'undefined' && values['parent'] > 0 ) {
if (!found) {
set_color_line_status(lines, line, idElement, values);
set_color_line_status(lines, idElement, values);
}
}
@ -2465,6 +2460,7 @@ function updateDB_visual(type, idElement , values, event, top, left) {
refresh_lines(lines, 'background', true);
break;
}
refresh_lines(lines, 'background', true);
draw_user_lines("", 0, 0, 0 , 0, 0, true);
}
@ -2601,9 +2597,19 @@ function updateDB(type, idElement , values, event) {
url: get_url_ajax(),
data: parameter,
type: "POST",
dataType: 'text',
dataType: 'json',
success: function (data) {
updateDB_visual(type, idElement , values, event, top, left);
if (data['correct']) {
if (data['new_line']) {
var line = {"id": idElement,
"node_begin": values['parent'],
"node_end": idElement,
"color": '#cccccc' };
lines.push(line);
}
updateDB_visual(type, idElement , values, event, top, left);
}
}
});
}

View File

@ -41,7 +41,7 @@ $baseurl = ui_get_full_url(false, false, false, false);
var click_on_the_file_below_to_begin = "<?php echo __('Click on the file below to begin.'); ?>\n";
var updating = "<?php echo __('Updating'); ?>\n";
var package_updated_successfully = "<?php echo __('Package updated successfully.'); ?>\n";
var if_there_are_any_database_change = "<?php echo __('If there are any database change, it will be applied on the next login.'); ?>\n";
var if_there_are_any_database_change = "<?php echo __('If there are any database change, it will be applied.'); ?>\n";
var mr_available = "<?php echo __('Minor release available'); ?>\n";
var package_available = "<?php echo __('New package available'); ?>\n";
var mr_not_accepted = "<?php echo __('Minor release rejected. Changes will not apply.'); ?>\n";
@ -54,8 +54,9 @@ $baseurl = ui_get_full_url(false, false, false, false);
var package_success = "<?php echo __('Package updated successfully'); ?>\n";
var package_error = "<?php echo __('Error in package updated'); ?>\n";
var bad_mr_file = "<?php echo __('Database MR version is inconsistent, do you want to apply the package?'); ?>\n";
var text1_mr_file = "<?php echo __('There are a new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launch a '); ?>\n";
var mr_available_header = "<?php echo __('There are db changes'); ?>\n";
var text1_mr_file = "<?php echo __('There are new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launching '); ?>\n";
var text3_mr_file = "<?php echo __('planned downtime'); ?>\n";
var text4_mr_file = "<?php echo __(' to this process'); ?>\n";
var text1_package_file = "<?php echo __('There is a new update available'); ?>\n";

View File

@ -82,7 +82,7 @@ echo "<span class='loading' style='font-size:18pt;'>";
echo "<img src='images/wait.gif' />";
echo "</span><br><br>";
echo "<div><b>" . __('The last version of package installed is:') . "</b></div><br>";
echo "<div><b>" . __('The latest version of package installed is:') . "</b></div><br>";
echo "<div id='pkg_version' style='color:#82b92e;font-size:40pt;font-weight:bold;'>" . $current_package . "</div>";
echo "<div class='checking_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";
@ -147,7 +147,7 @@ var open = "<?php echo $open;?>";
if(open){
$(document).ready(function() {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message":"infomodal"},

View File

@ -36,7 +36,7 @@ $buttons = array(
'offline' => array(
'active' => ($tab == 'offline') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">' .
html_print_image ("images/box.disabled.png", true, array ("title" => __('Offline update manager'))) .'</a>'),
html_print_image ("images/box.png", true, array ("title" => __('Offline update manager'))) .'</a>'),
'online' => array(
'active' => ($tab == 'online') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">' .

View File

@ -23,6 +23,7 @@ enterprise_hook('open_meta_frame');
include_once($config['homedir'] . "/include/functions_profile.php");
include_once($config['homedir'] . '/include/functions_users.php');
include_once ($config['homedir'] . '/include/functions_groups.php');
include_once ($config['homedir'] . '/include/functions_visual_map.php');
$meta = false;
if(enterprise_installed() && defined("METACONSOLE")) {
@ -30,6 +31,7 @@ if(enterprise_installed() && defined("METACONSOLE")) {
}
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
enterprise_include_once ('include/functions_dashboard.php');
//Add the columns for the enterprise Pandora edition.
$enterprise_include = false;
@ -129,6 +131,9 @@ if ($new_user && $config['admin_can_add_user']) {
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$user_info['id_skin'] = '';
}
$user_info['section'] = '';
$user_info['data_section'] = '';
//This attributes are inherited from global configuration
$user_info['block_size'] = $config["block_size"];
$user_info['flash_chart'] = $config["flash_charts"];
@ -158,12 +163,25 @@ if ($create_user) {
$values['comments'] = (string) get_parameter ('comments');
$values['is_admin'] = (int) get_parameter ('is_admin', 0);
$values['language'] = get_parameter ('language', 'default');
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$values['id_skin'] = (int) get_parameter ('skin', 0);
}
$values['block_size'] = (int) get_parameter ('block_size', $config["block_size"]);
$values['flash_chart'] = (int) get_parameter ('flash_charts', $config["flash_charts"]);
$values['section'] = get_parameter ('section');
if (($values['section'] == 'Event list') || ($values['section'] == 'Group view') || ($values['section'] == 'Alert detail') || ($values['section'] == 'Tactical view') || ($values['section'] == 'Default')) {
$values["data_section"] = '';
} else if ($values['section'] == 'Dashboard') {
$values["data_section"] = $dashboard;
} else if (io_safe_output($values['section']) == 'Visual console') {
$values["data_section"] = $visual_console;
} else if ($values['section'] == 'Other'){
$values["data_section"] = get_parameter ('data_section');
}
if (enterprise_installed()) {
$values['force_change_pass'] = 1;
$values['last_pass_change'] = date ("Y/m/d H:i:s", get_system_time());
@ -266,12 +284,27 @@ if ($update_user) {
$values['comments'] = (string) get_parameter ('comments');
$values['is_admin'] = get_parameter ('is_admin', 0 );
$values['language'] = (string) get_parameter ('language');
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$values['id_skin'] = get_parameter ('skin', 0);
}
$values['block_size'] = get_parameter ('block_size', $config["block_size"]);
$values['flash_chart'] = get_parameter ('flash_charts', $config["flash_charts"]);
$values['section'] = get_parameter ('section');
if (($values['section'] == 'Event list') || ($values['section'] == 'Group view') || ($values['section'] == 'Alert detail') || ($values['section'] == 'Tactical view') || ($values['section'] == 'Default')) {
$values["data_section"] = '';
} else if ($values['section'] == 'Dashboard') {
$values["data_section"] = $dashboard;
} else if (io_safe_output($values['section']) == 'Visual console') {
$values["data_section"] = $visual_console;
} else if ($values['section'] == 'Other'){
$values["data_section"] = get_parameter ('data_section');
}
if(enterprise_installed() && defined('METACONSOLE')) {
$values['metaconsole_access'] = get_parameter ('metaconsole_access');
$values['metaconsole_agents_manager'] = get_parameter ('metaconsole_agents_manager', '0');
@ -282,6 +315,7 @@ if ($update_user) {
$values["strict_acl"] = (bool)get_parameter ('strict_acl', false);
$values["session_time"] = (int)get_parameter('session_time', 0);
$res1 = update_user ($id, $values);
if ($config['user_can_update_password']) {
@ -324,7 +358,8 @@ if ($update_user) {
' Phone: ' . $values['phone'] . ' Comments: ' . $values['comments'] .
' Is_admin: ' . $values['is_admin'] .
' Language: ' . $values['language'] .
' Block size: ' . $values['block_size'] . ' Flash Chats: ' . $values['flash_chart'];
' Block size: ' . $values['block_size'] . ' Flash Chats: ' . $values['flash_chart'] .
' Section: ' . $values['section'];
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
$info .= ' Skin: ' . $values['id_skin'];
@ -512,15 +547,59 @@ if (!$meta) {
}
}
$table->data[11][0] = __('Interactive charts'). ' ' .ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ;
$table->data[11][0] = __('Interactive charts').' '.ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ;
$values = array(-1 => __('Use global conf'), 1 => __('Yes'), 0 => __('No'));
$table->data[11][1] = html_print_select($values, 'flash_charts',
$user_info["flash_chart"], '', '', -1, true, false, false);
$table->data[12][0] = __('Block size for pagination');
$table->data[12][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);
$table->data[12][0] = __('Home screen').
ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true);
$values = array (
'Default' =>__('Default'),
'Visual console'=>__('Visual console'),
'Event list'=>__('Event list'),
'Group view'=>__('Group view'),
'Tactical view'=>__('Tactical view'),
'Alert detail' => __('Alert detail'),
'Other'=>__('Other'));
if (enterprise_installed()) {
$values['Dashboard'] = __('Dashboard');
}
$table->data[12][1] = html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false);
if (enterprise_installed()) {
$dashboards = dashboard_get_dashboards();
$dashboards_aux = array();
if ($dashboards === false) {
$dashboards = array('None'=>'None');
}
else {
foreach ($dashboards as $key => $dashboard) {
$dashboards_aux[$dashboard['name']] = $dashboard['name'];
}
}
$table->data[12][1] .= html_print_select ($dashboards_aux, 'dashboard', $user_info["data_section"], '', '', '', true);
}
$layouts = visual_map_get_user_layouts ($config['id_user'], true);
$layouts_aux = array();
if ($layouts === false) {
$layouts_aux = array('None'=>'None');
}
else {
foreach ($layouts as $layout) {
$layouts_aux[$layout] = $layout;
}
}
$table->data[12][1] .= html_print_select ($layouts_aux, 'visual_console', $user_info["data_section"], '', '', '', true);
$table->data[12][1] .= html_print_input_text ('data_section', $user_info["data_section"], '', 60, 255, true, false);
$table->data[13][0] = __('Block size for pagination');
$table->data[13][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);
if ($id == $config['id_user']) {
$table->data[12][1] .= html_print_input_hidden('quick_language_change', 1, true);
$table->data[13][1] .= html_print_input_hidden('quick_language_change', 1, true);
}
if (enterprise_installed() && defined('METACONSOLE')) {
@ -528,25 +607,25 @@ if (enterprise_installed() && defined('METACONSOLE')) {
if (isset($user_info["metaconsole_access"])) {
$user_info_metaconsole_access = $user_info["metaconsole_access"];
}
$table->data[12][0] = __('Metaconsole access'). ' ' .ui_print_help_icon ('meta_access', true);
$table->data[13][0] = __('Metaconsole access'). ' ' .ui_print_help_icon ('meta_access', true);
$metaconsole_accesses = array('basic' => __('Basic'),
'advanced' => __('Advanced'));
$table->data[12][1] = html_print_select($metaconsole_accesses,
$table->data[13][1] = html_print_select($metaconsole_accesses,
'metaconsole_access', $user_info_metaconsole_access,
'','',-1,true, false, false);
}
$table->data[13][0] = __('Not Login');
$table->data[13][0] .= ui_print_help_tip(__('The user with not login set only can access to API.'), true);
$table->data[13][1] = html_print_checkbox('not_login', 1, $user_info["not_login"], true);
$table->data[14][0] = __('Not Login');
$table->data[14][0] .= ui_print_help_tip(__('The user with not login set only can access to API.'), true);
$table->data[14][1] = html_print_checkbox('not_login', 1, $user_info["not_login"], true);
$table->data[14][0] = __('Strict ACL');
$table->data[14][0] .= ui_print_help_tip(__('With this option enabled, the user will can access to accurate information. It is not recommended for admin users because performance could be affected'), true);
$table->data[14][1] = html_print_checkbox('strict_acl', 1, $user_info["strict_acl"], true);
$table->data[15][0] = __('Strict ACL');
$table->data[15][0] .= ui_print_help_tip(__('With this option enabled, the user will can access to accurate information. It is not recommended for admin users because performance could be affected'), true);
$table->data[15][1] = html_print_checkbox('strict_acl', 1, $user_info["strict_acl"], true);
$table->data[15][0] = __('Session Time');
$table->data[15][0] .= ui_print_help_tip(__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), true);
$table->data[15][1] = html_print_input_text ('session_time', $user_info["session_time"], '', 5, 5, true);
$table->data[16][0] = __('Session Time');
$table->data[16][0] .= ui_print_help_tip(__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), true);
$table->data[16][1] = html_print_input_text ('session_time', $user_info["session_time"], '', 5, 5, true);
if($meta) {
enterprise_include('include/functions_metaconsole.php');
@ -738,6 +817,56 @@ $(document).ready (function () {
$('input:radio[name="is_admin"]').trigger('change');
$('#checkbox-metaconsole_agents_manager').trigger('change');
show_data_section();
});
function show_data_section () {
section = $("#section").val();
switch (section) {
case <?php echo "'" . 'Dashboard' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Visual console' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "");
break;
case <?php echo "'" . 'Event list' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Group view' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Tactical view' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Alert detail' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Other' . "'"; ?>:
$("#text-data_section").css("display", "");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
case <?php echo "'" . 'Default' . "'"; ?>:
$("#text-data_section").css("display", "none");
$("#dashboard").css("display", "none");
$("#visual_console").css("display", "none");
break;
}
}
/* ]]> */
</script>

Binary file not shown.

After

(image error) Size: 235 B

Binary file not shown.

After

(image error) Size: 284 B

View File

@ -616,10 +616,20 @@ switch ($action) {
}
}
$item_in_db = db_get_row_filter ('tlayout_data', array ('id' => $id_element));
if (($item_in_db['parent_item'] == 0) && ($values['parent_item'] != 0)) {
$new_line = 1;
}
$result = db_process_sql_update('tlayout_data', $values,
array('id' => $id_element));
echo (int)$result;
$return_val = array();
$return_val['correct'] = (int)$result;
$return_val['new_line'] = $new_line;
echo json_encode($return_val);
break;
}
break;

View File

@ -22,8 +22,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC170511';
$pandora_version = 'v7.0NG.702';
$build_version = 'PC170518';
$pandora_version = 'v7.0NG.703';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -1990,9 +1990,32 @@ function get_os_name ($id_os) {
* @return array Dashboard name of the given user.
*/
function get_user_dashboards ($id_user) {
$sql = "SELECT name
FROM tdashboard
WHERE id_user="."'".$id_user."'";
if (users_is_admin($id_user)) {
$sql = "SELECT name
FROM tdashboard WHERE id_user = '" . $id_user ."' OR id_user = ''";
}
else {
$user_can_manage_all = users_can_manage_group_all('RR');
if ($user_can_manage_all) {
$sql = "SELECT name
FROM tdashboard WHERE id_user = '" . $id_user ."' OR id_user = ''";
}
else {
$user_groups = users_get_groups($id_user, "RR", false);
if (empty($user_groups)) {
return false;
}
$u_groups = array();
foreach ($user_groups as $id => $group_name) {
$u_groups[] = $id;
}
$sql = "SELECT name
FROM tdashboard
WHERE id_group IN (" . implode(",", $u_groups) . ") AND (id_user = '" . $id_user ."' OR id_user = '')";
}
}
return db_get_all_rows_sql ($sql);
}

View File

@ -1836,6 +1836,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
continue;
$agent_name = agents_get_name($id_agent, "");
$agent_alias = io_safe_output(agents_get_alias($id_agent));
/* Check for deletion permissions */
$id_group = agents_get_agent_group ($id_agent);
@ -1943,6 +1944,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
if (enterprise_hook('config_agents_has_remote_configuration', array($id_agent))) {
$agent_name = agents_get_name($id_agent);
$agent_name = io_safe_output($agent_name);
$agent_alias = io_safe_output(agents_get_alias($id_agent));
$agent_md5 = md5 ($agent_name, false);
// Agent remote configuration editor
@ -1957,7 +1959,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
if ($error) {
db_pandora_audit( "Agent management",
"Error: Deleted agent '$agent_name', the error is in the delete conf or md5.");
"Error: Deleted agent '$agent_alias', the error is in the delete conf or md5.");
}
}
}
@ -1969,7 +1971,7 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
db_process_sql ("delete from ttag_module where id_agente_modulo in (select id_agente_modulo from tagente_modulo where id_agente = ".$id_agent.")");
db_pandora_audit( "Agent management",
"Deleted agent '$agent_name'");
"Deleted agent '$agent_alias'");
// Delete the agent from the metaconsole cache
enterprise_include_once('include/functions_agents.php');

View File

@ -353,9 +353,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
elseif ($period < SECONDS_1MONTH) {
$time_format = "M \nd H\h";
}
else {
elseif ($period < SECONDS_6MONTHS) {
$time_format = "M \nd H\h";
}
else {
$time_format = "M Y";
}
}
else {
// Set the title and time format
@ -371,9 +374,12 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i
elseif ($period < SECONDS_1MONTH) {
$time_format = "M d H\h";
}
else {
elseif ($period < SECONDS_6MONTHS) {
$time_format = "M d H\h";
}
else {
$time_format = "M Y";
}
}
$timestamp_short = date($time_format, $timestamp);
@ -2304,10 +2310,9 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value
require_once("include_graph_dependencies.php");
include_graphs_dependencies($config['homedir'].'/');
$src = ui_get_full_url(
"/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbar" .
"&width=".$width."&height=".$height."&progress=".$progress.
"&width=".$width."&homedir=".$config['homedir']."&height=".$height."&progress=".$progress.
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str .
"&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text .
"&colorRGB=". $colorRGB, false, false, false

View File

@ -737,7 +737,7 @@ function html_print_extended_select_for_time ($name, $selected = '',
if (!is_user_admin($config['id_user'])) {
unset($fields[-1]);
$returnString = html_print_select ($fields, $name, $selected,"" . $script,
$returnString = html_print_select ($fields, $name . '_select', $selected,"" . $script,
$nothing, $nothing_value, true, false, false, '', false, 'font-size: xx-small;'.$select_style);
if ($return) {

View File

@ -49,6 +49,9 @@ function menu_print_menu (&$menu) {
'') .
'>';
// Use $config because a global var is required because normal
// and godmode menu are painted separately
if (!isset($config['count_main_menu'])) $config['count_main_menu'] = 0;
foreach ($menu as $mainsec => $main) {
$extensionInMenuParameter = (string) get_parameter ('extension_in_menu','');
@ -369,6 +372,12 @@ function menu_print_menu (&$menu) {
$sub_title = '';
}
// Added a top on inline styles
$top = menu_calculate_top($config['count_main_menu'], $count_sub, $count_sub2);
if ($top !== 0) {
$display = rtrim($display, "'");
$display .= "top: " . $top . "px;'";
}
//Add submenu2 to submenu string
$submenu_output .= "<ul id='sub" . str_replace(' ','_',$sub["id"]) . "' class=submenu2 $display>";
$submenu_output .= $submenu2_list;
@ -419,10 +428,12 @@ function menu_print_menu (&$menu) {
$visible = false;
}
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
$top = menu_calculate_top($config["count_main_menu"], $count_sub);
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'" style="top: ' . $top . 'px">';
$output .= $submenu_output;
$output .= '</ul>';
}
$config["count_main_menu"]++;
$output .= '</li>';
echo $output;
$menu_selected = false;
@ -718,4 +729,31 @@ function menu_sec3_in_sec2($sec,$sec2,$sec3) {
return false;
}
// Positionate the menu element. Added a negative top.
// 35px is the height of a menu item
function menu_calculate_top($level1, $level2, $level3 = false) {
$level2--;
if ($level3 !== 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 - ( floor($comp/2) * 35);
}
// Positionate in the bottom
if ($total >= 18) {
return - $comp * 35;
}
// return 0 by default
return 0;
}
?>

View File

@ -1640,20 +1640,12 @@ function ui_pagination ($count, $url = false, $offset = 0,
}
$number_of_pages = ceil($count / $pagination);
//~ html_debug_print('number_of_pages');
//~ html_debug_print($number_of_pages);
$actual_page = floor($offset / $pagination);
//~ html_debug_print('actual_page');
//~ html_debug_print($actual_page);
$ini_page = floor($actual_page / $block_limit) * $block_limit;
//~ html_debug_print('ini_page');
//~ html_debug_print($ini_page);
$end_page = $ini_page + $block_limit - 1;
if ($end_page > $number_of_pages) {
$end_page = $number_of_pages - 1;
}
//~ html_debug_print('end_page');
//~ html_debug_print($end_page);
$output = "<div class='pagination $other_class'>";
@ -2909,6 +2901,11 @@ function ui_print_agent_autocomplete_input($parameters) {
if (isset($parameters['input_id_server_value'])) {
$input_id_server_value = $parameters['input_id_server_value'];
}
$from_ux_transaction = ''; //Default value
if (isset($parameters['from_ux'])) {
$from_ux_transaction = $parameters['from_ux'];
}
$metaconsole_enabled = false; //Default value
@ -2996,10 +2993,39 @@ function ui_print_agent_autocomplete_input($parameters) {
if (isset($parameters['javascript_name_function_select'])) {
$javascript_name_function_select = $parameters['javascript_name_function_select'];
}
$javascript_code_function_select = '
if ($from_ux_transaction != "") {
$javascript_code_function_select = '
function function_select_' . $input_name . '(agent_name) {
console.log(agent_name);
$("#' . $selectbox_id . '").empty();
var inputs = [];
inputs.push ("id_agent=" + $("#' . $hidden_input_idagent_id . '").val());
inputs.push ("get_agent_transactions=1");
inputs.push ("page=enterprise/include/ajax/ux_transaction.ajax");
jQuery.ajax ({
data: inputs.join ("&"),
type: "POST",
url: action="' . $javascript_ajax_page . '",
dataType: "json",
success: function (data) {
if (data) {
$("#' . $selectbox_id . '").append ($("<option value=0>None</option>"));
jQuery.each (data, function (id, value) {
$("#' . $selectbox_id . '").append ($("<option value=" + id + ">" + value + "</option>"));
});
}
}
});
return false;
}
';
}
else {
$javascript_code_function_select = '
function function_select_' . $input_name . '(agent_name) {
$("#' . $selectbox_id . '").empty ();
@ -3060,6 +3086,8 @@ function ui_print_agent_autocomplete_input($parameters) {
return false;
}
';
}
if (isset($parameters['javascript_code_function_select'])) {
$javascript_code_function_select = $parameters['javascript_code_function_select'];
}

View File

@ -354,8 +354,9 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
var package_success = "<?php echo __('Package updated successfully'); ?>\n";
var package_error = "<?php echo __('Error in package updated'); ?>\n";
var bad_mr_file = "<?php echo __('Database MR version is inconsistent, do you want to apply the package?'); ?>\n";
var text1_mr_file = "<?php echo __('There are a new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launch a '); ?>\n";
var mr_available_header = "<?php echo __('There are db changes'); ?>\n";
var text1_mr_file = "<?php echo __('There are new database changes available to apply. Do you want to start the DB update process?'); ?>\n";
var text2_mr_file = "<?php echo __('We recommend launching '); ?>\n";
var text3_mr_file = "<?php echo __('planned downtime'); ?>\n";
var text4_mr_file = "<?php echo __(' to this process'); ?>\n";
var text1_package_file = "<?php echo __('There is a new update available'); ?>\n";

View File

@ -1182,7 +1182,9 @@ function visual_map_print_item($mode = "read", $layoutData,
else if($layoutData['label_position']=='right'){
$imgpos = 'float:left';
}
$varsize = getimagesize($img);
if ($width == 0 || $height == 0) {
if($varsize[0] > 150 || $varsize[1] > 150){
echo html_print_image($img, true,

View File

@ -40,6 +40,11 @@ else $graph_type = '';
ob_start ();
if (!empty($graph_type)) {
$homedir = $_GET['homedir'];
if ($homedir != null) {
$config['homedir'] = $homedir;
}
include_once($homeurl . 'include/functions.php');
include_once($homeurl . 'include/functions_html.php');

View File

@ -1414,33 +1414,29 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
tickColor: background_color,
markings: markings,
color: legend_color
},
xaxes: [ {
axisLabelFontSizePixels: font_size,
axisLabelUseCanvas: false,
axisLabel: xaxisname,
tickFormatter: xFormatter,
//~ minTickSize: steps,
color: '',
font: font
} ],
yaxes: [ {
tickFormatter: yFormatter,
color: ''
},
{
// align if we are to the right
alignTicksWithAxis: 1,
position: 'right',
font: font
//tickFormatter: dFormatter
} ]
,
},
xaxes: [{
axisLabelFontSizePixels: font_size,
axisLabelUseCanvas: false,
axisLabel: xaxisname,
tickFormatter: xFormatter,
labelHeight: 50,
color: '',
font: font
}],
yaxes: [{
tickFormatter: yFormatter,
color: '',
alignTicksWithAxis: 1,
position: 'left',
font: font,
reserveSpace: true,
}],
legend: {
position: 'se',
container: $('#legend_' + graph_id),
labelFormatter: lFormatter
}
}
};
if (vconsole) {
options.grid['hoverable'] = false;
@ -1761,18 +1757,19 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
if (labels[v] == undefined) {
return '';
}
return '<div class='+font+' style="font-size:'+font_size+'pt !important;">'+labels[v]+'</div>';
extra_css = '';
return '<div class='+font+' style="font-size:'+font_size+'pt; margin-top:15px;'+extra_css+'">'+labels[v]+'</div>';
}
function yFormatter(v, axis) {
axis.datamin = 0;
var formatted = number_format(v,force_integer,unit);
return '<div class='+font+' style="font-size:'+font_size+'pt !important;">'+formatted+'</div>';
return '<div class='+font+' style="font-size:'+font_size+'pt;">'+formatted+'</div>';
}
function lFormatter(v, item) {
return '<div style="font-size:'+font_size+'pt !important;">'+v+'</div>';
return '<div style="font-size:'+font_size+'pt;">'+v+'</div>';
// Prepared to turn series with a checkbox
//return '<div style=color:;font-size:'+font_size+'pt><input type="checkbox" id="' + graph_id + '_' + item.id +'" checked="checked" class="check_serie_'+graph_id+'">'+v+'</div>';
}
@ -1919,16 +1916,14 @@ function adjust_menu(graph_id, plot, parent_height, width) {
menu_height = $('#menu_'+graph_id).height();
}
offset_between_graph_and_div_graph_container = $('#' + graph_id).offset().top -
$('#' + graph_id).parent().offset().top;
$('#menu_' + graph_id)
.css('top',
((offset_between_graph_and_div_graph_container - menu_height - 5) + 'px'));
offset = $('#' + graph_id)[0].offsetTop;
console.log(offset);
$('#menu_' + graph_id).css('top', ((offset) + 'px'));
//$('#legend_' + graph_id).css('width',plot.width());
$('#menu_' + graph_id)
.css('left',width - $('#menu_'+graph_id).width());
//~ $('#menu_' + graph_id).css('left', $('#'+graph_id)[0].offsetWidth);
$('#menu_' + graph_id).show();
}

View File

@ -278,4 +278,35 @@ function d3_gauges($chart_data, $width, $height, $color, $legend,
return $output;
}
function ux_console_phases_donut ($phases, $id, $return = false) {
global $config;
foreach ($phases as $i => $phase) {
$phases[$i]['phase_name'] = io_safe_output($phase['phase_name']);
}
if (is_array($phases))
$phases = json_encode($phases);
$recipient_name = "phases_donut_" . $id;
$recipient_name_to_js = "#phases_donut_" . $id;
$output = "<div id=" . $recipient_name . " style='overflow: hidden;'></div>";
$output .= include_javascript_d3(true);
$output .= "<style type=\"text/css\">
path {
stroke: #fff;
fill-rule: evenodd;
}
</style>";
$output .= "<script language=\"javascript\" type=\"text/javascript\">
print_phases_donut('" . $recipient_name_to_js . "', " . $phases . ");
</script>";
if (!$return)
echo $output;
return $output;
}
?>

View File

@ -203,7 +203,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
}
// Parent layer
$return = "<div class='parent_graph' style='width: " . $width . "px; " . $background_style . "'>";
$return = "<div class='parent_graph' style='width: " . ($width) . "px; " . $background_style . "'>";
// Set some containers to legend, graph, timestamp tooltip, etc.
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:$font_size"."pt !important;'></p>";
@ -242,12 +242,18 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
}
$menu_width = 25 * $nbuttons + 15;
if ( $dashboard == false AND $vconsole == false) {
$return .= "<div id='menu_$graph_id' class='menu_graph' " .
$return .= "<div id='geneal_menu_$graph_id' class='menu_graph' style='
width: 30px;
height: 250px;
left: " . $width . "px;
position: absolute;
top: 0px;
background-color: white;'>";
$return .= "<div id='menu_$graph_id' " .
"style='display: none; " .
"text-align: center; " .
"width: " . $menu_width . "px; ".
"border-bottom: 0px; " .
"padding: 4px 4px 4px 4px;margin-bottom:5px;'>
"text-align: center;" .
"position: relative;".
"border-bottom: 0px;'>
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
if ($threshold) {
$return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$homeurl."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
@ -261,6 +267,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
//$return .= " <a href='javascript:'><img id='menu_export_json_$graph_id' src='".$homeurl."images/json.png' alt='".__('Export to JSON')."' title='".__('Export to JSON')."'></a>";
$return .= "</div>";
$return .= "</div>";
}
}
$return .= html_print_input_hidden('line_width_graph', $config['custom_graph_width'], true);
@ -275,7 +282,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
$height = 1;
}
if (!$dashboard && !$vconsole)
$return .= "<div id='overview_$graph_id' class='overview_graph' style='display: none; margin-left:0px; margin-top:20px; width: ".$width."px; height: ".$height ."px;'></div>";
$return .= "<div id='overview_$graph_id' class='overview_graph' style='display: none; margin-left:0px; margin-top:20px; margin-bottom:50px; width: ".$width."px; height: ".$height ."px;'></div>";
if ($water_mark != '') {
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";

View File

@ -1326,4 +1326,168 @@ function Gauge(placeholderName, configuration, font)
// initialization
this.configure(configuration);
}
function print_phases_donut (recipient, phases) {
var svg = d3.select(recipient)
.append("svg")
.attr("width", 600)
.attr("height", 300)
.append("g");
svg.append("g")
.attr("class", "slices");
svg.append("g")
.attr("class", "labels");
svg.append("g")
.attr("class", "lines");
var width = 550,
height = 300,
radius = Math.min(width, height) / 2;
var pie = d3.layout.pie()
.sort(null)
.value(function(d) {
return parseFloat(d.label2);
});
var arc = d3.svg.arc()
.outerRadius(radius * 0.8)
.innerRadius(radius * 0.4);
var outerArc = d3.svg.arc()
.innerRadius(radius * 0.9)
.outerRadius(radius * 0.9);
svg.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
var key = function(d){ return d.data.label; };
function phasesData (){
return phases.map(function(phase){
return { label: phase_name(phase, 1), label2: phase_name(phase, 2), value: phase.status }
});
}
function phase_name (phase, index) {
if (index == 1) {
return phase.phase_name;
}
else {
return phase.phase_time;
}
}
print_phases(phasesData());
function print_phases(data) {
/* ------- PIE SLICES -------*/
var slice = svg.select(".slices").selectAll("path.slice")
.data(pie(data), key);
slice.enter()
.insert("path")
.style("fill", function(d) {
if (d.data.value == 0) {
return "#80BA27";
}
else {
return "#FC4444";
}
})
.attr("class", "slice");
slice
.transition().duration(0)
.attrTween("d", function(d) {
this._current = this._current || d;
var interpolate = d3.interpolate(this._current, d);
this._current = interpolate(0);
return function(t) {
return arc(interpolate(t));
};
});
slice.exit()
.remove();
/* ------- TEXT LABELS -------*/
var text = svg.select(".labels").selectAll("text")
.data(pie(data), key);
text.enter()
.append("text")
.append("tspan")
.attr("dy", ".1em")
.text(function(d) {
return d.data.label;
})
.style("font-family", "Verdana")
.style("font-size", "10px")
.append("tspan")
.attr("dy", "1.4em")
.attr("dx", "-6em")
.text(function(d) {
return d.data.label2 + "ms";
})
.style("font-family", "Verdana")
.style("font-size", "10px");
function midAngle(d){
return d.startAngle + (d.endAngle - d.startAngle)/2;
}
text.transition().duration(0)
.attrTween("transform", function(d) {
this._current = this._current || d;
var interpolate = d3.interpolate(this._current, d);
this._current = interpolate(0);
return function(t) {
var d2 = interpolate(t);
var pos = outerArc.centroid(d2);
pos[0] = radius * (midAngle(d2) < Math.PI ? 1 : -1);
return "translate("+ pos +")";
};
})
.styleTween("text-anchor", function(d){
this._current = this._current || d;
var interpolate = d3.interpolate(this._current, d);
this._current = interpolate(0);
return function(t) {
var d2 = interpolate(t);
return midAngle(d2) < Math.PI ? "start":"end";
};
});
text.exit()
.remove();
/* ------- SLICE TO TEXT POLYLINES -------*/
var polyline = svg.select(".lines").selectAll("polyline")
.data(pie(data), key);
polyline.enter()
.append("polyline");
polyline.transition().duration(0)
.attrTween("points", function(d){
this._current = this._current || d;
var interpolate = d3.interpolate(this._current, d);
this._current = interpolate(0);
return function(t) {
var d2 = interpolate(t);
var pos = outerArc.centroid(d2);
pos[0] = radius * 0.95 * (midAngle(d2) < Math.PI ? 1 : -1);
return [arc.centroid(d2), outerArc.centroid(d2), pos];
};
})
.style("stroke", "black")
.style("opacity", ".3")
.style("stroke-width", "2px")
.style("fill", "none");
polyline.exit()
.remove();
}
}

View File

@ -36,9 +36,11 @@ function clippy_extension_cron_send_email() {
'intro' => '<table>' .
'<tr>' .
'<td class="context_help_body">' .
'<div style="word-break: break-word;">' .
__('The configuration of email for the task email is in the file:') . '<br />' .
'&lt;www&gt;/pandora_console/enterprise/extensions/cron/email_config.php <br />' .
__('Please check if the email configuration is correct.') .
'</div>' .
'</td>' .
'</tr>' .
'</table>'

View File

@ -61,6 +61,7 @@ Besides the defined module macros, the following macros are available:
<li>_moduletags_: URLs associated to the modules tags.</li>
<li>_alert_critical_instructions_: Instructions for CRITICAL status contained in the module.</li>
<li>_alert_warning_instructions_: Instructions for WARNING status contained in the module.</li>
<li>_alert_unknown_instructions_: Instructions for UNKNOWN status contained in the module.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (Only for alerts that use the command <i>eMail</i>)
Returns an image encoded in base64 of a modules graph with a period of <i>n</i> hours (eg. _modulegraph_24h_).
A correct setup of the connection between the server and the console's API is required.

View File

@ -61,6 +61,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
<li>_moduletags_: URLs asociadas a los tags de módulos.</li>
<li>_alert_critical_instructions_: Instrucciones contenidas en el módulo para un estado CRITICAL.</li>
<li>_alert_warning_instructions_: Instrucciones contenidas en el módulo para un estado WARNING.</li>
<li>_alert_unknown_instructions_: Instrucciones contenidas en el módulo para un estado UNKNOWN.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (Solo para alertas que usen el comando <i>eMail</i>)
Devuelve una imagen codificada en base64 de una gráfica del módulo con un período de <i>n</i> horas (eg. _modulegraph_24h_).
Requiere de una configuración correcta de la conexión del servidor a la consola vía api,

View File

@ -60,6 +60,7 @@
<li>_moduletags_ : モジュールタグに関連付けられた URL。</li>
<li>_alert_critical_instructions_: モジュールの障害状態時手順。</li>
<li>_alert_warning_instructions_: モジュールの警告状態時手順。</li>
<li>_alert_unknown_instructions_: Instructions for UNKNOWN status contained in the module.</li>
<li>_modulegraph_<i>n</i>h_: (>=6.0) (<i>eMail</i>コマンドを使うアラートのみ)
n で示す期間の base64 でエンコードされたモジュールグラフを返します。(: _modulegraph_24h_) サーバとコンソールの API の設定が正しくできている必要があります。この設定は、サーバの設定ファイルで行います。 </li>
</ul>

View File

@ -33,7 +33,7 @@
$(document).ready (function () {
$("a#show_messages_dialog").click (function () {
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{"page": "operation/messages/message_list"},
function (data, status) {
$("#dialog_messages").hide ()
@ -60,7 +60,7 @@ $(document).ready (function () {
$("a.show_systemalert_dialog").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").hide ()
@ -75,9 +75,11 @@ $(document).ready (function () {
$("a.modalpopup").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
{"page": "general/alert_enterprise",
"message":$(this).attr("id")},
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
@ -93,10 +95,11 @@ $(document).ready (function () {
$(".publienterprise").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message":$(this).attr("id")},
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()
@ -112,10 +115,11 @@ $(document).ready (function () {
$(".publienterprisehide").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
jQuery.post ("ajax.php",
{
"page": "general/alert_enterprise",
"message":$(this).attr("id")},
"page": "general/alert_enterprise",
"message": $(this).attr("id")
},
function (data, status) {
$("#alert_messages").hide ()
.empty ()

View File

@ -17,7 +17,6 @@
* @param editor Boolean variable to set other css selector in editor (when true).
*/
function draw_line (line, id_div) {
selector = '';
//Check if the global var resize_map is defined
@ -38,17 +37,32 @@ function draw_line (line, id_div) {
have_node_begin_img = $('#' + line['node_begin'] + " img").length;
have_node_end_img = $('#' + line['node_end'] + " img").length;
if (have_node_begin_img) {
var img_pos_begin = $('#' + line['node_begin'] + " img").position();
var img_margin_left_begin = $('#' + line['node_begin'] + " img").css("margin-left");
var img_margin_left_begin_aux = img_margin_left_begin.split("px");
img_margin_left_begin = parseFloat(img_margin_left_begin_aux[0]);
}
if (have_node_end_img) {
var img_pos_end = $('#' + line['node_end'] + " img").position();
var img_margin_left_end = $('#' + line['node_end'] + " img").css("margin-left");
var img_margin_left_end_aux = img_margin_left_end.split("px");
img_margin_left_end = parseFloat(img_margin_left_end_aux[0]);
}
if (line['x1']) {
x1 = line['x'];
}
else {
if (have_node_begin_img) {
width = $('#' + line['node_begin'] + " img").width();
x1 = parseInt($('#' + line['node_begin']).css (selector + 'left')) + (width / 2) + img_pos_begin.left + img_margin_left_begin;
}
else {
width = $('#' + line['node_begin']).width();
x1 = parseInt($('#' + line['node_begin']).css (selector + 'left')) + (width / 2);
}
x1 = parseInt($('#' + line['node_begin']).css (selector + 'left')) + (width / 2);
}
if (line['y1']) {
@ -57,11 +71,12 @@ function draw_line (line, id_div) {
else {
if (have_node_begin_img) {
height = parseInt($('#' + line['node_begin'] + " img").css('height'));
y1 = parseInt($('#' + line['node_begin']).css (selector + 'top')) + (height / 2) + img_pos_begin.top;
}
else {
height = $('#' + line['node_begin']).height();
y1 = parseInt($('#' + line['node_begin']).css (selector + 'top')) + (height / 2);
}
y1 = parseInt($('#' + line['node_begin']).css (selector + 'top')) + (height / 2);
}
if (line['x2']) {
@ -70,11 +85,12 @@ function draw_line (line, id_div) {
else {
if (have_node_end_img) {
width = $('#' + line['node_end'] + " img").width();
x2 = parseInt($('#' + line['node_end']).css (selector + 'left')) + (width / 2) + img_pos_end.left + img_margin_left_end;
}
else {
width = $('#' + line['node_end']).width();
x2 = parseInt($('#' + line['node_end']).css (selector + 'left')) + (width / 2);
}
x2 = parseInt($('#' + line['node_end']).css (selector + 'left')) + (width / 2);
}
if (line['y2']) {
@ -83,11 +99,12 @@ function draw_line (line, id_div) {
else {
if (have_node_end_img) {
height = parseInt($('#' + line['node_end'] + " img").css('height'));
y2 = parseInt($('#' + line['node_end']).css (selector + 'top')) + (height / 2) + img_pos_end.top;
}
else {
height = $('#' + line['node_end']).height();
y2 = parseInt($('#' + line['node_end']).css (selector + 'top')) + (height / 2);
}
y2 = parseInt($('#' + line['node_end']).css (selector + 'top')) + (height / 2);
}

View File

@ -201,49 +201,6 @@ li:hover ul { display: block; }
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
}
#subicon_god-setup {
top: -140px;
}
#subBulk_operations {
top: -210px;
}
#subicon_god-servers {
top: -120px;
}
#subicon_god-alerts {
top: -70px;
}
#subicon_god-links {
top: -140px;
}
#subicon_god-extensions {
top: -180px;
}
#subicon_god-um_messages {
top: -90px;
}
#subicon_god-configuration {
top: -100px;
}
#subDB_maintenance {
top: -120px;
}
#subExtension_manager {
top: -100px;
}
#subSetup {
top: -80px;
}
#menu_container {
z-index: 3;
position: absolute;

View File

@ -1884,7 +1884,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -1948,7 +1948,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -1939,7 +1939,7 @@ div.warn {
/* Submenus havent borders */
.submenu_not_selected, .submenu_selected, .submenu2 {
border: 0px !important;
min-height: 0px !important;
min-height: 35px !important;
}
/* Pandora width style theme */

View File

@ -453,7 +453,7 @@ if (! isset ($config['id_user'])) {
db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick_in_db;
$config['id_user'] = $nick_in_db;
config_prepare_session();
if (is_user_admin($config['id_user'])) {
// PHP configuration values
$PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));

View File

@ -70,8 +70,8 @@
<body>
<div style='height: 10px'>
<?php
$version = '7.0NG.702';
$build = '170511';
$version = '7.0NG.703';
$build = '170518';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -201,7 +201,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
// log4x doesnt support flash yet
//
if ($config['flash_charts'] == 1)
echo '<div style="margin-left: 70px; padding-top: 10px;">';
echo '<div style="margin-left: 100px; padding-top: 10px;">';
else
echo '<div style="margin-left: 50px; padding-top: 10px;">';

View File

@ -678,7 +678,7 @@ if ($traps !== false) {
continue;
}
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'" title="'.__('View agent details').'">';
$data[1] .= '<strong>'.$agent["nombre"].ui_print_help_tip($trap['source'], true);'</strong></a>';
$data[1] .= '<strong>'.$agent["nombre"].ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");'</strong></a>';
}
//OID
@ -1014,4 +1014,4 @@ echo '<div style="clear:both;">&nbsp;</div>';
}
}
</script>
</script>

View File

@ -288,6 +288,7 @@ if (!$meta) {
if (enterprise_installed()) {
$dashboards = get_user_dashboards ($config['id_user']);
$dashboards_aux = array();
if ($dashboards === false) {
$dashboards = array('None'=>'None');

View File

@ -84,7 +84,7 @@ if ($layout) {
//~ ob_start();
//~ // Render map
visual_map_print_visual_map($id_layout, true, true, $width, $height,
'../../', true, $graph_javascript, true);
'../../', true, true, true);
//~ return;
}
else {
@ -92,7 +92,7 @@ else {
}
// Floating menu - Start
echo '<div id="vc-controls">';
echo '<div id="vc-controls" style="z-index:300;">';
echo '<div id="menu_tab">';
echo '<ul class="mn">';
@ -191,6 +191,75 @@ $ignored_params['refr'] = '';
startCountDown(refr, false);
});
$('body').css('background-color','<?php echo $layout["background_color"]; ?>');
$('body').css('margin','0');
$('body').css('height','100%');
$('body').css('overflow','hidden');
$(".module_graph .menu_graph").css('display','none');
$(".parent_graph").each(function(){
if($(this).css('background-color') != 'rgb(255, 255, 255)'){
$(this).css('color', '#999');
}
});
$(".overlay").removeClass("overlay").addClass("overlaydisabled");
$('.item:not(.icon) img').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2-15)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$('.item > a > div').each(function(){
if($(this).css('float')=='left' || $(this).css('float')=='right'){
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2-5)+'px');
$(this).css('margin-left','');
}
else{
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
});
$(".graph:not([class~='noresizevc'])").each(function(){
height = parseInt($(this).css("height")) - 30;
$(this).css('height', height);
});
// Start the map fetch
//~ fetchMap();
});

View File

@ -230,6 +230,11 @@ $ignored_params['refr'] = '';
}
});
$(".graph:not([class~='noresizevc'])").each(function(){
height = parseInt($(this).css("height")) - 30;
$(this).css('height', height);
});
});
</script>

View File

@ -198,6 +198,9 @@ if ($config['pure']) {
/* Avoid the main_pure container 1000px height */
body.pure {
min-height: 100px;
margin: 0px;
overflow: hidden;
height: 100%;
<?php
echo "background-color: ".$layout['background_color'].";";
?>

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.702
%define release 170511
%define version 7.0NG.703
%define release 170518
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.702
%define release 170511
%define version 7.0NG.703
%define release 170518
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -9,7 +9,7 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.702"
PI_VERSION="7.0NG.703"
FORCE=0
DESTDIR=""
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`

View File

@ -112,7 +112,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('MR', 0),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '700'),
('current_package_enterprise', '703'),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}');
UNLOCK TABLES;
@ -1091,7 +1091,7 @@ INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `o
-- GIS Data
INSERT INTO `tgis_map` VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,40.42056,0,0,1);
INSERT INTO `tgis_map_connection` VALUES (1,'OpenStreetMap (MapQuest Open)','OSM','{\"type\":\"OSM\",\"url\":\"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_connection` VALUES (1,'OpenStreetMap (MapQuest Open)','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_connection` VALUES (2,'OpenStreetMap (Standard)','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0);
INSERT INTO `tgis_map_has_tgis_map_con` VALUES (1,1,'2010-03-01 09:46:48',1);
INSERT INTO `tgis_map_layer` VALUES (1,'Group All',1,0,1,0);

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.702-170511
Version: 7.0NG.703-170518
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.702-170511"
pandora_version="7.0NG.703-170518"
package_cpan=0
package_pandora=1

View File

@ -1,7 +1,7 @@
#############################################################################
# Pandora FMS Server Parameters
# Pandora FMS, the Flexible Monitoring System.
# Version 7.0NG.702
# Version 7.0NG.703
# Licensed under GPL license v2,
# (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -42,8 +42,8 @@ our @EXPORT = qw(
);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.702";
my $pandora_build = "170511";
my $pandora_version = "7.0NG.703";
my $pandora_build = "170518";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

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