[rhmessaging-commits] rhmessaging commits: r1199 - in mgmt: notes and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Nov 1 00:44:46 EDT 2007


Author: justi9
Date: 2007-11-01 00:44:46 -0400 (Thu, 01 Nov 2007)
New Revision: 1199

Modified:
   mgmt/cumin/python/cumin/broker.py
   mgmt/cumin/python/cumin/broker.strings
   mgmt/cumin/python/cumin/brokercluster.strings
   mgmt/cumin/python/cumin/brokergroup.strings
   mgmt/cumin/python/cumin/brokerprofile.strings
   mgmt/cumin/python/cumin/exchange.py
   mgmt/cumin/python/cumin/exchange.strings
   mgmt/cumin/python/cumin/page.strings
   mgmt/cumin/python/cumin/queue.py
   mgmt/cumin/python/cumin/queue.strings
   mgmt/cumin/python/cumin/widgets.py
   mgmt/cumin/python/cumin/widgets.strings
   mgmt/notes/justin-todo.txt
Log:
A bunch of changes from the last UI demo.

Queue and exchange columns reordered and renamed.

More actions from schema added.

Apply nav chevrons uniformly.

Add the durable and exclusive fields to queue.



Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/broker.py	2007-11-01 04:44:46 UTC (rev 1199)
@@ -237,7 +237,6 @@
         self.tabs.add_tab(self.config)
         self.tabs.add_tab(self.BrokerStatsTab(app, "stats"))
         self.tabs.add_tab(self.BrokerLogTab(app, "log"))
-        #self.tabs.add_tab(self.BrokerVirtualHostTab(app, "vhosts"))
 
     def show_config(self, session):
         return self.tabs.show_mode(session, self.config)

Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/broker.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -72,8 +72,8 @@
 
 [BrokerConfigTab.html]
 <ul class="actions">
-  <li><a href="">Apply Configuration to Broker</a></li>
-  <li><a href="">Add Property</a></li>
+  <li><a class="nav" href="{href}">Add Property</a></li>
+  <li><a href="{href}">Apply Configuration to Broker</a></li>
 </ul>
 
 <table class="mobjects">
@@ -158,6 +158,7 @@
     <th class="actions" colspan="2">
       <h2>Act on This Broker:</h2>
       <a href="{href}">Shutdown</a>
+      <a href="{href}">Unregister</a>
     </th>
   </tr>
 </table>

Modified: mgmt/cumin/python/cumin/brokercluster.strings
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/brokercluster.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -51,7 +51,16 @@
   <tr>
     <th class="actions" colspan="2">
       <h2>Act on This Cluster:</h2>
-      <a href="{href}">Shutdown</a>
+        <form class="inline" action="?" method="get">
+        <select>
+          <option>Choose Action...</option>
+          <option>Edit...</option>
+          <option>Remove</option>
+          <option>Start</option>
+          <option>Stop</option>
+        </select>
+        <button>Submit</button>
+      </form>
     </th>
   </tr>
 </table>

Modified: mgmt/cumin/python/cumin/brokergroup.strings
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/brokergroup.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -43,7 +43,7 @@
   <tr>
     <th class="actions" colspan="2">
       <h2>Act on This Group:</h2>
-      <a href="{edit_href}">Edit</a>
+      <a class="nav" href="{edit_href}">Edit</a>
       <a href="{href}">Remove</a>
     </th>
   </tr>
@@ -63,7 +63,7 @@
     {hidden_inputs}
   </div>
   <div class="foot">
-    <div style="display: block; float: left;"><button>Help</button></div>
+    <a class="help action" href="{href}" target="help">Help</a>
     {cancel}
     {submit}
   </div>

Modified: mgmt/cumin/python/cumin/brokerprofile.strings
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/brokerprofile.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -24,7 +24,8 @@
   <tr>
     <th class="actions" colspan="2">
       <h2>Act on This Profile:</h2>
-      <a href="{href}">Edit</a>
+      <a class="nav" href="{href}">Edit</a>
+      <a href="{href}">Remove</a>
     </th>
   </tr>
 </table>

Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/exchange.py	2007-11-01 04:44:46 UTC (rev 1199)
@@ -43,12 +43,11 @@
         self.page().show_exchange(branch, exchange).show_view(branch)
         return mlink(branch.marshal(), "Exchange", exchange.name)
 
-    def render_item_config(self, session, exchange):
-        count = len(exchange.binding_items())
-        return "%i binding%s" % (count, ess(count))
+    def render_item_producers(self, session, exchange):
+        return len(exchange.producer_items())
 
-    def render_item_status(self, session, exchange):
-        return status(len(exchange.errors), len(exchange.warnings))
+    def render_item_bindings(self, session, exchange):
+        return len(exchange.binding_items())
 
     def render_item_messages_received(self, session, exchange):
         return exchange.get_measurement("msgReceives").get_value()
