Merge remote-tracking branch 'origin/develop' into new-vc-line-element

This commit is contained in:
Daniel Barbero 2019-12-17 08:26:04 +01:00
commit d77d50bb74
68 changed files with 354 additions and 307 deletions

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.741, AIX version
# Version 7.0NG.742, 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.741, FreeBSD Version
# Version 7.0NG.742, 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.741, HP-UX Version
# Version 7.0NG.742, 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.741, GNU/Linux
# Version 7.0NG.742, 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.741, GNU/Linux
# Version 7.0NG.742, 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.741, Solaris Version
# Version 7.0NG.742, 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.741
# Version 7.0NG.742
# 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.741, AIX version
# Version 7.0NG.742, 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.741
# Version 7.0NG.742
# 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.741, HPUX Version
# Version 7.0NG.742, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.741
# Version 7.0NG.742
# 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.741
# Version 7.0NG.742
# 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.741
# Version 7.0NG.742
# 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.741, Solaris version
# Version 7.0NG.742, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.741, AIX version
# Version 7.0NG.742, 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.741-191216
Version: 7.0NG.742-191217
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.741-191216"
pandora_version="7.0NG.742-191217"
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.741, GNU/Linux
# Version 7.0NG.742, 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.741, FreeBSD Version
# Version 7.0NG.742, 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.741, HP-UX Version
# Version 7.0NG.742, 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.741, GNU/Linux
# Version 7.0NG.742, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.741, GNU/Linux
# Version 7.0NG.742, 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.741, NetBSD Version
# Version 7.0NG.742, 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.741, Solaris Version
# Version 7.0NG.742, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

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

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.741
%define release 191216
%define version 7.0NG.742
%define release 191217
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.741
%define release 191216
%define version 7.0NG.742
%define release 191217
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.741"
PI_BUILD="191216"
PI_VERSION="7.0NG.742"
PI_BUILD="191217"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
# Version 7.0NG.741
# Version 7.0NG.742
# 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.741}
{Pandora FMS Windows Agent v7.0NG.742}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{191216}
{191217}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.741(Build 191216)")
#define PANDORA_VERSION ("7.0NG.742(Build 191217)")
string pandora_path;
string pandora_dir;

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.741(Build 191216))"
VALUE "ProductVersion", "(7.0NG.742(Build 191217))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.741-191216
Version: 7.0NG.742-191217
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.741-191216"
pandora_version="7.0NG.742-191217"
package_pear=0
package_pandora=1

View File

