Author: justi9
Date: 2007-10-09 11:55:12 -0400 (Tue, 09 Oct 2007)
New Revision: 978
Modified:
mgmt/cumin/python/cumin/cluster.strings
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/virtualhost.py
Log:
Adds vhost groups to top-level vhosts tab. Adds basic vhost group
methods to model.
Modified: mgmt/cumin/python/cumin/cluster.strings
===================================================================
--- mgmt/cumin/python/cumin/cluster.strings 2007-10-09 15:41:40 UTC (rev 977)
+++ mgmt/cumin/python/cumin/cluster.strings 2007-10-09 15:55:12 UTC (rev 978)
@@ -28,7 +28,7 @@
<ul class="actions">
<li><a href="">Add Virtual Host</a></li>
<li><a href="">Add Server</a></li>
- <li><a href="">Shutdown Servers in
Cluster</a></li>
+ <li><a href="">Shutdown Servers</a></li>
</ul>
{tabs}
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-09 15:41:40 UTC (rev 977)
+++ mgmt/cumin/python/cumin/model.py 2007-10-09 15:55:12 UTC (rev 978)
@@ -96,6 +96,12 @@
def get_virtual_hosts(self):
return self.get_index(self.virtual_host).values()
+ def get_virtual_host_group(self, id):
+ return self.get_index(self.virtual_host_group).get(id)
+
+ def get_virtual_host_groups(self):
+ return self.get_index(self.virtual_host_group).values()
+
def get_queue(self, id):
return self.get_index(self.queue).get(id)
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-09 15:41:40 UTC (rev 977)
+++ mgmt/cumin/python/cumin/page.py 2007-10-09 15:55:12 UTC (rev 978)
@@ -154,6 +154,9 @@
self.vhosts = VirtualHostSet(app, "vhosts")
self.add_child(self.vhosts)
+ self.groups = VirtualHostGroupTree(app, "groups")
+ self.add_child(self.groups)
+
def render_title(self, session, model):
return "Virtual Hosts (%i)" % len(model.get_virtual_hosts())
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-09 15:41:40 UTC (rev 977)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-09 15:55:12 UTC (rev 978)
@@ -326,6 +326,7 @@
<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>
Modified: mgmt/cumin/python/cumin/virtualhost.py
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.py 2007-10-09 15:41:40 UTC (rev 977)
+++ mgmt/cumin/python/cumin/virtualhost.py 2007-10-09 15:55:12 UTC (rev 978)
@@ -21,6 +21,11 @@
return mlink(branch.marshal(), "VirtualHost", vhost.name)
+class VirtualHostGroupTree(ItemTree):
+ def render_title(self, session, model):
+ return "Virtual Host Groups (%i)" \
+ % len(model.get_virtual_host_groups())
+
class VirtualHostFrame(CuminFrame):
def __init__(self, app, name):
super(VirtualHostFrame, self).__init__(app, name)
Show replies by date