CLOUDSTACK-7731: UI > Infrastructure > Virtual Routers > group by XXXXXXX view 
> listView > detailView > add View All link > show read-only text "group by 
zone/pod/cluster/account" in select view area.


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

Branch: refs/heads/baremetal-systemvm
Commit: 6239447f0538b9f0408afc19143c592ba37e6783
Parents: 7004deb
Author: Jessica Wang <[email protected]>
Authored: Thu Oct 16 12:01:20 2014 -0700
Committer: Jessica Wang <[email protected]>
Committed: Thu Oct 16 12:35:25 2014 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6239447f/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index ef4d7c1..31e991d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9394,11 +9394,16 @@
                     label: 'label.select-view',
                     preFilter: function(args) {                        
                        //Only clicking ViewAll Link("view all Virtual 
Routers") in "Virtual Routers group by XXXXXXX" detailView will have 
"routerGroupByXXXXXXX" included in args.context
-                        if (("routerGroupByZone" in args.context) || 
("routerGroupByPod" in args.context) || ("routerGroupByCluster" in 
args.context) || ("routerGroupByAccount" in args.context)) {
-                               return ["routerNoGroup"];
-                        }
-                        else {
-                               return ["routerNoGroup", "routerGroupByZone", 
"routerGroupByPod", "routerGroupByCluster", "routerGroupByAccount"];
+                        if ("routerGroupByZone" in args.context) {
+                               return ["routerGroupByZone"]; // read-only 
(i.e. text "group by Zone") 
+                        } else if ( "routerGroupByPod" in args.context) {
+                               return ["routerGroupByPod"]; // read-only (i.e. 
text "group by Pod") 
+                        } else if ("routerGroupByCluster" in args.context) {
+                               return ["routerGroupByCluster"]; // read-only 
(i.e. text "group by Cluster") 
+                        } else if ("routerGroupByAccount" in args.context) {
+                               return ["routerGroupByAccount"]; // read-only 
(i.e. text "group by Account") 
+                        } else {
+                               return ["routerNoGroup", "routerGroupByZone", 
"routerGroupByPod", "routerGroupByCluster", "routerGroupByAccount"]; //editable 
dropdown 
                         }
                     }
                 },

Reply via email to