From ee9d038320077b067ac2daba61fd6df7eb382819 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 1 Mar 2012 10:57:57 -0800 Subject: [PATCH] Volume page - detail view - make API call to refresh data when Refresh button is clicked. [reviewed-by: Brian] --- ui/scripts/storage.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index ac31cc0417a..e7c9f6c0dce 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -870,15 +870,22 @@ } ], - dataProvider: function(args) { - args.response.success( - { - actionFilter: volumeActionfilter, - data: args.context.volumes[0] - } - ); + dataProvider: function(args) { + $.ajax({ + url: createURL("listVolumes&id=" + args.context.volumes[0].id), + dataType: "json", + async: true, + success: function(json) { + var jsonObj = json.listvolumesresponse.volume[0]; + args.response.success( + { + actionFilter: volumeActionfilter, + data: jsonObj + } + ); + } + }); } - } } }