volume-upload: UI > upload template from local > after uploading file to postURL, pop up a message indicating where to check the template's newest status.

This commit is contained in:
Jessica Wang 2015-01-21 14:51:53 -08:00
parent 573a4b1e43
commit 9acfb2eec1

View File

@ -635,8 +635,7 @@
url: createURL('getUploadParamsForTemplate'), url: createURL('getUploadParamsForTemplate'),
data: data, data: data,
async: false, async: false,
success: function(json) { success: function(json) {
debugger;
/* /*
{ {
"postuploadtemplateresponse": { "postuploadtemplateresponse": {
@ -653,7 +652,7 @@
var uploadparams = json.postuploadtemplateresponse.getuploadparams; //son.postuploadtemplateresponse.getuploadparams is an object, not an array of object. var uploadparams = json.postuploadtemplateresponse.getuploadparams; //son.postuploadtemplateresponse.getuploadparams is an object, not an array of object.
var templateId = uploadparams.id; var templateId = uploadparams.id;
debugger;
args.response.success({ args.response.success({
url: uploadparams.postURL, url: uploadparams.postURL,
data: { data: {
@ -661,14 +660,17 @@
expires: uploadparams.timeout, expires: uploadparams.timeout,
metadata: uploadparams.metadata metadata: uploadparams.metadata
} }
});
cloudStack.dialog.notice({
message: "This template file has been uploaded. Please check its status at Templates menu > " + args.data.name + " > Zones tab > click a zone > Status field and Ready field."
}); });
debugger;
} }
}); });
debugger;
}, },
postUpload: function(args) { postUpload: function(args) {
debugger; console.log("postUpload() is hit");
// Called when upload is done to do // Called when upload is done to do
// verification checks; // verification checks;
// i.e., poll the server to verify successful upload // i.e., poll the server to verify successful upload
@ -911,8 +913,7 @@
}, },
action: function(args) { action: function(args) {
debugger; return; //createForm.fileUpload.getURL() has executed the whole action. Therefore, nothing needs to be done here.
}, },
notification: { notification: {