warn while no instances are shown in map quick preview (discovery GCP)

This commit is contained in:
fbsanchez 2020-12-09 12:23:49 +01:00
parent 839890025b
commit b4bb0a1dcf
1 changed files with 11 additions and 0 deletions

View File

@ -1253,6 +1253,17 @@ class DiscoveryTaskList extends HTML
],
]
);
if (count($map->nodes) <= 1) {
// No nodes detected in current task definition.
$task = db_get_row('trecon_task', 'id_rt', $id_task);
if ((int) $task['type'] === DISCOVERY_CLOUD_GCP_COMPUTE_ENGINE) {
ui_print_info_message(
__('Please ensure instances or regions are being monitorized and \'scan and general monitoring\' is enabled.')
);
}
}
$map->printMap();
}