@@ -62,6 +61,9 @@
     def render_item_bytes_routed(self, session, exchange):
         return exchange.get_measurement("byteRoutes").get_value()
 
+    def render_item_status(self, session, exchange):
+        return status(len(exchange.errors), len(exchange.warnings))
+
 class ExchangeFrame(CuminFrame):
     def __init__(self, app, name):
         super(ExchangeFrame, self).__init__(app, name)
@@ -110,7 +112,7 @@
 
 class ExchangeBindingSet(ItemSet):
     def render_title(self, session, exchange):
-        return "Bindings (%i)" % len(exchange.binding_items())
+        return "Queue Bindings (%i)" % len(exchange.binding_items())
 
     def get_items(self, session, exchange):
         return sorted_by(exchange.binding_items(), "id")

Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/exchange.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -15,7 +15,8 @@
 <table class="ExchangeSet mobjects">
   <tr>
     <th>Name</th>
-    <th>Queue Bindings</th>
+    <th class="ralign">Producers</th>
+    <th class="ralign">Queue Bindings</th>
     <th class="ralign">Msgs. Received</th>
     <th class="ralign">Bytes Received</th>
     <th class="ralign">Msgs. Routed</th>
@@ -29,7 +30,8 @@
 [ExchangeSet.item_html]
 <tr>
   <td>{item_link}</a></td>
-  <td>{item_config}</td>
+  <td class="ralign">{item_producers}</td>
+  <td class="ralign">{item_bindings}</td>
   <td class="ralign">{item_messages_received}</td>
   <td class="ralign">{item_bytes_received}</td>
   <td class="ralign">{item_messages_routed}</td>

Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/page.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -210,7 +210,7 @@
   margin: 0 0.5em 0 0;
 }
 
