Conflict solution

This commit is contained in:
Jonathan 2023-04-04 11:35:26 +02:00
commit 99b07a2fb2
40 changed files with 57011 additions and 52456 deletions

View File

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

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

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230331
%define release 230404
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.770
%define release 230331
%define release 230404
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230331"
PI_BUILD="230404"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -563,7 +563,14 @@ if ($search != '') {
if ($id != '') {
$aux = $id[0]['id_agent'];
$search_sql = sprintf(
' AND ( `nombre` LIKE "%%%s%%" OR tagente.id_agente = %d',
' AND ( nombre LIKE "%%%s%%"
OR alias LIKE "%%%s%%"
OR comentarios LIKE "%%%s%%"
OR EXISTS (SELECT * FROM tagent_custom_data WHERE id_agent = id_agente AND description LIKE "%%%s%%")
OR tagente.id_agente = %d',
$search,
$search,
$search,
$search,
$aux
);

View File

@ -301,17 +301,6 @@ class TipsWindow
}
/**
* Get number of tips in database
*
* @return integer
*/
public function getTotalTips()
{
return db_get_sql('SELECT count(*) FROM twelcome_tip');
}
/**
* Get totals tips that user can show
*
@ -581,7 +570,7 @@ class TipsWindow
$sql = sprintf(
'SELECT id, name AS language, title, text, url, enable
FROM twelcome_tip t
LEFT JOIN tlanguage l ON t.id_lang = l.id_language
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_0900_ai_ci
%s %s %s',
$filter,
$order,
@ -590,6 +579,16 @@ class TipsWindow
$data = db_get_all_rows_sql($sql);
$sqlCount = sprintf(
'SELECT count(*)
FROM twelcome_tip t
LEFT JOIN tlanguage l ON t.id_lang = l.id_language COLLATE utf8mb4_0900_ai_ci
%s',
$filter
);
$total = db_get_sql($sqlCount);
foreach ($data as $key => $row) {
if ($row['enable'] === '1') {
$data[$key]['enable'] = '<span class="enable"></span>';
@ -626,8 +625,6 @@ class TipsWindow
if (empty($data) === true) {
$total = 0;
$data = [];
} else {
$total = $this->getTotalTips();
}
echo json_encode(

View File

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

View File

@ -756,10 +756,8 @@ function inventory_get_datatable(
foreach ($rows as $row) {
$data_rows = explode(PHP_EOL, $row['data']);
foreach ($data_rows as $data_key => $data_value) {
if (empty($data_value) === false) {
$row['data'] = $data_value;
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
}
$row['data'] = $data_value;
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -124,7 +124,6 @@ td > input[id^="checkbox-multi"] {
padding-right: 9px;
padding-top: 7px;
padding-bottom: 7px;
border-bottom: 2px solid #dedede;
word-break: break-all;
}

View File

@ -11892,3 +11892,6 @@ label:has(span.label-alert-agent) {
td[id^="table_info_box"] a {
font-weight: bold;
}
.info_table.events > tbody > tr > td {
border-bottom: 1px solid #dedede !important;
}

View File

@ -1234,10 +1234,6 @@ a.pandora_pagination:hover {
box-shadow: 0px 3px 6px #111;
}
.info_table.events > tbody > tr > td {
border-bottom: 2px solid #707070;
}
.info_table tr th,
.databox.data > tbody > tr > td {
border-bottom: 1px solid #707070 !important;
@ -1560,7 +1556,7 @@ a.autorefresh_txt,
}
.info_table.events > tbody > tr > td {
border-bottom: 1px solid #333;
border-bottom: 1px solid #333 !important;
}
.info_table,

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.770';
$build = '230331';
$build = '230404';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -218,7 +218,7 @@ foreach ($rows as $row) {
}
if ($idModuleInventory != $row['id_module_inventory']) {
if (isset($table) === true && $rowTable > 1) {
if (isset($table) === true && $rowTable >= 1) {
html_print_table($table);
unset($table);
$rowTable = 1;
@ -320,7 +320,7 @@ foreach ($rows as $row) {
$idModuleInventory = $row['id_module_inventory'];
}
if (isset($table) === true && $rowTable > 1) {
if (isset($table) === true && $rowTable >= 1) {
html_print_table($table);
$printedTables++;
}

View File

@ -30,7 +30,7 @@ use PandoraFMS\Enterprise\Metaconsole\Node;
global $config;
require_once $config['homedir'].'/include/functions_gis.php';
require_once 'include/functions_gis.php';
require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_modules.php';
@ -1442,13 +1442,22 @@ $alerttab['active'] = ($tab === 'alert');
// Inventory.
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
$inventorytab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
'images/hardware-software-component@svg.svg',
true,
[
'class' => 'main_menu_icon invert_filter',
'title' => __('Inventory'),
]
).'</a>';
$inventorytab = enterprise_hook('inventory_tab');
if ($inventorytab === ENTERPRISE_NOT_HOOK || $inventoryCount === 0) {
$inventorytab = '';
if ($tab == 'inventory') {
$inventorytab['active'] = true;
} else {
$inventorytab['active'] = false;
}
// Collection.
if ((int) $config['license_nms'] !== 1) {
$collectiontab = enterprise_hook('collection_tab');
@ -1468,13 +1477,12 @@ if ($policyTab === ENTERPRISE_NOT_HOOK) {
// Omnishell.
if (function_exists('count_tasks_agent')) {
$tasks = count_tasks_agent($id_agente);
if ($tasks === true) {
$omnishellTab = enterprise_hook('omnishell_tab');
if ($omnishellTab == -1) {
$omnishellTab = '';
}
$tasks = count_tasks_agent($id_agente);
if ($tasks === true) {
$omnishellTab = enterprise_hook('omnishell_tab');
if ($omnishellTab == -1) {
$omnishellTab = '';
}
}
@ -1579,7 +1587,7 @@ if (enterprise_installed() === true && (bool) $config['log_collector'] === true)
$log_viewer_tab['text'] = html_print_menu_button(
[
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente,
'image' => 'images/gm_log@svg.svg',
'image' => 'images/gm_log.png',
'title' => __('Log Viewer'),
],
true
@ -1909,7 +1917,7 @@ switch ($tab) {
if ((bool) $config['pure'] === false) {
ui_print_standard_header(
__('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
__('Agent main view'),
$icon,
false,
($help_header ?? ''),
@ -1928,12 +1936,6 @@ if ((bool) $config['pure'] === false) {
'link' => '',
'label' => $tab_name,
],
],
[
'id_element' => $id_agente,
'url' => 'operation/agentes/ver_agente&id_agente='.$id_agente,
'label' => agents_get_alias($id_agente),
'section' => 'Agents',
]
);
}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
%define release 230331
%define release 230404
# 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.770
%define release 230331
%define release 230404
# 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.770
%define release 230331
%define release 230404
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

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

View File

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

View File

@ -7269,13 +7269,15 @@ sub process_inventory_data ($$$$$$$) {
# Empty list
next unless defined ($list->{'data'});
foreach my $data (@{$list->{'data'}}) {
#Empty data.
next if (ref($data) eq 'HASH');
$data_list .= $data . "\n";
}
}
next if ($data_list eq '');
process_inventory_module_data ($pa_config, $data_list, $server_id, $agent_name, $module_name, $interval, $timestamp, $dbh);
}
}

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.770";
my $pandora_build = "230331";
my $pandora_build = "230404";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
%define release 230331
%define release 230404
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
%define release 230331
%define release 230404
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230331"
PI_BUILD="230404"
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.770 Build 230331";
my $version = "7.0NG.770 Build 230404";
# 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.770 Build 230331";
my $version = "7.0NG.770 Build 230404";
# save program name for logging
my $progname = basename($0);

View File

@ -123,7 +123,7 @@ foreach my $op (@operation){
my $wmi_query = 'SELECT ' . $config->{'fieldsList'} . ' FROM ' . $config->{'wmiClass'} . ($config->{'queryFilter'} ? ' WHERE ' . $config->{'queryFilter'} : '');
# Build wmic command
my $wmi_command = $config->{'wmicPath'} . ' -U ' . $config->{'user'} . '%' . $config->{'pass'} . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
my $wmi_command = $config->{'wmicPath'} . ' -U ' . "'" . $config->{'user'} . '%' . $config->{'pass'} . "'" . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
# Run wmic and parse output
my $output = `$wmi_command 2>/dev/null`;
@ -173,4 +173,4 @@ foreach my $k (keys %{$fields_values}){
my $result = eval $operation;
if (defined($result)){
print $result . "\n";
}
}