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

This commit is contained in:
daniel 2018-10-22 08:04:36 +02:00
commit 6bb478ea1a
33 changed files with 100 additions and 60 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -4,6 +4,7 @@ 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_template_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0';
ALTER TABLE tlayout MODIFY `name` varchar(600) NOT NULL;
ALTER TABLE tmetaconsole_setup ADD COLUMN `meta_dbuser` text;

View File

@ -1779,6 +1779,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE tlayout_template_data ADD COLUMN `show_last_value` tinyint(1) UNSIGNED NULL default '0';
-- ---------------------------------------------------------------------
-- Table `tlog_graph_models`
-- ---------------------------------------------------------------------

View File

@ -849,8 +849,7 @@ function readFields() {
values['enable_link'] = $("input[name=enable_link]").is(':checked') ? 1 : 0;
values['id_group'] = $("select[name=group]").val();
values['id_custom_graph'] = parseInt(
$("#custom_graph option:selected").val());
values['id_custom_graph'] = $("#custom_graph option:selected").val();
values['width_box'] = parseInt(
$("input[name='width_box']").val());
values['height_box'] = parseInt(
@ -1715,8 +1714,13 @@ function loadFieldsFromDB(item) {
.prop('checked', true);
$("input[name='radio_choice']").trigger('change');
$("#custom_graph option[value=" + data.id_custom_graph + "]").prop("selected", true);
if (is_metaconsole()){
$("#custom_graph option[value='" + data.id_custom_graph + '|' + data.id_metaconsole + "']").prop("selected", true);
}
else{
$("#custom_graph option[value=" + data.id_custom_graph + "]").prop("selected", true);
}
}
}
@ -2316,12 +2320,18 @@ function setModuleGraph(id_data) {
dataType: 'json',
success: function (data)
{
var url_hack_metaconsole = '';
if (is_metaconsole()) {
url_hack_metaconsole = '../../';
}
if (data['no_data'] == true) {
$('#' + id_data).html(data['url']);
}
else {
if($("#module_row").css('display')!='none'){
$("#" + id_data + " img").attr('src', 'images/console/signes/module_graph.png');
$("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/module_graph.png');
if($('#text-width_module_graph').val() == 0 || $('#text-height_module_graph').val() == 0){
$("#" + id_data + " img").css('width', '300px');
$("#" + id_data + " img").css('height', '180px');
@ -2331,7 +2341,7 @@ function setModuleGraph(id_data) {
$("#" + id_data + " img").css('height', $('#text-height_module_graph').val()+'px');
}
}else{
$("#" + id_data + " img").attr('src', 'images/console/signes/custom_graph.png');
$("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/custom_graph.png');
if($('#text-width_module_graph').val() == 0 || $('#text-height_module_graph').val() == 0){
$("#" + id_data + " img").css('width', '300px');
$("#" + id_data + " img").css('height', '180px');

View File

@ -427,13 +427,27 @@ foreach ($layoutDatas as $layoutData) {
}
}
}
$modules = io_safe_output($modules);
if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) {
$table->data[$i + 2][1] = html_print_select_from_sql(
"SELECT id_graph, name FROM tgraph", 'custom_graph_' . $idLayoutData,
$layoutData['id_custom_graph'], '', __('None'), 0, true);
if(is_metaconsole()){
$graphs = array();
$graphs = metaconsole_get_custom_graphs(true);
$table->data[$i + 2][1] = html_print_select(
$graphs, 'custom_graph_' . $idLayoutData,
$layoutData['id_custom_graph'] . "|" . $layoutData['id_metaconsole'],
'', __('None'), 0, true
);
}
else{
$table->data[$i + 2][1] = html_print_select_from_sql(
"SELECT id_graph, name FROM tgraph",
'custom_graph_' . $idLayoutData,
$layoutData['id_custom_graph'],
'', __('None'), 0, true
);
}
} else {
$table->data[$i + 2][1] = html_print_select($modules,
'module_' . $idLayoutData,
@ -446,12 +460,10 @@ foreach ($layoutDatas as $layoutData) {
}
break;
}
//Empty
$table->data[$i + 2][2] = '';
//Period
switch ($layoutData['type']) {
case MODULE_GRAPH:

View File

@ -1206,13 +1206,29 @@ switch ($action) {
break;
case 'module_graph':
$values['type'] = MODULE_GRAPH;
if(is_metaconsole()){
$explode_id = explode("|", $values['id_custom_graph']);
$values['id_custom_graph'] = $explode_id[0];
$values['id_metaconsole'] = $explode_id[1];
}
if ($values['id_custom_graph'] > 0 ) {
$values['height'] = $height_module_graph;
$values['width'] = $width_module_graph;
if(is_metaconsole()){
$server_data = metaconsole_get_connection_by_id($values['id_metaconsole']);
// Establishes connection
if (metaconsole_load_external_db($server_data) !== NOERR) continue;
}
$graph_conf = db_get_row('tgraph', 'id_graph', $values['id_custom_graph']);
if(is_metaconsole()){
metaconsole_restore_db();
}
$graph_stacked = $graph_conf['stacked'];
if ( $graph_stacked == CUSTOM_GRAPH_BULLET_CHART) {
$values['height'] = 50;

View File

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

View File

@ -94,7 +94,8 @@ function agents_create_agent ($name, $id_group, $interval, $ip_address, $values
if (! is_array ($values))
$values = array ();
$values['nombre'] = $name;
$values['alias'] = $name;
$values['nombre'] = hash("sha256",$name . "|" .$ip_address ."|". time() ."|". sprintf("%04d", rand(0,10000)));
$values['id_grupo'] = $id_group;
$values['intervalo'] = $interval;

View File

@ -298,7 +298,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
'#000000', 'text-grid_color', '', 7, 7, false,
'', 'class="grid_color"', true) .
'</td>';
$form_items['radio_choice_graph'] = array();
$form_items['radio_choice_graph']['items'] = array(
'module_graph',
@ -312,27 +312,25 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
. __('Custom graph') . "&nbsp;&nbsp;" .
html_print_radio_button('radio_choice', 'custom_graph', '', 'module_graph', true) .
'</td>';
$form_items['custom_graph_row'] = array();
$form_items['custom_graph_row']['items'] = array(
'module_graph',
'datos');
$form_items['custom_graph_row']['html'] =
'<td align="left" style="">' . __('Custom graph') . '</td>
<td align="left" style="">' .
html_print_select_from_sql(
"SELECT id_graph, name FROM tgraph", 'custom_graph',
'', '', __('None'), 0, true) .
'</td>';
$form_items['custom_graph_row']['html'] = '<td align="left" style="">' . __('Custom graph') . '</td><td align="left" style="">';
if(is_metaconsole()){
$graphs = array();
$graphs = metaconsole_get_custom_graphs(true);
$form_items['custom_graph_row']['html'] .= html_print_select($graphs, 'custom_graph', '', '', __('None'), 0, true);
}
else{
$form_items['custom_graph_row']['html'] .= html_print_select_from_sql("SELECT id_graph, name FROM tgraph", 'custom_graph','', '', __('None'), 0, true);
}
$form_items['custom_graph_row']['html'] .= '</td>';
$form_items['agent_row'] = array();
$form_items['agent_row']['items'] = array('static_graph',
'percentile_bar', 'percentile_item', 'module_graph',
'simple_value', 'datos', 'auto_sla_graph');
$form_items['agent_row']['html'] = '<td align="left">' .
__('Agent') . '</td>';
__('Agent') . '</td>';
$params = array();
$params['return'] = true;
$params['show_helptip'] = true;

View File

@ -185,7 +185,7 @@ function d3_bullet_chart($chart_data, $width, $height, $color, $legend,
.bullet g text { font-size:'.$font_size.'pt;}
</style>
<script src="'. $config['homeurl'] . 'include/graphs/bullet.js"></script>
<script src="'. $homeurl . 'include/graphs/bullet.js"></script>
<script language="javascript" type="text/javascript">
var margin = {top: 5, right: 40, bottom: 20, left: 120};

View File

@ -71,7 +71,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.727';
$build = '181018';
$build = '181022';
$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 181018
%define release 181022
# 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 181018
%define release 181022
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -3341,6 +3341,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
`clock_animation` varchar(60) NOT NULL default "analogic_1",
`time_format` varchar(60) NOT NULL default "time",
`timezone` varchar(60) NOT NULL default "Europe/Madrid",
`show_last_value` tinyint(1) UNSIGNED NULL default '0',
PRIMARY KEY(`id`),
FOREIGN KEY (`id_layout_template`) REFERENCES tlayout_template(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

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

View File

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

View File

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