fixed errors view discovery task list
Former-commit-id: 7e3160cde5c0fa46ee3d918789ffec4091f42c31
This commit is contained in:
parent
1feebae564
commit
f0c9d16318
|
@ -76,6 +76,7 @@ class DiscoveryTaskList extends Wizard
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
// Load styles.
|
// Load styles.
|
||||||
parent::run();
|
parent::run();
|
||||||
|
|
||||||
|
@ -94,7 +95,14 @@ class DiscoveryTaskList extends Wizard
|
||||||
return $this->deleteTask();
|
return $this->deleteTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->showListConsoleTask().'</ br>'.$this->showList();
|
$ret = $this->showListConsoleTask();
|
||||||
|
$ret2 = $this->showList();
|
||||||
|
|
||||||
|
if ($ret === false && $ret2 === false) {
|
||||||
|
include_once $config['homedir'].'/general/firts_task/recon_view.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -255,7 +263,6 @@ class DiscoveryTaskList extends Wizard
|
||||||
} else {
|
} else {
|
||||||
$recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task');
|
$recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task');
|
||||||
if ($recon_task === false) {
|
if ($recon_task === false) {
|
||||||
include_once $config['homedir'].'/general/firts_task/recon_view.php';
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
include_once $config['homedir'].'/include/functions_graph.php';
|
include_once $config['homedir'].'/include/functions_graph.php';
|
||||||
|
@ -819,14 +826,18 @@ class DiscoveryTaskList extends Wizard
|
||||||
|
|
||||||
if ($function_name == 'cron_task_do_backup' || $function_name == 'cron_task_execute_custom_script') {
|
if ($function_name == 'cron_task_do_backup' || $function_name == 'cron_task_execute_custom_script') {
|
||||||
if ($manage_pandora) {
|
if ($manage_pandora) {
|
||||||
$data[7] = '<a href="'.$url;
|
$data[7] = '<a href="'.ui_get_full_url(
|
||||||
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
|
sprintf(
|
||||||
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
|
||||||
|
$this->getTargetWiz(['description' => 'console_task']),
|
||||||
|
$task['id']
|
||||||
|
)
|
||||||
|
).'">';
|
||||||
$data[7] .= html_print_image(
|
$data[7] .= html_print_image(
|
||||||
'images/config.png',
|
'images/config.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Edit')]
|
['title' => __('Edit')]
|
||||||
);
|
).'</a>';
|
||||||
$data[7] .= '</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($manage_pandora) {
|
if ($manage_pandora) {
|
||||||
|
@ -841,14 +852,18 @@ class DiscoveryTaskList extends Wizard
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($write_perms || $manage_pandora) {
|
if ($write_perms || $manage_pandora) {
|
||||||
$data[7] = '<a href="'.$url;
|
$data[7] = '<a href="'.ui_get_full_url(
|
||||||
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
|
sprintf(
|
||||||
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
|
||||||
|
$this->getTargetWiz(['description' => 'console_task']),
|
||||||
|
$task['id']
|
||||||
|
)
|
||||||
|
).'">';
|
||||||
$data[7] .= html_print_image(
|
$data[7] .= html_print_image(
|
||||||
'images/config.png',
|
'images/config.png',
|
||||||
true,
|
true,
|
||||||
['title' => __('Edit')]
|
['title' => __('Edit')]
|
||||||
);
|
).'</a>';
|
||||||
$data[7] .= '</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($manage_perms || $manage_pandora) {
|
if ($manage_perms || $manage_pandora) {
|
||||||
|
@ -867,6 +882,8 @@ class DiscoveryTaskList extends Wizard
|
||||||
}
|
}
|
||||||
|
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -890,6 +907,9 @@ class DiscoveryTaskList extends Wizard
|
||||||
case CLOUDWIZARD_AWS_DESCRIPTION:
|
case CLOUDWIZARD_AWS_DESCRIPTION:
|
||||||
return 'wiz=cloud&mode=amazonws&page=1';
|
return 'wiz=cloud&mode=amazonws&page=1';
|
||||||
|
|
||||||
|
case 'console_task':
|
||||||
|
return 'wiz=ctask';
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 'wiz=hd&mode=netscan';
|
return 'wiz=hd&mode=netscan';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue