[rhmessaging-commits] rhmessaging commits: r1157 - in mgmt: notes and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Oct 24 12:10:02 EDT 2007
Author: justi9
Date: 2007-10-24 12:10:02 -0400 (Wed, 24 Oct 2007)
New Revision: 1157
Added:
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/brokercluster.strings
Removed:
mgmt/cumin/python/cumin/cluster.py
mgmt/cumin/python/cumin/cluster.strings
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/cumin/python/cumin/broker.strings
mgmt/cumin/python/cumin/demo.py
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/parameters.py
mgmt/cumin/python/cumin/virtualhost.py
mgmt/cumin/python/cumin/virtualhost.strings
mgmt/notes/Todo
Log:
Renames cluster to broker cluster in order to be more consistent and
to avoid any possible conflict in the future with clusters of other
things such as systems.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/broker.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -46,11 +46,11 @@
return none()
def render_item_cluster_link(self, session, broker):
- cluster = broker.get_cluster()
+ cluster = broker.get_broker_cluster()
if cluster:
branch = session.branch()
- self.page().show_cluster(branch, cluster).show_view(branch)
+ self.page().show_broker_cluster(branch, cluster).show_view(branch)
return mlink(branch.marshal(), "Cluster", cluster.name)
else:
@@ -235,11 +235,11 @@
return broker.name
def render_cluster_link(self, session, broker):
- cluster = broker.get_cluster()
+ cluster = broker.get_broker_cluster()
if cluster:
branch = session.branch()
- self.page().show_cluster(branch, cluster).show_view(branch)
+ self.page().show_broker_cluster(branch, cluster).show_view(branch)
html = mlink(branch.marshal(), "Cluster", cluster.name)
else:
html = none()
@@ -317,7 +317,7 @@
self.profile = BrokerProfileParameter(app, "profile")
self.add_parameter(self.profile)
- self.cluster = ClusterParameter(app, "cluster")
+ self.cluster = BrokerClusterParameter(app, "cluster")
self.add_parameter(self.cluster)
self.brokers = self.BrowserBrokers(app, "brokers")
@@ -340,7 +340,7 @@
except ValueError:
pass
- if cluster and cluster is not broker.get_cluster():
+ if cluster and cluster is not broker.get_broker_cluster():
try:
brokers.remove(broker)
except ValueError:
@@ -373,7 +373,7 @@
return self._render_filter_link(session, profile, self.profile)
def render_cluster_filters(self, session, model):
- clusters = sorted_by(model.get_clusters())
+ clusters = sorted_by(model.get_broker_clusters())
return self._render_filters(session, clusters, self.cluster_tmpl)
def render_cluster_link(self, session, cluster):
Modified: mgmt/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/cumin/python/cumin/broker.strings 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/broker.strings 2007-10-24 16:10:02 UTC (rev 1157)
@@ -149,7 +149,7 @@
<dl class="properties">
<dt>Name</dt><dd>{name}</dd>
- <dt>Cluster</dt><dd>{cluster_link}</dd>
+ <dt>Broker Cluster</dt><dd>{cluster_link}</dd>
<dt>Broker Profile</dt><dd>{profile_link}</dd>
<dt>Software Version</dt><dd>{version}</dd>
</dl>
Copied: mgmt/cumin/python/cumin/brokercluster.py (from rev 1155, mgmt/cumin/python/cumin/cluster.py)
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py (rev 0)
+++ mgmt/cumin/python/cumin/brokercluster.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -0,0 +1,106 @@
+from wooly import *
+from wooly.widgets import *
+from random import random
+
+from virtualhost import *
+from broker import *
+from widgets import *
+from parameters import *
+from util import *
+
+strings = StringCatalog(__file__)
+
+class BrokerClusterSet(ItemSet):
+ def __init__(self, app, name):
+ super(BrokerClusterSet, self).__init__(app, name)
+
+ self.broker_tmpl = Template(self, "broker_html")
+
+ def render_title(self, session, model):
+ return "Broker Clusters (%i)" % len(model.get_broker_clusters())
+
+ def get_items(self, session, model):
+ return sorted_by(model.get_broker_clusters())
+
+ 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):
+ writer = Writer()
+
+ for broker in sorted_by(cluster.broker_items()):
+ self.broker_tmpl.render(session, broker, writer)
+
+ return writer.to_string()
+
+ def render_broker_status(self, session, broker):
+ return random() < 0.25 and "red" or "green"
+
+class BrokerClusterFrame(CuminFrame):
+ def __init__(self, app, name):
+ super(BrokerClusterFrame, self).__init__(app, name)
+
+ self.param = BrokerClusterParameter(app, "id")
+ self.add_parameter(self.param)
+ self.set_object_parameter(self.param)
+
+ self.view = BrokerClusterView(app, "view")
+ self.add_mode(self.view)
+
+ self.broker = BrokerFrame(app, "broker")
+ self.add_mode(self.broker)
+
+ 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)
+
+ def show_virtual_host(self, session, vhost):
+ self.vhost.set_object(session, vhost)
+ return self.show_mode(session, self.vhost)
+
+ def render_title(self, session, cluster):
+ return "Broker Cluster '%s'" % cluster.name
+
+class BrokerClusterView(Widget):
+ def __init__(self, app, name):
+ super(BrokerClusterView, self).__init__(app, name)
+
+ self.tabs = TabSet(app, "tabs")
+ self.add_child(self.tabs)
+
+ self.tabs.add_tab(self.ClusterBrokerTab(app, "brokers"))
+ self.tabs.add_tab(self.ClusterVirtualHostTab(app, "vhosts"))
+ self.tabs.add_tab(self.ClusterStatsTab(app, "stats"))
+
+ def render_title(self, session, cluster):
+ return "Broker Cluster '%s'" % cluster.name
+
+ def render_name(self, session, cluster):
+ return cluster.name
+
+ class ClusterBrokerTab(BrokerSet):
+ def render_title(self, session, cluster):
+ return "Brokers (%i)" % len(cluster.broker_items())
+
+ def get_items(self, session, cluster):
+ return sorted_by(cluster.broker_items())
+
+ class ClusterVirtualHostTab(VirtualHostSet):
+ def render_title(self, session, cluster):
+ return "Functional Hosts (%i)" % len(cluster.virtual_host_items())
+
+ def get_items(self, session, cluster):
+ return sorted_by(cluster.virtual_host_items())
+
+ class ClusterStatsTab(Widget):
+ def render_title(self, session, cluster):
+ return "Statistics"
Copied: mgmt/cumin/python/cumin/brokercluster.strings (from rev 1155, mgmt/cumin/python/cumin/cluster.strings)
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.strings (rev 0)
+++ mgmt/cumin/python/cumin/brokercluster.strings 2007-10-24 16:10:02 UTC (rev 1157)
@@ -0,0 +1,102 @@
+[BrokerClusterSet.css]
+div.brokerlight {
+ float: left;
+ width: 1em;
+ height: 1em;
+ margin: 0.25em 1px 0 0;
+ padding: 0;
+ background-color: #6f6;
+}
+
+div.brokerlight.red {
+ background-color: red;
+}
+
+[BrokerClusterSet.html]
+<table class="BrokerClusterSet mobjects">
+ <tr>
+ <th>Broker Cluster</th>
+ <th>Configuration</th>
+ <th>Status</th>
+ </tr>
+
+ {items}
+</table>
+
+[BrokerClusterSet.item_html]
+<tr>
+ <td>{item_link}</td>
+ <td>3 brokers</td>
+ <td>
+ <div>0 errors, 0 warnings</div>
+ <div>{item_broker_lights}</div>
+ </td>
+</tr>
+
+[BrokerClusterSet.broker_html]
+<div class="brokerlight {broker_status}"></div>
+
+[BrokerClusterView.html]
+<div class="mstatus green" id="{id}">
+ <h2>Broker Cluster Status</h2>
+
+ <div>0 errors, 0 warnings</div>
+</div>
+
+<h1>{title}</h1>
+
+<dl class="properties">
+ <dt>Name</dt><dd>{name}</dd>
+</dl>
+
+<ul class="actions">
+ <li><a href="">Shutdown This Cluster</a></li>
+</ul>
+
+{tabs}
+
+[ClusterBrokerTab.html]
+<ul class="actions">
+ <li><a href="{add_broker_href}">Add Broker</a></li>
+</ul>
+
+<table class="mobjects">
+ <tr>
+ <th>Broker</th>
+ <th>Profile</th>
+ <th>Status</th>
+ <th>Load</th>
+ </tr>
+
+ {items}
+</table>
+
+[ClusterBrokerTab.item_html]
+<tr>
+ <td>{item_link}</td>
+ <td>{item_profile_link}</td>
+ <td>{item_status}</td>
+ <td>{item_load}</td>
+</tr>
+
+[ClusterVirtualHostTab.html]
+<ul class="actions">
+ <li><a href="">Add Functional Host</a></li>
+</ul>
+
+<table class="mobjects">
+ <tr>
+ <th>Functional Host</th>
+ <th>Configuration</th>
+ <th></th>
+ </tr>
+
+ {items}
+</table>
+
+[ClusterVirtualHostTab.item_html]
+<tr>
+ <td>{item_link}</td>
+ <td>10 queues, 5 exchanges</td>
+ <td><a class="action" href="">Remove</a></td>
+</tr>
Deleted: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -1,106 +0,0 @@
-from wooly import *
-from wooly.widgets import *
-from random import random
-
-from virtualhost import *
-from broker import *
-from widgets import *
-from parameters import *
-from util import *
-
-strings = StringCatalog(__file__)
-
-class ClusterSet(ItemSet):
- def __init__(self, app, name):
- super(ClusterSet, self).__init__(app, name)
-
- self.broker_tmpl = Template(self, "broker_html")
-
- def render_title(self, session, model):
- return "Clusters (%i)" % len(model.get_clusters())
-
- def get_items(self, session, model):
- return sorted_by(model.get_clusters())
-
- def render_item_link(self, session, cluster):
- branch = session.branch()
- self.page().show_cluster(branch, cluster).show_view(branch)
-
- return mlink(branch.marshal(), "Cluster", cluster.name)
-
- def render_item_broker_lights(self, session, cluster):
- writer = Writer()
-
- for broker in sorted_by(cluster.broker_items()):
- self.broker_tmpl.render(session, broker, writer)
-
- return writer.to_string()
-
- def render_broker_status(self, session, broker):
- return random() < 0.25 and "red" or "green"
-
-class ClusterFrame(CuminFrame):
- def __init__(self, app, name):
- super(ClusterFrame, self).__init__(app, name)
-
- self.param = ClusterParameter(app, "id")
- self.add_parameter(self.param)
- self.set_object_parameter(self.param)
-
- self.view = ClusterView(app, "view")
- self.add_mode(self.view)
-
- self.broker = BrokerFrame(app, "broker")
- self.add_mode(self.broker)
-
- 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)
-
- def show_virtual_host(self, session, vhost):
- self.vhost.set_object(session, vhost)
- return self.show_mode(session, self.vhost)
-
- def render_title(self, session, cluster):
- return "Cluster '%s'" % cluster.name
-
-class ClusterView(Widget):
- def __init__(self, app, name):
- super(ClusterView, self).__init__(app, name)
-
- self.tabs = TabSet(app, "tabs")
- self.add_child(self.tabs)
-
- self.tabs.add_tab(self.ClusterBrokerTab(app, "brokers"))
- self.tabs.add_tab(self.ClusterVirtualHostTab(app, "vhosts"))
- self.tabs.add_tab(self.ClusterStatsTab(app, "stats"))
-
- def render_title(self, session, cluster):
- return "Cluster '%s'" % cluster.name
-
- def render_name(self, session, cluster):
- return cluster.name
-
- class ClusterBrokerTab(BrokerSet):
- def render_title(self, session, cluster):
- return "Brokers (%i)" % len(cluster.broker_items())
-
- def get_items(self, session, cluster):
- return sorted_by(cluster.broker_items())
-
- class ClusterVirtualHostTab(VirtualHostSet):
- def render_title(self, session, cluster):
- return "Functional Hosts (%i)" % len(cluster.virtual_host_items())
-
- def get_items(self, session, cluster):
- return sorted_by(cluster.virtual_host_items())
-
- class ClusterStatsTab(Widget):
- def render_title(self, session, cluster):
- return "Statistics"
Deleted: mgmt/cumin/python/cumin/cluster.strings
===================================================================
--- mgmt/cumin/python/cumin/cluster.strings 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/cluster.strings 2007-10-24 16:10:02 UTC (rev 1157)
@@ -1,102 +0,0 @@
-[ClusterSet.css]
-div.brokerlight {
- float: left;
- width: 1em;
- height: 1em;
- margin: 0.25em 1px 0 0;
- padding: 0;
- background-color: #6f6;
-}
-
-div.brokerlight.red {
- background-color: red;
-}
-
-[ClusterSet.html]
-<table class="ClusterSet mobjects">
- <tr>
- <th>Cluster</th>
- <th>Configuration</th>
- <th>Status</th>
- </tr>
-
- {items}
-</table>
-
-[ClusterSet.item_html]
-<tr>
- <td>{item_link}</td>
- <td>3 brokers</td>
- <td>
- <div>0 errors, 0 warnings</div>
- <div>{item_broker_lights}</div>
- </td>
-</tr>
-
-[ClusterSet.broker_html]
-<div class="brokerlight {broker_status}"></div>
-
-[ClusterView.html]
-<div class="mstatus green" id="{id}">
- <h2>Cluster Status</h2>
-
- <div>0 errors, 0 warnings</div>
-</div>
-
-<h1>{title}</h1>
-
-<dl class="properties">
- <dt>Name</dt><dd>{name}</dd>
-</dl>
-
-<ul class="actions">
- <li><a href="">Shutdown This Cluster</a></li>
-</ul>
-
-{tabs}
-
-[ClusterBrokerTab.html]
-<ul class="actions">
- <li><a href="{add_broker_href}">Add Broker</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Broker</th>
- <th>Profile</th>
- <th>Status</th>
- <th>Load</th>
- </tr>
-
- {items}
-</table>
-
-[ClusterBrokerTab.item_html]
-<tr>
- <td>{item_link}</td>
- <td>{item_profile_link}</td>
- <td>{item_status}</td>
- <td>{item_load}</td>
-</tr>
-
-[ClusterVirtualHostTab.html]
-<ul class="actions">
- <li><a href="">Add Functional Host</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Functional Host</th>
- <th>Configuration</th>
- <th></th>
- </tr>
-
- {items}
-</table>
-
-[ClusterVirtualHostTab.item_html]
-<tr>
- <td>{item_link}</td>
- <td>10 queues, 5 exchanges</td>
- <td><a class="action" href="">Remove</a></td>
-</tr>
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -53,18 +53,18 @@
clusters = list()
for cluster_count in range(3):
- cluster = Cluster(self.model)
+ cluster = BrokerCluster(self.model)
cluster.name = fmt("cluster", cluster_count)
clusters.append(cluster)
vhost = VirtualHost(self.model)
vhost.name = "default"
- vhost.set_cluster(cluster)
+ vhost.set_broker_cluster(cluster)
for name in ("test", "devel"):
vhost = VirtualHost(self.model)
vhost.name = name
- vhost.set_cluster(cluster)
+ vhost.set_broker_cluster(cluster)
self.load_vhost(vhost)
@@ -76,7 +76,7 @@
index = broker_count % 4
if index < 3:
- broker.set_cluster(clusters[index])
+ broker.set_broker_cluster(clusters[index])
index = broker_count % 3
if index < 2:
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/model.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -5,8 +5,8 @@
def __init__(self):
super(CuminModel, self).__init__()
- self.cluster = ModelClass(self, "cluster")
self.broker = ModelClass(self, "broker")
+ self.broker_cluster = ModelClass(self, "broker_cluster")
self.broker_profile = ModelClass(self, "broker_profile")
self.config_property = ModelClass(self, "config_property")
self.broker_group = ModelClass(self, "broker_group")
@@ -22,9 +22,9 @@
self.realm = ModelClass(self, "realm")
self.binding = ModelClass(self, "binding")
- assoc = ModelAssociation(self, "cluster_to_brokers")
- assoc.add_endpoint(self.broker, "cluster", "0..1")
- assoc.add_endpoint(self.cluster, "broker", "0..n")
+ assoc = ModelAssociation(self, "broker_cluster_to_brokers")
+ assoc.add_endpoint(self.broker, "broker_cluster", "0..1")
+ assoc.add_endpoint(self.broker_cluster, "broker", "0..n")
assoc = ModelAssociation(self, "broker_profile_to_brokers")
assoc.add_endpoint(self.broker, "broker_profile", "0..1")
@@ -34,9 +34,9 @@
assoc.add_endpoint(self.config_property, "broker_profile", "0..1")
assoc.add_endpoint(self.broker_profile, "config_property", "0..n")
- assoc = ModelAssociation(self, "cluster_to_virtual_hosts")
- assoc.add_endpoint(self.virtual_host, "cluster", "0..1")
- assoc.add_endpoint(self.cluster, "virtual_host", "0..n")
+ assoc = ModelAssociation(self, "broker_cluster_to_virtual_hosts")
+ assoc.add_endpoint(self.virtual_host, "broker_cluster", "0..1")
+ assoc.add_endpoint(self.broker_cluster, "virtual_host", "0..n")
assoc = ModelAssociation(self, "broker_to_config_properties")
assoc.add_endpoint(self.config_property, "broker", "0..1")
@@ -111,11 +111,11 @@
assoc.add_endpoint(self.exchange, "binding", "0..n")
assoc.add_endpoint(self.binding, "exchange", "0..1")
- def get_cluster(self, id):
- return self.get_index(self.cluster).get(id)
+ def get_broker_cluster(self, id):
+ return self.get_index(self.broker_cluster).get(id)
- def get_clusters(self):
- return self.get_index(self.cluster).values()
+ def get_broker_clusters(self):
+ return self.get_index(self.broker_cluster).values()
def get_broker(self, id):
return self.get_index(self.broker).get(id)
@@ -152,7 +152,7 @@
def get_virtual_host_templates(self):
return [i for i in self.get_virtual_hosts() \
- if not i.get_cluster() and not i.get_broker()]
+ if not i.get_cluster() and not i.get_broker_cluster()]
def get_virtual_host_group(self, id):
return self.get_index(self.virtual_host_group).get(id)
@@ -186,9 +186,9 @@
if measure.name == name:
return measure
-class Cluster(ModelObject):
+class BrokerCluster(ModelObject):
def __init__(self, model):
- super(Cluster, self).__init__(model, model.cluster)
+ super(BrokerCluster, self).__init__(model, model.broker_cluster)
self.name = None
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/page.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -5,7 +5,7 @@
from broker import *
from brokergroup import *
from brokerprofile import *
-from cluster import *
+from brokercluster import *
from widgets import *
from util import *
@@ -41,7 +41,7 @@
self.profile = BrokerProfileFrame(app, "profile")
self.add_mode(self.profile)
- self.cluster = ClusterFrame(app, "cluster")
+ self.cluster = BrokerClusterFrame(app, "cluster")
self.add_mode(self.cluster)
def save_session(self, session):
@@ -66,10 +66,10 @@
return self.show_mode(session, self.view)
def show_broker(self, session, broker):
- cluster = broker.get_cluster()
+ cluster = broker.get_broker_cluster()
if cluster:
- frame = self.show_cluster(session, cluster)
+ frame = self.show_broker_cluster(session, cluster)
frame = frame.show_broker(session, broker)
else:
frame = self.show_mode(session, self.broker)
@@ -86,7 +86,7 @@
frame = self.show_mode(session, self.group_add)
return self.set_current_frame(session, frame)
- def show_cluster(self, session, cluster):
+ def show_broker_cluster(self, session, cluster):
frame = self.show_mode(session, self.cluster)
frame.set_object(session, cluster)
return self.set_current_frame(session, frame)
@@ -98,12 +98,12 @@
def show_virtual_host(self, session, vhost):
broker = vhost.get_broker()
- cluster = vhost.get_cluster()
+ cluster = vhost.get_broker_cluster()
if broker:
frame = self.show_broker(session, broker)
elif cluster:
- frame = self.show_cluster(session, cluster)
+ frame = self.show_broker_cluster(session, cluster)
else:
raise Exception()
@@ -166,7 +166,7 @@
self.add_tab(self.BrokerTab(app, "brokers"))
self.add_tab(BrokerGroupSet(app, "groups"))
self.add_tab(self.BrokerProfileTab(app, "profiles"))
- self.add_tab(self.ClusterTab(app, "clusters"))
+ self.add_tab(self.BrokerClusterTab(app, "clusters"))
self.add_tab(self.TagTab(app, "tags"))
def show_broker_group(self, session, group):
@@ -185,9 +185,9 @@
def render_title(self, session, model):
return "Broker Profiles (%i)" % len(model.get_broker_profiles())
- class ClusterTab(ClusterSet):
+ class BrokerClusterTab(BrokerClusterSet):
def render_title(self, session, model):
- return "Clusters (%i)" % len(model.get_clusters())
+ return "Broker Clusters (%i)" % len(model.get_broker_clusters())
class TagTab(Widget):
def render_title(self, session, model):
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-24 16:10:02 UTC (rev 1157)
@@ -383,7 +383,7 @@
margin: 0 0 1em 0;
}
-.ClusterBrowser.groups h2 {
+.BrokerClusterBrowser.groups h2 {
color: #564979;
font-size: 0.9em;
border-bottom: 1px dotted #ddd;
@@ -443,14 +443,8 @@
[MainView.html]
<div class="oblock">
- <div class="mstatus green" id="{id}">
- <div>0 errors, 0 warnings</div>
- </div>
-
<h1>{title}</h1>
- <br/>
-
<ul class="TabSet tabs">{tabs}</ul>
<div class="TabSet mode">{mode}</div>
</div>
@@ -468,14 +462,14 @@
{items}
</table>
-[ClusterTab.html]
+[BrokerClusterTab.html]
<ul class="actions">
- <li><a href="">Add Cluster</a></li>
+ <li><a href="">Add Broker Cluster</a></li>
</ul>
-<table class="ClusterSet mobjects">
+<table class="BrokerClusterSet mobjects">
<tr>
- <th>Cluster</th>
+ <th>Broker Cluster</th>
<th>Configuration</th>
<th>Status</th>
</tr>
Modified: mgmt/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/cumin/python/cumin/parameters.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/parameters.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -1,5 +1,12 @@
from wooly import *
+class BrokerClusterParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_broker_cluster(int(string))
+
+ def do_marshal(self, cluster):
+ return str(cluster.id)
+
class BrokerGroupParameter(Parameter):
def do_unmarshal(self, string):
return self.app.model.get_broker_group(int(string))
@@ -28,13 +35,6 @@
def do_marshal(self, client):
return str(client.id)
-class ClusterParameter(Parameter):
- def do_unmarshal(self, string):
- return self.app.model.get_cluster(int(string))
-
- def do_marshal(self, cluster):
- return str(cluster.id)
-
class ConfigPropertyParameter(Parameter):
def do_unmarshal(self, string):
return self.app.model.get_config_property(int(string))
Modified: mgmt/cumin/python/cumin/virtualhost.py
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.py 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/virtualhost.py 2007-10-24 16:10:02 UTC (rev 1157)
@@ -89,12 +89,12 @@
else:
return none()
- def render_cluster(self, session, vhost):
- cluster = vhost.get_cluster()
+ def render_broker_cluster(self, session, vhost):
+ cluster = vhost.get_broker_cluster()
if cluster:
branch = session.branch()
- self.page().show_cluster(branch, cluster).show_view(branch)
+ self.page().show_broker_cluster(branch, cluster).show_view(branch)
return mlink(branch.marshal(), "Cluster", cluster.name)
else:
Modified: mgmt/cumin/python/cumin/virtualhost.strings
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.strings 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/cumin/python/cumin/virtualhost.strings 2007-10-24 16:10:02 UTC (rev 1157)
@@ -29,7 +29,7 @@
<dl class="properties">
<dt>Name</dt><dd>{name}</dd>
<dt>Broker</dt><dd>{broker}</dd>
- <dt>Cluster</dt><dd>{cluster}</dd>
+ <dt>Broker Cluster</dt><dd>{broker_cluster}</dd>
</dl>
{tabs}
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-24 15:38:06 UTC (rev 1156)
+++ mgmt/notes/Todo 2007-10-24 16:10:02 UTC (rev 1157)
@@ -107,6 +107,3 @@
* exch: link bindings, producers stats to respective views
* model: get rid of the old *_count stat fields and use the new ones
-
- * Rename cluster to broker cluster, to avoid any future conflicts
- with system clusters
More information about the rhmessaging-commits
mailing list