From cacd2ffae4b75b007a62bd5c2aec4c03275fd038 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 8 May 2012 16:15:24 -0700 Subject: [PATCH] Revert "Revert "CS-14735: cloudstack 3.0 UI - Upload Volume - uploadVolume API is sync instead of async. Here is related UI change."" This reverts commit e577c6618b110d81ba44409244670c20acca64ef. --- ui/scripts/storage.js | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 153020d67cc..7b15f6aa399 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -170,8 +170,7 @@ poll: pollAsyncJobResult } }, - - //??? + uploadVolume: { isHeader: true, label: 'label.upload.volume', @@ -234,21 +233,9 @@ url: createURL("uploadVolume" + array1.join("")), dataType: "json", async: true, - success: function(json) { - debugger; - var jid = json.uploadvolumeresponse.jobid; - args.response.success( - {_custom: - {jobId: jid, - getUpdatedItem: function(json) { - return json.queryasyncjobresultresponse.jobresult.volume; - }, - getActionFilter: function() { - return volumeActionfilter; - } - } - } - ); + success: function(json) { + var items = json.uploadvolumeresponse.volume; + args.response.success({data:items[0]}); }, error: function(json) { args.response.error(parseXMLHttpResponse(json)); @@ -257,11 +244,12 @@ }, notification: { - poll: pollAsyncJobResult + poll: function(args) { + args.complete(); + } } } - //??? - + }, dataProvider: function(args) {