1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-30 22:50:10 +03:00

Bug #1874: Report errors for Images created from an upload

This commit is contained in:
Carlos Martín 2013-04-16 17:00:56 +02:00
parent 2ddce578a3
commit 8a272d663e
2 changed files with 22 additions and 4 deletions

View File

@ -809,11 +809,20 @@ function setupCreateFileDialog(){
//$('div#pb_dialog #upload-progress').progressbar("option","value",Math.floor(loaded*100/total));
},
onComplete: function(id, fileName, responseJSON){
if (uploader._handler._xhrs[id] &&
uploader._handler._xhrs[id].status == 500) {
onError({}, JSON.parse(uploader._handler._xhrs[id].response) )
} else {
notifyMessage("File uploaded correctly");
Sunstone.runAction("File.list");
}
//Inform complete upload, destroy upload dialog, refresh img list
notifyMessage("File uploaded correctly");
//$('div#pb_dialog').dialog('destroy');
$('div#pb_dialog').trigger("reveal:close")
Sunstone.runAction("File.list");
return false;
},
onCancel: function(id, fileName){

View File

@ -963,11 +963,20 @@ function setupCreateImageDialog(){
//$('div#pb_dialog #upload-progress').progressbar("option","value",Math.floor(loaded*100/total));
},
onComplete: function(id, fileName, responseJSON){
if (uploader._handler._xhrs[id] &&
uploader._handler._xhrs[id].status == 500) {
onError({}, JSON.parse(uploader._handler._xhrs[id].response) )
} else {
notifyMessage("Image uploaded correctly");
Sunstone.runAction("Image.list");
}
//Inform complete upload, destroy upload dialog, refresh img list
notifyMessage("Image uploaded correctly");
//$('div#pb_dialog').dialog('destroy');
$('div#pb_dialog').trigger("reveal:close")
Sunstone.runAction("Image.list");
return false;
},
onCancel: function(id, fileName){