diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index e831022c23..0872b52e88 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -1474,13 +1474,20 @@ class DiscoveryTaskList extends HTML } else if ((int) $task['type'] === DISCOVERY_EXTENSION) { // Content. $countSummary = 1; + $countErrors = 1; + $tableErrors = new StdClasS(); + $tableErrors->class = 'databox data'; + $tableErrors->width = '75%'; + $tableErrors->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;'; + $tableErrors->rowid = []; + $tableErrors->data = []; if (is_array($task['stats']) === true && count(array_filter(array_keys($task['stats']), 'is_numeric')) === count($task['stats'])) { foreach ($task['stats'] as $key => $summary) { - $table->data[$i][0] = ''.__('Summary').' '.$countSummary.''; - $table->data[$i][1] = ''; - $countSummary++; - $i++; if (is_array($summary) === true) { + $table->data[$i][0] = ''.__('Summary').' '.$countSummary.''; + $table->data[$i][1] = ''; + $countSummary++; + $i++; if (empty($summary['summary']) === true && empty($summary['info']) === true) { $table->data[$i][0] = json_encode($summary, JSON_PRETTY_PRINT); $table->data[$i][1] = ''; @@ -1517,8 +1524,12 @@ class DiscoveryTaskList extends HTML $i++; } } else { - $table->data[$i][0] = $summary; - $table->data[$i][1] = ''; + $tableErrors->data[$i][0] = ''.__('Error %s', $countErrors).''; + $tableErrors->data[$i][1] = ''; + $i++; + $tableErrors->data[$i][0] = $summary; + $tableErrors->data[$i][1] = ''; + $countErrors++; $i++; } } @@ -1565,7 +1576,15 @@ class DiscoveryTaskList extends HTML } $output = '
'.__('Summary').'
'; - $output .= html_print_table($table, true).''; + if (is_array($table->data) === true && count($table->data) > 0) { + $output .= html_print_table($table, true); + } + + if (is_array($tableErrors->data) === true && count($tableErrors->data) > 0) { + $output .= html_print_table($tableErrors, true); + } + + $output .= ''; } return $output;