You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/11/19 00:02:07 UTC

git commit: updated refs/heads/4.3 to 9a97c06

Updated Branches:
  refs/heads/4.3 845753816 -> 9a97c064b


CLOUDSTACK-4793: UI > Virtual Routers > Advanced Search > add cluster dropdown since API now supports it.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9a97c064
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9a97c064
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9a97c064

Branch: refs/heads/4.3
Commit: 9a97c064be976b1a32a26116a0de3cfeb8e14244
Parents: 8457538
Author: Jessica Wang <je...@apache.org>
Authored: Mon Nov 18 15:00:58 2013 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Nov 18 15:00:58 2013 -0800

----------------------------------------------------------------------
 ui/scripts/system.js | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a97c064/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index a211a7f..405c5ce 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) {