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

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Fri Oct 12 09:30:11 EDT 2007


Author: justi9
Date: 2007-10-12 09:30:11 -0400 (Fri, 12 Oct 2007)
New Revision: 1016

Modified:
   mgmt/cumin/python/cumin/exchange.py
   mgmt/cumin/python/cumin/exchange.strings
Log:
Makes the exchange view read only.



Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py	2007-10-12 13:14:51 UTC (rev 1015)
+++ mgmt/cumin/python/cumin/exchange.py	2007-10-12 13:30:11 UTC (rev 1016)
@@ -66,24 +66,12 @@
         self.view = ExchangeView(app, "view")
         self.add_child(self.view)
 
-        self.edit = ExchangeEdit(app, "edit")
-        self.add_child(self.edit)
-
-        self.remove = ExchangeRemove(app, "remove")
-        self.add_child(self.remove)
-
     def set_exchange(self, session, exchange):
         return self.param.set(session, exchange)
 
     def show_view(self, session):
         return self.show_mode(session, self.view)
 
-    def show_edit(self, session):
-        return self.show_mode(session, self.edit)
-
-    def show_remove(self, session):
-        return self.show_mode(session, self.remove)
-
     def render_href(self, session, exchange):
         branch = session.branch()
         self.show_view(branch)
@@ -122,24 +110,10 @@
         else:
             raise Exception()
 
-    def render_edit_exchange_href(self, session, exchange):
-        branch = session.branch()
-        self.page().show_exchange(branch, exchange).show_edit(branch)
-        return branch.marshal()
-
-    def render_remove_exchange_href(self, session, exchange):
-        branch = session.branch()
-        self.page().show_exchange(branch, exchange).show_remove(branch)
-        return branch.marshal()
-
 class ExchangeBindingSet(ItemSet):
     def render_title(self, session, exchange):
         return "Bindings (%i)" % len(exchange.binding_items())
 
-    def render_add_binding_href(self, session, exchange):
-        branch = session.branch()
-        return branch.marshal()
-
     def get_items(self, session, exchange):
         return sorted(exchange.binding_items(), cmp,
                       lambda x: x.get_queue().name)

Modified: mgmt/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/cumin/python/cumin/exchange.strings	2007-10-12 13:14:51 UTC (rev 1015)
+++ mgmt/cumin/python/cumin/exchange.strings	2007-10-12 13:30:11 UTC (rev 1016)
@@ -18,7 +18,8 @@
     <th>Configuration</th>
     <th>Status</th>
   </tr>
-{items}
+
+  {items}
 </table>
 
 [ExchangeSet.item_html]
@@ -38,6 +39,7 @@
     <fieldset>
       <div class="field">{exchange_name}</div>
     </fieldset>
+
     <span class="legend">Type</span>
     <fieldset>
       <div class="field">
@@ -53,12 +55,13 @@
         <em>Fan Out:</em> Lorem ipsum gloria dei ipso facto ad nauseum
       </div>
     </fieldset>
-{hidden_inputs}
+
+    {hidden_inputs}
   </div>
   <div class="foot">
     <div style="display: block; float: left;"><button>Help</help></div>
-{cancel}
-{submit}
+    {cancel}
+    {submit}
   </div>
 </form>
 <script defer="defer">
@@ -79,24 +82,14 @@
     <dt>Type</dt><dd>{type}</dd>
   </dl>
 
-  <ul class="actions">
-    <li><a href="{edit_exchange_href}">Edit This Exchange</a></li>
-    <li><a href="{remove_exchange_href}">Remove This Exchange</a></li>
-  </ul>
-
   {tabs}
 </div>
 
 [ExchangeBindingSet.html]
-<ul class="actions">
-  <li><a href="{add_binding_href}">Add Binding</a></li>
-</ul>
-
 <table class="ExchangeBindingSet mobjects">
   <tr>
     <th>Queue</th>
     <th>Routing Key</th>
-    <th></th>
   </tr>
 
   {items}
@@ -106,5 +99,4 @@
 <tr>
   <td><a href="{item_href}">Queue '{item_name}'</a></td>
   <td>{item_routing_key}</td>
-  <td><a class="action" href="">Remove</a></td>
 </tr>




More information about the rhmessaging-commits mailing list