diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index a54002818d..b201f03df1 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.742-200115
+Version: 7.0NG.742-200116
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 ec00c3d207..667a916eae 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.742-200115"
+pandora_version="7.0NG.742-200116"
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 366e7ad559..901a25684c 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.742';
-use constant AGENT_BUILD => '200115';
+use constant AGENT_BUILD => '200116';
# 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 fd41ec1f90..a5ba25309f 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.742
-%define release 200115
+%define release 200116
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 920028aef8..9391a8fe18 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.742
-%define release 200115
+%define release 200116
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 df8455a431..33b85b6879 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.742"
-PI_BUILD="200115"
+PI_BUILD="200116"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 214118aaff..462a905312 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{200115}
+{200116}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 6889d27878..1b90cd4356 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.742(Build 200115)")
+#define PANDORA_VERSION ("7.0NG.742(Build 200116)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index a206edfda6..069494b28e 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.742(Build 200115))"
+ VALUE "ProductVersion", "(7.0NG.742(Build 200116))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 543a1c91f4..a21b22de5f 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.742-200115
+Version: 7.0NG.742-200116
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 0048357d77..dbe006c507 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.742-200115"
+pandora_version="7.0NG.742-200116"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/mr/35.sql b/pandora_console/extras/mr/35.sql
index 86236df36f..3a002f44f8 100644
--- a/pandora_console/extras/mr/35.sql
+++ b/pandora_console/extras/mr/35.sql
@@ -1,5 +1,6 @@
START TRANSACTION;
+ALTER TABLE `tmap` ADD COLUMN `id_group_map` INT(10) UNSIGNED NOT NULL default 0;
ALTER TABLE `tevent_filter` MODIFY `severity` TEXT NOT NULL;
-COMMIT;
\ No newline at end of file
+COMMIT;
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 0c95628752..bbc07ad08c 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
@@ -1195,6 +1195,8 @@ CREATE TABLE IF NOT EXISTS `tmap` (
`generation_method` INTEGER UNSIGNED NOT NULL default 0,
`generated` INTEGER UNSIGNED NOT NULL default 0,
`filter` TEXT,
+ `id_group_map` INT(10) UNSIGNED NOT NULL default 0,
+
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php
index f830f47dbd..e567f20716 100644
--- a/pandora_console/godmode/alerts/alert_list.list.php
+++ b/pandora_console/godmode/alerts/alert_list.list.php
@@ -412,65 +412,56 @@ $url_up_template = $url.'&sort_field=template&sort=up&pure='.$pure;
$url_down_template = $url.'&sort_field=template&sort=down&pure='.$pure;
-$table = new stdClass();
+$table_alert_list = new stdClass();
if (is_metaconsole()) {
- $table->class = 'alert_list databox';
+ $table_alert_list->class = 'alert_list databox';
} else {
- $table->class = 'info_table';
+ $table_alert_list->class = 'info_table';
}
-$table->width = '100%';
-$table->cellpadding = 0;
-$table->cellspacing = 0;
-$table->size = [];
+$table_alert_list->width = '100%';
+$table_alert_list->cellpadding = 0;
+$table_alert_list->cellspacing = 0;
+$table_alert_list->size = [];
-$table->align = [];
-$table->align[0] = 'left';
-$table->align[1] = 'left';
-$table->align[2] = 'left';
-$table->align[3] = 'left';
-$table->align[4] = 'left';
+$table_alert_list->align = [];
+$table_alert_list->align[0] = 'left';
+$table_alert_list->align[1] = 'left';
+$table_alert_list->align[2] = 'left';
+$table_alert_list->align[3] = 'left';
+$table_alert_list->align[4] = 'left';
-$table->head = [];
+$table_alert_list->head = [];
if (! $id_agente) {
- $table->style = [];
- $table->style[0] = 'font-weight: bold;';
- $table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
- $table->headstyle[0] = 'width: 100%; min-width: 12em;';
- $table->headstyle[1] = 'min-width: 15em;';
- $table->headstyle[2] = 'min-width: 20em;';
- $table->headstyle[3] = 'min-width: 1em;';
- $table->headstyle[4] = 'min-width: 15em;';
-
- /*
- if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
- $table->size[4] = '8%';
- }*/
+ $table_alert_list->style = [];
+ $table_alert_list->style[0] = 'font-weight: bold;';
+ $table_alert_list->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
} else {
- $table->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
- $table->headstyle[0] = 'width: 100%; min-width: 15em;';
- $table->headstyle[1] = 'min-width: 15em;';
- $table->headstyle[2] = 'min-width: 20em;';
- $table->headstyle[3] = 'min-width: 1em;';
- $table->headstyle[4] = 'min-width: 15em;';
+ $table_alert_list->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
}
-$table->head[1] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
-$table->head[2] = __('Actions');
-$table->head[3] = __('Status');
-$table->head[4] = "".__('Op.').'';
+$table_alert_list->head[1] = __('Status');
+$table_alert_list->head[2] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
+$table_alert_list->head[3] = __('Actions');
+$table_alert_list->head[4] = "".__('Op.').'';
-$table->valign[0] = 'middle';
-$table->valign[1] = 'middle';
-$table->valign[2] = 'middle';
-$table->valign[3] = 'middle';
-$table->valign[4] = 'middle';
+$table_alert_list->headstyle[0] = 'min-width: 200px; width:30%;';
+$table_alert_list->headstyle[1] = 'min-width: 50px; width:8%';
+$table_alert_list->headstyle[2] = 'min-width: 150px; width:22%;';
+$table_alert_list->headstyle[3] = 'min-width: 200px; width:30%;';
+$table_alert_list->headstyle[4] = 'min-width: 150px; width:10%;';
-$table->style[4] = 'min-width:80px';
+$table_alert_list->valign[0] = 'middle';
+$table_alert_list->valign[1] = 'middle';
+$table_alert_list->valign[2] = 'middle';
+$table_alert_list->valign[3] = 'middle';
+$table_alert_list->valign[4] = 'middle';
-$table->data = [];
+$table_alert_list->cellstyle = [];
+
+$table_alert_list->data = [];
$url .= $sort_params;
@@ -479,14 +470,14 @@ $iterator = 0;
foreach ($simple_alerts as $alert) {
if ($alert['disabled']) {
- $table->rowstyle[$iterator] = 'font-style: italic; color: #aaaaaa;';
- $table->style[$iterator][1] = 'font-style: italic; color: #aaaaaa;';
+ $table_alert_list->rowstyle[$iterator] = 'font-style: italic; color: #aaaaaa;';
+ $table_alert_list->style[$iterator][2] = 'font-style: italic; color: #aaaaaa;';
}
if ($rowPair) {
- $table->rowclass[$iterator] = 'rowPair';
+ $table_alert_list->rowclass[$iterator] = 'rowPair';
} else {
- $table->rowclass[$iterator] = 'rowOdd';
+ $table_alert_list->rowclass[$iterator] = 'rowOdd';
}
$rowPair = !$rowPair;
@@ -523,38 +514,53 @@ foreach ($simple_alerts as $alert) {
$all_groups = agents_get_all_groups_agent($id_agente);
}
- $module_name = modules_get_agentmodule_name($alert['id_agent_module']);
- $data[0] .= ui_print_truncate_text($module_name, 'module_medium', false, true, true, '[…]', 'display:block;font-size: 7.2pt').'
';
+ $status = STATUS_ALERT_NOT_FIRED;
+ $title = '';
+ if ($alert['times_fired'] > 0) {
+ $status = STATUS_ALERT_FIRED;
+ $title = __('Alert fired').' '.$alert['internal_counter'].' '.__('time(s)');
+ } else if ($alert['disabled'] > 0) {
+ $status = STATUS_ALERT_DISABLED;
+ $title = __('Alert disabled');
+ } else {
+ $status = STATUS_ALERT_NOT_FIRED;
+ $title = __('Alert not fired');
+ }
+
+ $module_name = modules_get_agentmodule_name($alert['id_agent_module']);
+ $data[0] .= ui_print_truncate_text($module_name, 'module_medium', false, true, true, '[…]', 'display:block;font-weight:normal;').'
';
+
+ $data[1] = ui_print_status_image($status, $title, true);
$template_group = db_get_value('id_group', 'talert_templates', 'id', $alert['id_alert_template']);
// The access to the template manage page is necessary have LW permissions on template group
if (check_acl($config['id_user'], $template_group, 'LW')) {
- $data[1] .= "";
+ $data[2] .= "";
}
- $data[1] .= ui_print_truncate_text(
+ $data[2] .= ui_print_truncate_text(
alerts_get_alert_template_name($alert['id_alert_template']),
'module_medium',
false,
true,
true,
'[…]',
- 'font-size: 7.1pt'
+ ''
);
- $data[1] .= ' ';
- $data[1] .= html_print_image('images/zoom.png', true, ['id' => 'template-details-'.$alert['id_alert_template'], 'class' => 'img_help']);
- $data[1] .= ' ';
+ $data[2] .= html_print_image('images/zoom.png', true, ['id' => 'template-details-'.$alert['id_alert_template'], 'class' => 'img_help action_button_img']);
+ $data[2] .= ' ';
if (check_acl($config['id_user'], $template_group, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) {
- $data[1] .= '';
+ $data[2] .= '';
}
$actions = alerts_get_alert_agent_module_actions($alert['id']);
- $data[2] = "
| ';
- $data[2] .= ''; - $data[2] .= ' | |
| ';
+ $data[3] .= '||
';
- $data[2] .= '
| ';
+ $data[3] .= '