#8201 Fix dashboard event dialog

This commit is contained in:
Daniel Maya 2021-12-07 12:17:26 +01:00
parent 4925aaae18
commit e24987d03e
1 changed files with 6 additions and 2 deletions

View File

@ -1338,6 +1338,10 @@ if ($get_extended_event) {
$timestamp_first = $event['min_timestamp'];
$timestamp_last = $event['max_timestamp'];
$server_id = $event['server_id'];
if (empty($server_id) && !empty($event['server_name']) && is_metaconsole()) {
$server_id = metaconsole_get_id_server($event['server_name']);
}
$comments = $event['comments'];
$event['similar_ids'] = $similar_ids;
@ -1513,7 +1517,7 @@ if ($get_extended_event) {
$console_url = '';
// If metaconsole switch to node to get details and custom fields.
if ($meta) {
if ($meta || (is_metaconsole() && !empty($server_id))) {
$server = metaconsole_get_connection_by_id($server_id);
} else {
$server = '';
@ -1526,7 +1530,7 @@ if ($get_extended_event) {
}
$connected = true;
if ($meta) {
if ($meta || (is_metaconsole() && !empty($server_id))) {
if (metaconsole_connect($server) === NOERR) {
$connected = true;
} else {