Author: justi9
Date: 2007-10-09 16:24:22 -0400 (Tue, 09 Oct 2007)
New Revision: 991
Modified:
mgmt/cumin/python/cumin/cluster.py
Log:
Makes servers the first tab in the cluster view.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-09 20:09:29 UTC (rev 990)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-09 20:24:22 UTC (rev 991)
@@ -58,8 +58,8 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
+ self.tabs.add_child(self.ClusterServers(app, "servers"))
self.tabs.add_child(self.ClusterVirtualHosts(app, "vhosts"))
- self.tabs.add_child(self.ClusterServers(app, "servers"))
def render_title(self, session, cluster):
return "Cluster '%s'" % cluster.name
@@ -67,16 +67,16 @@
def render_name(self, session, cluster):
return cluster.name
- class ClusterVirtualHosts(VirtualHostSet):
+ class ClusterServers(ServerSet):
def render_title(self, session, cluster):
- return "Virtual Hosts (%i)" % len(cluster.virtual_host_items())
+ return "Servers (%i)" % len(cluster.server_items())
def get_items(self, session, cluster):
- return sorted(cluster.virtual_host_items(), cmp, lambda x: x.name)
+ return sorted(cluster.server_items(), cmp, lambda x: x.name)
- class ClusterServers(ServerSet):
+ class ClusterVirtualHosts(VirtualHostSet):
def render_title(self, session, cluster):
- return "Servers (%i)" % len(cluster.server_items())
+ return "Virtual Hosts (%i)" % len(cluster.virtual_host_items())
def get_items(self, session, cluster):
- return sorted(cluster.server_items(), cmp, lambda x: x.name)
+ return sorted(cluster.virtual_host_items(), cmp, lambda x: x.name)
Show replies by date