diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index e3bdf4d6ee..6771606f50 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.735-190620
+Version: 7.0NG.735-190625
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 29805564f8..fe7628e999 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -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
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index c1a404b8de..6bbb463b49 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -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;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 92a2a06578..8f580504eb 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -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}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 2f4e5a4fe6..28023a28f3 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -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}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index de01023370..879ff79eac 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.735"
-PI_BUILD="190620"
+PI_BUILD="190625"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index a985084c57..21e38fb13b 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{190620}
+{190625}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 0d35e4bfc5..2194b622ac 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -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;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 500ef613f1..f328ab299c 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -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
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 1970cb19df..8a166990ab 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.735-190620
+Version: 7.0NG.735-190625
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 8563bebf3c..2d45e0aa49 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -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
diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php
index 0e08a3728f..9e7ce18c4e 100644
--- a/pandora_console/godmode/agentes/modificar_agente.php
+++ b/pandora_console/godmode/agentes/modificar_agente.php
@@ -163,7 +163,7 @@ echo '
';
echo __('Group').' ';
$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;
diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php
index 3b7b5a947d..8ea292445b 100644
--- a/pandora_console/godmode/alerts/configure_alert_action.php
+++ b/pandora_console/godmode/alerts/configure_alert_action.php
@@ -317,9 +317,9 @@ $(document).ready (function () {
jQuery.post (,
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('');
diff --git a/pandora_console/godmode/massive/massive_delete_alerts.php b/pandora_console/godmode/massive/massive_delete_alerts.php
index 862d54bbbc..d7f316fd4d 100755
--- a/pandora_console/godmode/massive/massive_delete_alerts.php
+++ b/pandora_console/godmode/massive/massive_delete_alerts.php
@@ -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");
+ });
});
/* ]]> */
diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php
index bd980f5256..14caf1b9cb 100644
--- a/pandora_console/godmode/menu.php
+++ b/pandora_console/godmode/menu.php
@@ -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';
diff --git a/pandora_console/images/heartbeat_green.gif b/pandora_console/images/heartbeat_green.gif
index 49697adbc7..a985013064 100644
Binary files a/pandora_console/images/heartbeat_green.gif and b/pandora_console/images/heartbeat_green.gif differ
diff --git a/pandora_console/images/heartbeat_red.gif b/pandora_console/images/heartbeat_red.gif
index e0c4b24ccd..abc8d83832 100644
Binary files a/pandora_console/images/heartbeat_red.gif and b/pandora_console/images/heartbeat_red.gif differ
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 08b31ca957..60a348e138 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -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.
diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php
index 83de1ef9ab..a6acdd03fe 100644
--- a/pandora_console/include/functions_alerts.php
+++ b/pandora_console/include/functions_alerts.php
@@ -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)) {
diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php
index 3bf8a3448b..3f8a8cd33b 100644
--- a/pandora_console/include/functions_menu.php
+++ b/pandora_console/include/functions_menu.php
@@ -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']);
diff --git a/pandora_console/include/javascript/pandora_alerts.js b/pandora_console/include/javascript/pandora_alerts.js
index 1c72d13cf3..389aa15475 100644
--- a/pandora_console/include/javascript/pandora_alerts.js
+++ b/pandora_console/include/javascript/pandora_alerts.js
@@ -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")
);
}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index cf94353e3a..2e3074241c 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
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
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index de1ce16abc..3b0caf9619 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -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() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index ef54cd23f8..d6b4578521 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -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}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 95a1664bf0..f3758822ff 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -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}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index a85d8b9fe3..b63386d7df 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.735"
-PI_BUILD="190620"
+PI_BUILD="190625"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index ee60f7ce55..875f8f51dd 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -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;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 4e4c971bfd..e00e964276 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -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);
|