#9771 added summary for extensions task
This commit is contained in:
parent
46fe04983a
commit
65046caad4
|
@ -968,7 +968,6 @@ class DiscoveryTaskList extends HTML
|
||||||
$data[9] .= '</a>';
|
$data[9] .= '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((int) $task['type'] !== DISCOVERY_EXTENSION) {
|
|
||||||
$data[9] .= '<a href="#" onclick="progress_task_list('.$task['id_rt'].',\''.$task['name'].'\')">';
|
$data[9] .= '<a href="#" onclick="progress_task_list('.$task['id_rt'].',\''.$task['name'].'\')">';
|
||||||
$data[9] .= html_print_image(
|
$data[9] .= html_print_image(
|
||||||
'images/details.svg',
|
'images/details.svg',
|
||||||
|
@ -980,7 +979,6 @@ class DiscoveryTaskList extends HTML
|
||||||
);
|
);
|
||||||
$data[9] .= '</a>';
|
$data[9] .= '</a>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($task['disabled'] != 2 && $task['utimestamp'] > 0
|
if ($task['disabled'] != 2 && $task['utimestamp'] > 0
|
||||||
&& $task['type'] != DISCOVERY_APP_MYSQL
|
&& $task['type'] != DISCOVERY_APP_MYSQL
|
||||||
|
@ -1462,6 +1460,48 @@ class DiscoveryTaskList extends HTML
|
||||||
$table->data[$i][1] = '<span id="alive">';
|
$table->data[$i][1] = '<span id="alive">';
|
||||||
$table->data[$i][1] .= ($total - $agents);
|
$table->data[$i][1] .= ($total - $agents);
|
||||||
$table->data[$i++][1] .= '</span>';
|
$table->data[$i++][1] .= '</span>';
|
||||||
|
} else if ((int) $task['type'] === DISCOVERY_EXTENSION) {
|
||||||
|
// Content.
|
||||||
|
if (is_array($task['stats']) === true) {
|
||||||
|
$countSummary = 1;
|
||||||
|
foreach ($task['stats'] as $key => $summary) {
|
||||||
|
$table->data[$i][0] = '<b>'.__('Summary').' '.$countSummary.'</b>';
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
if (is_array($summary) === true) {
|
||||||
|
foreach ($summary as $k2 => $v) {
|
||||||
|
if (is_array($v) === true) {
|
||||||
|
if ($k2 === 'summary') {
|
||||||
|
$countSummary++;
|
||||||
|
foreach ($v as $k3 => $v2) {
|
||||||
|
$table->data[$i][0] = $k3;
|
||||||
|
$table->data[$i][1] = $v2;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$table->data[$i][0] = json_encode([$k2 => $v]);
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($k2 === 'info') {
|
||||||
|
$table->data[$i][0] = '<i class="font_8pt">'.$v.'</i>';
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
} else {
|
||||||
|
$table->data[$i][0] = json_encode([$k2 => $v]);
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$table->data[$i][0] = $summary;
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Content.
|
// Content.
|
||||||
if (is_array($task['stats']['summary']) === true) {
|
if (is_array($task['stats']['summary']) === true) {
|
||||||
|
|
Loading…
Reference in New Issue