Merge remote-tracking branch 'origin/develop' into ent-7074-Command-Center

This commit is contained in:
Daniel Barbero Martin 2021-04-22 18:29:47 +02:00
commit 6548e9e210
36 changed files with 108 additions and 62 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.754-210421
Version: 7.0NG.754-210422
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.754-210421"
pandora_version="7.0NG.754-210422"
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

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.754';
use constant AGENT_BUILD => '210421';
use constant AGENT_BUILD => '210422';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210421
%define release 210422
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210421
%define release 210422
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210421"
PI_BUILD="210422"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{210421}
{210422}
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.754(Build 210421)")
#define PANDORA_VERSION ("7.0NG.754(Build 210422)")
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.754(Build 210421))"
VALUE "ProductVersion", "(7.0NG.754(Build 210422))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.754-210421
Version: 7.0NG.754-210422
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.754-210421"
pandora_version="7.0NG.754-210422"
package_pear=0
package_pandora=1

View File

@ -194,22 +194,22 @@ if ($delete_layout || $copy_layout) {
}
if ($copy_layout) {
// Number of inserts
// Number of inserts.
$ninsert = (int) 0;
// Return from DB the source layout
// Return from DB the source layout.
$layout_src = db_get_all_rows_filter(
'tlayout',
['id' => $id_layout]
);
// Name of dst
// Name of dst.
$name_dst = get_parameter(
'name_dst',
$layout_src[0]['name'].' copy'
);
// Create the new Console
// Create the new Console.
$idGroup = $layout_src[0]['id_group'];
$background = $layout_src[0]['background'];
$height = $layout_src[0]['height'];
@ -217,12 +217,15 @@ if ($delete_layout || $copy_layout) {
$visualConsoleName = $name_dst;
$values = [
'name' => $visualConsoleName,
'id_group' => $idGroup,
'background' => $background,
'height' => $height,
'width' => $width,
'name' => $visualConsoleName,
'id_group' => $idGroup,
'background' => $background,
'height' => $height,
'width' => $width,
'background_color' => $layout_src[0]['background_color'],
'is_favourite' => $layout_src[0]['is_favourite'],
];
$result = db_process_sql_insert('tlayout', $values);
$idNewVisualConsole = $result;

View File

@ -3739,6 +3739,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
$params['use_input_id_server'] = true;
$params['input_id_server_id'] = 'hidden-id_server';
$params['disabled_javascript_on_blur_function'] = true;
$params['javascript_is_function_select'] = true;
}
ui_print_agent_autocomplete_input($params);

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC210421';
$build_version = 'PC210422';
$pandora_version = 'v7.0NG.754';
// Do not overwrite default timezone set if defined.

View File

@ -1682,7 +1682,7 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3)
// Check if agent exists (BUG WC-50518-2).
if ($alias == '' && $alias_as_name === 0) {
returnError('No agent alias specified');
} else if (agents_get_agent_id($server_name)) {
} else if (agents_get_agent_id($nombre_agente)) {
returnError('The agent name already exists in DB.');
} else if (db_get_value_sql('SELECT id_grupo FROM tgrupo WHERE id_grupo = '.$grupo) === false) {
returnError('The group does not exist.');

View File

@ -3682,16 +3682,9 @@ function graph_custom_sql_graph(
}
}
if ($id != null) {
$historical_db = db_get_value_sql(
'SELECT historical_db from treport_content where id_rc ='.$content['id_rc']
);
} else {
$historical_db = $content['historical_db'];
}
if ($report_content['external_source'] != '') {
$sql = io_safe_output($report_content['external_source']);
$historical_db = $content['historical_db'];
if ($content['external_source'] != '') {
$sql = io_safe_output($content['external_source']);
} else {
$sql = db_get_row(
'treport_custom_sql',

View File

@ -756,14 +756,18 @@ function groups_create_group($group_name, $rest_values)
$values = array_merge($rest_values, $array_tmp);
if (!isset($values['propagate'])) {
if (isset($values['propagate']) === false) {
$values['propagate'] = 0;
}
if (!isset($values['disabled'])) {
if (isset($values['disabled']) === false) {
$values['disabled'] = 0;
}
if (isset($values['max_agents']) === false) {
$values['max_agents'] = 0;
}
$check = db_get_value('nombre', 'tgrupo', 'nombre', $group_name);
if (!$check) {

View File

@ -152,7 +152,6 @@ function menu_print_menu(&$menu)
$first_sub_sec2 = '';
foreach ($main['sub'] as $subsec2 => $sub) {
// hd($sub, true);
$count_sub++;
// Init some variables.

View File

@ -44,12 +44,12 @@ function update_dashboard(data) {
// eslint-disable-next-line no-unused-vars
function showGroup() {
$("#li-group").removeClass("hidden");
var private = $("#private").prop("checked");
if (private) {
$("#id_group").removeAttr("required");
$("#li-group").hide();
} else {
$("#id_group").attr("required", true);
$("#li-group").show();
}
}

View File

@ -352,7 +352,25 @@ final class BarsGraph extends Item
false,
false
);
$graph = base64_encode(file_get_contents($image));
$rc = file_get_contents($image);
if ($rc !== false) {
$graph = base64_encode($rc);
} else {
$graph = graph_nodata_image(
// Width.
$width,
// Height.
$height,
// Type.
'hbar',
// Text.
'',
// Percent.
false,
// Base64.
true
);
}
} else {
if ($typeGraph === 'horizontal') {
$graph = \hbar_graph(

View File

@ -649,7 +649,6 @@ form ul.form_flex {
justify-content: center;
height: 100%;
width: 100%;
background-color: #222;
}
.container-layout {

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.754';
$build = '210421';
$build = '210422';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -15,6 +15,7 @@ global $config;
require_once 'include/functions_reports.php';
$linkReport = false;
$searchReports = check_acl($config['id_user'], 0, 'RR');
@ -30,6 +31,28 @@ if ($reports === false || !$searchReports) {
$table->width = '98%';
$table->class = 'databox';
$table->head = [];
$table->align = [];
$table->headstyle = [];
$table->style = [];
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'left';
$table->data = [];
$table->head[0] = __('Report name');
$table->head[1] = __('Description');
$table->head[2] = __('HTML');
$table->head[3] = __('XML');
$table->size[0] = '50%';
$table->size[1] = '20%';
$table->size[2] = '2%';
$table->headstyle[2] = 'min-width: 35px;text-align: left;';
$table->size[3] = '2%';
$table->headstyle[3] = 'min-width: 35px;text-align: left;';
$table->size[4] = '2%';
$table->headstyle[4] = 'min-width: 35px;text-align: left;';
$table->head = [];
$table->head[0] = __('Report name');
$table->head[1] = __('Description');
@ -37,10 +60,6 @@ if ($reports === false || !$searchReports) {
$table->head[3] = __('XML');
enterprise_hook('load_custom_reporting_1', [$table]);
$table->align = [];
$table->align[2] = 'center';
$table->align[3] = 'center';
$table->align[4] = 'center';
$table->data = [];
foreach ($reports as $report) {
@ -54,7 +73,7 @@ if ($reports === false || !$searchReports) {
$reportstring,
$report['description'],
'<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'">'.html_print_image('images/reporting.png', true).'</a>',
'<a href="ajax.php?page=operation/reporting/reporting_xml&id='.$report['id_report'].'">'.html_print_image('images/database_lightning.png', true).'</a>',
'<a href="ajax.php?page=operation/reporting/reporting_xml&id='.$report['id_report'].'">'.html_print_image('images/xml.png', true).'</a>',
];
enterprise_hook('load_custom_reporting_2');

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210421
%define release 210422
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210421
%define release 210422
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210421
%define release 210422
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -73,12 +73,22 @@ if ($manageDashboards !== 0) {
$output .= '</div>';
$output .= '</div>';
if ($config['style'] === 'pandora') {
$options['background'] = '#fff';
}
if (empty($options['background']) === true) {
if ($config['style'] === 'pandora') {
$options['background'] = '#ffffff';
}
if ($config['style'] === 'pandora_black') {
$options['background'] = '#222';
if ($config['style'] === 'pandora_black') {
$options['background'] = '#222222';
}
} else if ($options['background'] === '#ffffff'
&& $config['style'] === 'pandora_black'
) {
$options['background'] = '#222222';
} else if ($options['background'] === '#222222'
&& $config['style'] === 'pandora'
) {
$options['background'] = '#ffffff';
}
if ((int) $cellData['id_widget'] !== 0) {

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.754-210421
Version: 7.0NG.754-210422
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.754-210421"
pandora_version="7.0NG.754-210422"
package_cpan=0
package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210421";
my $pandora_build = "210422";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210421";
my $pandora_build = "210422";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210421
%define release 210422
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210421
%define release 210422
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210421"
PI_BUILD="210422"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.754 PS210421";
my $version = "7.0NG.754 PS210422";
# 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.754 PS210421";
my $version = "7.0NG.754 PS210422";
# save program name for logging
my $progname = basename($0);