#11440 Fixed the way to show the information of the actions in the alerts
This commit is contained in:
parent
8971aec8cb
commit
995ce67368
|
@ -326,32 +326,39 @@ if (count($actions) == 1 && isset($actions[0])) {
|
|||
}
|
||||
|
||||
foreach ($action['escalation'] as $k => $v) {
|
||||
if ($v > 0) {
|
||||
$table->data[$kaction][$k] = html_print_image(
|
||||
'images/tick.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
);
|
||||
} else {
|
||||
$table->data[$kaction][$k] = html_print_image(
|
||||
'images/blade.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if (count($table->head) <= count($action['escalation'])) {
|
||||
if ($k == count($action['escalation'])) {
|
||||
if ($k == 1) {
|
||||
$table->head[$k] = __('Every time that the alert is fired');
|
||||
if (count($table->head) >= count($action['escalation'])) {
|
||||
if ($k === count($action['escalation'])) {
|
||||
if ($k === 1) {
|
||||
$table->head[$kaction] = __('Every time that the alert is fired');
|
||||
} else {
|
||||
$table->head[$k] = '>#'.($k - 1);
|
||||
$table->head[$kaction] = '>#'.($kaction - 1);
|
||||
}
|
||||
} else {
|
||||
$table->head[$k] = '#'.$k;
|
||||
$table->head[$kaction] = '#'.($kaction);
|
||||
if ($v > 0) {
|
||||
$table->data[$kaction][($kaction + 1)] = html_print_image(
|
||||
'images/tick.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
);
|
||||
} else {
|
||||
$table->data[$kkaction][($kaction + 1)] = html_print_image(
|
||||
'images/blade.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table->head[($kaction + 1)] = '#'.($kaction);
|
||||
if (count($action['escalation']) === 0) {
|
||||
$table->data[$kaction][($kaction + 2)] = html_print_image(
|
||||
'images/blade.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$action_threshold = ($action['module_action_threshold'] > 0) ? $action['module_action_threshold'] : $action['action_threshold'];
|
||||
|
||||
if ($action_threshold == 0) {
|
||||
|
@ -364,7 +371,7 @@ if (count($actions) == 1 && isset($actions[0])) {
|
|||
);
|
||||
}
|
||||
|
||||
$table->head[($k + 1)] = __('Threshold');
|
||||
$table->head[($kaction + 1)] = __('Threshold');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue