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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Dec 18 11:23:17 EST 2007


Author: justi9
Date: 2007-12-18 11:23:17 -0500 (Tue, 18 Dec 2007)
New Revision: 1513

Modified:
   mgmt/cumin/python/cumin/broker.py
   mgmt/cumin/python/cumin/broker.strings
   mgmt/cumin/python/cumin/brokercluster.py
   mgmt/cumin/python/cumin/brokergroup.py
   mgmt/cumin/python/cumin/brokerprofile.py
   mgmt/cumin/python/cumin/widgets.py
   mgmt/cumin/python/cumin/widgets.strings
   mgmt/notes/justin-todo.txt
Log:
Adds an incomplete multiple action form.

Renames BrokerSetForm to BrokerSet to avoid colissions with bulk
action form names.



Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/broker.py	2007-12-18 16:23:17 UTC (rev 1513)
@@ -16,9 +16,9 @@
 
 strings = StringCatalog(__file__)
 
-class BrokerSetForm(PaginatedItemSet, Form, Frame):
+class BrokerSet(PaginatedItemSet, Form, Frame):
     def __init__(self, app, name):
-        super(BrokerSetForm, self).__init__(app, name)
+        super(BrokerSet, self).__init__(app, name)
 
         self.broker = BrokerParameter(app, "param")
         self.add_parameter(self.broker)
@@ -50,7 +50,7 @@
         return BrokerRegistration.select(orderBy="name")[start:end]
 
     def do_process(self, session, model):
-        super(BrokerSetForm, self).do_process(session, model)
+        super(BrokerSet, self).do_process(session, model)
 
         if self.submit.get(session):
             self.submit.set(session, False)
@@ -482,7 +482,7 @@
     def get_title(self, session, model):
         return "Brokers %s" % fmt_count(BrokerRegistration.select().count())
 
-    class BrowserBrokers(BrokerSetForm):
+    class BrowserBrokers(BrokerSet):
         def do_get_items(self, session, model):
             group = self.parent().group.get(session)
             profile = self.parent().profile.get(session)
@@ -717,3 +717,17 @@
 
     def render_cancel_content(self, session, broker):
         return "No, Cancel"
+
+class BrokerSetRemove(CuminActionSetForm):
+    def get_title(self, session, model):
+        return "Unregister Brokers"
+
+    def process_cancel(self, session, model):
+        branch = session.branch()
+        self.page().show_view(branch)
+        self.page().set_redirect_url(session, branch.marshal())
+
+    def process_submit(self, session, model):
+        branch = session.branch()
+        self.page().show_view(branch)
+        self.page().set_redirect_url(session, branch.marshal())

Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/broker.strings	2007-12-18 16:23:17 UTC (rev 1513)
@@ -1,4 +1,4 @@
-[BrokerSetForm.html]
+[BrokerSet.html]
 <form id="{id}" method="post" action="?">
   <!-- <select onchange="document.getElementById('{id}.submit').submit()"> -->
 
@@ -35,7 +35,7 @@
   {hidden_inputs}
 </form>
 
-[BrokerSetForm.item_html]
+[BrokerSet.item_html]
 <tr>
   <td><input type="checkbox" name="{item_checkbox_name}" value="{item_checkbox_value}" {item_checkbox_checked_attr}/></td>
   <td>{item_link}</td>

Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokercluster.py	2007-12-18 16:23:17 UTC (rev 1513)
@@ -92,7 +92,7 @@
     def render_name(self, session, cluster):
         return cluster.name
 
-    class ClusterBrokerTab(BrokerSetForm):
+    class ClusterBrokerTab(BrokerSet):
         def get_title(self, session, cluster):
             return "Brokers %s" % fmt_count(len(cluster.brokers))
 

Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokergroup.py	2007-12-18 16:23:17 UTC (rev 1513)
@@ -2,7 +2,7 @@
 from wooly import *
 from wooly.widgets import *
 
-from broker import BrokerSetForm
+from broker import BrokerSet
 from widgets import *
 from parameters import *
 from formats import *
@@ -85,7 +85,7 @@
     def render_name(self, session, group):
         return group.name
 
-    class GroupBrokerTab(BrokerSetForm):
+    class GroupBrokerTab(BrokerSet):
         def get_title(self, session, group):
             return "Brokers %s" % \
                 fmt_count(self.get_item_count(session, group))

Modified: mgmt/cumin/python/cumin/brokerprofile.py
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.py	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/brokerprofile.py	2007-12-18 16:23:17 UTC (rev 1513)
@@ -74,7 +74,7 @@
         def get_title(self, session, profile):
             return "Configuration"
 
-    class ProfileBrokerTab(BrokerSetForm):
+    class ProfileBrokerTab(BrokerSet):
         def __init__(self, app, name):
             super(BrokerProfileView.ProfileBrokerTab, self).__init__(app, name)
 

Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/widgets.py	2007-12-18 16:23:17 UTC (rev 1513)
@@ -132,6 +132,10 @@
     def __init__(self, app, name):
         super(CuminConfirmForm, self).__init__(app, name)
 
+class CuminActionSetForm(ItemSet, CuminForm, Frame):
+    def __init__(self, app, name):
+        super(CuminActionSetForm, self).__init__(app, name)
+
 class CuminStatus(Widget):
     def render_class(self, session, object):
         if hasattr(object, "errors"):

Modified: mgmt/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/cumin/python/cumin/widgets.strings	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/cumin/python/cumin/widgets.strings	2007-12-18 16:23:17 UTC (rev 1513)
@@ -14,6 +14,32 @@
   wooly.doc().elembyid("{id}").node.elements[1].focus();
 </script>
 
+[CuminActionSetForm.html]
+<form id="{id}" class="mform" method="post" action="?">
+  <div class="head">
+    <h1>{title}</h1>
+  </div>
+  <div class="body">
+    <span class="legend">Actions</span>
+    <fieldset>
+      <ul>{items}</ul>
+    </fieldset>
+
+    {hidden_inputs}
+  </div>
+  <div class="foot">
+    <div style="display: block; float: left;"><button>Help</button></div>
+    {cancel}
+    {submit}
+  </div>
+</form>
+<script>
+  wooly.doc().elembyid("{id}").node.elements[0].focus();
+</script>
+
+[CuminActionSetForm.item_html]
+<li>{item_content}</li>
+
 [CuminStatus.javascript]
 function updateStatus(id, object) {
     var status = wooly.doc().elembyid(id);

Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt	2007-12-17 23:15:22 UTC (rev 1512)
+++ mgmt/notes/justin-todo.txt	2007-12-18 16:23:17 UTC (rev 1513)
@@ -18,12 +18,11 @@
 
    - Add y-axis ticks and values for reference
 
- * Broker groups
+ * Sortify brokers
 
-   - Group form submit has different behaviors between hitting enter
-     and clicking submit
+ * Sortify clients
 
- * Sort in tables
+ * Sortify sessions
 
  * Render stats without values as something other than 0, say a --
 
@@ -39,6 +38,17 @@
 
 Deferred
 
+ * Consider making CuminForm (or Form) also have Frame behavior
+
+ * Sortify broker groups
+
+ * Sortify exchanges
+
+ * Broker groups
+
+   - Group form submit has different behaviors between hitting enter
+     and clicking submit
+
  * Add [None] to groups field in broker view
 
  * Go back to Widget.parent as an attr, not a function




More information about the rhmessaging-commits mailing list