-button, table.props th.actions a, ul.actions a {
+button, table.props th.actions a, ul.actions a, a.action {
   margin: 0;
   border: 1px solid #ddd;
   padding: 0.25em 0.5em 0.15em 0.5em;
@@ -219,7 +219,7 @@
   font-size: 0.9em;
 }
 
-button:hover, table.props th.actions a:hover, ul.actions a:hover {
+button:hover, table.props th.actions a:hover, ul.actions a:hover, a.action:hover {
   background-color: white;
 }
 
@@ -354,10 +354,14 @@
   max-width: 20em;
 }
 
-form.mform button {
+form.mform button, form.mform a.help {
   margin: 0.5em;
 }
 
+form.mform a.help {
+  float: left;
+}
+
 ul.radiotabs {
   list-style: none;
   margin: 0 0 1em 0;
@@ -477,6 +481,7 @@
 
 .browser .nav h2 {
   font-weight: normal;
+  font-size: 0.9em;
 }
 
 .browser .nav ul {
@@ -517,6 +522,10 @@
   text-align: right;
 }
 
+form.inline {
+  display: inline;
+}
+
 [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">

Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/queue.py	2007-11-01 04:44:46 UTC (rev 1199)
@@ -46,12 +46,11 @@
     def render_item_name(self, session, queue):
         return queue.name
 
-    def render_item_config(self, session, queue):
-        count = len(queue.binding_items())
-        return "%i binding%s" % (count, ess(count))
+    def render_item_consumers(self, session, queue):
+        return queue.get_measurement("consumers").get_value()
 
-    def render_item_status(self, session, queue):
-        return status(len(queue.errors), len(queue.warnings))
+    def render_item_bindings(self, session, queue):
+        return len(queue.binding_items())
 
     def render_item_message_depth(self, session, queue):
         return queue.get_measurement("msgDepth").get_value()
@@ -59,8 +58,8 @@
     def render_item_byte_depth(self, session, queue):
         return queue.get_measurement("byteDepth").get_value()
 
-    def render_item_consumers(self, session, queue):
-        return queue.get_measurement("consumers").get_value()
+    def render_item_status(self, session, queue):
+        return status(len(queue.errors), len(queue.warnings))
 
 class QueueFrame(CuminFrame):
     def __init__(self, app, name):
@@ -112,7 +111,7 @@
         self.add_child(self.tabs)
 
         self.tabs.add_tab(QueueStatistics(app, "stats"))
-        self.tabs.add_tab(ConsumerSet(app, "consumers"))
+        self.tabs.add_tab(QueueConsumerSet(app, "consumers"))
         self.tabs.add_tab(QueueBindingSet(app, "bindings"))
 
     def render_title(self, session, queue):
@@ -121,19 +120,15 @@
     def render_name(self, session, queue):
         return queue.name
 
-    def render_latency_tuning(self, session, queue):
-        if queue.latency_priority == "h":
-            return "Lower Latency"
-        elif queue.latency_priority == "m":
-            return "Balanced"
-        elif queue.latency_priority == "l":
-            return "Higher Throughput"
-        else:
-            raise Exception()
+    def render_durable(self, session, queue):
+        return yes_no(queue.is_durable)
 
+    def render_exclusive(self, session, queue):
+        return yes_no(queue.is_exclusive)
+
 class QueueBindingSet(ItemSet):
     def render_title(self, session, queue):
-        return "Bindings (%i)" % len(queue.binding_items())
+        return "Exchange Bindings (%i)" % len(queue.binding_items())
 
     def get_items(self, session, queue):
         return sorted_by(queue.binding_items(), "id")
@@ -389,7 +384,7 @@
             return "queue.png?id=%i;m=enqueueTxCount;m=dequeueTxCount" \
                    % queue.id
 
-class ConsumerSet(ItemSet):
+class QueueConsumerSet(ItemSet):
     def render_title(self, session, queue):
         return "Consumers (%i)" % len(queue.consumer_items())
 

Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/queue.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -16,10 +16,10 @@
     <tr>
       <th><input type="checkbox"/></th>
       <th>Name</th>
-      <th>Exchange Bindings</th>
+      <th class="ralign">Consumers</th>
+      <th class="ralign">Exchange Bindings</th>
       <th class="ralign">Msg. Depth</th>
       <th class="ralign">Byte Depth</th>
-      <th class="ralign">Consumers</th>
       <th>Status</th>
     </tr>
 
@@ -31,10 +31,10 @@
 <tr>
   <td><input type="checkbox"/></td>
   <td>{item_link}</a></td>
-  <td>{item_config}</td>
+  <td class="ralign">{item_consumers}</td>
+  <td class="ralign">{item_bindings}</td>
   <td class="ralign">{item_message_depth}</td>
   <td class="ralign">{item_byte_depth}</td>
-  <td class="ralign">{item_consumers}</td>
   <td>{item_status}</td>
 </tr>
 
@@ -125,7 +125,8 @@
 
 <table class="props">
   <tr><th>Name</th><td>{name}</td></tr>
-  <tr><th>Latency Tuning</th><td>{latency_tuning}</td></tr>
+  <tr><th>Durable?</th><td>{durable}</td></tr>
+  <tr><th>Exclusive?</th><td>{exclusive}</td></tr>
   <tr>
     <th class="actions" colspan="2">
       <h2>Act on This Queue:</h2>
@@ -155,7 +156,7 @@
 </tr>
 
 [QueueBindingAdd.html]
-<form id="{id}" class="QueueBindingAdd mform" method="post" action="?">
+<form id="{id}" class="mform" method="post" action="?">
   <div class="head">
     <h1>{title}</h1>
   </div>
@@ -171,7 +172,7 @@
     {hidden_inputs}
   </div>
   <div class="foot">
-    <div style="display: block; float: left;"><button>Help</button></div>
+    <a class="help action" href="{help_href}" target="help">Help</a>
     {cancel}
     {submit}
   </div>
@@ -230,7 +231,7 @@
   <img src="{transactions_chart_url}"/>
 </div>
 
-[ConsumerSet.html]
+[QueueConsumerSet.html]
 <div class="sactions">
   <h2>Act on Selected Consumers:</h2>
   <button>Start</button>
@@ -251,7 +252,7 @@
   {items}
 </table>
 
-[ConsumerSet.item_html]
+[QueueConsumerSet.item_html]
 <tr>
   <td><input type="checkbox"/></td>
   <td>{item_name}</td>

Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/widgets.py	2007-11-01 04:44:46 UTC (rev 1199)
@@ -34,6 +34,9 @@
 
     return "<div class=\"statuslight %s\">%s</div>" % (class_, number)
 
+def yes_no(predicate):
+    return predicate and "Yes" or "No"
+
 class CuminFrame(Frame, ModeSet):
     def __init__(self, app, name):
         super(CuminFrame, self).__init__(app, name)
@@ -109,6 +112,9 @@
     def process_display(self, session, object):
         pass
 
+    def render_help_href(self, session, object):
+        return self.render_href(self, session, object)
+
     def render_cancel_content(self, session, object):
         return "Cancel"
 

Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/cumin/python/cumin/widgets.strings	2007-11-01 04:44:46 UTC (rev 1199)
@@ -1,5 +1,5 @@
 [CuminConfirmForm.html]
-<form id="{id}" class="QueueForm mform" method="post" action="?">
+<form id="{id}" class="mform" method="post" action="?">
   <div class="head">
     <h1>{title}</h1>
   </div>
@@ -12,4 +12,3 @@
 <script>
 wooly.doc().elem("{id}").node.elements[1].focus();
 </script>
-

Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt	2007-10-31 17:52:33 UTC (rev 1198)
+++ mgmt/notes/justin-todo.txt	2007-11-01 04:44:46 UTC (rev 1199)
@@ -1,113 +1,82 @@
-Big picture
+Current
 
- * A more-or-less complete demonstration of an admin UI
+ * Brokers tab
 
-Higher
+   - Find/connect in bulk
 
-Lower
+ * Queue
 
- * more form inputs, non scalar ones too
+   - Add msg/byte enq/deq rates
 
- * Add an error banner to form
+   - Split queues view into bytes and messages modes
 
- * use wsgiref instead of BaseHTTPServer
+   - Add a msg enq rate msg deq rate chart
 
- * Make sure HTTPServer handles concurrent requests; need to look at
-   documentation
+   - Rate of accel, decel for enq, deq
 
-   - It does not, and it's not easily changed.  Will need to switch to
-     wsgi stuff, I believe.
+ * queue: link consumers stat to consumers view
 
- * Change declared charset to iso-8859???, not utf-8, since it's
-   important to be honest
+ * exch: link bindings, producers stats to respective views
 
- * Make it a little simpler to express hrefs
+ * model: get rid of the old *_count stat fields and use the new ones
 
- * Make form help buttons pop up a (for now, empty) help page
+ * Add rates to stats views
 
- * Make item counts in tab labels a little grayer, that is, less
-   intense than the name
+ * Make status boxes display stats like those from list views
 
- * If debug is enabled, append a comment to the response containing
-   render and process traces
+ * Restyle drop boxes to not be beveled
 
- * Add ability to send a test message to a queue
+Deferred
 
- * Add favicon and a mapping in the server to serve it
+ * Make the status lights also be links to an appropriate view
 
- * Separate wooly stuff into its own devel subdir
+   - Defer until we know what we're going to link to
 
- * Consider having a cssclass set on widgets
+ * Add a CuminItemSet with add/edit/remove href parts
 
- * Use page attributes for session errors, redirect
+ * Rename ServerGroupType to ServerGroupCategory
 
- * See if we can eliminate the attr/param distinction, and use whether
-   or not a param is added to a widget via add_param to do that
-
  * Add a parameter that takes a modelclass
 
- * Servers tab
+ * Make it a little simpler to express hrefs
 
-   - Find/connect in bulk
+ * More form inputs, non scalar ones too
 
-   - Add an ungrouped radio button
+ * Add an error banner to form
 
- * Cluster
+ * Use wsgiref instead of BaseHTTPServer
 
-   - Add remove action
+ * Make item counts in tab labels a little grayer, that is, less
+   intense than the name
 
-   - Stop, start
+ * Add favicon and a mapping in the server to serve it
 
-   - Display load, profiles (?)
+ * Separate wooly stuff into its own devel subdir
 
- * Queue
+ * Consider having a cssclass set on widgets
 
-   - Add durable, exclusive props
+ * See if we can eliminate the attr/param distinction, and use whether
+   or not a param is added to a widget via add_param to do that
 
-   - Make consumers the second column, after name
-
-   - Add msg/byte enq/deq rates
-
-   - Split queues view into bytes and messages modes
-
-   - Add a msg enq rate msg deq rate chart
-
-   - Rate of accel, decel for enq, deq
-
  * Add group type to group add,edit
 
- * Add a CuminItemSet with add/edit/remove href parts
+ * Broker browser: Add an ungrouped radio button
 
- * Rename ServerGroupType to ServerGroupCategory
+ * Right now we're calling render_title outside of render in order to
+   produce tab labels, for instance.  This is not good, especially in
+   cases where get_object is overriden and that fact is not reflected
+   in the render_title calls.  Perhaps introduce a get_title to solve
+   this.
 
- * Add a frame() accessor to Widget
+ * Add ability to send a test message to a queue
 
+ * Use page attributes for session errors, redirect
+
  * Add a sanity check traversal to the widget tree and to the
    registered sets of widgets and parameters
 
- * Add more bindings to the demo data
-
- * Add producers to the default exchange
-
- * queue: link consumers stat to consumers view
-
- * exch: link bindings, producers stats to respective views
-
- * model: get rid of the old *_count stat fields and use the new ones
-
- * Add rates to stats views
-
  * Right now, non cumin pages don't print their stack traces in the
    log
 
- * Make sure nav links are so marked
+ * Add a frame() accessor to Widget
 
- * Make the status lights also be links to an appropriate view
-
- * Make status boxes display stats like those from list views
-
- * Right now we're calling render_title outside of render in order to
-   produce tab labels, for instance.  This is not good, especially in
-   cases where get_object is overriden and that fact is not reflected
-   in the render_title calls.  Perhaps introduce a get_title to solve
-   this.




More information about the rhmessaging-commits mailing list