From b4bb0a1dcf8bdd90f289ba0e63367a41a0440ae5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 9 Dec 2020 12:23:49 +0100 Subject: [PATCH] warn while no instances are shown in map quick preview (discovery GCP) --- .../godmode/wizards/DiscoveryTaskList.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 6ca4f7f0fc..8809b8942d 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -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(); }