diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index 557b7bf5b3..0e52d0dc1f 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -1,8 +1,19 @@ url.'&mode=importcsv" alt="importcsv">Importar csv'; + if (extensions_is_enabled_extension('csv_import')) { + echo 'Importar csv'; + } + echo 'Escanear red'; return; } @@ -116,50 +119,27 @@ class HostDevices implements Wizard public function runCSV() { global $config; - echo 'formulario csv'; - if (isset($this->page) === false || $this->page === 0) { - $this->page = 0; - - $test = get_parameter('test', null); - - // Check user answers. - if ($test !== null) { - // $this->process_page_0($respuestas_usuario) - $this->page++; - header( - 'Location: '.$this->url.'&page='.$this->page - ); - } else { - // Mostrar pagina 0. - echo 'Aqui vamos a empezar a construir el formulario.'; - ?> -
- -
- page == 1) { - // Code... - $this->page++; + if (!check_acl($config['id_user'], 0, 'AW') + ) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access db status' + ); + include 'general/noaccess.php'; return; - header('Location: index.php?class=HostDevices&page='.$this->page); - } else if ($this->page == 2) { - // Code... - $this->page++; - header('Location: index.php?class=HostDevices&page='.$this->page); - } else if ($this->page == 3) { - // Code... - $this->page++; - header('Location: /XXX/discovery/index.php?class=HostDevices&page='.$this->page); } - // Page 4, last. - return [ - 'result' => $this->result, - 'id' => $this->id, - 'msg' => $this->msg, - ]; + if (!extensions_is_enabled_extension('csv_import')) { + ui_print_error_message( + [ + 'message' => __('Extension CSV Import is not enabled.'), + 'no_close' => true, + ] + ); + return; + } + include_once $config['homedir'].'/enterprise/extensions/csv_import/main.php'; } @@ -818,8 +798,8 @@ function get_explanation_recon_script (id) { } -