[rhmessaging-commits] rhmessaging commits: r1158 - in mgmt: notes and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Oct 24 12:49:24 EDT 2007
Author: justi9
Date: 2007-10-24 12:49:23 -0400 (Wed, 24 Oct 2007)
New Revision: 1158
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/brokerprofile.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/virtualhost.py
mgmt/cumin/python/cumin/widgets.py
mgmt/notes/Todo
Log:
Removes duplicate show_view methods.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/broker.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -20,7 +20,6 @@
def render_item_link(self, session, broker):
branch = session.branch()
self.page().show_broker(branch, broker).show_view(branch)
-
return mlink(branch.marshal(), "Broker", broker.name)
def render_item_group_link(self, session, broker):
@@ -29,7 +28,6 @@
if group:
branch = session.branch()
self.page().show_broker_group(branch, group).show_view(branch)
-
return mlink(branch.marshal(), "BrokerGroup", group.name)
else:
return none()
@@ -40,7 +38,6 @@
if profile:
branch = session.branch()
self.page().show_broker_profile(branch, profile).show_view(branch)
-
return mlink(branch.marshal(), "BrokerProfile", profile.name)
else:
return none()
@@ -51,7 +48,6 @@
if cluster:
branch = session.branch()
self.page().show_broker_cluster(branch, cluster).show_view(branch)
-
return mlink(branch.marshal(), "Cluster", cluster.name)
else:
return none()
@@ -109,6 +105,7 @@
self.view = BrokerView(app, "view")
self.add_mode(self.view)
+ self.set_view_mode(self.view)
self.vhost = VirtualHostFrame(app, "vhost")
self.add_mode(self.vhost)
@@ -116,9 +113,6 @@
self.prop = BrokerConfigPropertyForm(app, "prop")
self.add_mode(self.prop)
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def show_virtual_host(self, session, vhost):
self.vhost.set_object(session, vhost)
return self.show_mode(session, self.vhost)
@@ -240,11 +234,9 @@
if cluster:
branch = session.branch()
self.page().show_broker_cluster(branch, cluster).show_view(branch)
- html = mlink(branch.marshal(), "Cluster", cluster.name)
+ return mlink(branch.marshal(), "Cluster", cluster.name)
else:
- html = none()
-
- return html
+ return none()
def render_profile_link(self, session, broker):
profile = broker.get_broker_profile()
@@ -252,12 +244,10 @@
if profile:
branch = session.branch()
self.page().show_broker_profile(branch, profile).show_view(branch)
- html = mlink(branch.marshal(), "BrokerProfile", profile.name)
+ return mlink(branch.marshal(), "BrokerProfile", profile.name)
else:
- html = none()
+ return none()
- return html
-
def render_version(self, session, broker):
return "1.0"
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/broker.strings 2007-10-24 16:49:23 UTC (rev 1158)
@@ -149,9 +149,9 @@
<dl class="properties">
<dt>Name</dt><dd>{name}</dd>
- <dt>Broker Cluster</dt><dd>{cluster_link}</dd>
- <dt>Broker Profile</dt><dd>{profile_link}</dd>
- <dt>Software Version</dt><dd>{version}</dd>
+ <dt>Cluster</dt><dd>{cluster_link}</dd>
+ <dt>Profile</dt><dd>{profile_link}</dd>
+ <dt>Version</dt><dd>{version}</dd>
</dl>
<ul class="actions">
Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/brokercluster.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -25,7 +25,6 @@
def render_item_link(self, session, cluster):
branch = session.branch()
self.page().show_broker_cluster(branch, cluster).show_view(branch)
-
return mlink(branch.marshal(), "BrokerCluster", cluster.name)
def render_item_broker_lights(self, session, cluster):
@@ -49,6 +48,7 @@
self.view = BrokerClusterView(app, "view")
self.add_mode(self.view)
+ self.set_view_mode(self.view)
self.broker = BrokerFrame(app, "broker")
self.add_mode(self.broker)
@@ -56,9 +56,6 @@
self.vhost = VirtualHostFrame(app, "vhost")
self.add_mode(self.vhost)
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def show_broker(self, session, broker):
self.broker.set_object(session, broker)
return self.show_mode(session, self.broker)
Modified: mgmt/cumin/python/cumin/brokerprofile.py
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/brokerprofile.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -15,8 +15,7 @@
def render_item_link(self, session, profile):
branch = session.branch()
- frame = self.page().show_broker_profile(branch, profile)
- frame.show_view(branch)
+ self.page().show_broker_profile(branch, profile).show_view(branch)
return mlink(branch.marshal(), "BrokerProfile", profile.name)
class BrokerProfileFrame(CuminFrame):
@@ -29,10 +28,8 @@
self.view = BrokerProfileView(app, "view")
self.add_mode(self.view)
+ self.set_view_mode(self.view)
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def render_title(self, session, profile):
return "Broker Profile '%s'" % profile.name
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -41,7 +41,6 @@
def render_item_link(self, session, exchange):
branch = session.branch()
self.page().show_exchange(branch, exchange).show_view(branch)
-
return mlink(branch.marshal(), "Exchange", exchange.name)
def render_item_config(self, session, exchange):
@@ -73,10 +72,8 @@
self.view = ExchangeView(app, "view")
self.add_mode(self.view)
+ self.set_view_mode(self.view)
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def render_title(self, session, exchange):
return "Exchange '%s'" % exchange.name
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -39,7 +39,6 @@
def render_item_link(self, session, queue):
branch = session.branch()
self.page().show_queue(branch, queue).show_view(branch)
-
return mlink(branch.marshal(), "Queue", queue.name)
def render_item_name(self, session, queue):
@@ -73,10 +72,8 @@
self.view = QueueView(app, "view")
self.add_mode(self.view)
+ self.set_view_mode(self.view)
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def render_title(self, session, queue):
return "Queue '%s'" % queue.name
Modified: mgmt/cumin/python/cumin/virtualhost.py
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/virtualhost.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -20,7 +20,6 @@
def render_item_link(self, session, vhost):
branch = session.branch()
self.page().show_virtual_host(branch, vhost).show_view(branch)
-
return mlink(branch.marshal(), "VirtualHost", vhost.name)
class VirtualHostFrame(CuminFrame):
@@ -31,6 +30,10 @@
self.add_parameter(self.param)
self.set_object_parameter(self.param)
+ self.view = VirtualHostView(app, "view")
+ self.add_mode(self.view)
+ self.set_view_mode(self.view)
+
self.queue = QueueFrame(app, "queue")
self.add_mode(self.queue)
@@ -40,12 +43,6 @@
self.client = ClientFrame(app, "client")
self.add_mode(self.client)
- self.view = VirtualHostView(app, "view")
- self.add_mode(self.view)
-
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
def show_queue(self, session, queue):
self.queue.set_object(session, queue)
return self.show_mode(session, self.queue)
@@ -84,7 +81,6 @@
if broker:
branch = session.branch()
self.page().show_broker(branch, broker).show_view(branch)
-
return mlink(branch.marshal(), "Broker", broker.name)
else:
return none()
@@ -95,7 +91,6 @@
if cluster:
branch = session.branch()
self.page().show_broker_cluster(branch, cluster).show_view(branch)
-
return mlink(branch.marshal(), "Cluster", cluster.name)
else:
return none()
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/cumin/python/cumin/widgets.py 2007-10-24 16:49:23 UTC (rev 1158)
@@ -35,13 +35,13 @@
self.__view_mode = mode
def show_view(self, session):
- self.show_mode(session, self.__view_mode)
+ return self.show_mode(session, self.__view_mode)
def set_edit_mode(self, mode):
self.__edit_mode = mode
def show_edit(self, session):
- self.show_mode(session, self.__edit_mode)
+ return self.show_mode(session, self.__edit_mode)
def do_process(self, session, object):
self.page().get_frames(session).append(self)
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-24 16:10:02 UTC (rev 1157)
+++ mgmt/notes/Todo 2007-10-24 16:49:23 UTC (rev 1158)
@@ -96,8 +96,6 @@
* Add a sanity check traversal to the widget tree and to the
registered sets of widgets and parameters
- * Remove legacy show_view methods now that we have set_view_mode
-
* Add more bindings to the demo data
* Add producers to the default exchange
@@ -107,3 +105,5 @@
* 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
More information about the rhmessaging-commits
mailing list