mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#9771 changes in summary and new fields for trecon_task
This commit is contained in:
parent
cc2ab53db4
commit
966dc63a92
@ -41,6 +41,7 @@ CREATE TABLE IF NOT EXISTS `tdiscovery_apps_tasks_macros` (
|
|||||||
ALTER TABLE `trecon_task`
|
ALTER TABLE `trecon_task`
|
||||||
ADD COLUMN `id_app` int(10),
|
ADD COLUMN `id_app` int(10),
|
||||||
ADD COLUMN `setup_complete` tinyint unsigned NOT NULL DEFAULT 0,
|
ADD COLUMN `setup_complete` tinyint unsigned NOT NULL DEFAULT 0,
|
||||||
|
ADD COLUMN `executions_timeout` int unsigned NOT NULL DEFAULT 60,
|
||||||
ADD FOREIGN KEY (`id_app`) REFERENCES tdiscovery_apps(`id_app`) ON DELETE CASCADE ON UPDATE CASCADE;
|
ADD FOREIGN KEY (`id_app`) REFERENCES tdiscovery_apps(`id_app`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
||||||
|
@ -1395,14 +1395,14 @@ class DiscoveryTaskList extends HTML
|
|||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
if (is_array($task['stats']) === false) {
|
if (is_array($task['stats']) === false && (int) $task['type'] !== DISCOVERY_EXTENSION) {
|
||||||
$task['stats'] = json_decode($task['summary'], true);
|
$task['stats'] = json_decode($task['summary'], true);
|
||||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||||
return $task['summary'];
|
return $task['summary'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($task['stats'])) {
|
if (is_array($task['stats']) || (int) $task['type'] === DISCOVERY_EXTENSION) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$table = new StdClasS();
|
$table = new StdClasS();
|
||||||
$table->class = 'databox data';
|
$table->class = 'databox data';
|
||||||
@ -1462,8 +1462,8 @@ class DiscoveryTaskList extends HTML
|
|||||||
$table->data[$i++][1] .= '</span>';
|
$table->data[$i++][1] .= '</span>';
|
||||||
} else if ((int) $task['type'] === DISCOVERY_EXTENSION) {
|
} else if ((int) $task['type'] === DISCOVERY_EXTENSION) {
|
||||||
// Content.
|
// Content.
|
||||||
if (is_array($task['stats']) === true) {
|
|
||||||
$countSummary = 1;
|
$countSummary = 1;
|
||||||
|
if (is_array($task['stats']) === true) {
|
||||||
foreach ($task['stats'] as $key => $summary) {
|
foreach ($task['stats'] as $key => $summary) {
|
||||||
$table->data[$i][0] = '<b>'.__('Summary').' '.$countSummary.'</b>';
|
$table->data[$i][0] = '<b>'.__('Summary').' '.$countSummary.'</b>';
|
||||||
$table->data[$i][1] = '';
|
$table->data[$i][1] = '';
|
||||||
@ -1508,6 +1508,13 @@ class DiscoveryTaskList extends HTML
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$table->data[$i][0] = '<b>'.__('Summary').'</b>';
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
|
$table->data[$i][0] = $task['summary'];
|
||||||
|
$table->data[$i][1] = '';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Content.
|
// Content.
|
||||||
|
@ -893,6 +893,7 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
|
|||||||
`snmp_skip_non_enabled_ifs` TINYINT UNSIGNED DEFAULT 1,
|
`snmp_skip_non_enabled_ifs` TINYINT UNSIGNED DEFAULT 1,
|
||||||
`id_app` int(10),
|
`id_app` int(10),
|
||||||
`setup_complete` tinyint unsigned NOT NULL DEFAULT 0,
|
`setup_complete` tinyint unsigned NOT NULL DEFAULT 0,
|
||||||
|
`executions_timeout` int unsigned NOT NULL DEFAULT 60,
|
||||||
PRIMARY KEY (`id_rt`),
|
PRIMARY KEY (`id_rt`),
|
||||||
KEY `recon_task_daemon` (`id_recon_server`),
|
KEY `recon_task_daemon` (`id_recon_server`),
|
||||||
FOREIGN KEY (`id_app`) REFERENCES tdiscovery_apps(`id_app`) ON DELETE CASCADE ON UPDATE CASCADE
|
FOREIGN KEY (`id_app`) REFERENCES tdiscovery_apps(`id_app`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user