Merge remote-tracking branch 'origin/develop' into ent-4238-eventos-csv-e-historico

This commit is contained in:
fbsanchez 2019-06-25 14:10:32 +02:00
commit 1966c81f2d
35 changed files with 70 additions and 40 deletions

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.735"
PI_BUILD="190620"
PI_BUILD="190625"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

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

View File

@ -163,7 +163,7 @@ echo '<td>';
echo __('Group').'&nbsp;';
$own_info = get_user_info($config['id_user']);
if (!$own_info['is_admin'] && !check_acl($config['id_user'], 0, 'AW')) {
if (!$own_info['is_admin'] && check_acl($config['id_user'], 0, 'AW')) {
$return_all_group = false;
} else {
$return_all_group = true;

View File

@ -317,9 +317,9 @@ $(document).ready (function () {
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
values,
function (data, status) {
original_command = js_html_entity_decode (data["command"]);
original_command = data["command"];
render_command_preview (original_command);
command_description = js_html_entity_decode (data["description"]);
command_description = data["description"];
render_command_description(command_description);
var max_fields = parseInt('<?php echo $config['max_macro_fields']; ?>');

View File

@ -31,6 +31,7 @@ require_once $config['homedir'].'/include/functions_users.php';
if (is_ajax()) {
$get_agents = (bool) get_parameter('get_agents');
$recursion = (int) get_parameter('recursion');
$disabled_modules = (int) get_parameter('disabled_modules');
if ($get_agents) {
$id_group = (int) get_parameter('id_group');
@ -44,12 +45,18 @@ if (is_ajax()) {
$groups = [$id_group];
}
if ($disabled_modules == 0) {
$filter['tagente_modulo.disabled'] = '<> 1';
} else {
unset($filter['tagente_modulo.disabled']);
}
$agents_alerts = [];
foreach ($groups as $group) {
$agents_alerts_one_group = alerts_get_agents_with_alert_template(
$id_alert_template,
$group,
false,
$filter,
[
'tagente.alias',
'tagente.id_agente',
@ -253,6 +260,11 @@ $table->data[1][1] = html_print_select_groups(
'',
$id_alert_template == 0
);
$table->data[0][2] = __('Show alerts on disabled modules');
$table->data[0][3] = html_print_checkbox('disabled_modules', 1, false, true, false);
$table->data[1][2] = __('Group recursion');
$table->data[1][3] = html_print_checkbox('recursion', 1, false, true, false);
@ -360,6 +372,7 @@ $(document).ready (function () {
"get_agents" : 1,
"id_group" : this.value,
"recursion" : $("#checkbox-recursion").is(":checked") ? 1 : 0,
"disabled_modules" : $("#checkbox-disabled_modules").is(":checked") ? 1 : 0,
"id_alert_template" : $("#id_alert_template").val(),
// Add a key prefix to avoid auto sorting in js object conversion
"keys_prefix" : "_"
@ -387,6 +400,10 @@ $(document).ready (function () {
$("#modules_selection_mode").change (function() {
$("#id_agents").trigger('change');
});
$("#checkbox-disabled_modules").click(function () {
$("#id_group").trigger("change");
});
});
/* ]]> */
</script>

View File

@ -208,7 +208,7 @@ if (!empty($sub)) {
}
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, 'RR')) {
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'PM')) {
// Servers
$menu_godmode['gservers']['text'] = __('Servers');
$menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

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

View File

@ -1916,7 +1916,6 @@ function alerts_get_agents_with_alert_template($id_alert_template, $id_group, $f
$filter[] = 'tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module';
$filter[] = 'tagente_modulo.id_agente = tagente.id_agente';
$filter['id_alert_template'] = $id_alert_template;
$filter['tagente_modulo.disabled'] = '<> 1';
$filter['delete_pending'] = '<> 1';
if (empty($id_agents)) {

View File

@ -50,6 +50,12 @@ function menu_print_menu(&$menu)
$sec = (string) get_parameter('sec');
$sec2 = (string) get_parameter('sec2');
if ($sec2 == 'operation/agentes/ver_agente') {
$sec2 = 'godmode/agentes/configurar_agente';
} else {
$sec2 = (string) get_parameter('sec2');
}
$menu_selected = false;
$allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']);

View File

@ -1,5 +1,4 @@
var original_command = "";
function parse_alert_command(command, classs) {
if (classs == "recovery") {
classs = "fields_recovery";
@ -34,13 +33,13 @@ function parse_alert_command(command, classs) {
}
function render_command_preview(original_command) {
$("#textarea_command_preview").text(
$("#textarea_command_preview").html(
parse_alert_command(original_command, "")
);
}
function render_command_recovery_preview(original_command) {
$("#textarea_command_recovery_preview").text(
$("#textarea_command_recovery_preview").html(
parse_alert_command(original_command, "recovery")
);
}

View File

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

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.735
%define release 190620
%define release 190625
# 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.735
%define release 190620
%define release 190625
# 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.735
%define release 190620
%define release 190625
%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.735-190620
Version: 7.0NG.735-190625
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.735-190620"
pandora_version="7.0NG.735-190625"
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.735";
my $pandora_build = "190620";
my $pandora_build = "190625";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -141,12 +141,21 @@ sub data_producer ($) {
# Manual tasks are "forced" like the other, setting the utimestamp to 1
# By default, after create a tasks it takes the utimestamp to 0
# Status -1 means "done".
my @rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
WHERE id_recon_server = ?
AND disabled = 0
AND ((utimestamp = 0 AND interval_sweep != 0 OR status = 1)
OR (status = -1 AND interval_sweep > 0 AND (utimestamp + interval_sweep) < UNIX_TIMESTAMP()))', $server_id);
my @rows;
if (pandora_is_master($pa_config) == 0) {
@rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
WHERE id_recon_server = ?
AND disabled = 0
AND ((utimestamp = 0 AND interval_sweep != 0 OR status = 1)
OR (status = -1 AND interval_sweep > 0 AND (utimestamp + interval_sweep) < UNIX_TIMESTAMP()))', $server_id);
} else {
@rows = get_db_rows ($dbh, 'SELECT * FROM trecon_task
WHERE (id_recon_server = ? OR id_recon_server = ANY(SELECT id_server FROM tserver WHERE status = 0 AND server_type = ?))
AND disabled = 0
AND ((utimestamp = 0 AND interval_sweep != 0 OR status = 1)
OR (status = -1 AND interval_sweep > 0 AND (utimestamp + interval_sweep) < UNIX_TIMESTAMP()))', $server_id, DISCOVERYSERVER);
}
foreach my $row (@rows) {
# Update task status

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.735";
my $pandora_build = "190620";
my $pandora_build = "190625";
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.735
%define release 190620
%define release 190625
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.735"
PI_BUILD="190620"
PI_BUILD="190625"
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.735 PS190620";
my $version = "7.0NG.735 PS190625";
# 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.735 PS190620";
my $version = "7.0NG.735 PS190625";
# save program name for logging
my $progname = basename($0);