From 67ed483098305dd83b494326e5518f7616057da4 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 6 Feb 2012 14:32:14 -0800 Subject: [PATCH] bug 13452: System page - Change UI to handle createStorageNetworkIpRange API as async. --- ui/scripts/system.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 4cb51e03e91..65b73afafd6 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -501,17 +501,16 @@ $.ajax({ url: createURL("createStorageNetworkIpRange" + array1.join("")), dataType: "json", - success: function(json) { - var item = json.createstoragenetworkiprange.storageiprange; //??? - args.response.success({ - data: item, - notification: { - label: 'IP range is added', - poll: function(args) { - args.complete(); - } - } - }); + success: function(json) { + args.response.success({ + _custom: { + jobId: json.createstoragenetworkiprangeresponse.jobid + }, + notification: { + label: 'Added IP range', + poll: pollAsyncJobResult + } + }); }, error: function(XMLHttpResponse) { var errorMsg = parseXMLHttpResponse(XMLHttpResponse);