cloudstack 3.0 new UI - template page - detailView - clicking refresh button will make listTemplates API call to refresh data.

This commit is contained in:
Jessica Wang 2011-12-22 10:30:39 -08:00
parent 25c25acd21
commit 0d013cfd3a

View File

@ -804,13 +804,23 @@
}
],
dataProvider: function(args) {
args.response.success(
{
actionFilter: templateActionfilter,
data:args.context.templates[0]
}
);
dataProvider: function(args) {
var jsonObj = args.context.templates[0];
var apiCmd = "listTemplates&templatefilter=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: templateActionfilter,
data: json.listtemplatesresponse.template[0]
});
}
});
}
}
}