diff --git a/README.md b/README.md
index 3187ac8487..15db18aa00 100644
--- a/README.md
+++ b/README.md
@@ -46,3 +46,4 @@ Pandora FMS is a monitoring tool that not only measures if a parameter is right

+
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 1702ba40e0..1e6c6854a6 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.753-210330
+Version: 7.0NG.753-210407
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 e7aa071815..50959f54d6 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.753-210330"
+pandora_version="7.0NG.753-210407"
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 6cd1040763..4cd468afc8 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1016,7 +1016,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.753';
-use constant AGENT_BUILD => '210330';
+use constant AGENT_BUILD => '210407';
# 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 a190459153..0d9669e329 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.753
-%define release 210330
+%define release 210407
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 f235de2b53..ec53b3c1f0 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.753
-%define release 210330
+%define release 210407
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 ef9b1bdf5b..9a51acb1c8 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.753"
-PI_BUILD="210330"
+PI_BUILD="210407"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index d19f17758b..35fde32cab 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{210330}
+{210407}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 872071af8e..7bfc42d7d0 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.753(Build 210330)")
+#define PANDORA_VERSION ("7.0NG.753(Build 210407)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 310bdbd8e0..4a88adf11d 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.753(Build 210330))"
+ VALUE "ProductVersion", "(7.0NG.753(Build 210407))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 8be915a7ed..979f6b9ea9 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.753-210330
+Version: 7.0NG.753-210407
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 4c1fde485b..e26fa1a9ef 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.753-210330"
+pandora_version="7.0NG.753-210407"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/mr/46.sql b/pandora_console/extras/mr/46.sql
new file mode 100644
index 0000000000..63e0bf5843
--- /dev/null
+++ b/pandora_console/extras/mr/46.sql
@@ -0,0 +1,6 @@
+START TRANSACTION;
+
+ALTER TABLE `tagent_custom_fields` MODIFY COLUMN `combo_values` TEXT NOT NULL DEFAULT '';
+
+
+COMMIT;
\ No newline at end of file
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index a72fffdc53..7945e60204 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -2519,7 +2519,7 @@ INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Di
-- ----------------------------------------------------------------------
-- Add column in table `tagent_custom_fields`
-- ----------------------------------------------------------------------
-ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT '';
+ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` TEXT NOT NULL DEFAULT '';
-- ----------------------------------------------------------------------
-- Add column in table `tnetflow_filter`
diff --git a/pandora_console/general/first_task/cluster_builder.php b/pandora_console/general/first_task/cluster_builder.php
index 7cae5f3a3b..08ea618cce 100644
--- a/pandora_console/general/first_task/cluster_builder.php
+++ b/pandora_console/general/first_task/cluster_builder.php
@@ -24,6 +24,14 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
return;
}
+\ui_print_page_header(
+ __('Monitoring').' » '.__('Clusters'),
+ 'images/chart.png',
+ false,
+ '',
+ false
+);
+
ui_require_css_file('first_task');
?>
'select_search',
+ 'fields' => $combo_values,
+ 'name' => 'customvalue_'.$field['id_field'],
+ 'selected' => $custom_value,
+ 'nothing' => __('None'),
+ 'nothing_value' => '',
+ 'return' => true,
+ 'sort' => false,
+ 'size' => '400px',
+ 'dropdownAutoWidth' => true,
+ ]
);
};
diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index f7ff804b50..63b9e03131 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -400,7 +400,7 @@ if ($id_agente) {
// Module tab.
$moduletab['text'] = ''.html_print_image(
- 'images/module.png',
+ 'images/gm_modules.png',
true,
[
'title' => __('Modules'),
@@ -416,7 +416,7 @@ if ($id_agente) {
// Alert tab.
$alerttab['text'] = ''.html_print_image(
- 'images/bell.png',
+ 'images/gm_alerts.png',
true,
[
'title' => __('Alerts'),
diff --git a/pandora_console/godmode/agentes/configure_field.php b/pandora_console/godmode/agentes/configure_field.php
index 4a6b086d63..0f7a42820a 100755
--- a/pandora_console/godmode/agentes/configure_field.php
+++ b/pandora_console/godmode/agentes/configure_field.php
@@ -33,7 +33,7 @@ if ($id_field) {
$name = $field['name'];
$display_on_front = $field['display_on_front'];
$is_password_type = $field['is_password_type'];
- $combo_values = $field['combo_values'];
+ $combo_values = $field['combo_values'] ? $field['combo_values'] : '';
$is_combo_enable = $config['is_combo_enable'];
ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, '');
} else {
@@ -116,12 +116,12 @@ $table->data[4][0] = __('Combo values').ui_print_help_tip(
__('Set values separated by comma'),
true
);
-$table->data[4][1] = html_print_input_text(
+$table->data[4][1] = html_print_textarea(
'combo_values',
+ 3,
+ 65,
io_safe_output($combo_values),
'',
- 35,
- 200,
true
);
@@ -144,7 +144,7 @@ echo '';
\ No newline at end of file
+
diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php
index 6c6e6f66b3..da85133c7f 100644
--- a/pandora_console/godmode/alerts/alert_list.list.php
+++ b/pandora_console/godmode/alerts/alert_list.list.php
@@ -882,9 +882,11 @@ foreach ($simple_alerts as $alert) {
['title' => __('Add action')]
);
} else {
- $data[4] .= '';
- $data[4] .= html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']);
- $data[4] .= '';
+ if ((int) $alert['id_policy_alerts'] === 0) {
+ $data[4] .= '';
+ $data[4] .= html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']);
+ $data[4] .= '';
+ }
}
}
diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php
index 7b9b43ed41..08e2c2e9f3 100644
--- a/pandora_console/godmode/groups/configure_group.php
+++ b/pandora_console/godmode/groups/configure_group.php
@@ -149,12 +149,12 @@ if ($id_group) {
$table->data[2][1] .= html_print_select_groups(
false,
'AR',
- true,
+ false,
'id_parent',
$id_parent,
'',
- '',
- '',
+ __('None'),
+ -1,
true,
false,
true,
@@ -174,7 +174,9 @@ if ($id_group) {
'name' => 'id_parent',
'selected' => $id_parent,
'return' => true,
- 'returnAllGroup' => true,
+ 'returnAllGroup' => false,
+ 'nothing' => __('None'),
+ 'nothing_value' => -1,
]
);
$table->data[2][1] .= '';
@@ -182,7 +184,7 @@ if ($id_group) {
if ($acl_parent) {
$table->data[2][1] .= ' ';
- $table->data[2][1] .= html_print_image('images/groups_small/'.groups_get_icon($id_parent).'.png', true);
+ $table->data[2][1] .= html_print_image('images/groups_small/'.( $id_parent != 0 ? groups_get_icon($id_parent) : 'without_group').'.png', true);
$table->data[2][1] .= '';
}
diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php
index f1a0cd607e..74ea0af8fe 100644
--- a/pandora_console/godmode/groups/group_list.php
+++ b/pandora_console/godmode/groups/group_list.php
@@ -39,14 +39,14 @@ require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_users.php';
-if (is_metaconsole()) {
+if (is_metaconsole() === true) {
enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('meta/include/functions_agents_meta.php');
enterprise_hook('open_meta_frame');
}
-if (is_ajax()) {
- if (! check_acl($config['id_user'], 0, 'AR')) {
+if (is_ajax() === true) {
+ if (check_acl($config['id_user'], 0, 'AR') === false) {
db_pandora_audit('ACL Violation', 'Trying to access Group Management');
include 'general/noaccess.php';
return;
@@ -56,14 +56,14 @@ if (is_ajax()) {
$get_group_agents = (bool) get_parameter('get_group_agents');
$get_is_disabled = (bool) get_parameter('get_is_disabled');
- if ($get_group_json) {
+ if ($get_group_json === true) {
$id_group = (int) get_parameter('id_group');
- if ($id_group == 0) {
+ if ($id_group === 0 || $id_group === -1) {
$group = [
'id_grupo' => 0,
- 'nombre' => 'All',
- 'icon' => 'world',
+ 'nombre' => 'None',
+ 'icon' => '',
'parent' => 0,
'disabled' => 0,
'custom_id' => null,
@@ -72,7 +72,7 @@ if (is_ajax()) {
return;
}
- if (! check_acl($config['id_user'], $id_group, 'AR')) {
+ if (check_acl($config['id_user'], $id_group, 'AR') === false) {
db_pandora_audit(
'ACL Violation',
'Trying to access Alert Management'
@@ -87,7 +87,7 @@ if (is_ajax()) {
return;
}
- if ($get_group_agents) {
+ if ($get_group_agents === true) {
ob_clean();
$id_group = (int) get_parameter('id_group');
$disabled = (int) get_parameter('disabled', 0);
@@ -108,10 +108,13 @@ if (is_ajax()) {
// (by default and for compatibility show void agents).
$show_void_agents = (int) get_parameter('show_void_agents', 1);
$serialized = (bool) get_parameter('serialized', false);
- $serialized_separator = (string) get_parameter('serialized_separator', '|');
+ $serialized_separator = (string) get_parameter(
+ 'serialized_separator',
+ '|'
+ );
$force_serialized = (bool) get_parameter('force_serialized', false);
- if (! check_acl($config['id_user'], $id_group, 'AR')) {
+ if (check_acl($config['id_user'], $id_group, 'AR') === false) {
db_pandora_audit(
'ACL Violation',
'Trying to access Alert Management'
@@ -120,12 +123,15 @@ if (is_ajax()) {
return;
}
- if (https_is_running()) {
+ if (https_is_running() === true) {
header('Content-type: application/json');
}
if ($filter_agents_json != '') {
- $filter['id_agente'] = json_decode(io_safe_output($filter_agents_json), true);
+ $filter['id_agente'] = json_decode(
+ io_safe_output($filter_agents_json),
+ true
+ );
}
if ($all_agents) {
@@ -142,7 +148,6 @@ if (is_ajax()) {
$filter['status'] = $status_agents;
}
- // Juanma (22/05/2014) Fix: If remove void agents set.
$_sql_post = ' 1=1 ';
if ($show_void_agents == 0) {
$_sql_post .= ' AND id_agente IN (SELECT a.id_agente FROM tagente a, tagente_modulo b WHERE a.id_agente=b.id_agente AND b.delete_pending=0) AND \'1\'';
@@ -172,7 +177,7 @@ if (is_ajax()) {
$agents_aux = [];
foreach ($agents as $key => $value) {
- if (preg_match('/'.$search.'/', io_safe_output($value))) {
+ if (preg_match('/'.$search.'/', io_safe_output($value)) === true) {
$agents_aux[$key] = $value;
}
}
@@ -197,7 +202,10 @@ if (is_ajax()) {
'id_tmetaconsole_setup' => $agent_info[0],
]
);
- } else if ($serialized && !is_metaconsole() && $force_serialized) {
+ } else if ($serialized
+ && is_metaconsole() === false
+ && $force_serialized
+ ) {
$agent_info = explode($serialized_separator, $k);
$agent_disabled = db_get_value_filter(
'disabled',
@@ -233,10 +241,14 @@ if (is_ajax()) {
return;
}
- if ($get_is_disabled) {
+ if ($get_is_disabled === true) {
$index = get_parameter('id_agent');
- $agent_disabled = db_get_value_filter('disabled', 'tagente', ['id_agente' => $index]);
+ $agent_disabled = db_get_value_filter(
+ 'disabled',
+ 'tagente',
+ ['id_agente' => $index]
+ );
$return['disabled'] = $agent_disabled;
$return['id_agent'] = $index;
@@ -268,8 +280,8 @@ if ($tab != 'credbox' && ! check_acl(
include 'general/noaccess.php';
return;
} else if ($tab == 'credbox'
- && !check_acl($config['id_user'], 0, 'UM')
- && !check_acl($config['id_user'], 0, 'PM')
+ && check_acl($config['id_user'], 0, 'UM') === false
+ && check_acl($config['id_user'], 0, 'PM') === false
) {
db_pandora_audit(
'ACL Violation',
@@ -339,7 +351,7 @@ switch ($tab) {
}
// Header.
-if (defined('METACONSOLE')) {
+if (is_metaconsole() === true) {
agents_meta_print_header();
echo '