From a0ad52b75f89dd66e4971c0f5eb1f39d591cc98f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 21 Dec 2023 13:13:31 +0100 Subject: [PATCH] #12128 action alert no show when empty --- pandora_console/godmode/alerts/alert_view.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_view.php b/pandora_console/godmode/alerts/alert_view.php index 7809742221..499bbded5e 100644 --- a/pandora_console/godmode/alerts/alert_view.php +++ b/pandora_console/godmode/alerts/alert_view.php @@ -308,13 +308,18 @@ $table->head[0] = __('Actions'); $table->style[0] = 'font-weight: bold; text-align: left;'; if (count($actions) == 1 && isset($actions[0])) { - $table->head[1] = __('Every time that the alert is fired'); - $table->data[0][0] = $actions[0]['name']; - $table->data[0][1] = html_print_image( - 'images/tick.png', - true, - ['class' => 'invert_filter'] - ); + if (!empty($actions[0]['name'])) { + $table->head[1] = __('Every time that the alert is fired'); + $table->data[0][0] = $actions[0]['name']; + $table->data[0][1] = html_print_image( + 'images/tick.png', + true, + ['class' => 'invert_filter'] + ); + } else { + $table->colspan[0] = 2; + $table->data[0] = __('No action defined.'); + } } else { foreach ($actions as $kaction => $action) { $table->data[$kaction][0] = $action['name'];