From 4701458ba378d874e9c0629088b5856e2405aaab Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 30 Nov 2011 17:56:36 -0800 Subject: [PATCH] cloudStack 3.0 new UI - naas - view hosts - pass podID, clusterID to listHosts API upon what the previous page is. --- ui/scripts/system.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 8e50d285127..c3ffeaee412 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -5646,9 +5646,15 @@ clustername: { label: 'Cluster' } }, - dataProvider: function(args) { + dataProvider: function(args) { + var array1 = []; + array1.push("&zoneid=" + args.context.zones[0].id); + if("pods" in args.context) + array1.push("&podid=" + args.context.pods[0].id); + if("clusters" in args.context) + array1.push("&clusterid=" + args.context.clusters[0].id); $.ajax({ - url: createURL("listHosts&type=Routing&zoneid=" + args.context.zones[0].id + "&page=" + args.page + "&pagesize=" + pageSize), + url: createURL("listHosts&type=Routing" + array1.join("") + "&page=" + args.page + "&pagesize=" + pageSize), dataType: "json", async: true, success: function(json) {