Merge remote-tracking branch 'origin/develop' into 2221-Actualizacion_de_Pandora_a_version_7_de_PHP

This commit is contained in:
daniel 2018-10-16 15:42:17 +02:00
commit f824650642
32 changed files with 81 additions and 44 deletions

View File

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

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.727';
use constant AGENT_BUILD => '181015';
use constant AGENT_BUILD => '181016';
# 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.727
%define release 181015
%define release 181016
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.727"
PI_BUILD="181015"
PI_BUILD="181016"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -1,5 +1,8 @@
START TRANSACTION;
ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0;
UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]';
ALTER TABLE tlayout_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0';
ALTER TABLE tlayout MODIFY `name` varchar(600) NOT NULL;

View File

@ -1180,13 +1180,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 20);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 21);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '727');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '728');
-- ---------------------------------------------------------------------
-- Table `tconfig_os`
@ -1278,6 +1278,8 @@ ALTER TABLE `tservice` ADD COLUMN `quiet` tinyint(1) NOT NULL default 0;
ALTER TABLE `tservice` ADD COLUMN `cps` int NOT NULL default 0;
ALTER TABLE `tservice` ADD COLUMN `cascade_protection` tinyint(1) NOT NULL default 0;
ALTER TABLE `tservice` ADD COLUMN `evaluate_sla` int(1) NOT NULL default 0;
ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0;
UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]';
-- ---------------------------------------------------------------------
-- Table `tlayout`

View File