@ -65,17 +65,13 @@ function quickShell()
ui_require_css_file('discovery');
// Settings.
// WebSocket host, where to connect.
if (isset($config['ws_host']) === false) {
config_update_value('ws_host', $_SERVER['SERVER_ADDR']);
}
// WebSocket host, where client should connect.
if (isset($config['ws_port']) === false) {
config_update_value('ws_port', 8080);
}
if (empty($config['ws_proxy_url']) === true) {
$ws_url = 'http://'.$config['ws_host'].':'.$config['ws_port'];
$ws_url = 'http://'.$_SERVER['SERVER_ADDR'].':'.$config['ws_port'];
} else {
preg_match('/\/\/(.*)/', $config['ws_proxy_url'], $matches);
if (isset($_SERVER['HTTPS']) === true) {
@ -313,7 +309,7 @@ function quickShellSettings()
}
// Parser.
if (get_parameter('qs_update', false) !== false) {
if (get_parameter('update_config', false) !== false) {
// Gotty settings. Internal communication (WS).
$gotty = get_parameter(
'gotty',
@ -381,14 +377,6 @@ function quickShellSettings()
}
}
// Interface.
ui_print_page_header(
__('QuickShell settings'),
'',
false,
'quickshell_settings'
);
if ($changes > 0) {
$msg = __('%d Updated', $changes);
if ($critical > 0) {
@ -401,100 +389,105 @@ function quickShellSettings()
ui_print_success_message($msg);
}
// Form.
$wiz = new Wizard();
// Form. Using old style.
echo '<fieldset>';
echo '<legend>'.__('Quickshell').'</legend>';
$wiz->printForm(
[
'form' => [
'action' => '#',
'class' => 'wizard',
'method' => 'post',
],
'inputs' => [
[
'label' => __('Gotty path').ui_print_help_tip(
__('Leave blank if using an external Gotty service'),
true
),
'arguments' => [
'type' => 'text',
'name' => 'gotty',
'value' => $config['gotty'],
],
],
[
'label' => __('Gotty host'),
'arguments' => [
'type' => 'text',
'name' => 'gotty_host',
'value' => $config['gotty_host'],
],
],
[
'label' => __('Gotty ssh port'),
'arguments' => [
'type' => 'text',
'name' => 'gotty_ssh_port',
'value' => $config['gotty_ssh_port'],
],
],
[
'label' => __('Gotty telnet port'),
'arguments' => [
'type' => 'text',
'name' => 'gotty_telnet_port',
'value' => $config['gotty_telnet_port'],
],
],
[
'toggle' => true,
'toggle_name' => 'Advanced',
'block_content' => [
[
'label' => __('Gotty user').ui_print_help_tip(
__('Optional, set a user to access gotty service'),
true
),
'arguments' => [
'type' => 'text',
'name' => 'gotty_user',
'value' => $config['gotty_user'],
],
],
[
'label' => __('Gotty password').ui_print_help_tip(
__('Optional, set a password to access gotty service'),
true
),
'arguments' => [
'type' => 'password',
'name' => 'gotty_pass',
'value' => io_output_password($config['gotty_pass']),
],
],
],
],
[
'arguments' => [
'type' => 'hidden',
'name' => 'qs_update',
'value' => 1,
],
],
[
'arguments' => [
'type' => 'submit',
'label' => __('Update'),
'attributes' => 'class="sub next"',
],
],
],
],
false,
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->data = [];
$t->style = [];
$t->style[0] = 'font-weight: bold; width: 40%;';
$t->data[0][0] = __('Gotty path');
$t->data[0][1] = html_print_input_text(
'gotty',
$config['gotty'],
'',
30,
100,
true
);
$t->data[1][0] = __('Gotty host');
$t->data[1][1] = html_print_input_text(
'gotty_host',
$config['gotty_host'],
'',
30,
100,
true
);
$t->data[2][0] = __('Gotty ssh port');
$t->data[2][1] = html_print_input_text(
'gotty_ssh_port',
$config['gotty_ssh_port'],
'',
30,
100,
true
);
$t->data[3][0] = __('Gotty telnet port');
$t->data[3][1] = html_print_input_text(
'gotty_telnet_port',
$config['gotty_telnet_port'],
'',
30,
100,
true
);
$hidden = new StdClass();
$hidden->data = [];
$hidden->width = '100%';
$hidden->class = 'databox filters';
$hidden->data = [];
$hidden->style[0] = 'font-weight: bold;width: 40%;';
$hidden->data[0][0] = __('Gotty user').ui_print_help_tip(
__('Optional, set a user to access gotty service'),
true
);
$hidden->data[0][1] = html_print_input_text(
'gotty_user',
$config['gotty_user'],
'',
30,
100,
true
);
$hidden->data[1][0] = __('Gotty password').ui_print_help_tip(
__('Optional, set a password to access gotty service'),
true
);
$hidden->data[1][1] = html_print_input_password(
'gotty_pass',
io_output_password($config['gotty_pass']),
'',
30,
100,
true
);
html_print_table($t);
ui_print_toggle(
[
'content' => html_print_table($hidden, true),
'name' => __('Advanced options'),
'clean' => false,
'main_class' => 'no-border-imp',
'container_class' => 'no-border-imp',
]
);
echo '</fieldset>';
}
@ -523,19 +516,4 @@ if (empty($agent_id) === false
}
}
extensions_add_godmode_menu_option(
// Name.
__('QuickShell settings'),
// Acl.
'PM',
// FatherId.
'gextensions',
// Icon.
'images/ehorus/terminal.png',
// Version.
'N/A',
// SubfatherId.
null
);
extensions_add_godmode_function('quickShellSettings');

View File

@ -129,6 +129,7 @@ if ($disabled != '') {
$extensions = extensions_get_extension_info();
$table = new StdClass;
$table->width = '98%';
$table->head = [];

View File

@ -316,6 +316,9 @@ if (check_acl($config['id_user'], 0, 'PM')) {
$sub2['godmode/setup/setup&amp;section=notifications']['text'] = __('Notifications');
$sub2['godmode/setup/setup&amp;section=notifications']['refr'] = 0;
$sub2['godmode/setup/setup&amp;section=websocket_engine']['text'] = __('Websocket Engine');
$sub2['godmode/setup/setup&amp;section=websocket_engine']['refr'] = 0;
if ($config['activate_gis']) {
$sub2['godmode/setup/gis']['text'] = __('Map conections GIS');
}

View File

@ -1856,7 +1856,7 @@ $class = 'databox filters';
'combo_server',
$server_name,
'',
__('Select server'),
__('Local metaconsole'),
0
);
?>

View File

@ -133,6 +133,11 @@ $buttons['notifications'] = [
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=notifications').'">'.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'</a>',
];
$buttons['websocket_engine'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=websocket_engine').'">'.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'</a>',
];
$help_header = '';
if (enterprise_installed()) {
$subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header);
@ -183,6 +188,12 @@ switch ($section) {
$subpage = ' &raquo '.__('Notifications');
break;
case 'websocket_engine':
$buttons['websocket_engine']['active'] = true;
$subpage = ' &raquo '.__('Pandora Websocket Engine');
$help_header = 'quickshell_settings';
break;
case 'enterprise':
$buttons['enterprise']['active'] = true;
$subpage = ' &raquo '.__('Enterprise');
@ -247,6 +258,10 @@ switch ($section) {
include_once $config['homedir'].'/godmode/setup/setup_notifications.php';
break;
case 'websocket_engine':
include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php';
break;
default:
enterprise_hook('setup_enterprise_select_tab', [$section]);
break;

View File

@ -403,50 +403,6 @@ html_print_table($table_mail_conf);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('WebSocket settings').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->data = [];
$t->style[0] = 'font-weight: bold';
$t->data[0][0] = __('Bind address');
$t->data[0][1] = html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
);
$t->data[1][0] = __('Bind port');
$t->data[1][2] = html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
);
$t->data[2][0] = __('WebSocket proxy url').ui_print_help_tip(__('If you had configured a wsproxy set here target URL (for instance ws://your.public.fqdn/ws).'), true);
$t->data[2][2] = html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
);
html_print_input_hidden('update_config', 1);
html_print_table($t);
echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');

View File

@ -1196,16 +1196,23 @@ $row++;
if ($config['prominent_time'] == 'comparation') {
$timestamp = false;
$comparation = true;
$compact = false;
} else if ($config['prominent_time'] == 'timestamp') {
$timestamp = true;
$comparation = false;
$compact = false;
} else if ($config['prominent_time'] == 'compact') {
$timestamp = false;
$comparation = false;
$compact = true;
}
$table_other->data[$row][0] = __('Timestamp or time comparation');
$table_other->data[$row][1] = __('Comparation in rollover').' ';
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', '', $comparation, true);
$table_other->data[$row][1] .= '<br />'.__('Timestamp in rollover').' ';
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', '', $timestamp, true);
$table_other->data[$row][0] = __('Timestamp, time comparison, or compact mode');
$table_other->data[$row][1] = '<div class="switch_radio_button">';
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'comparation', __('Comparation in rollover'), $comparation, true);
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'timestamp', __('Timestamp in rollover'), $timestamp, true);
$table_other->data[$row][1] .= html_print_radio_button('prominent_time', 'compact', __('Compact mode'), $compact, true);
$table_other->data[$row][1] .= '</div>';
$row++;

