rhmessaging commits: r1078 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 17:13:51 -0400 (Mon, 15 Oct 2007)
New Revision: 1078
Modified:
mgmt/cumin/python/cumin/demo.py
Log:
Adds server profiles to the demo data.
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-15 20:57:52 UTC (rev 1077)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-15 21:13:51 UTC (rev 1078)
@@ -34,6 +34,15 @@
sgroup.set_type(sgtypes["Department"])
sgroups[name] = sgroup
+ sprofiles = list()
+
+ for name in ("4S Xserve", "2S ProLiant"):
+ sprofile = ServerProfile(self.model)
+ sprofile.name = name
+ sprofiles.append(sprofile)
+
+ self.load_props(sprofile)
+
# vhost templates
for name in ("test", "devel"):
vhost = VirtualHost(self.model)
@@ -63,25 +72,16 @@
server = Server(self.model)
server.name = fmt("server", server_count)
- prop = ConfigProperty(self.model)
- prop.name = "max_threads"
- prop.value = 1000
- server.add_config_property(prop)
+ self.load_props(server)
- prop = ConfigProperty(self.model)
- prop.name = "max_memory"
- prop.value = 1000000
- server.add_config_property(prop)
-
- prop = ConfigProperty(self.model)
- prop.name = "ssl_enabled"
- prop.value = True
- server.add_config_property(prop)
-
index = server_count % 4
if index < 3:
server.set_cluster(clusters[index])
+ index = server_count % 3
+ if index < 2:
+ server.set_server_profile(sprofiles[index])
+
if server_count % 2:
sgroups["East Coast"].add_server(server)
else:
@@ -105,6 +105,22 @@
for vhost in server.virtual_host_items():
self.load_vhost(vhost)
+ def load_props(self, obj):
+ prop = ConfigProperty(self.model)
+ prop.name = "max_threads"
+ prop.value = 1000
+ obj.add_config_property(prop)
+
+ prop = ConfigProperty(self.model)
+ prop.name = "max_memory"
+ prop.value = 1000000
+ obj.add_config_property(prop)
+
+ prop = ConfigProperty(self.model)
+ prop.name = "ssl_enabled"
+ prop.value = True
+ obj.add_config_property(prop)
+
def load_vhost(self, vhost):
for name in ("realm0", "realm1", "realm2"):
realm = Realm(self.model)
17 years, 2 months
rhmessaging commits: r1077 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 16:57:52 -0400 (Mon, 15 Oct 2007)
New Revision: 1077
Modified:
mgmt/cumin/python/cumin/model.py
Log:
Adds server profiles to the demo model.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-15 20:57:02 UTC (rev 1076)
+++ mgmt/cumin/python/cumin/model.py 2007-10-15 20:57:52 UTC (rev 1077)
@@ -7,6 +7,7 @@
self.cluster = ModelClass(self, "cluster")
self.server = ModelClass(self, "server")
+ self.server_profile = ModelClass(self, "server_profile")
self.config_property = ModelClass(self, "config_property")
self.server_group = ModelClass(self, "server_group")
self.server_group_type = ModelClass(self, "server_group_type")
@@ -21,6 +22,14 @@
assoc.add_endpoint(self.server, "cluster", "0..1")
assoc.add_endpoint(self.cluster, "server", "0..n")
+ assoc = ModelAssociation(self, "server_profile_to_servers")
+ assoc.add_endpoint(self.server, "server_profile", "0..1")
+ assoc.add_endpoint(self.server_profile, "server", "0..n")
+
+ assoc = ModelAssociation(self, "server_profile_to_config_properties")
+ assoc.add_endpoint(self.config_property, "server_profile", "0..1")
+ assoc.add_endpoint(self.server_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")
@@ -94,6 +103,12 @@
def get_servers(self):
return self.get_index(self.server).values()
+ def get_server_profile(self, id):
+ return self.get_index(self.server_profile).get(id)
+
+ def get_server_profiles(self):
+ return self.get_index(self.server_profile).values()
+
def get_server_group(self, id):
return self.get_index(self.server_group).get(id)
@@ -158,6 +173,12 @@
writer.write("</server>")
+class ServerProfile(ModelObject):
+ def __init__(self, model):
+ super(ServerProfile, self).__init__(model, model.server_profile)
+
+ self.name = None
+
class ConfigProperty(ModelObject):
def __init__(self, model):
super(ConfigProperty, self).__init__(model, model.config_property)
17 years, 2 months
rhmessaging commits: r1076 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 16:57:02 -0400 (Mon, 15 Oct 2007)
New Revision: 1076
Modified:
mgmt/cumin/python/cumin/server.strings
Log:
Small tweak to link text.
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-15 20:10:11 UTC (rev 1075)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-15 20:57:02 UTC (rev 1076)
@@ -17,7 +17,7 @@
[ServerConfigPropertySet.html]
<ul class="actions">
- <li><a href="">Apply Current Values to This Server</a></li>
+ <li><a href="">Apply Configuration to This Server</a></li>
</ul>
<table class="mobjects">
17 years, 2 months
rhmessaging commits: r1075 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 16:10:11 -0400 (Mon, 15 Oct 2007)
New Revision: 1075
Modified:
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Adds text boxes with values to the property edit form.
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-15 19:35:52 UTC (rev 1074)
+++ mgmt/cumin/python/cumin/server.py 2007-10-15 20:10:11 UTC (rev 1075)
@@ -132,16 +132,25 @@
self.profile.set_value("profile")
self.add_child(self.profile)
+ self.pvalue = TextInput(app, "profile_value", self)
+ self.add_child(self.pvalue)
+
self.server = RadioInput(app, "server", self)
self.server.set_parameter(self.source)
self.server.set_value("server")
self.add_child(self.server)
+ self.svalue = TextInput(app, "server_value", self)
+ self.add_child(self.svalue)
+
self.local = RadioInput(app, "local", self)
self.local.set_parameter(self.source)
self.local.set_value("local")
self.add_child(self.local)
+ self.lvalue = TextInput(app, "local_value", self)
+ self.add_child(self.lvalue)
+
def get_object(self, session, object):
return self.param.get(session)
@@ -154,6 +163,21 @@
frame.show_view(branch)
session.set_redirect(branch.marshal())
+ def process_submit(self, session, prop):
+ if self.source.get(session) == "profile":
+ prop.value = self.pvalue.get(session)
+ elif self.source.get(session) == "server":
+ prop.value = self.svalue.get(session)
+ elif self.source.get(session) == "local":
+ prop.value = self.lvalue.get(session)
+ else:
+ raise Exception()
+
+ self.process_cancel(session, prop)
+
+ def process_display(self, session, prop):
+ self.lvalue.set(session, prop.value)
+
def render_title(self, session, prop):
return "Edit Property '%s'" % prop.name
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-15 19:35:52 UTC (rev 1074)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-15 20:10:11 UTC (rev 1075)
@@ -41,8 +41,13 @@
<td><a class="action" href="{item_edit_href}">Edit</a></td>
</tr>
+[ServerConfigPropertyForm.css]
+.ServerConfigPropertyForm div.value {
+ margin: 1em 2em;
+}
+
[ServerConfigPropertyForm.html]
-<form id="{id}" class="mform" method="post" action="?">
+<form id="{id}" class="ServerConfigPropertyForm mform" method="post" action="?">
<div class="head">
<h1>{title}</h1>
</div>
@@ -50,13 +55,16 @@
<span class="legend">Value</span>
<fieldset>
<div class="field">
- {profile} Use profile value
+ {profile} Use the value from the server profile
+ <div class="value">{profile_value}</div>
</div>
<div class="field">
- {server} Use current server value
+ {server} Use the actual value currently set on the server
+ <div class="value">{server_value}</div>
</div>
<div class="field">
- {local} Set a custom value
+ {local} Set a new value
+ <div class="value">{local_value}</div>
</div>
</fieldset>
17 years, 2 months
rhmessaging commits: r1074 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 15:35:52 -0400 (Mon, 15 Oct 2007)
New Revision: 1074
Modified:
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Introduces server config properties into the server view. Adds a form
for editing properties.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-15 19:35:06 UTC (rev 1073)
+++ mgmt/cumin/python/cumin/model.py 2007-10-15 19:35:52 UTC (rev 1074)
@@ -105,7 +105,10 @@
def get_server_group_types(self):
return self.get_index(self.server_group_type).values()
-
+
+ def get_config_property(self, id):
+ return self.get_index(self.config_property).get(id)
+
def get_virtual_host(self, id):
return self.get_index(self.virtual_host).get(id)
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-15 19:35:06 UTC (rev 1073)
+++ mgmt/cumin/python/cumin/server.py 2007-10-15 19:35:52 UTC (rev 1074)
@@ -51,6 +51,9 @@
self.vhost = VirtualHostFrame(app, "vhost")
self.add_mode(self.vhost)
+ self.prop = ServerConfigPropertyForm(app, "prop")
+ self.add_mode(self.prop)
+
def get_object(self, session, object):
return self.param.get(session)
@@ -64,6 +67,12 @@
self.vhost.set_virtual_host(session, vhost)
return self.show_mode(session, self.vhost)
+ def show_config_property(self, session, prop):
+ self.prop.set_config_property(session, prop)
+ frame = self.show_mode(session, self.prop)
+ return self.page().set_current_frame(session, frame)
+
+ # XXX need to set frames in these
def show_queue(self, session, queue):
vhost = self.show_virtual_host(session, queue.virtual_host)
return vhost.show_queue(session, queue)
@@ -85,6 +94,69 @@
def render_none(self, session, group):
return none()
+class ServerConfigPropertySet(ItemSet):
+ def get_items(self, session, server):
+ return csorted(server.config_property_items())
+
+ def render_item_name(self, session, prop):
+ return prop.name
+
+ def render_item_value(self, session, prop):
+ return prop.value
+
+ def render_item_edit_href(self, session, prop):
+ branch = session.branch()
+ frame = self.page().show_server(branch, prop.get_server())
+ frame.show_config_property(branch, prop)
+ return branch.marshal()
+
+class ConfigPropertyParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_config_property(int(string))
+
+ def do_marshal(self, prop):
+ return str(prop.id)
+
+class ServerConfigPropertyForm(CuminForm):
+ def __init__(self, app, name):
+ super(ServerConfigPropertyForm, self).__init__(app, name)
+
+ self.param = ConfigPropertyParameter(app, "param")
+ self.add_parameter(self.param)
+
+ self.source = Parameter(app, "source")
+ self.add_parameter(self.source)
+
+ self.profile = RadioInput(app, "profile", self)
+ self.profile.set_parameter(self.source)
+ self.profile.set_value("profile")
+ self.add_child(self.profile)
+
+ self.server = RadioInput(app, "server", self)
+ self.server.set_parameter(self.source)
+ self.server.set_value("server")
+ self.add_child(self.server)
+
+ self.local = RadioInput(app, "local", self)
+ self.local.set_parameter(self.source)
+ self.local.set_value("local")
+ self.add_child(self.local)
+
+ def get_object(self, session, object):
+ return self.param.get(session)
+
+ def set_config_property(self, session, prop):
+ return self.param.set(session, prop)
+
+ def process_cancel(self, session, prop):
+ branch = session.branch()
+ frame = self.page().show_server(branch, prop.get_server())
+ frame.show_view(branch)
+ session.set_redirect(branch.marshal())
+
+ def render_title(self, session, prop):
+ return "Edit Property '%s'" % prop.name
+
class ServerView(Widget):
def __init__(self, app, name):
super(ServerView, self).__init__(app, name)
@@ -122,7 +194,7 @@
def get_items(self, session, server):
return sorted(server.virtual_host_items(), cmp, lambda x: x.name)
- class ConfigTab(Widget):
+ class ConfigTab(ServerConfigPropertySet):
def render_title(self, session, server):
return "Configuration"
@@ -284,4 +356,3 @@
def render_title(self, session, group):
return "Edit Group '%s'" % group.name
-
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-15 19:35:06 UTC (rev 1073)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-15 19:35:52 UTC (rev 1074)
@@ -15,6 +15,67 @@
<td>0 errors, 0 warnings</td>
</tr>
+[ServerConfigPropertySet.html]
+<ul class="actions">
+ <li><a href="">Apply Current Values to This Server</a></li>
+</ul>
+
+<table class="mobjects">
+ <tr>
+ <th>Property</th>
+ <th>Configured Value</th>
+ <th>Actual Value</th>
+ <th>Profile Value</th>
+ <th></th>
+ </tr>
+
+ {items}
+</table>
+
+[ServerConfigPropertySet.item_html]
+<tr>
+ <td>{item_name}</td>
+ <td>{item_value}</td>
+ <td></td>
+ <td></td>
+ <td><a class="action" href="{item_edit_href}">Edit</a></td>
+</tr>
+
+[ServerConfigPropertyForm.html]
+<form id="{id}" class="mform" method="post" action="?">
+ <div class="head">
+ <h1>{title}</h1>
+ </div>
+ <div class="body">
+ <span class="legend">Value</span>
+ <fieldset>
+ <div class="field">
+ {profile} Use profile value
+ </div>
+ <div class="field">
+ {server} Use current server value
+ </div>
+ <div class="field">
+ {local} Set a custom value
+ </div>
+ </fieldset>
+
+ {hidden_inputs}
+ </div>
+ <div class="foot">
+ <div style="display: block; float: left;"><button>Help</button></div>
+ {cancel}
+ {submit}
+ </div>
+</form>
+<script defer="defer">
+(function() {
+ var elem = wooly.doc().elem("{id}").node.elements[1];
+ elem.focus();
+ elem.select();
+}())
+</script>
+
[ServerView.html]
<div class="oblock">
<div class="mstatus green" id="{id}">
@@ -37,31 +98,6 @@
{tabs}
</div>
-[ConfigTab.html]
-<ul class="actions">
- <li><a href="">Edit This Configuration</a></li>
-</ul>
-
-<pre class="code">
-server "server00" {
- include "/usr/local/cluster/common.conf";
-
- vhost "default" {
- store: bdb;
- transaction: journal;
- }
-
- vhost "devel" {
- max-queue-depth: 10000;
- store: memory;
- transaction: memory;
- }
-
- vhost "test" {
- }
-}
-</pre>
-
[ServerBrowser.css]
.ServerBrowser.groups {
float: left;
17 years, 2 months
rhmessaging commits: r1073 - mgmt/notes.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 15:35:06 -0400 (Mon, 15 Oct 2007)
New Revision: 1073
Modified:
mgmt/notes/Todo
Log:
Hmm.
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-15 19:33:48 UTC (rev 1072)
+++ mgmt/notes/Todo 2007-10-15 19:35:06 UTC (rev 1073)
@@ -48,7 +48,7 @@
* cumindev: add a cumin-test function and bind it to C-c C-c
- * Consider adding a set_object to Frame, instead of having
+ * Consider adding a set_object to CuminFrame, instead of having
set_somethingspecific on each frame.
* Consider having a cssclass set on widgets
@@ -60,3 +60,7 @@
* Add link disabling; use it for the server groups edit and remove
links
+
+ * Rename csorted to sorted_by, a niceer name
+
+ * Add a parameter that takes a modelclass
17 years, 2 months
rhmessaging commits: r1072 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 15:33:48 -0400 (Mon, 15 Oct 2007)
New Revision: 1072
Modified:
mgmt/cumin/python/cumin/queue.strings
Log:
Removes an XXX that is now irrelevant.
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-15 17:53:49 UTC (rev 1071)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-15 19:33:48 UTC (rev 1072)
@@ -60,10 +60,8 @@
</div>
</form>
<script defer="defer">
-var id = "{id}";
(function() {
- // XXX elements[0] is a fieldset, at least in firefox
- var elem = wooly.doc().elem(id).node.elements[1];
+ var elem = wooly.doc().elem("{id}").node.elements[1];
elem.focus();
elem.select();
}())
17 years, 2 months
rhmessaging commits: r1071 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 13:53:49 -0400 (Mon, 15 Oct 2007)
New Revision: 1071
Modified:
mgmt/cumin/python/cumin/demo.py
mgmt/cumin/python/cumin/model.py
Log:
Adds a ConfigProperty object to the demo model and data and associates
it with Server.
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-15 17:53:10 UTC (rev 1070)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-15 17:53:49 UTC (rev 1071)
@@ -63,6 +63,21 @@
server = Server(self.model)
server.name = fmt("server", server_count)
+ prop = ConfigProperty(self.model)
+ prop.name = "max_threads"
+ prop.value = 1000
+ server.add_config_property(prop)
+
+ prop = ConfigProperty(self.model)
+ prop.name = "max_memory"
+ prop.value = 1000000
+ server.add_config_property(prop)
+
+ prop = ConfigProperty(self.model)
+ prop.name = "ssl_enabled"
+ prop.value = True
+ server.add_config_property(prop)
+
index = server_count % 4
if index < 3:
server.set_cluster(clusters[index])
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-15 17:53:10 UTC (rev 1070)
+++ mgmt/cumin/python/cumin/model.py 2007-10-15 17:53:49 UTC (rev 1071)
@@ -7,6 +7,7 @@
self.cluster = ModelClass(self, "cluster")
self.server = ModelClass(self, "server")
+ self.config_property = ModelClass(self, "config_property")
self.server_group = ModelClass(self, "server_group")
self.server_group_type = ModelClass(self, "server_group_type")
self.virtual_host = ModelClass(self, "virtual_host")
@@ -24,6 +25,10 @@
assoc.add_endpoint(self.virtual_host, "cluster", "0..1")
assoc.add_endpoint(self.cluster, "virtual_host", "0..n")
+ assoc = ModelAssociation(self, "server_to_config_properties")
+ assoc.add_endpoint(self.config_property, "server", "0..1")
+ assoc.add_endpoint(self.server, "config_property", "0..n")
+
assoc = ModelAssociation(self, "server_to_virtual_hosts")
assoc.add_endpoint(self.virtual_host, "server", "0..1")
assoc.add_endpoint(self.server, "virtual_host", "0..n")
@@ -150,6 +155,13 @@
writer.write("</server>")
+class ConfigProperty(ModelObject):
+ def __init__(self, model):
+ super(ConfigProperty, self).__init__(model, model.config_property)
+
+ self.name = None
+ self.value = None
+
class ServerGroup(ModelObject):
def __init__(self, model):
super(ServerGroup, self).__init__(model, model.server_group)
17 years, 2 months
rhmessaging commits: r1070 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 13:53:10 -0400 (Mon, 15 Oct 2007)
New Revision: 1070
Modified:
mgmt/cumin/python/cumin/cluster.py
Log:
Disables the cluster config tab for now.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-15 15:23:25 UTC (rev 1069)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-15 17:53:10 UTC (rev 1070)
@@ -85,7 +85,7 @@
self.tabs.add_tab(self.ServerTab(app, "servers"))
self.tabs.add_tab(self.VirtualHostTab(app, "vhosts"))
- self.tabs.add_tab(self.ConfigTab(app, "config"))
+ #self.tabs.add_tab(self.ConfigTab(app, "config"))
self.tabs.add_tab(self.StatsTab(app, "stats"))
self.tabs.add_tab(self.LogTab(app, "log"))
17 years, 2 months
rhmessaging commits: r1069 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 11:23:25 -0400 (Mon, 15 Oct 2007)
New Revision: 1069
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/wooly/forms.py
Log:
Renames on_* form processing methods to process_*, to reflect the
pattern where methods called as part of process or render are prefixed
with "process_" or "render_".
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-15 15:12:25 UTC (rev 1068)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-15 15:23:25 UTC (rev 1069)
@@ -172,12 +172,12 @@
return valid
class ExchangeAdd(ExchangeForm):
- def on_cancel(self, session, vhost):
+ def process_cancel(self, session, vhost):
branch = session.branch()
self.page().show_virtual_host(branch, vhost).show_view(branch)
session.set_redirect(branch.marshal())
- def on_submit(self, session, vhost):
+ def process_submit(self, session, vhost):
if self.validate(session):
exchange = Exchange(self.app.model)
@@ -198,12 +198,12 @@
return "Add Exchange to Host Template '%s'" % vhost.name
class ExchangeEdit(ExchangeForm):
- def on_cancel(self, session, exchange):
+ def process_cancel(self, session, exchange):
branch = session.branch()
self.page().show_exchange(branch, exchange).show_view(branch)
session.set_redirect(branch.marshal())
- def on_submit(self, session, exchange):
+ def process_submit(self, session, exchange):
if self.validate(session):
exchange.lock()
try:
@@ -216,7 +216,7 @@
self.page().show_exchange(branch, exchange).show_view(branch)
session.set_redirect(branch.marshal())
- def on_display(self, session, exchange):
+ def process_display(self, session, exchange):
self.exchange_name.set(session, exchange.name)
self.type.set(session, exchange.type)
@@ -224,7 +224,7 @@
return "Edit Exchange '%s'" % exchange.name
class ExchangeRemove(CuminConfirmForm):
- def on_confirm(self, session, exchange):
+ def process_confirm(self, session, exchange):
vhost = exchange.get_virtual_host()
exchange.remove()
@@ -233,7 +233,7 @@
self.page().show_virtual_host(branch, vhost).show_view(branch)
session.set_redirect(branch.marshal())
- def on_cancel(self, session, exchange):
+ def process_cancel(self, session, exchange):
branch = session.branch()
self.page().show_exchange(branch, exchange).show_view(branch)
session.set_redirect(branch.marshal())
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-15 15:12:25 UTC (rev 1068)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-15 15:23:25 UTC (rev 1069)
@@ -208,12 +208,12 @@
return valid
class QueueAdd(QueueForm):
- def on_cancel(self, session, vhost):
+ def process_cancel(self, session, vhost):
branch = session.branch()
self.page().show_virtual_host(branch, vhost).show_view(branch)
session.set_redirect(branch.marshal())
- def on_submit(self, session, vhost):
+ def process_submit(self, session, vhost):
if self.validate(session):
queue = Queue(self.app.model)
@@ -234,12 +234,12 @@
return "Add Queue to Host Template '%s'" % vhost.name
class QueueEdit(QueueForm):
- def on_cancel(self, session, queue):
+ def process_cancel(self, session, queue):
branch = session.branch()
self.page().show_queue(branch, queue).show_view(branch)
session.set_redirect(branch.marshal())
- def on_submit(self, session, queue):
+ def process_submit(self, session, queue):
if self.validate(session):
queue.lock()
try:
@@ -252,7 +252,7 @@
self.page().show_queue(branch, queue).show_view(branch)
session.set_redirect(branch.marshal())
- def on_display(self, session, queue):
+ def process_display(self, session, queue):
self.queue_name.set(session, queue.name)
self.latency_priority.set(session, queue.latency_priority)
@@ -260,7 +260,7 @@
return "Edit Queue '%s'" % queue.name
class QueueRemove(CuminConfirmForm):
- def on_confirm(self, session, queue):
+ def process_confirm(self, session, queue):
vhost = queue.get_virtual_host()
queue.remove()
@@ -269,7 +269,7 @@
self.page().show_virtual_host(branch, vhost).show_view(branch)
session.set_redirect(branch.marshal())
- def on_cancel(self, session, queue):
+ def process_cancel(self, session, queue):
branch = session.branch()
self.page().show_queue(branch, queue).show_view(branch)
session.set_redirect(branch.marshal())
@@ -296,7 +296,7 @@
def render_title(self, session, queue):
return "Add Binding to Queue '%s'" % queue.name
- def on_cancel(self, session, queue):
+ def process_cancel(self, session, queue):
branch = session.branch()
self.page().show_queue(branch, queue).show_view(branch)
session.set_redirect(branch.marshal())
@@ -318,7 +318,7 @@
return valid
- def on_submit(self, session, queue):
+ def process_submit(self, session, queue):
if self.validate(session):
binding = Binding(self.app.model)
@@ -340,12 +340,12 @@
lambda x: x.name)
class QueueBindingRemove(CuminConfirmForm):
- def on_confirm(self, session, binding):
+ def process_confirm(self, session, binding):
branch = session.branch()
self.page().show_queue(branch, binding.get_queue()).show_view(branch)
session.set_redirect(branch.marshal())
- def on_cancel(self, session, binding):
+ def process_cancel(self, session, binding):
branch = session.branch()
self.page().show_queue(branch, binding.get_queue()).show_view(branch)
session.set_redirect(branch.marshal())
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-15 15:12:25 UTC (rev 1068)
+++ mgmt/cumin/python/cumin/server.py 2007-10-15 15:23:25 UTC (rev 1069)
@@ -240,7 +240,7 @@
self.group_name = TextInput(app, "name", self)
self.add_child(self.group_name)
- def on_submit(self, session, object):
+ def process_submit(self, session, object):
if object is self.app.model:
group = ServerGroup(object)
else:
@@ -257,7 +257,7 @@
self.page().show_server_group(branch, group)
session.set_redirect(branch.marshal())
- def on_cancel(self, session, model):
+ def process_cancel(self, session, model):
branch = session.branch()
self.page().show_view(branch)
session.set_redirect(branch.marshal())
@@ -279,7 +279,7 @@
def set_server_group(self, session, group):
self.param.set(session, group)
- def on_display(self, session, group):
+ def process_display(self, session, group):
self.group_name.set(session, group.name)
def render_title(self, session, group):
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-10-15 15:12:25 UTC (rev 1068)
+++ mgmt/cumin/python/cumin/widgets.py 2007-10-15 15:23:25 UTC (rev 1069)
@@ -47,21 +47,21 @@
if self.cancel.get(session):
self.cancel.set(session, False)
- self.on_cancel(session, object)
+ self.process_cancel(session, object)
elif self.submit.get(session):
self.submit.set(session, False)
- self.on_submit(session, object)
+ self.process_submit(session, object)
else:
- self.on_display(session, object)
+ self.process_display(session, object)
- def on_cancel(self, session, object):
+ def process_cancel(self, session, object):
pass
- def on_submit(self, session, object):
+ def process_submit(self, session, object):
pass
- def on_display(self, session, object):
+ def process_display(self, session, object):
pass
class Cancel(FormButton):
@@ -89,21 +89,21 @@
if self.confirm.get(session):
self.confirm.set(session, False)
- self.on_confirm(session, object)
+ self.process_confirm(session, object)
elif self.cancel.get(session):
self.cancel.set(session, False)
- self.on_cancel(session, object)
+ self.process_cancel(session, object)
else:
- self.on_display(session, object)
+ self.process_display(session, object)
- def on_cancel(self, session, object):
+ def process_cancel(self, session, object):
pass
- def on_confirm(self, session, object):
+ def process_confirm(self, session, object):
pass
- def on_display(self, session, object):
+ def process_display(self, session, object):
pass
def render_confirm_content(self, session, object):
Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py 2007-10-15 15:12:25 UTC (rev 1068)
+++ mgmt/cumin/python/wooly/forms.py 2007-10-15 15:23:25 UTC (rev 1069)
@@ -142,9 +142,9 @@
if self.get(session):
self.set(session, False)
- self.on_submit(session, object)
+ self.process_submit(session, object)
- def on_submit(self, session, object):
+ def process_submit(self, session, object):
pass
def render_value(self, session, object):
17 years, 2 months