#12097 Fix view summary in discovery task
This commit is contained in:
parent
963664c1d8
commit
7d5f4f17c6
|
@ -25,7 +25,15 @@ function progress_task_list(id, title) {
|
|||
draggable: true,
|
||||
closeOnEscape: true,
|
||||
width: 800,
|
||||
height: 600,
|
||||
height: "auto",
|
||||
buttons: [
|
||||
{
|
||||
text: "OK",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
],
|
||||
close: function() {
|
||||
if (xhr != null) xhr.abort();
|
||||
if (timeoutRef != null) clearTimeout(timeoutRef);
|
||||
|
@ -35,12 +43,18 @@ function progress_task_list(id, title) {
|
|||
// Function var.
|
||||
var handleFetchTaskList = function(err, data) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
let err_text = err.toString();
|
||||
err_text = err_text.replace("Error: ", "");
|
||||
err_text =
|
||||
"<b>Error</b><br/>" + err_text[0].toUpperCase() + err_text.substring(1);
|
||||
$elem.html(err_text);
|
||||
}
|
||||
if (data.error) {
|
||||
// TODO: Show info about the problem.
|
||||
$elem.html(data.error);
|
||||
} else {
|
||||
if (data) {
|
||||
data = data.replace(
|
||||
'<script type="text/javascript" src="http://172.16.0.2/pandora_console/include/javascript/jquery.ui-timepicker-addon.js"></script>',
|
||||
""
|
||||
);
|
||||
data = JSON.parse(data);
|
||||
$elem.html(data.html);
|
||||
}
|
||||
|
||||
|
@ -71,7 +85,7 @@ function fetchTaskList(id, callback) {
|
|||
},
|
||||
type: "POST",
|
||||
url: $("#ajax-url").val(),
|
||||
dataType: "json",
|
||||
dataType: "text",
|
||||
success: function(data) {
|
||||
callback(null, data);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue