diff --git a/pandora_console/include/ajax/task_list.ajax.php b/pandora_console/include/ajax/task_list.ajax.php index 353083390a..33dc3e6b5f 100644 --- a/pandora_console/include/ajax/task_list.ajax.php +++ b/pandora_console/include/ajax/task_list.ajax.php @@ -44,57 +44,16 @@ if ($progress_task_discovery) { $summary = json_decode($task['summary'], true); $result = '
'; - $result .= '
'; + } else { + $global_progress = -1; + $result .= ui_print_error_message( + __('No data to show'), + '', + true + ).''; } - $result .= ''; - - $i = 0; - $table = new StdClasS(); - $table->class = 'databox data'; - $table->width = '75%'; - $table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;'; - $table->rowid = []; - $table->data = []; - - // Content. - $table->data[$i][0] = ''.__('Hosts discovered').''; - $table->data[$i][1] = ''; - $table->data[$i][1] .= $summary['summary']['discovered']; - $table->data[$i++][1] .= ''; - - $table->data[$i][0] = ''.__('Alive').''; - $table->data[$i][1] = ''; - $table->data[$i][1] .= $summary['summary']['alive']; - $table->data[$i++][1] .= ''; - - $table->data[$i][0] = ''.__('Not alive').''; - $table->data[$i][1] = ''; - $table->data[$i][1] .= $summary['summary']['not_alive']; - $table->data[$i++][1] .= ''; - - $table->data[$i][0] = ''.__('Responding SNMP').''; - $table->data[$i][1] = ''; - $table->data[$i][1] .= $summary['summary']['SNMP']; - $table->data[$i++][1] .= ''; - - $table->data[$i][0] = ''.__('Responding WMI').''; - $table->data[$i][1] = ''; - $table->data[$i][1] .= $summary['summary']['WMI']; - $table->data[$i++][1] .= ''; - - $result .= html_print_table($table, true).''; - $result_array['status'] = $global_progress; $result_array['html'] = $result; diff --git a/pandora_console/include/javascript/pandora_taskList.js b/pandora_console/include/javascript/pandora_taskList.js index 270fec67a0..f151c9003a 100644 --- a/pandora_console/include/javascript/pandora_taskList.js +++ b/pandora_console/include/javascript/pandora_taskList.js @@ -35,10 +35,8 @@ function progress_task_list(id, title) { // TODO: Show info about the problem. } - if (data.status > 0) { - $elem.html(data.html); - if (!$elem.dialog("isOpen")) $elem.dialog("open"); - } + $elem.html(data.html); + if (!$elem.dialog("isOpen")) $elem.dialog("open"); if (data.status != -1) { timeoutRef = setTimeout(function() {