Author: justi9
Date: 2007-10-09 15:44:52 -0400 (Tue, 09 Oct 2007)
New Revision: 988
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/server.py
Log:
Moves some UI elements around. Makes servers the first tab in the top
view. Moves action links closer to item sets. Shortens "Server
Groups" to just "Groups".
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-09 19:25:21 UTC (rev 987)
+++ mgmt/cumin/python/cumin/page.py 2007-10-09 19:44:52 UTC (rev 988)
@@ -140,13 +140,29 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
+ self.tabs.add_child(self.ServerTab(app, "servers"))
+ self.tabs.add_child(self.ClusterTab(app, "clusters"))
self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
- self.tabs.add_child(self.ServerTab(app, "servers"))
- self.tabs.add_child(ClusterSet(app, "clusters"))
def render_title(self, session, model):
return "Red Hat Messaging"
+ class ServerTab(TabSet):
+ def __init__(self, app, name):
+ super(MainView.ServerTab, self).__init__(app, name)
+
+ self.groups = ServerGroupTree(app, "groups")
+ self.add_child(self.groups)
+
+ self.servers = ServerSet(app, "servers")
+ self.add_child(self.servers)
+
+ def render_title(self, session, model):
+ return "Servers (%i)" % len(model.get_servers())
+
+ class ClusterTab(ClusterSet):
+ pass
+
class VirtualHostTab(TabSet):
def __init__(self, app, name):
super(MainView.VirtualHostTab, self).__init__(app, name)
@@ -159,16 +175,3 @@
def render_title(self, session, model):
return "Virtual Hosts (%i)" % len(model.get_virtual_hosts())
-
- class ServerTab(TabSet):
- def __init__(self, app, name):
- super(MainView.ServerTab, self).__init__(app, name)
-
- self.servers = ServerSet(app, "servers")
- self.add_child(self.servers)
-
- self.groups = ServerGroupTree(app, "groups")
- self.add_child(self.groups)
-
- def render_title(self, session, model):
- return "Servers (%i)" % len(model.get_servers())
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-09 19:25:21 UTC (rev 987)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-09 19:44:52 UTC (rev 988)
@@ -130,7 +130,7 @@
ul.actions {
padding: 0;
- margin: 1em 0;
+ margin: 0 0 1em 0;
list-style: none;
}
@@ -354,13 +354,7 @@
[MainView.html]
<div class="oblock">
<h1>{title}</h1>
- <ul class="actions">
- <li><a href="">Add Virtual Host</a></li>
- <li><a href="">Add Virtual Host Group</a></li>
- <li><a href="">Add Server</a></li>
- <li><a href="">Add Server Group</a></li>
- <li><a href="">Add Cluster</a></li>
- </ul>
+
{tabs}
</div>
@@ -371,3 +365,15 @@
[ServerTab.html]
<ul class="ServerTab radiotabs tabs">{tabs}</ul>
<div class="ServerTab mode">{mode}</div>
+
+[ClusterTab.html]
+<ul class="actions">
+ <li><a href="">Add Cluster</a></li>
+</ul>
+
+<table class="ClusterTab mobjects">
+ <tr>
+ <th>Cluster</th>
+ </tr>
+ {items}
+</table>
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-09 19:25:21 UTC (rev 987)
+++ mgmt/cumin/python/cumin/server.py 2007-10-09 19:44:52 UTC (rev 988)
@@ -139,7 +139,7 @@
class ServerGroupTree(ItemTree):
def render_title(self, session, model):
- return "Server Groups (%i)" % len(model.get_server_groups())
+ return "Groups (%i)" % len(model.get_server_groups())
def get_items(self, session, model):
roots = list()