mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2011-08-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* extensions/module_groups.php: Add tooltip message when a module group doesn't have alerts or are not fired. Fixes: #3388455 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4693 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1fe64da228
commit
ebf88ee459
@ -1,3 +1,10 @@
|
|||||||
|
2011-08-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* extensions/module_groups.php: Add tooltip message when a module group
|
||||||
|
doesn't have alerts or are not fired.
|
||||||
|
|
||||||
|
Fixes: #3388455
|
||||||
|
|
||||||
2011-08-09 Miguel de Dios <miguel.dedios@artica.es>
|
2011-08-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* DEBIAN/control: fixed the name of package and update version number.
|
* DEBIAN/control: fixed the name of package and update version number.
|
||||||
|
@ -26,16 +26,16 @@ if (is_ajax ()) {
|
|||||||
$module_group = (int)get_parameter('module_group');
|
$module_group = (int)get_parameter('module_group');
|
||||||
$id_agent_group = (int)get_parameter('id_agent_group');
|
$id_agent_group = (int)get_parameter('id_agent_group');
|
||||||
|
|
||||||
|
$data = false;
|
||||||
if ($get_info_alert_module_group) {
|
if ($get_info_alert_module_group) {
|
||||||
$agents = agents_get_group_agents($id_agent_group);
|
$agents = agents_get_group_agents($id_agent_group);
|
||||||
if (!empty($agents)) {
|
if (!empty($agents)) {
|
||||||
$alerts = agents_get_alerts_simple($agents);
|
$alerts = agents_get_alerts_simple($agents);
|
||||||
|
|
||||||
foreach ($alerts as $alert) {
|
foreach ($alerts as $alert) {
|
||||||
$module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module']));
|
$module = db_get_row_filter('tagente_modulo', array('id_agente_modulo' => $alert['id_agent_module']));
|
||||||
|
|
||||||
if ($module_group == $module['id_module_group']) {
|
if ($module_group == $module['id_module_group']) {
|
||||||
if ($alert["times_fired"] > 0) {
|
if ($alert["times_fired"] > 0) {
|
||||||
|
$data = true;
|
||||||
echo '<strong>' . __('Number fired of alerts').': </strong> ' . $alert["times_fired"] . '<br />';
|
echo '<strong>' . __('Number fired of alerts').': </strong> ' . $alert["times_fired"] . '<br />';
|
||||||
$agent = db_get_row('tagente', 'id_agente', $module['id_agente']);
|
$agent = db_get_row('tagente', 'id_agente', $module['id_agente']);
|
||||||
echo '<strong>' . __('Agent').': </strong>';
|
echo '<strong>' . __('Agent').': </strong>';
|
||||||
@ -45,7 +45,6 @@ if (is_ajax ()) {
|
|||||||
$template = db_get_row('talert_templates', 'id' , $alert['id_alert_template']);
|
$template = db_get_row('talert_templates', 'id' , $alert['id_alert_template']);
|
||||||
echo '<strong>' . __('Alert template') . ': </strong>';
|
echo '<strong>' . __('Alert template') . ': </strong>';
|
||||||
echo io_safe_output($template['name']) . '<br />';
|
echo io_safe_output($template['name']) . '<br />';
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM talert_template_module_actions AS t1
|
FROM talert_template_module_actions AS t1
|
||||||
INNER JOIN talert_actions AS t2 ON t1.id_alert_action = t2.id
|
INNER JOIN talert_actions AS t2 ON t1.id_alert_action = t2.id
|
||||||
@ -69,7 +68,16 @@ if (is_ajax ()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!$data){
|
||||||
|
echo '<i>These module/s have no alerts or alert/s are not fired</i>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
echo '<i>No available data</i>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<i>No available data</i>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user