#10304 Fix action default in agent detail

This commit is contained in:
miguel angel rasteu 2023-06-29 12:59:32 +02:00
parent d082687c44
commit 61ab82d808
1 changed files with 12 additions and 3 deletions

View File

@ -1446,13 +1446,22 @@ function ui_format_alert_row(
$actionText .= '</ul></div>';
if ($actionDefault != '') {
$actionText .= db_get_sql(
if ($actionDefault !== '') {
$actionDefault_name = db_get_sql(
sprintf(
'SELECT name FROM talert_actions WHERE id = %d',
$actionDefault
)
).' <i>('.__('Default').')</i>';
);
foreach ($actions as $action) {
if ($actionDefault_name === $action['name']) {
$hide_actionDefault = true;
}
}
if ($hide_actionDefault !== true) {
$actionText .= $actionDefault_name.' <i>('.__('Default').')</i>';
}
}
}