From 2587e42db6b22d1825db2251d872e46ce91b5241 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 18 Nov 2013 15:00:58 -0800 Subject: [PATCH] CLOUDSTACK-4793: UI > Virtual Routers > Advanced Search > add cluster dropdown since API now supports it. --- ui/scripts/system.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index a211a7f2b60..405c5ce59f1 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7620,7 +7620,29 @@ } }); } - }, + }, + clusterid: { + label: 'label.cluster', + dependsOn: 'podid', + select: function(args) { + $.ajax({ + url: createURL("listClusters&podid=" + args.podid), + dataType: "json", + async: false, + success: function(json) { + var clusters = json.listclustersresponse.cluster ? json.listclustersresponse.cluster : []; + args.response.success({ + data: $.map(clusters, function(cluster) { + return { + id: cluster.id, + description: cluster.name + }; + }) + }); + } + }); + } + }, domainid: { label: 'Domain', select: function(args) {