Merge remote-tracking branch 'origin/develop' into ent-9662-Restyling-fuentes-colores-botones

Conflicts:
	pandora_console/include/class/SnmpConsole.class.php
This commit is contained in:
daniel 2023-03-06 08:09:29 +01:00
commit f6e063b981
31 changed files with 103 additions and 43 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230303
Version: 7.0NG.769-230306
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.769-230303"
pandora_version="7.0NG.769-230306"
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.769';
use constant AGENT_BUILD => '230303';
use constant AGENT_BUILD => '230306';
# 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.769
%define release 230303
%define release 230306
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.769
%define release 230303
%define release 230306
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230303"
PI_BUILD="230306"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -956,7 +956,20 @@ class SnmpConsole extends HTML
'class' => 'invert_filter main_menu_icon',
]
).'</a>';
$tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">'.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon invert_filter']).'</a>';
if ($config['enterprise_installed']) {
$tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">';
$tmp->action .= html_print_image(
'images/edit.svg',
true,
[
'alt' => __('SNMP trap editor'),
'title' => __('SNMP trap editor'),
'class' => 'main_menu_icon invert_filter',
]
);
$tmp->action .= '</a>';
}
$tmp->m = html_print_checkbox_extended('snmptrapid[]', $tmp->id_trap, false, false, '', 'class="chk"', true);

View File

@ -214,6 +214,11 @@ class Tree
AND ta.unknown_count = 0
AND ta.normal_count > 0) ';
break;
case AGENT_STATUS_NOT_NORMAL:
$agent_status_filter = ' AND (ta.critical_count > 0
OR ta.warning_count > 0) ';
break;
}
return $agent_status_filter;
@ -285,6 +290,10 @@ class Tree
return $show_init_condition;
}
if ((int) $this->filter['statusModule'] === 6) {
return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)';
}
$field_filter = modules_get_counter_by_states($this->filter['statusModule']);
if ($field_filter === false) {
return ' AND 1=0';
@ -902,6 +911,18 @@ class Tree
$agent['counters']['ok'] = $agent['normal_count'];
$agent['counters']['total'] = $agent['normal_count'];
break;
case AGENT_MODULE_STATUS_NOT_NORMAL:
if (empty($agent['critical_count']) === false) {
$agent['counters']['critical'] = $agent['critical_count'];
}
if (empty($agent['warning_count']) === false) {
$agent['counters']['warning'] = $agent['warning_count'];
}
$agent['counters']['total'] = ($agent['warning_count'] + $agent['critical_count']);
break;
}
}

View File

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

View File

@ -956,6 +956,11 @@ function processTreeSearch(settings) {
agents: settings.translate.ok.agents,
modules: settings.translate.ok.modules,
none: settings.translate.ok.none
},
not_normal: {
agents: settings.translate.not_normal.agents,
modules: settings.translate.not_normal.modules,
none: settings.translate.not_normal.none
}
}
});

View File

@ -248,6 +248,10 @@ class TreeViewWidget extends Widget
$values['agentStatus'] = AGENT_STATUS_NOT_INIT;
break;
case 6:
$values['agentStatus'] = AGENT_STATUS_NOT_NORMAL;
break;
default:
case -1:
$values['agentStatus'] = AGENT_STATUS_ALL;
@ -289,6 +293,10 @@ class TreeViewWidget extends Widget
$values['moduleStatus'] = AGENT_MODULE_STATUS_NOT_INIT;
break;
case 6:
$values['moduleStatus'] = AGENT_MODULE_STATUS_NOT_NORMAL;
break;
default:
case -1:
$values['moduleStatus'] = -1;
@ -386,12 +394,13 @@ class TreeViewWidget extends Widget
// Agents status.
$fields = [
AGENT_STATUS_ALL => __('All'),
AGENT_STATUS_NORMAL => __('Normal'),
AGENT_STATUS_WARNING => __('Warning'),
AGENT_STATUS_CRITICAL => __('Critical'),
AGENT_STATUS_UNKNOWN => __('Unknown'),
AGENT_STATUS_NOT_INIT => __('Not init'),
AGENT_STATUS_ALL => __('All'),
AGENT_STATUS_NORMAL => __('Normal'),
AGENT_STATUS_WARNING => __('Warning'),
AGENT_STATUS_CRITICAL => __('Critical'),
AGENT_STATUS_UNKNOWN => __('Unknown'),
AGENT_STATUS_NOT_INIT => __('Not init'),
AGENT_STATUS_NOT_NORMAL => __('Not normal'),
];
$inputs[] = [
@ -425,6 +434,7 @@ class TreeViewWidget extends Widget
AGENT_MODULE_STATUS_CRITICAL_BAD => __('Critical'),
AGENT_MODULE_STATUS_UNKNOWN => __('Unknown'),
AGENT_MODULE_STATUS_NOT_INIT => __('Not init'),
AGENT_MODULE_STATUS_NOT_NORMAL => __('Not normal'),
];
if (is_metaconsole() === false) {
@ -702,6 +712,11 @@ class TreeViewWidget extends Widget
'modules' => __('Normal modules'),
'none' => __('Normal'),
],
'not_normal' => [
'agents' => __('Not normal agents'),
'modules' => __('Not normal modules'),
'none' => __('Not normal'),
],
'module' => __('Module'),
'timeOnlyTitle' => __('Choose time'),
'timeText' => __('Time'),