View File

@ -0,0 +1,98 @@
<?php
/**
* Settings for Pandora Websocket engine.
*
* @category UI file
* @package Pandora FMS
* @subpackage Community
* @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.
* ============================================================================
*/
global $config;
$url = ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=websocket_engine&amp;pure='.$config['pure']
);
echo '<form id="form_setup" method="post" action="'.$url.'">';
echo '<fieldset>';
echo '<legend>'.__('WebSocket settings').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->data = [];
$t->style[0] = 'font-weight: bold';
$t->data[0][0] = __('Bind address');
$t->data[0][1] = html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
);
$t->data[1][0] = __('Bind port');
$t->data[1][2] = html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
);
$t->data[2][0] = __('WebSocket proxy url').ui_print_help_tip(
__('If you had configured a wsproxy set here target URL (for instance ws://your.public.fqdn/ws).'),
true
);
$t->data[2][2] = html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
);
html_print_input_hidden('update_config', 1);
html_print_table($t);
echo '</fieldset>';
if (function_exists('quickShellSettings') === true) {
quickShellSettings();
}
echo '<div class="action-buttons" style="width: 100%;">';
html_print_submit_button(
__('Update'),
'update_button',
false,
'class="sub upd"'
);
echo '</div>';
echo '</form>';

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -101,7 +101,7 @@ $params = json_decode($_REQUEST['data'], true);
// Metaconsole connection to the node.
$server_id = $params['server_id'];
if ($config['metaconsole'] && !empty($server_id)) {
if (is_metaconsole() && !empty($server_id)) {
$server = metaconsole_get_connection_by_id($server_id);
// Error connecting.
if (metaconsole_connect($server) !== NOERR) {

View File

@ -20,8 +20,8 @@
/**
* Pandora build version and version
*/
$build_version = 'PC191216';
$pandora_version = 'v7.0NG.741';
$build_version = 'PC191217';
$pandora_version = 'v7.0NG.742';
// Do not overwrite default timezone set if defined.
$script_tz = @date_default_timezone_get();

View File

@ -3851,9 +3851,11 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
$file_js = $config['homedir'].'/include/web2image.js';
$url = ui_get_full_url(false).$hack_metaconsole.'/include/chart_generator.php';
$img_file = 'img_'.uniqid().'.png';
$img_path = $config['homedir'].'/attachment/'.$img_file;
$img_url = ui_get_full_url(false).$hack_metaconsole.'/attachment/'.$img_file;
if (!$params['return_img_base_64']) {
$img_file = 'img_'.uniqid().'.png';
$img_path = $config['homedir'].'/attachment/'.$img_file;
$img_url = ui_get_full_url(false).$hack_metaconsole.'/attachment/'.$img_file;
}
$width_img = 500;
@ -3866,8 +3868,8 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined=false
}
if ($type_graph_pdf === 'slicebar') {
$height_img = 70;
$params['height'] = 70;
$height_img = 90;
$params['height'] = 90;
}
$params_encode_json = urlencode(json_encode($params));

View File

@ -1911,14 +1911,6 @@ function config_process_config()
* Parse the ACL IP list for access API
*/
$temp_list_ACL_IPs_for_API = [];
if (isset($config['list_ACL_IPs_for_API'])) {
if (!empty($config['list_ACL_IPs_for_API'])) {
$temp_list_ACL_IPs_for_API = explode(';', $config['list_ACL_IPs_for_API']);
}
}
$config['list_ACL_IPs_for_API'] = $temp_list_ACL_IPs_for_API;
$keysConfig = array_keys($config);
/*
@ -2976,6 +2968,15 @@ function config_process_config()
// Finally, check if any value was overwritten in a form.
config_update_config();
$temp_list_ACL_IPs_for_API = [];
if (isset($config['list_ACL_IPs_for_API'])) {
if (!empty($config['list_ACL_IPs_for_API'])) {
$temp_list_ACL_IPs_for_API = explode(';', $config['list_ACL_IPs_for_API']);
}
}
$config['list_ACL_IPs_for_API'] = $temp_list_ACL_IPs_for_API;
}

View File

@ -291,16 +291,18 @@ function reporting_make_reporting_data(
$agents_to_macro = $content['id_agent'];
}
// Metaconsole connection.
if (is_metaconsole()) {
$server = metaconsole_get_connection_names();
$connection = metaconsole_get_connection($server);
if (metaconsole_connect($connection) != NOERR) {
continue;
}
}
if (isset($content['style']['name_label'])) {
$server_name = $content['server_name'];
$metaconsole_on = is_metaconsole();
// Metaconsole connection.
if ($metaconsole_on && $server_name != '') {
$connection = metaconsole_get_connection($server_name);
if (!metaconsole_load_external_db($connection)) {
continue;
}
}
// Add macros name.
$items_label = [];
$items_label['type'] = $content['type'];
@ -309,8 +311,6 @@ function reporting_make_reporting_data(
$items_label['modules'] = $modules_to_macro;
$items_label['agents'] = $agents_to_macro;
$items_label['visual_format'] = $visual_format;
$metaconsole_on = is_metaconsole();
$server_name = $content['server_name'];
$items_label['agent_description'] = agents_get_description(
$content['id_agent']
@ -5092,37 +5092,13 @@ function reporting_sql($report, $content)
}
if ($content['treport_custom_sql_id'] != 0) {
switch ($config['dbtype']) {
case 'mysql':
$sql = io_safe_output(
db_get_value_filter(
'`sql`',
'treport_custom_sql',
['id' => $content['treport_custom_sql_id']]
)
);
break;
case 'postgresql':
$sql = io_safe_output(
db_get_value_filter(
'"sql"',
'treport_custom_sql',
['id' => $content['treport_custom_sql_id']]
)
);
break;
case 'oracle':
$sql = io_safe_output(
db_get_value_filter(
'sql',
'treport_custom_sql',
['id' => $content['treport_custom_sql_id']]
)
);
break;
}
$sql = io_safe_output(
db_get_value_filter(
'`sql`',
'treport_custom_sql',
['id' => $content['treport_custom_sql_id']]
)
);
} else {
$sql = io_safe_output($content['external_source']);
}
@ -5152,10 +5128,6 @@ function reporting_sql($report, $content)
$historical_db = $content['historical_db'];
}
if (is_metaconsole()) {
metaconsole_restore_db();
}
$result = db_get_all_rows_sql($sql, $historical_db);
if ($result !== false) {
foreach ($result as $row) {
@ -7551,12 +7523,10 @@ function reporting_custom_graph(
if ($type_report == 'custom_graph') {
if (is_metaconsole()) {
$servers = metaconsole_get_connection_names();
foreach ($servers as $server) {
$connection = metaconsole_get_connection($server);
if (metaconsole_connect($connection) != NOERR) {
continue;
}
$id_meta = metaconsole_get_id_server($content['server_name']);
$server = metaconsole_get_connection_by_id($id_meta);
if (metaconsole_connect($server) != NOERR) {
return false;
}
}
}

View File

@ -545,6 +545,10 @@ function ui_print_timestamp($unixtime, $return=false, $option=[])
date2strftime_format($config['date_format']),
$unixtime
);
} else if ($prominent == 'compact') {
$units = 'tiny';
$title = date($config['date_format'], $unixtime);
$data = human_time_comparation($unixtime, $units);
} else {
$title = date($config['date_format'], $unixtime);
$units = 'large';

View File

@ -152,7 +152,7 @@ class WSManager extends WebSocketServer
*/
public function __construct(
$listen_addr,
$listen_port,
int $listen_port,
$connected=[],
$process=[],
$processRaw=[],
@ -271,12 +271,20 @@ class WSManager extends WebSocketServer
{
global $config;
$php_session_id = \str_replace(
'PHPSESSID=',
'',
$user->headers['cookie']
$match;
$php_session_id = '';
\preg_match(
'/PHPSESSID=(.*)/',
$user->headers['cookie'],
$match
);
if (is_array($match) === true) {
$php_session_id = $match[1];
}
$php_session_id = \preg_replace('/;.*$/', '', $php_session_id);
// If being redirected from proxy.
if (isset($user->headers['x-forwarded-for']) === true) {
$user->address = $user->headers['x-forwarded-for'];

View File

@ -590,6 +590,10 @@ select:-internal-list-box {
.no-border {
border: none;
}
.no-border-imp,
.no-border-imp > div {
border: none !important;
}
.no-padding {
padding: 0;
}

View File

@ -128,8 +128,8 @@
</div>
<div style='height: 10px'>
<?php
$version = '7.0NG.741';
$build = '191216';
$version = '7.0NG.742';
$build = '191217';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -2,8 +2,8 @@
# Pandora FMS Console
#
%define name pandorafms_console
%define version 7.0NG.741
%define release 191216
%define version 7.0NG.742
%define release 191217
# 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.741
%define release 191216
%define version 7.0NG.742
%define release 191217
# 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.741
%define release 191216
%define version 7.0NG.742
%define release 191217
%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.741"
PI_VERSION="7.0NG.742"
FORCE=0
DESTDIR=""
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`

View File

@ -139,7 +139,7 @@ $ws = new WSManager(
// Bind address.
$config['ws_bind_address'],
// Bind port.
$config['ws_port'],
(int) $config['ws_port'],
// Connected handlers.
['gotty' => 'proxyConnected'],
// Process handlers.

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.741-191216
Version: 7.0NG.742-191217
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.741-191216"
pandora_version="7.0NG.742-191217"
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.741
# Version 7.0NG.742
# Licensed under GPL license v2,
# (c) 2003-2017 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -44,8 +44,8 @@ our @EXPORT = qw(
);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.741";
my $pandora_build = "191216";
my $pandora_version = "7.0NG.742";
my $pandora_build = "191217";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -31,8 +31,8 @@ use base 'Exporter';
our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.741";
my $pandora_build = "191216";
my $pandora_version = "7.0NG.742";
my $pandora_build = "191217";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.741
%define release 191216
%define version 7.0NG.742
%define release 191217
Summary: Pandora FMS Server
Name: %{name}

View File

@ -2,8 +2,8 @@
# Pandora FMS Server
#
%define name pandorafms_server
%define version 7.0NG.741
%define release 191216
%define version 7.0NG.742
%define release 191217
Summary: Pandora FMS Server
Name: %{name}

View File

@ -8,8 +8,8 @@
# This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.741"
PI_BUILD="191216"
PI_VERSION="7.0NG.742"
PI_BUILD="191217"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.741 PS191216";
my $version = "7.0NG.742 PS191217";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.741 PS191216";
my $version = "7.0NG.742 PS191217";
# save program name for logging
my $progname = basename($0);