diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index c5d6bb93a1..579d746516 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.755-210625
+Version: 7.0NG.755-210628
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 e89669ddc3..a08d52437d 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.755-210625"
+pandora_version="7.0NG.755-210628"
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 ff0cd500c9..65849d6e8c 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.755';
-use constant AGENT_BUILD => '210625';
+use constant AGENT_BUILD => '210628';
# 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 c81327fabd..133a1b7fbb 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.755
-%define release 210625
+%define release 210628
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 af0f6277f4..7126cb84fd 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.755
-%define release 210625
+%define release 210628
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 1e9d0871c0..844a9f08b0 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.755"
-PI_BUILD="210625"
+PI_BUILD="210628"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index af15e12ae0..d58cc371ad 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{210625}
+{210628}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index c4afff4e48..c459f7cde4 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.755 Build 210625")
+#define PANDORA_VERSION ("7.0NG.755 Build 210628")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index b0edd74296..02a5e88138 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.755(Build 210625))"
+ VALUE "ProductVersion", "(7.0NG.755(Build 210628))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index f328e8e212..a804c1bc6b 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.755-210625
+Version: 7.0NG.755-210628
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 1b4e161128..a86259afbd 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.755-210625"
+pandora_version="7.0NG.755-210628"
package_pear=0
package_pandora=1
diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php
index baaf967228..7643abc4fd 100644
--- a/pandora_console/include/class/AgentWizard.class.php
+++ b/pandora_console/include/class/AgentWizard.class.php
@@ -1172,7 +1172,7 @@ class AgentWizard extends HTML
[
'arguments' => [
'type' => 'hidden',
- 'value' => json_encode($candidateModules),
+ 'value' => htmlspecialchars(json_encode($candidateModules)),
'return' => true,
'name' => 'modules-definition',
],
diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php
index 8ff384a8fc..b0be9087a2 100644
--- a/pandora_console/include/class/Tree.class.php
+++ b/pandora_console/include/class/Tree.class.php
@@ -160,6 +160,21 @@ class Tree
}
+ /**
+ * Show disabled modules
+ *
+ * @return string Sql disabled.
+ */
+ protected function getDisabledFilter()
+ {
+ if (empty($this->filter['showDisabled'])) {
+ return ' tam.disabled = 0 AND ta.disabled = 0';
+ }
+
+ return ' 1 = 1';
+ }
+
+
protected function getAgentStatusFilter($status=self::TV_DEFAULT_AGENT_STATUS)
{
if ($status == self::TV_DEFAULT_AGENT_STATUS) {
@@ -1094,6 +1109,7 @@ class Tree
$agent_filter = 'AND ta.id_agente = '.$this->id;
$tag_condition = $this->getTagCondition();
$tag_join = empty($tag_condition) && (!$this->L3forceTagCondition) ? '' : $this->getTagJoin();
+ $show_disabled = $this->getDisabledFilter();
if ($this->avoid_condition === true) {
$condition = '';
@@ -1107,6 +1123,10 @@ class Tree
tam.id_tipo_modulo, tam.id_modulo, tae.estado, tae.datos,
tam.parent_module_id AS parent, tatm.id AS alerts, tam.unit';
+ if ($show_disabled) {
+ $columns .= ', tam.disabled';
+ }
+
$sql = "SELECT $columns
FROM tagente_modulo tam
$tag_join
@@ -1119,7 +1139,8 @@ class Tree
LEFT JOIN talert_template_modules tatm
ON tatm.id_agent_module = tam.id_agente_modulo
$inner
- WHERE tam.disabled = 0 AND ta.disabled = 0
+ WHERE
+ $show_disabled
$condition
$agent_filter
$group_acl
diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php
index 119610eb0d..56ec13ac3a 100644
--- a/pandora_console/include/class/TreeService.class.php
+++ b/pandora_console/include/class/TreeService.class.php
@@ -180,6 +180,7 @@ class TreeService extends Tree
} else if ($this->type == 'services') {
$this->getSecondLevel();
} else if ($this->type == 'agent') {
+ $this->filter['showDisabled'] = true;
$this->getThirdLevel();
}
@@ -433,6 +434,7 @@ class TreeService extends Tree
$tmp['showEventsBtn'] = 1;
$tmp['eventAgent'] = $item->agent()->id_agente();
+ $tmp['disabled'] = (bool) $item->agent()->disabled();
break;
case SERVICE_ELEMENT_MODULE:
@@ -495,6 +497,7 @@ class TreeService extends Tree
$tmp['showGraphs'] = 1;
$tmp['showEventsBtn'] = 1;
$tmp['eventAgent'] = $item->module()->id_agente();
+ $tmp['disabled'] = $item->module()->disabled();
$html = ' 0
+ element.children.length > 0 &&
+ element.disabled == false
) {
$node.removeClass("leaf-empty").addClass("leaf-closed");
@@ -1027,8 +1036,9 @@ var TreeController = {
element.searchChildren
) {
if (
- element.rootType == "group_edition" &&
- typeof element.children == "undefined"
+ (element.rootType == "group_edition" &&
+ typeof element.children == "undefined") ||
+ element.disabled == true
) {
$node.addClass("leaf-empty");
} else {
diff --git a/pandora_console/include/styles/tree.css b/pandora_console/include/styles/tree.css
index 1a479ac3cf..6a0cc7b19f 100644
--- a/pandora_console/include/styles/tree.css
+++ b/pandora_console/include/styles/tree.css
@@ -179,3 +179,7 @@ div#tree-controller-recipient {
.tree-node > .node-content > div + div:not(.tree-node-counters) {
margin-left: 3px;
}
+
+.tree-node .disabled {
+ filter: opacity(0.3);
+}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index d2af3d2d94..fe5eaef6db 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@