Author: eallen
Date: 2011-02-16 15:54:16 +0000 (Wed, 16 Feb 2011)
New Revision: 4533
Modified:
trunk/cumin/python/cumin/messaging/binding.py
trunk/cumin/python/cumin/messaging/exchange.py
trunk/cumin/python/cumin/messaging/queue.py
Log:
Enable csv export on queue and exchange bindings
Modified: trunk/cumin/python/cumin/messaging/binding.py
===================================================================
--- trunk/cumin/python/cumin/messaging/binding.py 2011-02-16 01:33:22 UTC (rev 4532)
+++ trunk/cumin/python/cumin/messaging/binding.py 2011-02-16 15:54:16 UTC (rev 4533)
@@ -1,17 +1,22 @@
import logging
-from wooly import WidgetTemplate, Writer, Attribute, Parameter, Widget
-from wooly.forms import FormInput, FormField, Form
-from wooly.parameters import DictParameter
-from cumin.formats import *
-from cumin.objectselector import *
-from cumin.sqladapter import *
-from cumin.util import sorted_by
-from cumin.widgets import *
+from rosemary.model import RosemaryObject
-import main
-from cumin.objectframe import ObjectFrameTaskForm
+from cumin.formats import fmt_shorten
+from cumin.objectframe import ObjectFrameTaskForm, ObjectFrame, ObjectFrameTask
+from cumin.objectselector import ObjectSelectorTask, ObjectSelector,\
+ ObjectLinkColumn
+from cumin.widgets import SubmitSwitch, QueueBindingField, ExchangeBindingField
+from cumin.sqladapter import ObjectSqlAdapter
+from wooly import Widget, Parameter
+from wooly.template import WidgetTemplate
+from wooly.forms import Form, FormField, FormError, MissingValueError,\
+ StringField
+from wooly.parameters import DictParameter, StringParameter, ListParameter,\
+ IntegerParameter
+from wooly.util import StringCatalog, Writer
+
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.messaging.exchange")
@@ -127,6 +132,9 @@
self.add_join(exchange, binding.exchangeRef, exchange._id)
self.add_join(queue, binding.queueRef, queue._id)
+ def get_data(self, values, options):
+ return super(BindingData, self).get_data(values, options)
+
class BindingSelector(ObjectSelector):
def __init__(self, app, name):
binding = app.model.org_apache_qpid_broker.Binding
@@ -158,8 +166,6 @@
self.remove = BindingSelectionRemove(app, self)
- self.enable_csv_export()
-
class Exchange(ObjectLinkColumn):
def render_header_content(self, session):
return "Exchange"
@@ -600,7 +606,6 @@
class ExchangeBindings(ExchangeKeysField):
def render_id(self, session, *args):
- s = fmt_bytes(1)
cls = "ExchangeHiddenRow"
exchange = self.exchange.get(session)
if exchange and exchange.type == 'headers':
Modified: trunk/cumin/python/cumin/messaging/exchange.py
===================================================================
--- trunk/cumin/python/cumin/messaging/exchange.py 2011-02-16 01:33:22 UTC (rev 4532)
+++ trunk/cumin/python/cumin/messaging/exchange.py 2011-02-16 15:54:16 UTC (rev 4533)
@@ -113,6 +113,8 @@
self.exchange_column.visible = False
+ self.enable_csv_export(exchange)
+
class ExchangeInputSet(RadioInputSet):
def __init__(self, app, name):
super(ExchangeInputSet, self).__init__(app, name)
Modified: trunk/cumin/python/cumin/messaging/queue.py
===================================================================
--- trunk/cumin/python/cumin/messaging/queue.py 2011-02-16 01:33:22 UTC (rev 4532)
+++ trunk/cumin/python/cumin/messaging/queue.py 2011-02-16 15:54:16 UTC (rev 4533)
@@ -114,6 +114,8 @@
self.queue_column.visible = False
+ self.enable_csv_export(queue)
+
class QueueAdd(ObjectFrameTask):
def __init__(self, app, frame):
super(QueueAdd, self).__init__(app, frame)