Fixed task edit url when nof fully defined (custom-script)

This commit is contained in:
fbsanchez 2021-03-15 14:37:08 +01:00
parent 971f86601a
commit c20c206a5f
2 changed files with 4 additions and 1 deletions

View File

@ -1060,7 +1060,9 @@ class DiscoveryTaskList extends HTML
*/ */
public function getTargetWiz($task, $script=false) public function getTargetWiz($task, $script=false)
{ {
if ($script !== false) { if ($script !== false
|| (int) $task['type'] === DISCOVERY_HOSTDEVICES_CUSTOM
) {
switch ($script['type']) { switch ($script['type']) {
case DISCOVERY_SCRIPT_APP_VMWARE: case DISCOVERY_SCRIPT_APP_VMWARE:
return 'wiz=app&mode=vmware&page=0'; return 'wiz=app&mode=vmware&page=0';

View File

@ -185,6 +185,7 @@ class CustomNetScan extends Wizard
$this->task['id_recon_server'] = $server_id; $this->task['id_recon_server'] = $server_id;
$this->task['id_group'] = $id_group; $this->task['id_group'] = $id_group;
$this->task['interval_sweep'] = $interval; $this->task['interval_sweep'] = $interval;
$this->task['type'] = DISCOVERY_HOSTDEVICES_CUSTOM;
if (isset($this->task['id_rt']) === false) { if (isset($this->task['id_rt']) === false) {
// Create. // Create.