From 483119ec0f4a1301d45d256222cf79b8d3676eb8 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 22 Dec 2011 10:38:08 -0800 Subject: [PATCH] cloudstack 3.0 new UI - ISO page - detailView - clicking refresh button will make listIsos API call to refresh data. --- ui/scripts/templates.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index ce19e317838..ad5311d8ea5 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -1503,12 +1503,22 @@ ], dataProvider: function(args) { - args.response.success( - { - actionFilter: isoActionfilter, - data:args.context.isos[0] - } - ); + var jsonObj = args.context.isos[0]; + var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id; + if(jsonObj.zoneid != null) + apiCmd = apiCmd + "&zoneid="+jsonObj.zoneid; + + $.ajax({ + url: createURL(apiCmd), + dataType: "json", + success: function(json) { + args.response.success({ + actionFilter: isoActionfilter, + data: json.listisosresponse.iso[0] + }); + } + }); + } } }