Author: justi9
Date: 2007-10-11 13:11:06 -0400 (Thu, 11 Oct 2007)
New Revision: 1009
Modified:
mgmt/cumin/python/cumin/cluster.py
mgmt/cumin/python/cumin/cluster.strings
Log:
Adds a simulated config tab to cluster.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-11 16:42:35 UTC (rev 1008)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-11 17:11:06 UTC (rev 1009)
@@ -88,6 +88,8 @@
self.tabs.add_child(self.ServerTab(app, "servers"))
self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
+ self.tabs.add_child(self.ConfigurationTab(app, "config"))
+ self.tabs.add_child(self.StatisticsTab(app, "stats"))
def render_title(self, session, cluster):
return "Cluster '%s'" % cluster.name
@@ -104,3 +106,11 @@
def get_items(self, session, cluster):
return sorted(cluster.virtual_host_items(), cmp, lambda x: x.name)
+
+ class ConfigurationTab(Widget):
+ def render_title(self, session, cluster):
+ return "Configuration"
+
+ class StatisticsTab(Widget):
+ def render_title(self, session, cluster):
+ return "Statistics"
Modified: mgmt/cumin/python/cumin/cluster.strings
===================================================================
--- mgmt/cumin/python/cumin/cluster.strings 2007-10-11 16:42:35 UTC (rev 1008)
+++ mgmt/cumin/python/cumin/cluster.strings 2007-10-11 17:11:06 UTC (rev 1009)
@@ -60,9 +60,9 @@
</tr>
[VirtualHostTab.html]
- <ul class="actions">
- <li><a href="">Add Functional Host</a></li>
- </ul>
+<ul class="actions">
+ <li><a href="">Add Functional Host</a></li>
+</ul>
<table class="mobjects">
<tr>
@@ -80,3 +80,36 @@
<td>10 queues, 5 exchanges</td>
<td><a class="action"
href="">Remove</a></td>
</tr>
+
+[ConfigurationTab.css]
+.code {
+ background-color: #f7f7f7;
+ padding: 1em;
+ border: 1px dotted #ddd;
+}
+
+[ConfigurationTab.html]
+<ul class="actions">
+ <li><a href="">Edit This Configuration</a></li>
+ <li><a href="">Apply to All Cluster Servers</a></li>
+</ul>
+
+<pre class="code">
+server "$SERVER" {
+ include "/usr/local/cluster/common.conf";
+
+ vhost "default" {
+ store: bdb;
+ transaction: journal;
+ }
+
+ vhost "devel" {
+ max-queue-depth: 10000;
+ store: memory;
+ transaction: memory;
+ }
+
+ vhost "test" {
+ }
+}
+</pre>
\ No newline at end of file
Show replies by date