[rhmessaging-commits] rhmessaging commits: r992 - mgmt/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Oct 9 16:41:26 EDT 2007


Author: justi9
Date: 2007-10-09 16:41:26 -0400 (Tue, 09 Oct 2007)
New Revision: 992

Modified:
   mgmt/cumin/python/cumin/cluster.py
   mgmt/cumin/python/cumin/cluster.strings
   mgmt/cumin/python/cumin/server.py
Log:
Fixes a link bug in the server view.  Moves links closer to item lists
in the cluster view.



Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py	2007-10-09 20:24:22 UTC (rev 991)
+++ mgmt/cumin/python/cumin/cluster.py	2007-10-09 20:41:26 UTC (rev 992)
@@ -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.ServerTab(app, "servers"))
+        self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
 
     def render_title(self, session, cluster):
         return "Cluster '%s'" % cluster.name
@@ -67,14 +67,14 @@
     def render_name(self, session, cluster):
         return cluster.name
 
-    class ClusterServers(ServerSet):
+    class ServerTab(ServerSet):
         def render_title(self, session, cluster):
             return "Servers (%i)" % len(cluster.server_items())
 
         def get_items(self, session, cluster):
             return sorted(cluster.server_items(), cmp, lambda x: x.name)
 
-    class ClusterVirtualHosts(VirtualHostSet):
+    class VirtualHostTab(VirtualHostSet):
         def render_title(self, session, cluster):
             return "Virtual Hosts (%i)" % len(cluster.virtual_host_items())
 

Modified: mgmt/cumin/python/cumin/cluster.strings
===================================================================
--- mgmt/cumin/python/cumin/cluster.strings	2007-10-09 20:24:22 UTC (rev 991)
+++ mgmt/cumin/python/cumin/cluster.strings	2007-10-09 20:41:26 UTC (rev 992)
@@ -25,28 +25,50 @@
     <dt>Name</dt><dd>{name}</dd>
   </dl>
 
-  <ul class="actions">
-    <li><a href="">Add Virtual Host</a></li>
-    <li><a href="">Add Server</a></li>
-    <li><a href="">Shutdown Servers</a></li>
-  </ul>
-
   {tabs}
 </div>
 
-[ClusterServers.html]
-<table class="ClusterServers mobjects">
+[ServerTab.html]
+<ul class="actions">
+  <li><a href="">Add Server</a></li>
+  <li><a href="">Shutdown Servers</a></li>
+</ul>
+
+<table class="mobjects">
   <tr>
-    <th>Name</th>
+    <th>Server</th>
     <th>Status</th>
     <th></th>
   </tr>
-{items}
+
+  {items}
 </table>
 
-[ClusterServers.item_html]
+[ServerTab.item_html]
 <tr>
   <td>{item_link}</td>
   <td>0 errors, 0 warnings</td>
   <td><a class="action" href="">Remove</a></td>
 </tr>
+
+[VirtualHostTab.html]
+  <ul class="actions">
+    <li><a href="">Add Virtual Host</a></li>
+  </ul>
+
+<table class="mobjects">
+  <tr>
+    <th>Virtual Host</th>
+    <th>Configuration</th>
+    <th></th>
+  </tr>
+
+  {items}
+</table>
+
+[VirtualHostTab.item_html]
+<tr>
+  <td>{item_link}</td>
+  <td>10 queues, 5 exchanges</td>
+  <td><a class="action" href="">Remove</a></td>
+</tr>

Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py	2007-10-09 20:24:22 UTC (rev 991)
+++ mgmt/cumin/python/cumin/server.py	2007-10-09 20:41:26 UTC (rev 992)
@@ -110,12 +110,11 @@
         return server.name
 
     def render_cluster_link(self, session, server):
-        html = None
         cluster = server.get_cluster()
         
         if cluster:
             branch = session.branch()
-            self.page().show_cluster(session, cluster).show_view(branch)
+            self.page().show_cluster(branch, cluster).show_view(branch)
             html = mlink(branch.marshal(), "Cluster", cluster.name)
         else:
             html = none()




More information about the rhmessaging-commits mailing list