resolve merge conflcit

This commit is contained in:
marcos 2021-05-31 12:13:22 +02:00
commit 0b8e721d34
32 changed files with 150 additions and 84 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.754-210528 Version: 7.0NG.754-210531
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{210528} {210531}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.754 Build 210528") #define PANDORA_VERSION ("7.0NG.754 Build 210531")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.754-210528 Version: 7.0NG.754-210531
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -196,6 +196,7 @@ function mainModuleGroups()
ON ta.id_agente = tam.id_agente ON ta.id_agente = tam.id_agente
WHERE ta.disabled = 0 WHERE ta.disabled = 0
AND tam.disabled = 0 AND tam.disabled = 0
AND tam.id_modulo <> 0
AND tam.delete_pending = 0 AND tam.delete_pending = 0
AND ta.id_grupo IN (%s) AND ta.id_grupo IN (%s)
GROUP BY tam.id_agente_modulo GROUP BY tam.id_agente_modulo

View File

@ -1,28 +1,42 @@
<?php <?php
/**
* Resource registration.
*
* @category Extensions
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 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.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com /**
// ================================================== * Remember the hard-coded values.
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * -- id_modulo now uses tmodule.
// Please see http://pandorafms.org for full contribution list * -- ---------------------------.
// This program is free software; you can redistribute it and/or * -- 1 - Data server modules (agent related modules)
// modify it under the terms of the GNU General Public License * -- 2 - Network server modules
// as published by the Free Software Foundation; version 2 * -- 4 - Plugin server
// This program is distributed in the hope that it will be useful, * -- 5 - Predictive server
// but WITHOUT ANY WARRANTY; without even the implied warranty of * -- 6 - WMI server
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -- 7 - WEB Server (enteprise)
// GNU General Public License for more details. * In the xml is the tag "module_source"
// Remember the hard-coded values
/*
-- id_modulo now uses tmodule
-- ---------------------------
-- 1 - Data server modules (agent related modules)
-- 2 - Network server modules
-- 4 - Plugin server
-- 5 - Predictive server
-- 6 - WMI server
-- 7 - WEB Server (enteprise)
In the xml is the tag "module_source"
*/ */
require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_agents.php';
@ -1097,8 +1111,14 @@ function resource_registration_extension_main()
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA); $xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
if ($xml === false) {
ui_print_error_message(
__('Error uploading resource. Check if the selected file is a valid resource template in .ptr format')
);
} else {
process_upload_xml($xml); process_upload_xml($xml);
} }
}
extensions_add_godmode_menu_option(__('Resource registration'), 'PM', 'gagente', '', 'v1r1'); extensions_add_godmode_menu_option(__('Resource registration'), 'PM', 'gagente', '', 'v1r1');

View File

@ -1,17 +1,32 @@
<?php <?php
/**
* Common editor fields.
*
* @category Module manager
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 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.
require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_categories.php'; require_once $config['homedir'].'/include/functions_categories.php';
require_once $config['homedir'].'/include/graphs/functions_d3.php'; require_once $config['homedir'].'/include/graphs/functions_d3.php';
@ -19,7 +34,10 @@ require_once $config['homedir'].'/include/graphs/functions_d3.php';
include_javascript_d3(); include_javascript_d3();
global $config;function prepend_table_simple($row, $id=false) global $config;
function prepend_table_simple($row, $id=false)
{ {
global $table_simple; global $table_simple;
@ -115,7 +133,12 @@ function add_component_selection($id_network_component_type)
'', '',
'---'.__('Manual setup').'---', '---'.__('Manual setup').'---',
0, 0,
true true,
false,
true,
'',
false,
'width: 460px; '
); );
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= ' <span id="component_loading" class="invisible">'; $data[1] .= ' <span id="component_loading" class="invisible">';

View File

@ -312,7 +312,7 @@ class AgentWizard extends HTML
$this->idPolicy = get_parameter('id', ''); $this->idPolicy = get_parameter('id', '');
$this->targetIp = get_parameter('targetIp', ''); $this->targetIp = get_parameter('targetIp', '');
if (!empty($this->idAgent)) { if (empty($this->idAgent) === false) {
$array_aux = db_get_all_rows_sql( $array_aux = db_get_all_rows_sql(
sprintf( sprintf(
'SELECT ip FROM taddress ta 'SELECT ip FROM taddress ta
@ -1691,6 +1691,20 @@ class AgentWizard extends HTML
) )
); );
if ($this->wizardSection === 'snmp_interfaces_explorer'
&& empty($candidate['macros']) === false
) {
// Use definition provided.
$values['id_plugin'] = $candidate['id_plugin'];
$values['macros'] = base64_decode($candidate['macros']);
} else {
$fieldsPlugin = db_get_value_sql(
sprintf(
'SELECT macros FROM tplugin WHERE id=%d',
(int) $infoMacros['server_plugin']
)
);
if ($fieldsPlugin !== false) { if ($fieldsPlugin !== false) {
$fieldsPlugin = json_decode($fieldsPlugin, true); $fieldsPlugin = json_decode($fieldsPlugin, true);
$i = 1; $i = 1;
@ -1715,6 +1729,7 @@ class AgentWizard extends HTML
$values['macros'] = json_encode($fieldsPlugin); $values['macros'] = json_encode($fieldsPlugin);
} }
} }
}
} else if ($this->protocol === 'wmi') { } else if ($this->protocol === 'wmi') {
if ($candidate['execution_type'] === EXECUTION_TYPE_NETWORK) { if ($candidate['execution_type'] === EXECUTION_TYPE_NETWORK) {
// Generals fields. // Generals fields.

View File

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

View File

@ -27,6 +27,8 @@
*/ */
// Begin. // Begin.
global $config;
// Check to avoid error when load this library in error screen situations. // Check to avoid error when load this library in error screen situations.
if (isset($config['homedir'])) { if (isset($config['homedir'])) {
include_once $config['homedir'].'/include/functions_agents.php'; include_once $config['homedir'].'/include/functions_agents.php';
@ -35,8 +37,6 @@ if (isset($config['homedir'])) {
include_once $config['homedir'].'/include/functions_groups.php'; include_once $config['homedir'].'/include/functions_groups.php';
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
include_once $config['homedir'].'/include/functions_html.php'; include_once $config['homedir'].'/include/functions_html.php';
// For standard breadcrumbs.
ui_require_css_file('discovery');
} }
@ -4353,6 +4353,8 @@ function ui_print_standard_header(
array $options=[], array $options=[],
array $breadcrumbs=[] array $breadcrumbs=[]
) { ) {
// For standard breadcrumbs.
ui_require_css_file('discovery');
// Create the breadcrumb. // Create the breadcrumb.
$headerInformation = new HTML(); $headerInformation = new HTML();
$headerInformation->setBreadcrum([]); $headerInformation->setBreadcrum([]);

View File

@ -8300,6 +8300,10 @@ div.stat-win-spinner img {
margin-bottom: 20px; margin-bottom: 20px;
} }
.align-left-important {
text-align: left !important;
}
.legendLabel { .legendLabel {
font-family: inherit !important; font-family: inherit !important;
} }

View File

@ -1277,6 +1277,7 @@ if ($config['pure'] == 0) {
// Container div. // Container div.
echo '</div>'; echo '</div>';
echo '<div id="both"></div>'; echo '<div id="both"></div>';
echo '</div>';
echo '<div id="foot">'; echo '<div id="foot">';
include 'general/footer.php'; include 'general/footer.php';

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.754-210528 Version: 7.0NG.754-210531
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.754 Build 210528"; my $version = "7.0NG.754 Build 210531";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

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