From 717a863470f41b5ee4497c7e8152fd108bb627bd Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 1 Mar 2012 11:12:32 -0800 Subject: [PATCH] Snapshot page - detail view - make API call to refresh data when Refresh button is clicked. [reviewed-by: Brian] --- ui/scripts/storage.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index e7c9f6c0dce..602f0bee03a 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1141,12 +1141,20 @@ ], dataProvider: function(args) { - args.response.success( - { - actionFilter: snapshotActionfilter, - data: args.context.snapshots[0] - } - ); + $.ajax({ + url: createURL("listSnapshots&id=" + args.context.snapshots[0].id), + dataType: "json", + async: true, + success: function(json) { + var jsonObj = json.listsnapshotsresponse.snapshot[0]; + args.response.success( + { + actionFilter: snapshotActionfilter, + data: jsonObj + } + ); + } + }); } } }