Author: justi9
Date: 2009-04-03 09:59:17 -0400 (Fri, 03 Apr 2009)
New Revision: 3257
Removed:
mgmt/trunk/cumin/python/cumin/brokercluster.py
mgmt/trunk/cumin/python/cumin/brokercluster.strings
mgmt/trunk/cumin/python/cumin/brokerprofile.py
mgmt/trunk/cumin/python/cumin/brokerprofile.strings
mgmt/trunk/cumin/python/cumin/configproperty.py
mgmt/trunk/cumin/python/cumin/realm.py
mgmt/trunk/cumin/python/cumin/realm.strings
mgmt/trunk/cumin/python/cumin/virtualhost.py
mgmt/trunk/cumin/python/cumin/virtualhost.strings
Modified:
mgmt/trunk/cumin/python/cumin/broker.py
mgmt/trunk/cumin/python/cumin/broker.strings
mgmt/trunk/cumin/python/cumin/demo.py
mgmt/trunk/cumin/python/cumin/page.py
mgmt/trunk/cumin/python/cumin/parameters.py
Log:
Remove dead code
Modified: mgmt/trunk/cumin/python/cumin/broker.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/broker.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -4,7 +4,6 @@
from random import random
from psycopg2 import IntegrityError
-from configproperty import *
from queue import *
from exchange import *
from brokerlink import *
@@ -418,8 +417,6 @@
super(BrokerBrowser, self).__init__(app, name)
self.group_tmpl = Template(self, "group_html")
- self.profile_tmpl = Template(self, "profile_html")
- self.cluster_tmpl = Template(self, "cluster_html")
self.brokers = NewBrokerSet(app, "brokers")
self.add_child(self.brokers)
@@ -439,20 +436,6 @@
def render_group_link(self, session, group):
return self._render_filter_link(session, group, self.brokers.group)
- def render_profile_filters(self, session):
- profiles = BrokerProfile.select()
- return self._render_filters(session, profiles, self.profile_tmpl)
-
- def render_profile_link(self, session, profile):
- return self._render_filter_link(session, profile, self.profile)
-
- def render_cluster_filters(self, session):
- clusters = BrokerCluster.select()
- return self._render_filters(session, clusters, self.cluster_tmpl)
-
- def render_cluster_link(self, session, cluster):
- return self._render_filter_link(session, cluster, self.cluster)
-
def _render_filters(self, session, collection, template):
writer = Writer()
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2009-04-03 13:59:17 UTC (rev 3257)
@@ -148,12 +148,6 @@
[BrokerBrowser.group_html]
<li>{group_link}</li>
-[BrokerBrowser.profile_html]
-<li>{profile_link}</li>
-
-[BrokerBrowser.cluster_html]
-<li>{cluster_link}</li>
-
[BrokerSetForm.css]
table.BrokerSetForm td, table.BrokerSetForm th {
padding: 0.25em;
Deleted: mgmt/trunk/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokercluster.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/brokercluster.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -1,170 +0,0 @@
-from mint import *
-from wooly import *
-from wooly.widgets import *
-from random import random
-
-from virtualhost import *
-from broker import *
-from widgets import *
-from parameters import *
-from formats import *
-from util import *
-
-strings = StringCatalog(__file__)
-
-class BrokerClusterSet(ItemSet):
- def render_cluster_add_href(self, session, *args):
- branch = session.branch()
- self.page.show_broker_cluster_add(branch)
- return branch.marshal()
-
- def render_title(self, session, *args):
- return "Broker Clusters %s" %
fmt_count(BrokerCluster.select().count())
-
- def do_get_items(self, session, *args):
- return BrokerCluster.select()
-
- def render_item_link(self, session, cluster):
- branch = session.branch()
- self.page.show_broker_cluster(branch, cluster).show_view(branch)
- return fmt_olink(branch, cluster)
-
- def render_item_config(self, session, cluster):
- return len(cluster.brokers)
-
- def render_item_status(self, session, cluster):
- writer = Writer()
-
- for broker in sorted_by(cluster.brokers):
- writer.write(fmt_ostatus(broker))
-
- return writer.to_string()
-
-class BrokerClusterFrame(CuminFrame):
- def __init__(self, app, name):
- super(BrokerClusterFrame, self).__init__(app, name)
-
- self.object = BrokerClusterParameter(app, "id")
- self.add_parameter(self.object)
-
- view = BrokerClusterView(app, "view")
- self.add_mode(view)
- self.set_view_mode(view)
-
- edit = BrokerClusterEdit(app, "edit")
- self.add_mode(edit)
- self.set_edit_mode(edit)
-
- remove = BrokerClusterRemove(app, "remove")
- self.add_mode(remove)
- self.set_remove_mode(remove)
-
- self.broker = BrokerFrame(app, "broker")
- self.add_mode(self.broker)
-
- def show_broker(self, session, broker):
- self.broker.set_object(session, broker)
- return self.show_mode(session, self.broker)
-
-class BrokerClusterStatus(CuminStatus):
- pass
-
-class BrokerClusterView(CuminView):
- def __init__(self, app, name):
- super(BrokerClusterView, self).__init__(app, name)
-
- self.status = BrokerClusterStatus(app, "status")
- self.add_child(self.status)
-
- self.tabs = TabbedModeSet(app, "tabs")
- self.add_child(self.tabs)
-
- self.tabs.add_tab(self.ClusterBrokerTab(app, "brokers"))
- self.tabs.add_tab(self.ClusterStatsTab(app, "stats"))
-
- class ClusterBrokerTab(BrokerSet):
- def get_args(self, session):
- return self.frame.get_args(session)
-
- def render_title(self, session, cluster):
- return "Brokers %s" % fmt_count(len(cluster.brokers))
-
- def do_get_items(self, session, cluster):
- return cluster.brokers
-
- class ClusterStatsTab(Widget):
- def get_args(self, session):
- return self.frame.get_args(session)
-
- def render_title(self, session, cluster):
- return "Statistics"
-
-class BrokerClusterForm(CuminForm):
- def __init__(self, app, name):
- super(BrokerClusterForm, self).__init__(app, name)
-
- self.cluster_name = StringInput(app, "name")
- self.add_child(self.cluster_name)
-
- def process_cluster(self, session, cluster):
- cluster.name = self.cluster_name.get(session)
-
- branch = session.branch()
- self.page.show_broker_cluster(branch, cluster).show_view(branch)
- self.page.set_redirect_url(session, branch.marshal())
-
-class BrokerClusterAdd(BrokerClusterForm, Frame):
- def render_title(self, session):
- return "Add Cluster"
-
- def process_cancel(self, session):
- branch = session.branch()
- self.page.main.show(branch)
- self.page.set_redirect_url(session, branch.marshal())
-
- def process_submit(self, session):
- cluster = BrokerCluster()
- self.process_cluster(session, cluster)
-
-class BrokerClusterEdit(BrokerClusterForm, Frame):
- def get_args(self, session):
- return self.frame.get_args(session)
-
- def process_cancel(self, session, cluster):
- branch = session.branch()
- self.parent.show_view(branch)
- self.page.set_redirect_url(session, branch.marshal())
-
- def process_submit(self, session, cluster):
- self.process_cluster(session, cluster)
-
- def process_display(self, session, cluster):
- self.cluster_name.set(session, cluster.name)
-
- def render_title(self, session, cluster):
- return "Edit Cluster '%s'" % cluster.name
-
-class BrokerClusterRemove(CuminConfirmForm):
- def get_args(self, session):
- return self.get_args(session)
-
- def process_cancel(self, session, cluster):
- branch = session.branch()
- self.page.show_broker_cluster(branch, cluster).show_view(branch)
- self.page.set_redirect_url(session, branch.marshal())
-
- def process_submit(self, session, cluster):
- cluster.destroySelf()
-
- branch = session.branch()
- self.page.main.show(branch)
- self.page.set_redirect_url(session, branch.marshal())
-
- def render_title(self, session, cluster):
- return "Remove Broker Cluster '%s'" % cluster.name
-
- def render_submit_content(self, session, cluster):
- return "Yes, Remove Broker Cluster '%s'" % cluster.name
-
- def render_cancel_content(self, session, cluster):
- return "No, Cancel"
Deleted: mgmt/trunk/cumin/python/cumin/brokercluster.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokercluster.strings 2009-04-03 11:02:44 UTC (rev
3256)
+++ mgmt/trunk/cumin/python/cumin/brokercluster.strings 2009-04-03 13:59:17 UTC (rev
3257)
@@ -1,107 +0,0 @@
-[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]
-<ul class="actions">
- <li><a class="nav" href="{cluster_add_href}">Add Broker
Cluster</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Name</th>
- <th>Brokers</th>
- <th>Status</th>
- </tr>
-
- {items}
-</table>
-
-[BrokerClusterSet.item_html]
-<tr>
- <td>{item_link}</td>
- <td>{item_config}</td>
- <td>{item_status}</td>
-</tr>
-
-[BrokerClusterSet.broker_html]
-<div class="brokerlight {broker_status}"></div>
-
-[BrokerClusterView.html]
-{status}
-
-<h1><img src="resource?name=cluster-36.png" alt="cluster"
/>{title}</h1>
-
-<table class="props">
- <tr><th>Name</th><td>{name}</td></tr>
- <tr>
- <th class="actions" colspan="2">
- <h2>Act on This Cluster:</h2>
- <a class="nav" href="{edit_href}">Edit</a>
- <a href="{remove_href}">Remove</a>
- <a href="{href}">Start</a>
- <a href="{href}">Stop</a>
- </th>
- </tr>
-</table>
-
-{tabs}
-
-[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>
-
-[BrokerClusterForm.html]
-<form id="{id}" class="mform" method="post"
action="?">
- <div class="head">
- <h1>{title}</h1>
- </div>
- <div class="body">
- <span class="legend">Name</span>
- <fieldset>{name}</fieldset>
-
- {hidden_inputs}
- </div>
- <div class="foot">
- {help}
- {submit}
- {cancel}
- </div>
-</form>
-<script type="text/javascript" defer="defer">
-//<![CDATA[
-(function() {
- var elem = wooly.doc().elembyid("{id}").node.elements[1];
- elem.focus();
- elem.select();
-}())
-//]]>
-</script>
Deleted: mgmt/trunk/cumin/python/cumin/brokerprofile.py
===================================================================
Deleted: mgmt/trunk/cumin/python/cumin/brokerprofile.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerprofile.strings 2009-04-03 11:02:44 UTC (rev
3256)
+++ mgmt/trunk/cumin/python/cumin/brokerprofile.strings 2009-04-03 13:59:17 UTC (rev
3257)
@@ -1,103 +0,0 @@
-[BrokerProfileSet.html]
-<ul class="actions">
- <li><a class="nav" href="{profile_add_href}">Add Broker
Profile</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Name</th>
- </tr>
-
- {items}
-</table>
-
-[BrokerProfileSet.item_html]
-<tr>
- <td>{item_link}</td>
-</tr>
-
-[BrokerProfileView.html]
-<h1><img src="resource?name=profile-36.png" alt="profile"
/> {title}</h1>
-
-<table class="props">
- <tr><th>Name</th><td>{name}</td></tr>
- <tr>
- <th class="actions" colspan="2">
- <h2>Act on This Profile:</h2>
- <a class="nav" href="{edit_href}">Edit</a>
- <a href="{remove_href}">Remove</a>
- </th>
- </tr>
-</table>
-
-{tabs}
-
-[ProfileConfigTab.html]
-<ul class="actions">
- <li><a href="">Add Property</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Name</th>
- <th>Configured Value</th>
- <th></th>
- </tr>
-
- {items}
-</table>
-
-[ProfileConfigTab.item_html]
-<tr>
- <td>{item_name}</td>
- <td>{item_value}</td>
- <td><a class="action"
href="">Edit</a></td>
-</tr>
-
-[ProfileBrokerTab.html]
-<ul class="actions">
- <li><a href="">Apply Profile Configuration to
Brokers</a></li>
-</ul>
-
-<table class="mobjects">
- <tr>
- <th>Name</th>
- <th>Configuration Status</th>
- <th></th>
- </tr>
-
- {items}
-</table>
-
-[ProfileBrokerTab.item_html]
-<tr>
- <td>{item_link}</td>
- <td><a
href="{item_config_href}">{item_config_status}</a></td>
-</tr>
-
-[BrokerProfileForm.html]
-<form id="{id}" class="mform" method="post"
action="?">
- <div class="head">
- <h1>{title}</h1>
- </div>
- <div class="body">
- <span class="legend">Name</span>
- <fieldset>{name}</fieldset>
-
- {hidden_inputs}
- </div>
- <div class="foot">
- {help}
- {submit}
- {cancel}
- </div>
-</form>
-<script type="text/javascript" defer="defer">
-//<![CDATA[
-(function() {
- var elem = wooly.doc().elembyid("{id}").node.elements[1];
- elem.focus();
- elem.select();
-}())
-//]]>
-</script>
Deleted: mgmt/trunk/cumin/python/cumin/configproperty.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/configproperty.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/configproperty.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -1,16 +0,0 @@
-from wooly import *
-from wooly.widgets import *
-
-from widgets import *
-from parameters import *
-from util import *
-
-class ConfigPropertySet(ItemSet):
- def do_get_items(self, session, *args):
- return sorted_by(model.get_config_properties())
-
- def render_item_name(self, session, prop):
- return prop.name
-
- def render_item_value(self, session, prop):
- return prop.value
Modified: mgmt/trunk/cumin/python/cumin/demo.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/demo.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/demo.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -21,20 +21,6 @@
CollectorRegistration(name="main", collectorId="main")
- #profiles = list()
-
- #for name in ("4S Xserve", "2S ProLiant"):
- # profile = BrokerProfile(name=name)
- # profiles.append(profile)
-
- # self.load_props(profile)
-
- #clusters = list()
-
- #for cluster_count in range(3):
- # cluster = BrokerCluster(name=fmt("cluster", cluster_count))
- # clusters.append(cluster)
-
def load_props(self, obj):
prop = ConfigProperty()
prop.name = "max_threads"
Modified: mgmt/trunk/cumin/python/cumin/page.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/page.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -337,8 +337,6 @@
self.add_tab(BrokerBrowser(app, "brokers"))
self.add_tab(BrokerGroupSet(app, "groups"))
- #self.add_tab(BrokerProfileSet(app, "profiles"))
- #self.add_tab(BrokerClusterSet(app, "clusters"))
class Heading(CuminHeading):
def render_title(self, session):
Modified: mgmt/trunk/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/parameters.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/parameters.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -19,13 +19,6 @@
def do_marshal(self, cls):
return cls.cumin_name
-class BrokerClusterParameter(Parameter):
- def do_unmarshal(self, string):
- return BrokerCluster.get(int(string))
-
- def do_marshal(self, cluster):
- return str(cluster.id)
-
class BrokerGroupParameter(Parameter):
def do_unmarshal(self, string):
if string == "__none__":
@@ -55,13 +48,6 @@
def do_marshal(self, broker):
return str(broker.id)
-class BrokerProfileParameter(Parameter):
- def do_unmarshal(self, string):
- return BrokerProfile.get(int(string))
-
- def do_marshal(self, profile):
- return str(profile.id)
-
class ConnectionParameter(Parameter):
def do_unmarshal(self, string):
return ClientConnection.get(int(string))
@@ -183,10 +169,3 @@
def do_marshal(self, session):
return str(session.id)
-
-class VirtualHostParameter(Parameter):
- def do_unmarshal(self, string):
- return Vhost.get(int(string))
-
- def do_marshal(self, vhost):
- return str(vhost.id)
Deleted: mgmt/trunk/cumin/python/cumin/realm.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/realm.py 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/realm.py 2009-04-03 13:59:17 UTC (rev 3257)
@@ -1,40 +0,0 @@
-from wooly import *
-from wooly.widgets import *
-from wooly.forms import *
-from wooly.resources import *
-
-from widgets import *
-from parameters import *
-from util import *
-
-strings = StringCatalog(__file__)
-
-class RealmSet(ItemSet):
- def render_title(self, session, vhost):
- return "Realms %s" % fmt_count(len(vhost.realm_items()))
-
- def do_get_items(self, session, vhost):
- return sorted_by(vhost.realm_items())
-
- def render_item_name(self, session, realm):
- return realm.name
-
-class RealmInputSet(CheckboxInputSet):
- def __init__(self, app, name):
- super(RealmInputSet, self).__init__(app, name)
-
- param = ListParameter(app, "param", RealmParameter(app,
"item"))
- self.add_parameter(param)
- self.set_parameter(param)
-
- def do_get_items(self, session, vhost):
- return sorted_by(vhost.realm_items())
-
- def render_item_value(self, session, realm):
- return realm.id
-
- def render_item_content(self, session, realm):
- return realm.name
-
- def render_item_checked_attr(self, session, realm):
- return realm in self.param.get(session) and
"checked=\"checked\""
Deleted: mgmt/trunk/cumin/python/cumin/realm.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/realm.strings 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/realm.strings 2009-04-03 13:59:17 UTC (rev 3257)
@@ -1,13 +0,0 @@
-[RealmInputSet.item_html]
-<div class="field">
- <input type="checkbox" name="{name}"
value="{item_value}" tabindex="{tab_index}" {item_checked_attr}/>
- {item_content}
-</div>
-
-[RealmSet.html]
-<ul class="RealmSet mobjects">{items}</ul>
-
-[RealmSet.item_html]
-<li>
- <strong><a
href="{item_href}">{item_name}</a></strong>
-</li>
Deleted: mgmt/trunk/cumin/python/cumin/virtualhost.py
===================================================================
Deleted: mgmt/trunk/cumin/python/cumin/virtualhost.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/virtualhost.strings 2009-04-03 11:02:44 UTC (rev 3256)
+++ mgmt/trunk/cumin/python/cumin/virtualhost.strings 2009-04-03 13:59:17 UTC (rev 3257)
@@ -1,34 +0,0 @@
-[VirtualHostSet.html]
-<table class="VirtualHostSet mobjects">
- <tr>
- <th>Functional Host</th>
- <th>Configuration</th>
- <th>Status</th>
- </tr>
-
- {items}
-</table>
-
-[VirtualHostSet.item_html]
-<tr>
- <td>{item_link}</td>
- <td>10 queues, 5 exchanges</td>
- <td>2 errors, 10 warnings</td>
-</tr>
-
-[VirtualHostView.html]
-<div class="mstatus green" id="{id}">
- <h2>Functional Host Status</h2>
-
- <div>0 errors, 0 warnings</div>
-</div>
-
-<h1>{title}</h1>
-
-<table class="props">
- <tr><th>Name</th><td>{name}</td></tr>
- <tr><th>Broker</th><td>{broker_link}</td></tr>
- <tr><th>Cluster</th><td>{cluster_link}</td></tr>
-</table>
-
-{tabs}