@ -1544,13 +1544,14 @@ function loadFieldsFromDB(item) {
if (key == 'linked_layout_status_type')
$("select[name=linked_map_status_calculation_type]").val(val).change();
if (key == 'id_layout_linked') {
if (data['linked_layout_node_id'] == null) {
$("select[name=map_linked]").val(val).change();
}
else {
var $option = $("select[name=map_linked] > option[data-node-id=" + data['linked_layout_node_id'] + "][value=" + val + "]");
if ($option.length === 0) $option = $("select[name=map_linked] > option[value=" + val + "]");
$option.prop("selected", true).parent().change();
if (val != 0) {
if (data['linked_layout_node_id'] == null) {
$("select[name=map_linked]").val(val).change();
} else {
var $option = $("select[name=map_linked] > option[data-node-id=" + data['linked_layout_node_id'] + "][value=" + val + "]");
if ($option.length === 0) $option = $("select[name=map_linked] > option[value=" + val + "]");
$option.prop("selected", true).parent().change();
}
}
}
if (key == 'linked_layout_node_id')

View File

@ -741,8 +741,8 @@ $table_vc->style[0] = 'font-weight: bold';
$table_vc->size[0] = '50%';
$table_vc->data = array ();
$vc_favourite_view_array[0] = 'Classic view';
$vc_favourite_view_array[1] = 'View of favorites';
$vc_favourite_view_array[0] = __('Classic view');
$vc_favourite_view_array[1] = __('View of favorites');
$table_vc->data[$row][0] = __('Type of view of visual consoles') .
ui_print_help_tip(__('Allows you to directly display the list of favorite visual consoles'), true);
$table_vc->data[$row][1] = html_print_select($vc_favourite_view_array, 'vc_favourite_view', $config["vc_favourite_view"], '', '', 0, true);
@ -750,7 +750,6 @@ $row++;
$table_vc->data[$row][0] = __('Number of favorite visual consoles to show in the menu') .
ui_print_help_tip(__('If the number is 0 it will not show the pull-down menu and maximum 25 favorite consoles'), true);
//$table_vc->data[$row][1] = html_print_input_text ('vc_menu_items', $config["vc_menu_items"], '', 5, 5, true);
$table_vc->data[$row][1] = "<input type ='number' value=".$config["vc_menu_items"]." size='5' name='vc_menu_items' min='0' max='25'>";
$row++;
@ -763,8 +762,26 @@ $table_vc->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["
echo "<fieldset>";
echo "<legend>" . __('Visual consoles configuration') . "</legend>";
html_print_table ($table_vc);
echo "</fieldset>";
echo "</fieldset>";
//----------------------------------------------------------------------
// Services
//----------------------------------------------------------------------
$table_ser = new stdClass();
$table_ser->width = '100%';
$table_ser->class = "databox filters";
$table_ser->style[0] = 'font-weight: bold';
$table_ser->size[0] = '50%';
$table_ser->data = array ();
$table_ser->data['number'][0] = __('Number of favorite services to show in the menu') .
ui_print_help_tip(__('If the number is 0 it will not show the pull-down menu and maximum 25 favorite services'), true);
$table_ser->data['number'][1] = "<input type ='number' value=".$config["ser_menu_items"]." size='5' name='ser_menu_items' min='0' max='25'>";
echo "<fieldset>";
echo "<legend>" . __('Services configuration') . "</legend>";
html_print_table ($table_ser);
echo "</fieldset>";
//----------------------------------------------------------------------
// OTHER CONFIGURATION

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC181015';
$build_version = 'PC181016';
$pandora_version = 'v7.0NG.727';
// Do not overwrite default timezone set if defined.

View File

@ -530,7 +530,7 @@ function config_update_config () {
$error_update[] = __('Product name');
if (!config_update_value ('rb_copyright_notice', (string) get_parameter ('rb_copyright_notice')))
$error_update[] = __('Copyright notice');
if (!config_update_value ('meta_custom_logo', (string) get_parameter ('meta_custom_logo')))
$error_update[] = __('Custom logo metaconsole');
if (!config_update_value ('meta_custom_logo_white_bg', (string) get_parameter ('meta_custom_logo_white_bg')))
@ -545,7 +545,7 @@ function config_update_config () {
$error_update[] = __('Custom title2 login metaconsole');
if (!config_update_value ('meta_login_background', (string) get_parameter ('meta_login_background')))
$error_update[] = __('Login background metaconsole');
if (!config_update_value ('meta_custom_docs_url', (string) get_parameter ('meta_custom_docs_url')))
$error_update[] = __('Custom Docs url');
if (!config_update_value ('meta_custom_support_url', (string) get_parameter ('meta_custom_support_url')))
@ -553,13 +553,16 @@ function config_update_config () {
if (!config_update_value ('vc_refr', get_parameter('vc_refr')))
$error_update[] = __('Default interval for refresh on Visual Console');
if (!config_update_value ('vc_favourite_view', (int) get_parameter('vc_favourite_view', 5)))
if (!config_update_value ('vc_favourite_view', (int) get_parameter('vc_favourite_view', 0)))
$error_update[] = __('Default line favourite_view for the Visual Console');
if (!config_update_value ('vc_menu_items', (int) get_parameter('vc_menu_items', 10)))
$error_update[] = __('Default line menu items for the Visual Console');
if (!config_update_value ('vc_line_thickness', (int) get_parameter('vc_line_thickness')))
$error_update[] = __('Default line thickness for the Visual Console');
if (!config_update_value ('ser_menu_items', (int) get_parameter('ser_menu_items', 10)))
$error_update[] = __('Default line menu items for the Services');
if (!config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small')))
$error_update[] = __('Agent size text');
if (!config_update_value ('agent_size_text_medium', get_parameter('agent_size_text_medium')))
@ -1300,6 +1303,16 @@ function config_process_config () {
config_update_value ('meta_custom_title2_login', __('METACONSOLE'));
}
if (!isset($config['vc_favourite_view'])) {
config_update_value('vc_favourite_view', 0);
}
if (!isset($config['vc_menu_items'])) {
config_update_value('vc_menu_items', 10);
}
if (!isset($config['ser_menu_items'])) {
config_update_value('ser_menu_items', 10);
}
if (!isset ($config['history_db_enabled'])) {
config_update_value ( 'history_db_enabled', false);
}
@ -2010,7 +2023,7 @@ function config_process_config () {
if (!isset($config['ehorus_req_timeout'])) {
config_update_value('ehorus_req_timeout', 5);
}
/* Finally, check if any value was overwritten in a form */
config_update_config();
}

View File

@ -1066,7 +1066,7 @@ function tags_check_acl_by_module($id_module = 0, $id_user = false,
// If user has not permission for this group,go to next group
if (!isset($user_groups[$group])) continue;
// No tags means user can see all tags for this group
if (!isset($user_groups[$group]["tags"][$acl_column])) return true;
if (empty($user_groups[$group]["tags"][$acl_column])) return true;
// Check acl
$intersection = array_intersect($tags, $user_groups[$group]["tags"][$acl_column]);
if(!empty($intersection)) return true;

View File

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

View File

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

View File

@ -2476,6 +2476,7 @@ CREATE TABLE IF NOT EXISTS `tservice` (
`cps` int NOT NULL default 0,
`cascade_protection` tinyint(1) NOT NULL default 0,
`evaluate_sla` int(1) NOT NULL default 0,
`is_favourite` tinyint(1) NOT NULL default 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB
COMMENT = 'Table to define services to monitor'

View File

@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
('custom_report_front_header', ''),
('custom_report_front_footer', ''),
('MR', 20),
('MR', 21),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '727'),
('current_package_enterprise', '728'),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}'),
('custom_docs_logo', 'default_docs.png'),
('custom_support_logo', 'default_support.png'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.727-181015
Version: 7.0NG.727-181016
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.727-181015"
pandora_version="7.0NG.727-181016"
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.727";
my $pandora_build = "181015";
my $pandora_build = "181016";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.727";
my $pandora_build = "181015";
my $pandora_build = "181016";
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.727
%define release 181015
%define release 181016
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.727"
PI_BUILD="181015"
PI_BUILD="181016"
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.727 PS181015";
my $version = "7.0NG.727 PS181016";
# 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.727 PS181015";
my $version = "7.0NG.727 PS181016";
# save program name for logging
my $progname = basename($0);