View File

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

View File

@ -543,7 +543,12 @@ $infoHeadTitle = 'Sombra oscura';
agents: "<?php echo __('Normal agents'); ?>",
modules: "<?php echo __('Normal modules'); ?>",
none: "<?php echo __('Normal'); ?>"
}
},
not_normal: {
agents: "<?php echo __('Not normal agents'); ?>",
modules: "<?php echo __('Not normal modules'); ?>",
none: "<?php echo __('Not normal'); ?>"
},
}
});
}

View File

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

View File

@ -1,9 +1,9 @@
-- Pandora FMS - the Flexible Monitoring System
-- ============================================
-- Copyright (c) 2014-2021 Artica Soluciones Tecnologicas, http://www.artica.es
-- Please see http://www.pandorafms.org for full contribution list
-- Copyright (c) 2014-2023 Artica PFMS
-- Please see http://www.pandorafms.com
-- Database Data for Pandora FMS 5.1
-- Database Data for Pandora FMS NG
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
@ -39,17 +39,18 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('block_size','20'),
('days_purge','45'),
('days_delete_unknown','0'),
('days_delete_not_initialized','0'),
('days_delete_not_initialized','7'),
('days_compact','0'),
('days_autodisable_deletion','30'),
('graph_res','5'),
('step_compact','1'),
('db_scheme_first_version', '6.0dev'),
('db_scheme_version','6.0RC1'),
('db_scheme_build','PD150908'),
('db_scheme_first_version', '7.0NG'),
('db_scheme_version','7.0NG'),
('db_scheme_build','PD230303'),
('show_unknown','0'),
('show_lastalerts','1'),
('style','pandora'),
('graph_image_height', '250'),
('graph_color1', '#99dd00'),
('graph_color2', '#336600'),
('graph_color3', '#3399cc'),
@ -104,7 +105,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('enable_refr', 0),
('meta_num_elements', 100),
('update_manager_installed', 1),
('num_files_attachment', 250),
('num_files_attachment', 500),
('show_vc', 1),
('inventory_changes_blacklist', '1,2,20,21'),
('custom_report_front', 0),
@ -220,10 +221,10 @@ UNLOCK TABLES;
LOCK TABLES `tlink` WRITE;
INSERT INTO `tlink` VALUES
(1,'Documentation','https://pandorafms.com/manual'),
(2,'Enterprise Edition','http://pandorafms.com'),
(2,'Get support','https://pandorafms.com/en/technical-support/'),
(3,'Report a bug','https://github.com/pandorafms/pandorafms/issues'),
(4,'Suggest new feature','https://pandorafms.com/community/beta-program/'),
(5,'Module library','http://library.pandorafms.com/');
(5,'Module library','https://pandorafms.com/library/');
UNLOCK TABLES;

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.769-230303
Version: 7.0NG.769-230306
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.769-230303"
pandora_version="7.0NG.769-230306"
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.769";
my $pandora_build = "230303";
my $pandora_build = "230306";
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.769";
my $pandora_build = "230303";
my $pandora_build = "230306";
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.769
%define release 230303
%define release 230306
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.769
%define release 230303
%define release 230306
Summary: Pandora FMS Server
Name: %{name}

View File

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