Author: justi9
Date: 2007-10-12 09:14:51 -0400 (Fri, 12 Oct 2007)
New Revision: 1015
Modified:
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/queue.strings
Log:
Makes the queue view read only.
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-12 11:28:13 UTC (rev 1014)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-12 13:14:51 UTC (rev 1015)
@@ -69,30 +69,12 @@
self.view = QueueView(app, "view")
self.add_child(self.view)
- self.edit = QueueEdit(app, "edit")
- self.add_child(self.edit)
-
- self.remove = QueueRemove(app, "remove")
- self.add_child(self.remove)
-
- self.binding_add = QueueBindingAdd(app, "binding_add")
- self.add_child(self.binding_add)
-
def set_queue(self, session, queue):
return self.param.set(session, queue)
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 show_binding_add(self, session):
- return self.show_mode(session, self.binding_add)
-
def render_href(self, session, queue):
branch = session.branch()
self.show_view(branch)
@@ -158,25 +140,10 @@
else:
raise Exception()
- def render_edit_queue_href(self, session, queue):
- branch = session.branch()
- self.page().show_queue(branch, queue).show_edit(branch)
- return branch.marshal()
-
- def render_remove_queue_href(self, session, queue):
- branch = session.branch()
- self.page().show_queue(branch, queue).show_remove(branch)
- return branch.marshal()
-
class QueueBindingSet(ItemSet):
def render_title(self, session, queue):
return "Bindings (%i)" % len(queue.binding_items())
- def render_add_binding_href(self, session, queue):
- branch = session.branch()
- self.page().show_queue(branch, queue).show_binding_add(branch)
- return branch.marshal()
-
def get_items(self, session, queue):
return sorted(queue.binding_items(), cmp,
lambda x: x.get_exchange().name)
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-12 11:28:13 UTC (rev 1014)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-12 13:14:51 UTC (rev 1015)
@@ -33,6 +33,7 @@
<fieldset>
<div class="field">{queue_name}</div>
</fieldset>
+
<span class="legend">Latency Tuning</span>
<fieldset>
<div class="field">
@@ -49,12 +50,13 @@
delays
</div>
</fieldset>
-{hidden_inputs}
+
+ {hidden_inputs}
</div>
<div class="foot">
<div style="display: block; float:
left;"><button>Help</button></div>
-{cancel}
-{submit}
+ {cancel}
+ {submit}
</div>
</form>
<script defer="defer">
@@ -114,24 +116,14 @@
<dt>Latency Tuning</dt><dd>{latency_tuning}</dd>
</dl>
- <ul class="actions">
- <li><a href="{edit_queue_href}">Edit This
Queue</a></li>
- <li><a href="{remove_queue_href}">Remove This
Queue</a></li>
- </ul>
-
{tabs}
</div>
[QueueBindingSet.html]
- <ul class="actions">
- <li><a href="{add_binding_href}">Add
Binding</a></li>
- </ul>
-
<table class="QueueBindingSet mobjects">
<tr>
<th>Exchange</th>
<th>Routing Key</th>
- <th></th>
</tr>
{items}
@@ -141,7 +133,6 @@
<tr>
<td><a href="{item_href}">Exchange
'{item_name}'</a></td>
<td>{item_routing_key}</td>
- <td><a class="action"
href="{item_remove_href}">Remove</a></td>
</tr>
[QueueBindingAdd.html]
@@ -152,16 +143,18 @@
<div class="body">
<span class="legend">Exchange</span>
<fieldset>{exchanges}</fieldset>
+
<span class="legend">Routing Key</span>
<fieldset>
<div class="field">{routing_key}</div>
</fieldset>
-{hidden_inputs}
+
+ {hidden_inputs}
</div>
<div class="foot">
<div style="display: block; float:
left;"><button>Help</button></div>
-{cancel}
-{submit}
+ {cancel}
+ {submit}
</div>
</form>
<script defer="defer">