#9771 changed format table for view json raw

This commit is contained in:
Daniel Cebrian 2023-04-24 16:18:49 +02:00
parent 4d927c2bb3
commit 8b51aea36c

View File

@ -1470,6 +1470,13 @@ class DiscoveryTaskList extends HTML
$countSummary++;
$i++;
if (is_array($summary) === true) {
if (empty($summary['summary']) === true && empty($summary['info']) === true) {
$table->data[$i][0] = json_encode($summary, JSON_PRETTY_PRINT);
$table->data[$i][1] = '';
$i++;
continue;
}
foreach ($summary as $k2 => $v) {
if (is_array($v) === true) {
if ($k2 === 'summary') {
@ -1479,17 +1486,17 @@ class DiscoveryTaskList extends HTML
$i++;
}
} else {
$table->data[$i][0] = json_encode([$k2 => $v]);
$table->data[$i][0] = json_encode([$k2 => $v], JSON_PRETTY_PRINT);
$table->data[$i][1] = '';
$i++;
}
} else {
if ($k2 === 'info') {
$table->data[$i][0] = '<i class="font_8pt">'.$v.'</i>';
$table->data[$i][0] = $v;
$table->data[$i][1] = '';
$i++;
} else {
$table->data[$i][0] = json_encode([$k2 => $v]);
$table->data[$i][0] = json_encode([$k2 => $v], JSON_PRETTY_PRINT);
$table->data[$i][1] = '';
$i++;
}