[rhmessaging-commits] rhmessaging commits: r1010 - in mgmt/cumin/python: wooly and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Oct 11 16:20:39 EDT 2007


Author: justi9
Date: 2007-10-11 16:20:39 -0400 (Thu, 11 Oct 2007)
New Revision: 1010

Modified:
   mgmt/cumin/python/cumin/cluster.py
   mgmt/cumin/python/cumin/cluster.strings
   mgmt/cumin/python/cumin/page.py
   mgmt/cumin/python/cumin/page.strings
   mgmt/cumin/python/cumin/server.py
   mgmt/cumin/python/cumin/server.strings
   mgmt/cumin/python/wooly/forms.py
Log:
 * Removes the top-level vhost tab for now.
 * Adds config and stats to server.



Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/cluster.py	2007-10-11 20:20:39 UTC (rev 1010)
@@ -88,8 +88,9 @@
 
         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"))
+        self.tabs.add_child(self.ConfigTab(app, "config"))
+        self.tabs.add_child(self.StatsTab(app, "stats"))
+        self.tabs.add_child(self.LogTab(app, "log"))
 
     def render_title(self, session, cluster):
         return "Cluster '%s'" % cluster.name
@@ -107,10 +108,15 @@
         def get_items(self, session, cluster):
             return sorted(cluster.virtual_host_items(), cmp, lambda x: x.name)
 
-    class ConfigurationTab(Widget):
+    class ConfigTab(Widget):
         def render_title(self, session, cluster):
             return "Configuration"
 
-    class StatisticsTab(Widget):
+    class StatsTab(Widget):
         def render_title(self, session, cluster):
             return "Statistics"
+
+    class LogTab(Widget):
+        def render_title(self, session, cluster):
+            return "Log Messages"
+

Modified: mgmt/cumin/python/cumin/cluster.strings
===================================================================
--- mgmt/cumin/python/cumin/cluster.strings	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/cluster.strings	2007-10-11 20:20:39 UTC (rev 1010)
@@ -81,14 +81,7 @@
   <td><a class="action" href="">Remove</a></td>
 </tr>
 
-[ConfigurationTab.css]
-.code {
-  background-color: #f7f7f7;
-  padding: 1em;
-  border: 1px dotted #ddd;
-}
-
-[ConfigurationTab.html]
+[ConfigTab.html]
 <ul class="actions">
   <li><a href="">Edit This Configuration</a></li>
   <li><a href="">Apply to All Cluster Servers</a></li>
@@ -112,4 +105,4 @@
     vhost "test" {
     }
 }
-</pre>
\ No newline at end of file
+</pre>

Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/page.py	2007-10-11 20:20:39 UTC (rev 1010)
@@ -160,7 +160,6 @@
 
         self.tabs.add_child(self.ServerTab(app, "servers"))
         self.tabs.add_child(self.ClusterTab(app, "clusters"))
-        self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
 
     def render_title(self, session, model):
         return "Red Hat Messaging"
@@ -188,27 +187,6 @@
         def render_title(self, session, model):
             return self.clusters.render_title(session, model)
 
-    class VirtualHostTab(TabSet):
-        def __init__(self, app, name):
-            super(MainView.VirtualHostTab, self).__init__(app, name)
-
-            self.vhosts = self.VirtualHostTemplateSet(app, "vhosts")
-            self.add_child(self.vhosts)
-
-            self.groups = VirtualHostGroupTree(app, "groups")
-            self.add_child(self.groups)
-
-        def render_title(self, session, model):
-            return "Functional Hosts"
-
-        class VirtualHostTemplateSet(VirtualHostSet):
-            def get_items(self, session, model):
-                return model.get_virtual_host_templates()
-
-            def render_title(self, session, model):
-                return "Templates (%i)" % \
-                       len(model.get_virtual_host_templates())
-
 class ServerBrowser(Widget):
     def __init__(self, app, name):
         super(ServerBrowser, self).__init__(app, name)

Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/page.strings	2007-10-11 20:20:39 UTC (rev 1010)
@@ -335,6 +335,12 @@
   background-color: #cfc;
 }
 
+pre.code {
+  background-color: #f7f7f7;
+  padding: 1em;
+  border: 1px dotted #ddd;
+}
+
 [CuminPage.html]
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -379,32 +385,6 @@
 
 {clusters}
 
-[VirtualHostTab.html]
-<ul class="radiotabs tabs">{tabs}</ul>
-<div class="mode">{mode}</div>
-
-[VirtualHostTemplateSet.html]
-<ul class="actions">
-  <li><a href="">Add Template</a></li>
-</ul>
-
-<table class="mobjects">
-  <tr>
-    <th>Template</th>
-    <th>Configuration</th>
-    <th></th>
-  </tr>
-
-  {items}
-</table>
-
-[VirtualHostTemplateSet.item_html]
-<tr>
-  <td>{item_link}</td>
-  <td>10 queues, 5 exchanges</td>
-  <td><a class="action" href="">Remove</a></td>
-</tr>
-
 [ServerBrowser.css]
 .ServerBrowser.groups {
   float: left;

Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/server.py	2007-10-11 20:20:39 UTC (rev 1010)
@@ -97,12 +97,11 @@
         self.tabs = TabSet(app, "tabs")
         self.add_child(self.tabs)
 
-        self.vhosts = self.ServerVirtualHosts(app, "vhosts")
-        self.tabs.add_child(self.vhosts)
+        self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
+        self.tabs.add_child(self.ConfigTab(app, "config"))
+        self.tabs.add_child(self.StatsTab(app, "stats"))
+        self.tabs.add_child(self.LogTab(app, "log"))
 
-        self.log = self.ServerLog(app, "log")
-        self.tabs.add_child(self.log)
-
     def render_title(self, session, server):
         return "Server '%s'" % server.name
 
@@ -125,15 +124,23 @@
         def get_items(self, session, server):
             return sorted(server.server_group_items(), cmp, lambda x: x.name)
 
-    class ServerVirtualHosts(VirtualHostSet):
+    class VirtualHostTab(VirtualHostSet):
         def render_title(self, session, server):
             return "Functional Hosts (%i)" % len(server.virtual_host_items())
 
         def get_items(self, session, server):
             return sorted(server.virtual_host_items(), cmp, lambda x: x.name)
 
-    class ServerLog(Widget):
+    class ConfigTab(Widget):
         def render_title(self, session, server):
+            return "Configuration"
+
+    class StatsTab(Widget):
+        def render_title(self, session, server):
+            return "Statistics"
+
+    class LogTab(Widget):
+        def render_title(self, session, server):
             return "Log Messages"
 
 class ServerGroupTree(ItemTree):

Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/cumin/server.strings	2007-10-11 20:20:39 UTC (rev 1010)
@@ -38,6 +38,31 @@
   {tabs}
 </div>
 
+[ConfigTab.html]
+<ul class="actions">
+  <li><a href="">Edit This Configuration</a></li>
+</ul>
+
+<pre class="code">
+server "server00" {
+    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>
+
 [ServerGroupTree.css]
 ul.ServerGroupTree, ul.ServerGroupTree ul {
   list-style: square;

Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py	2007-10-11 17:11:06 UTC (rev 1009)
+++ mgmt/cumin/python/wooly/forms.py	2007-10-11 20:20:39 UTC (rev 1010)
@@ -33,10 +33,6 @@
 
         return writer.to_string()
 
-# XXX implement me
-#class FormInputItemSet(FormInput, ItemSet):
-#    pass
-
 class FormInput(Widget):
     def __init__(self, app, name, form):
         super(FormInput, self).__init__(app, name)




More information about the rhmessaging-commits mailing list