rhmessaging commits: r1068 - mgmt/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 11:12:25 -0400 (Mon, 15 Oct 2007)
New Revision: 1068
Modified:
mgmt/cumin/python/wooly/__init__.py
Log:
We have to use unquote_plus instead of unquote in unmarshal_url_vars
because form-encoded vars produce +'s for spaces, at least in my
firefox.
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-10-15 14:58:32 UTC (rev 1067)
+++ mgmt/cumin/python/wooly/__init__.py 2007-10-15 15:12:25 UTC (rev 1068)
@@ -1,6 +1,6 @@
import sys, os
from cStringIO import StringIO
-from urllib import quote, unquote
+from urllib import quote, unquote_plus
from copy import copy
from time import clock
from datetime import datetime
@@ -542,7 +542,7 @@
for var in vars:
try:
key, svalue = var.split("=")
- value = unquote(svalue)
+ value = unquote_plus(svalue)
param = self.app.get_parameter(key)
17 years, 2 months
rhmessaging commits: r1067 - mgmt/notes.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 10:58:32 -0400 (Mon, 15 Oct 2007)
New Revision: 1067
Modified:
mgmt/notes/Todo
Log:
Update my todo list.
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-15 14:45:01 UTC (rev 1066)
+++ mgmt/notes/Todo 2007-10-15 14:58:32 UTC (rev 1067)
@@ -18,21 +18,11 @@
- It does not, and it's not easily changed. Will need to switch to
wsgi stuff, I believe.
- * When in queue mode, make the context nav go back to the right tab
-
* Change declared charset to iso-8859???, not utf-8, since it's
important to be honest
- * Only do render timing conditionally
-
- * Make debug and devel things contingent upon a start-time variable
- "--debug"
-
* Make it a little simpler to express hrefs
- * Add disabling to form inputs, and disable renaming of exchanges
- that start with "amq." and the default exchange
-
* Make form help buttons pop up a (for now, empty) help page
* Icons: machine looking thing for vhost. For Cumin in general, I'm
@@ -44,9 +34,6 @@
* If debug is enabled, append a comment to the response containing
render and process traces
- * Write a little test comparing wooly.Template to string.Template to
- using the % operator
-
* Add ability to send a test message to a queue
* Add favicon and a mapping in the server to serve it
@@ -57,8 +44,6 @@
* Separate wooly stuff into its own devel subdir
- * When there is nothing in a set, render a [None]
-
* Add creation dates to some objects
* cumindev: add a cumin-test function and bind it to C-c C-c
@@ -66,11 +51,12 @@
* Consider adding a set_object to Frame, instead of having
set_somethingspecific on each frame.
- * Remove log messages from host template view
-
* Consider having a cssclass set on widgets
* Use page attributes for session errors, redirect
* See if we can eliminate the attr/param distinction, and use whether
or not a param is added to a widget via add_param to do that
+
+ * Add link disabling; use it for the server groups edit and remove
+ links
17 years, 2 months
rhmessaging commits: r1066 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 10:45:01 -0400 (Mon, 15 Oct 2007)
New Revision: 1066
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/wooly/widgets.strings
Log:
Adds preliminary server group add/edit capability. Flattens out
MainView a little, making it a TabSet. Adds a min-height prop to the
tabs css.
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-15 13:09:45 UTC (rev 1065)
+++ mgmt/cumin/python/cumin/page.py 2007-10-15 14:45:01 UTC (rev 1066)
@@ -33,10 +33,10 @@
self.cluster = ClusterFrame(app, "cluster")
self.add_mode(self.cluster)
- self.group_add = ServerGroupAdd(app, "group_add")
+ self.group_add = ServerGroupAdd(app, "groupadd")
self.add_mode(self.group_add)
- self.group_edit = ServerGroupEdit(app, "group_edit")
+ self.group_edit = ServerGroupEdit(app, "groupedit")
self.add_mode(self.group_edit)
def save_session(self, session):
@@ -72,6 +72,12 @@
return self.page().set_current_frame(session, frame)
+ def show_server_group(self, session, group):
+ mode = self.show_view(session)
+ mode.show_server_group(session, group)
+ self.page().set_current_frame(session, self)
+ return mode
+
def show_server_group_add(self, session):
frame = self.show_mode(session, self.group_add)
return self.page().set_current_frame(session, frame)
@@ -139,18 +145,22 @@
object = frame.get_object(session, self.object.get(session))
return frame.render_title(session, object)
-class MainView(Widget):
+class MainView(TabSet):
def __init__(self, app, name):
super(MainView, self).__init__(app, name)
- self.tabs = TabSet(app, "tabs")
- self.add_child(self.tabs)
+ self.servers = self.ServerTab(app, "servers")
+ self.add_tab(self.servers)
- self.tabs.add_tab(self.ServerTab(app, "servers"))
- self.tabs.add_tab(self.ClusterTab(app, "clusters"))
+ self.add_tab(self.ClusterTab(app, "clusters"))
+ def show_server_group(self, session, group):
+ mode = self.show_mode(session, self.servers)
+ mode.set_server_group(session, group)
+ return mode
+
def render_title(self, session, model):
- return "Red Hat Messaging"
+ return "Red Hat Management"
class ServerTab(ServerBrowser):
pass
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-15 13:09:45 UTC (rev 1065)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-15 14:45:01 UTC (rev 1066)
@@ -381,7 +381,8 @@
<div class="oblock">
<h1>{title}</h1>
- {tabs}
+ <ul class="TabSet tabs">{tabs}</ul>
+ <div class="TabSet mode">{mode}</div>
</div>
[ClusterTab.html]
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-15 13:09:45 UTC (rev 1065)
+++ mgmt/cumin/python/cumin/server.py 2007-10-15 14:45:01 UTC (rev 1066)
@@ -240,6 +240,23 @@
self.group_name = TextInput(app, "name", self)
self.add_child(self.group_name)
+ def on_submit(self, session, object):
+ if object is self.app.model:
+ group = ServerGroup(object)
+ else:
+ group = object
+
+ group.lock()
+ try:
+ group.name = self.group_name.get(session)
+ group.set_type(self.app.model.get_server_group_types()[0])
+ finally:
+ group.unlock()
+
+ branch = session.branch()
+ self.page().show_server_group(branch, group)
+ session.set_redirect(branch.marshal())
+
def on_cancel(self, session, model):
branch = session.branch()
self.page().show_view(branch)
@@ -261,6 +278,10 @@
def set_server_group(self, session, group):
self.param.set(session, group)
-
+
+ def on_display(self, session, group):
+ self.group_name.set(session, group.name)
+
def render_title(self, session, group):
return "Edit Group '%s'" % group.name
+
Modified: mgmt/cumin/python/wooly/widgets.strings
===================================================================
--- mgmt/cumin/python/wooly/widgets.strings 2007-10-15 13:09:45 UTC (rev 1065)
+++ mgmt/cumin/python/wooly/widgets.strings 2007-10-15 14:45:01 UTC (rev 1066)
@@ -39,6 +39,7 @@
background-color: #fff;
position: relative;
z-index: 1;
+ min-height: 20em;
}
[TabSet.html]
17 years, 2 months
rhmessaging commits: r1065 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-15 09:09:45 -0400 (Mon, 15 Oct 2007)
New Revision: 1065
Modified:
mgmt/cumin/python/cumin/cluster.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/virtualhost.py
mgmt/cumin/python/wooly/widgets.py
mgmt/cumin/python/wooly/widgets.strings
Log:
Adds support in ModeSet for child widgets that are not modes. Uses
this feature to flatten the widget tree for CuminPage.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -48,13 +48,13 @@
self.add_parameter(self.param)
self.view = ClusterView(app, "view")
- self.add_child(self.view)
+ self.add_mode(self.view)
self.server = ServerFrame(app, "server")
- self.add_child(self.server)
+ self.add_mode(self.server)
self.vhost = VirtualHostFrame(app, "vhost")
- self.add_child(self.vhost)
+ self.add_mode(self.vhost)
def get_object(self, session, object):
return self.param.get(session)
@@ -83,11 +83,11 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(self.ServerTab(app, "servers"))
- self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
- self.tabs.add_child(self.ConfigTab(app, "config"))
- self.tabs.add_child(self.StatsTab(app, "stats"))
- self.tabs.add_child(self.LogTab(app, "log"))
+ 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.StatsTab(app, "stats"))
+ self.tabs.add_tab(self.LogTab(app, "log"))
def render_title(self, session, cluster):
return "Cluster '%s'" % cluster.name
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -63,7 +63,7 @@
self.add_parameter(self.param)
self.view = ExchangeView(app, "view")
- self.add_child(self.view)
+ self.add_mode(self.view)
def get_object(self, session, object):
return self.param.get(session)
@@ -84,8 +84,8 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(ExchangeBindingSet(app, "bindings"))
- self.tabs.add_child(self.ExchangeLog(app, "log"))
+ self.tabs.add_tab(ExchangeBindingSet(app, "bindings"))
+ self.tabs.add_tab(self.ExchangeLog(app, "log"))
class ExchangeLog(Widget):
def render_title(self, session, exchange):
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/page.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -9,7 +9,7 @@
strings = StringCatalog(__file__)
-class CuminPage(Page):
+class CuminPage(Page, ModeSet):
def __init__(self, app, name):
super(CuminPage, self).__init__(app, name)
@@ -24,23 +24,20 @@
self.frame_tmpl = Template(self, "frame_html")
- self.modes = ModeSet(app, "mode")
- self.add_child(self.modes)
-
self.view = MainView(app, "view")
- self.modes.add_child(self.view)
+ self.add_mode(self.view)
self.server = ServerFrame(app, "server")
- self.modes.add_child(self.server)
+ self.add_mode(self.server)
self.cluster = ClusterFrame(app, "cluster")
- self.modes.add_child(self.cluster)
+ self.add_mode(self.cluster)
self.group_add = ServerGroupAdd(app, "group_add")
- self.modes.add_child(self.group_add)
+ self.add_mode(self.group_add)
self.group_edit = ServerGroupEdit(app, "group_edit")
- self.modes.add_child(self.group_edit)
+ self.add_mode(self.group_edit)
def save_session(self, session):
if self.app.debug:
@@ -61,7 +58,7 @@
def show_view(self, session):
self.set_current_frame(session, self)
- return self.modes.show_mode(session, self.view)
+ return self.show_mode(session, self.view)
def show_server(self, session, server):
cluster = server.get_cluster()
@@ -70,22 +67,22 @@
frame = self.show_cluster(session, cluster)
frame = frame.show_server(session, server)
else:
- frame = self.modes.show_mode(session, self.server)
+ frame = self.show_mode(session, self.server)
frame.set_server(session, server)
return self.page().set_current_frame(session, frame)
def show_server_group_add(self, session):
- frame = self.modes.show_mode(session, self.group_add)
+ frame = self.show_mode(session, self.group_add)
return self.page().set_current_frame(session, frame)
def show_server_group_edit(self, session, group):
- frame = self.modes.show_mode(session, self.group_edit)
+ frame = self.show_mode(session, self.group_edit)
frame.set_server_group(session, group)
return self.page().set_current_frame(session, frame)
def show_cluster(self, session, cluster):
- frame = self.modes.show_mode(session, self.cluster)
+ frame = self.show_mode(session, self.cluster)
frame.set_cluster(session, cluster)
return self.page().set_current_frame(session, frame)
@@ -149,8 +146,8 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(self.ServerTab(app, "servers"))
- self.tabs.add_child(self.ClusterTab(app, "clusters"))
+ self.tabs.add_tab(self.ServerTab(app, "servers"))
+ self.tabs.add_tab(self.ClusterTab(app, "clusters"))
def render_title(self, session, model):
return "Red Hat Messaging"
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -66,7 +66,7 @@
self.add_parameter(self.param)
self.view = QueueView(app, "view")
- self.add_child(self.view)
+ self.add_mode(self.view)
def get_object(self, session, object):
return self.param.get(session)
@@ -114,8 +114,8 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(QueueBindingSet(app, "bindings"))
- self.tabs.add_child(self.QueueLog(app, "log"))
+ self.tabs.add_tab(QueueBindingSet(app, "bindings"))
+ self.tabs.add_tab(self.QueueLog(app, "log"))
class QueueLog(Widget):
def render_title(self, session, queue):
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/server.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -46,10 +46,10 @@
self.add_parameter(self.param)
self.view = ServerView(app, "view")
- self.add_child(self.view)
+ self.add_mode(self.view)
self.vhost = VirtualHostFrame(app, "vhost")
- self.add_child(self.vhost)
+ self.add_mode(self.vhost)
def get_object(self, session, object):
return self.param.get(session)
@@ -92,10 +92,10 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(self.VirtualHostTab(app, "vhosts"))
- self.tabs.add_child(self.ConfigTab(app, "config"))
- self.tabs.add_child(self.StatsTab(app, "stats"))
- self.tabs.add_child(self.LogTab(app, "log"))
+ self.tabs.add_tab(self.VirtualHostTab(app, "vhosts"))
+ self.tabs.add_tab(self.ConfigTab(app, "config"))
+ self.tabs.add_tab(self.StatsTab(app, "stats"))
+ self.tabs.add_tab(self.LogTab(app, "log"))
def render_title(self, session, server):
return "Server '%s'" % server.name
Modified: mgmt/cumin/python/cumin/virtualhost.py
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/cumin/virtualhost.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -36,13 +36,13 @@
self.add_parameter(self.param)
self.queue = QueueFrame(app, "queue")
- self.add_child(self.queue)
+ self.add_mode(self.queue)
self.exchange = ExchangeFrame(app, "exchange")
- self.add_child(self.exchange)
+ self.add_mode(self.exchange)
self.view = VirtualHostView(app, "view")
- self.add_child(self.view)
+ self.add_mode(self.view)
def get_object(self, session, object):
return self.param.get(session)
@@ -71,10 +71,10 @@
self.tabs = TabSet(app, "tabs")
self.add_child(self.tabs)
- self.tabs.add_child(QueueSet(app, "queues"))
- self.tabs.add_child(ExchangeSet(app, "exchanges"))
- self.tabs.add_child(self.ConfigTab(app, "config"))
- self.tabs.add_child(self.LogTab(app, "log"))
+ self.tabs.add_tab(QueueSet(app, "queues"))
+ self.tabs.add_tab(ExchangeSet(app, "exchanges"))
+ self.tabs.add_tab(self.ConfigTab(app, "config"))
+ self.tabs.add_tab(self.LogTab(app, "log"))
def render_title(self, session, vhost):
return "Functional Host '%s'" % vhost.name
Modified: mgmt/cumin/python/wooly/widgets.py
===================================================================
--- mgmt/cumin/python/wooly/widgets.py 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/wooly/widgets.py 2007-10-15 13:09:45 UTC (rev 1065)
@@ -8,10 +8,14 @@
def __init__(self, app, name):
super(ModeSet, self).__init__(app, name)
+ self.modes = list()
+
self.mode = Parameter(app, "mode")
self.add_parameter(self.mode)
- def add_child(self, mode):
+ def add_mode(self, mode):
+ self.modes.append(mode)
+
super(ModeSet, self).add_child(mode)
if not self.mode.default:
@@ -34,7 +38,7 @@
if mode:
mode.process(session, object)
- def do_render(self, session, object):
+ def render_mode(self, session, object):
mode = self.get_selected_mode(session)
if mode:
@@ -49,18 +53,14 @@
self.object = Attribute(app, "object")
self.add_attribute(self.object)
- def do_render(self, session, object):
- writer = Writer()
+ def add_tab(self, tab):
+ self.add_mode(tab)
- self.template.render(session, object, writer)
-
- return writer.to_string()
-
def render_tabs(self, session, object):
self.object.set(session, object)
writer = Writer()
- for mode in self.children:
+ for mode in self.modes:
self.tab_tmpl.render(session, mode, writer)
return writer.to_string()
@@ -77,12 +77,6 @@
def render_tab_content(self, session, mode):
return mode.render_title(session, self.object.get(session))
- def render_mode(self, session, object):
- mode = self.get_selected_mode(session)
-
- if mode:
- return mode.render(session, object)
-
class Link(Widget):
def update_session(self, session, object):
pass
Modified: mgmt/cumin/python/wooly/widgets.strings
===================================================================
--- mgmt/cumin/python/wooly/widgets.strings 2007-10-14 20:31:09 UTC (rev 1064)
+++ mgmt/cumin/python/wooly/widgets.strings 2007-10-15 13:09:45 UTC (rev 1065)
@@ -1,3 +1,6 @@
+[ModeSet.html]
+{mode}
+
[TabSet.css]
ul.TabSet.tabs {
padding: 0;
17 years, 2 months
rhmessaging commits: r1064 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 16:31:09 -0400 (Sun, 14 Oct 2007)
New Revision: 1064
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Clean up of the show_* methods used for navigation. Removes the extra
set of methods that was on MainFrame, and incorporates MainFrame into
CuminPage. Also simplifies context styling a bit.
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-14 18:17:44 UTC (rev 1063)
+++ mgmt/cumin/python/cumin/page.py 2007-10-14 20:31:09 UTC (rev 1064)
@@ -24,39 +24,70 @@
self.frame_tmpl = Template(self, "frame_html")
- self.main = MainFrame(app, "main")
- self.add_child(self.main)
- self.set_default_frame(self.main)
+ self.modes = ModeSet(app, "mode")
+ self.add_child(self.modes)
- class FramesAttribute(Attribute):
- def get_default(self, session):
- return list()
+ self.view = MainView(app, "view")
+ self.modes.add_child(self.view)
- def set_modal(self, session, modal):
- self.modal.set(session, modal)
+ self.server = ServerFrame(app, "server")
+ self.modes.add_child(self.server)
+ self.cluster = ClusterFrame(app, "cluster")
+ self.modes.add_child(self.cluster)
+
+ self.group_add = ServerGroupAdd(app, "group_add")
+ self.modes.add_child(self.group_add)
+
+ self.group_edit = ServerGroupEdit(app, "group_edit")
+ self.modes.add_child(self.group_edit)
+
def save_session(self, session):
if self.app.debug:
self.app.debug.sessions.append(session)
+ def set_modal(self, session, modal):
+ self.modal.set(session, modal)
+
+ def get_object(self, session, object):
+ return self.app.model
+
+ class FramesAttribute(Attribute):
+ def get_default(self, session):
+ return list()
+
+ def get_frames(self, session):
+ return self.frames.get(session)
+
+ def show_view(self, session):
+ self.set_current_frame(session, self)
+ return self.modes.show_mode(session, self.view)
+
def show_server(self, session, server):
cluster = server.get_cluster()
if cluster:
- frame = self.main.show_cluster(session, cluster)
+ frame = self.show_cluster(session, cluster)
frame = frame.show_server(session, server)
else:
- frame = self.main.show_server(session, server)
-
- return self.set_current_frame(session, frame)
+ frame = self.modes.show_mode(session, self.server)
+ frame.set_server(session, server)
- def show_server_group(self, session, sgroup):
- frame = self.main.show_server_group(session, sgroup)
- return self.set_current_frame(session, frame)
+ return self.page().set_current_frame(session, frame)
+ def show_server_group_add(self, session):
+ frame = self.modes.show_mode(session, self.group_add)
+ return self.page().set_current_frame(session, frame)
+
+ def show_server_group_edit(self, session, group):
+ frame = self.modes.show_mode(session, self.group_edit)
+ frame.set_server_group(session, group)
+ return self.page().set_current_frame(session, frame)
+
def show_cluster(self, session, cluster):
- frame = self.main.show_cluster(session, cluster)
- return self.set_current_frame(session, frame)
+ frame = self.modes.show_mode(session, self.cluster)
+ frame.set_cluster(session, cluster)
+ return self.page().set_current_frame(session, frame)
def show_virtual_host(self, session, vhost):
server = vhost.get_server()
@@ -67,11 +98,12 @@
elif cluster:
frame = self.show_cluster(session, cluster)
else:
- frame = self.main
+ raise Exception()
frame = frame.show_virtual_host(session, vhost)
- return self.set_current_frame(session, frame)
+ return self.page().set_current_frame(session, frame)
+
def show_queue(self, session, queue):
frame = self.show_virtual_host(session, queue.virtual_host)
frame = frame.show_queue(session, queue)
@@ -85,11 +117,13 @@
def render_class(self, session, object):
return self.modal.get(session) and "modal"
- def render_content(self, session, object):
- return self.main.render(session, object)
+ def render_href(self, session, object):
+ branch = session.branch()
+ self.show_view(branch)
+ return branch.marshal()
- def get_frames(self, session):
- return self.frames.get(session)
+ def render_title(self, session, model):
+ return "Red Hat Messaging"
def render_frames(self, session, object):
self.object.set(session, object)
@@ -108,52 +142,6 @@
object = frame.get_object(session, self.object.get(session))
return frame.render_title(session, object)
-class MainFrame(CuminFrame):
- def __init__(self, app, name):
- super(MainFrame, self).__init__(app, name)
-
- self.view = MainView(app, "view")
- self.add_child(self.view)
-
- self.server = ServerFrame(app, "server")
- self.add_child(self.server)
-
- self.cluster = ClusterFrame(app, "cluster")
- self.add_child(self.cluster)
-
- self.group_add = ServerGroupAdd(app, "group_add")
- self.add_child(self.group_add)
-
- self.group_edit = ServerGroupEdit(app, "group_edit")
- self.add_child(self.group_edit)
-
- def get_object(self, session, object):
- return self.app.model
-
- def show_view(self, session):
- return self.show_mode(session, self.view)
-
- def show_virtual_host(self, session, vhost):
- self.vhost.set_virtual_host(session, vhost)
- return self.show_mode(session, self.vhost)
-
- def show_server(self, session, server):
- self.server.set_server(session, server)
- return self.show_mode(session, self.server)
-
- def show_cluster(self, session, cluster):
- self.cluster.set_cluster(session, cluster)
- return self.show_mode(session, self.cluster)
-
- def show_group_add(self, session):
- return self.show_mode(session, self.group_add)
-
- def show_group_edit(self, session):
- return self.show_mode(session, self.group_edit)
-
- def render_title(self, session, model):
- return "<img src=\"resource?name=logo.png\"/>"
-
class MainView(Widget):
def __init__(self, app, name):
super(MainView, self).__init__(app, name)
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-10-14 18:17:44 UTC (rev 1063)
+++ mgmt/cumin/python/cumin/page.strings 2007-10-14 20:31:09 UTC (rev 1064)
@@ -115,25 +115,17 @@
display: inline;
}
-ul#context li:after {
+ul#context li:before {
content: " > ";
font-weight: bold;
font-size: 0.8em;
color: #fff;
}
-ul#context li:last-child:after {
- content: "";
-}
-
ul#context li a {
color: #ff9f00;
}
-ul#context li:first-child a {
- vertical-align: -15%;
-}
-
ul#context li:last-child a {
color: #fff;
}
@@ -372,9 +364,11 @@
<li>Hi, <strong>nsantos</strong></li>
<li><a class="action" href="">Log Out</a></li>
</ul>
+
+ <a id="logo" href="{href}"><img src="resource?name=logo.png"/></a>
<ul id="context">{frames}</ul>
</div>
- <div id="body">{content}</div>
+ <div id="body">{mode}</div>
<div id="foot">
</div>
</body>
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-14 18:17:44 UTC (rev 1063)
+++ mgmt/cumin/python/cumin/server.py 2007-10-14 20:31:09 UTC (rev 1064)
@@ -163,18 +163,17 @@
self.set_server_group(branch, None)
return link(branch.marshal(), "All Servers", class_)
+ def render_add_group_href(self, session, group):
+ branch = session.branch()
+ self.page().show_server_group_add(branch)
+ return branch.marshal()
+
def render_edit_group_href(self, session, group):
if group:
branch = session.branch()
- frame = self.page().main.show_group_edit(branch)
- frame.set_server_group(branch, group)
+ self.page().show_server_group_edit(branch, group)
return branch.marshal()
- def render_add_group_href(self, session, group):
- branch = session.branch()
- self.page().main.show_group_add(branch)
- return branch.marshal()
-
def render_remove_group_href(self, session, group):
if group:
branch = session.branch()
@@ -241,16 +240,16 @@
self.group_name = TextInput(app, "name", self)
self.add_child(self.group_name)
-class ServerGroupAdd(ServerGroupForm, Frame):
- def render_title(self, session, model):
- return "Add Group"
-
def on_cancel(self, session, model):
branch = session.branch()
- self.page().main.show_view(branch)
+ self.page().show_view(branch)
session.set_redirect(branch.marshal())
-class ServerGroupEdit(ServerGroupForm):
+class ServerGroupAdd(ServerGroupForm, Frame):
+ def render_title(self, session, model):
+ return "Add Group"
+
+class ServerGroupEdit(ServerGroupForm, Frame):
def __init__(self, app, name):
super(ServerGroupEdit, self).__init__(app, name)
@@ -265,8 +264,3 @@
def render_title(self, session, group):
return "Edit Group '%s'" % group.name
-
- def on_cancel(self, session, model):
- branch = session.branch()
- self.page().main.show_view(branch)
- session.set_redirect(branch.marshal())
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 18:17:44 UTC (rev 1063)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 20:31:09 UTC (rev 1064)
@@ -96,7 +96,6 @@
[ServerBrowser.html]
<div class="ServerBrowser groups">
- <h2>Selection</h2>
<ul class="groups"><li>{all_servers_link}</li></ul>
{groups}
17 years, 2 months
rhmessaging commits: r1063 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 14:17:44 -0400 (Sun, 14 Oct 2007)
New Revision: 1063
Modified:
mgmt/cumin/python/cumin/server.strings
Log:
Style tweaks. Use radio button images for groups.
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 17:55:07 UTC (rev 1062)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 18:17:44 UTC (rev 1063)
@@ -68,21 +68,22 @@
width: 20%;
}
-.ServerBrowser.groups a.selected {
- font-weight: bold;
-}
-
.ServerBrowser.groups ul {
margin: 0 0 1em 0;
}
-.ServerBrowser.groups ul.groups li {
- margin: 0 0 0 0.5em;
+.ServerBrowser.groups ul.groups a:before {
+ content: url(resource?name=radio-button.png);
+ vertical-align: -10%;
+ margin: 0 0.5em 0 0;
}
+.ServerBrowser.groups ul.groups a.selected:before {
+ content: url(resource?name=radio-button-checked.png);
+}
+
.ServerBrowser.groups h2 {
color: #564979;
- font-weight: bold;
font-size: 0.9em;
border-bottom: 1px dotted #ddd;
width: 80%;
17 years, 2 months
rhmessaging commits: r1062 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 13:55:07 -0400 (Sun, 14 Oct 2007)
New Revision: 1062
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Adds navigation to the group edit form.
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-14 14:32:02 UTC (rev 1061)
+++ mgmt/cumin/python/cumin/page.py 2007-10-14 17:55:07 UTC (rev 1062)
@@ -124,6 +124,9 @@
self.group_add = ServerGroupAdd(app, "group_add")
self.add_child(self.group_add)
+ self.group_edit = ServerGroupEdit(app, "group_edit")
+ self.add_child(self.group_edit)
+
def get_object(self, session, object):
return self.app.model
@@ -145,6 +148,9 @@
def show_group_add(self, session):
return self.show_mode(session, self.group_add)
+ def show_group_edit(self, session):
+ return self.show_mode(session, self.group_edit)
+
def render_title(self, session, model):
return "<img src=\"resource?name=logo.png\"/>"
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-14 14:32:02 UTC (rev 1061)
+++ mgmt/cumin/python/cumin/server.py 2007-10-14 17:55:07 UTC (rev 1062)
@@ -147,28 +147,42 @@
self.servers = self.BrowserServers(app, "servers")
self.add_child(self.servers)
- def render_title(self, session, model):
- return "Servers (%i)" % len(model.get_servers())
+ def get_object(self, session, object):
+ return self.param.get(session)
- def render_all_servers_link(self, session, model):
- class_ = self.param.get(session) is None and "selected"
+ def set_server_group(self, session, group):
+ return self.param.set(session, group)
+ def render_title(self, session, group):
+ return "Servers (%i)" % len(self.app.model.get_servers())
+
+ def render_all_servers_link(self, session, group):
+ class_ = group is None and "selected"
+
branch = session.branch()
- self.param.set(branch, None)
+ self.set_server_group(branch, None)
return link(branch.marshal(), "All Servers", class_)
- def render_add_group_href(self, session, model):
+ def render_edit_group_href(self, session, group):
+ if group:
+ branch = session.branch()
+ frame = self.page().main.show_group_edit(branch)
+ frame.set_server_group(branch, group)
+ return branch.marshal()
+
+ def render_add_group_href(self, session, group):
branch = session.branch()
self.page().main.show_group_add(branch)
return branch.marshal()
- def render_remove_group_href(self, session, model):
- group = self.param.get(session)
-
+ def render_remove_group_href(self, session, group):
if group:
branch = session.branch()
return branch.marshal()
+ def render_groups(self, session, group):
+ return self.groups.render(session, self.app.model)
+
class BrowserGroups(Widget):
def __init__(self, app, name):
super(ServerBrowser.BrowserGroups, self).__init__(app, name)
@@ -207,13 +221,11 @@
return mlink(branch.marshal(), "ServerGroup", group.name, selected)
class BrowserServers(ServerSet):
- def get_items(self, session, model):
- group = self.parent.param.get(session)
-
+ def get_items(self, session, group):
if group:
- return sorted(group.server_items(), cmp, lambda x: x.name)
+ return csorted(group.server_items())
else:
- return sorted(model.get_servers(), cmp, lambda x: x.name)
+ return csorted(self.app.model.get_servers())
class ServerGroupParameter(Parameter):
def do_unmarshal(self, string):
@@ -245,7 +257,7 @@
self.param = ServerGroupParameter(app, "id")
self.add_parameter(self.param)
- def get_object(self, session):
+ def get_object(self, session, object):
return self.param.get(session)
def set_server_group(self, session, group):
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 14:32:02 UTC (rev 1061)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 17:55:07 UTC (rev 1062)
@@ -102,9 +102,6 @@
<ul class="actions">
<li><a href="{add_group_href}">Add Group</a></li>
- </ul>
-
- <ul class="actions">
<li><a href="{edit_group_href}">Edit Group</a></li>
<li><a href="{remove_group_href}">Remove Group</a></li>
</ul>
17 years, 2 months
rhmessaging commits: r1061 - in mgmt: cumin/python/wooly and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 10:32:02 -0400 (Sun, 14 Oct 2007)
New Revision: 1061
Modified:
mgmt/cumin/python/cumin/cluster.py
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/queue.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
mgmt/cumin/python/cumin/virtualhost.py
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/wooly/__init__.py
mgmt/notes/Todo
Log:
Moves the get_object machinery down into Widget and out of CuminFrame.
Removes ServerGroupFrame.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -46,7 +46,6 @@
self.param = ClusterParameter(app, "id")
self.add_parameter(self.param)
- self.set_object_attribute(self.param)
self.view = ClusterView(app, "view")
self.add_child(self.view)
@@ -57,6 +56,9 @@
self.vhost = VirtualHostFrame(app, "vhost")
self.add_child(self.vhost)
+ def get_object(self, session, object):
+ return self.param.get(session)
+
def set_cluster(self, session, cluster):
self.param.set(session, cluster)
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/exchange.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -61,11 +61,13 @@
self.param = ExchangeParameter(app, "id")
self.add_parameter(self.param)
- self.set_object_attribute(self.param)
self.view = ExchangeView(app, "view")
self.add_child(self.view)
+ def get_object(self, session, object):
+ return self.param.get(session)
+
def set_exchange(self, session, exchange):
return self.param.set(session, exchange)
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/page.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -16,6 +16,9 @@
self.frames = self.FramesAttribute(app, "frames")
self.add_attribute(self.frames)
+ self.object = Attribute(app, "object")
+ self.add_attribute(self.object)
+
self.modal = Attribute(app, "modal")
self.add_attribute(self.modal)
@@ -89,6 +92,7 @@
return self.frames.get(session)
def render_frames(self, session, object):
+ self.object.set(session, object)
writer = Writer()
for frame in self.get_frames(session):
@@ -97,10 +101,12 @@
return writer.to_string()
def render_frame_href(self, session, frame):
- return frame.render_href(session, frame.get_object(session))
+ object = frame.get_object(session, self.object.get(session))
+ return frame.render_href(session, object)
def render_frame_title(self, session, frame):
- return frame.render_title(session, frame.get_object(session))
+ object = frame.get_object(session, self.object.get(session))
+ return frame.render_title(session, object)
class MainFrame(CuminFrame):
def __init__(self, app, name):
@@ -118,7 +124,7 @@
self.group_add = ServerGroupAdd(app, "group_add")
self.add_child(self.group_add)
- def get_object(self, session):
+ def get_object(self, session, object):
return self.app.model
def show_view(self, session):
Modified: mgmt/cumin/python/cumin/queue.py
===================================================================
--- mgmt/cumin/python/cumin/queue.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/queue.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -64,11 +64,13 @@
self.param = QueueParameter(app, "id")
self.add_parameter(self.param)
- self.set_object_attribute(self.param)
self.view = QueueView(app, "view")
self.add_child(self.view)
+ def get_object(self, session, object):
+ return self.param.get(session)
+
def set_queue(self, session, queue):
return self.param.set(session, queue)
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/server.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -44,7 +44,6 @@
self.param = ServerParameter(app, "id")
self.add_parameter(self.param)
- self.set_object_attribute(self.param)
self.view = ServerView(app, "view")
self.add_child(self.view)
@@ -52,6 +51,9 @@
self.vhost = VirtualHostFrame(app, "vhost")
self.add_child(self.vhost)
+ def get_object(self, session, object):
+ return self.param.get(session)
+
def set_server(self, session, server):
self.param.set(session, server)
@@ -136,7 +138,7 @@
def __init__(self, app, name):
super(ServerBrowser, self).__init__(app, name)
- self.param = ServerGroupParameter(app, "param")
+ self.param = ServerGroupParameter(app, "group")
self.add_parameter(self.param)
self.groups = self.BrowserGroups(app, "groups")
@@ -160,12 +162,12 @@
self.page().main.show_group_add(branch)
return branch.marshal()
- def render_remove_group_link(self, session, model):
+ def render_remove_group_href(self, session, model):
group = self.param.get(session)
if group:
branch = session.branch()
- return "<li>%s</li>" % link(branch.marshal(), "Remove This Group")
+ return branch.marshal()
class BrowserGroups(Widget):
def __init__(self, app, name):
@@ -220,16 +222,6 @@
def do_marshal(self, group):
return str(group.id)
-class ServerGroupFrame(CuminFrame):
- def __init__(self, app, name):
- super(ServerGroupFrame, self).__init__(app, name)
-
- self.add = ServerGroupAdd(app, "add")
- self.add_child(self.add)
-
- self.edit = ServerGroupEdit(app, "edit")
- self.add_child(self.edit)
-
class ServerGroupForm(CuminForm):
def __init__(self, app, name):
super(ServerGroupForm, self).__init__(app, name)
@@ -237,7 +229,7 @@
self.group_name = TextInput(app, "name", self)
self.add_child(self.group_name)
-class ServerGroupAdd(ServerGroupForm):
+class ServerGroupAdd(ServerGroupForm, Frame):
def render_title(self, session, model):
return "Add Group"
@@ -247,5 +239,22 @@
session.set_redirect(branch.marshal())
class ServerGroupEdit(ServerGroupForm):
+ def __init__(self, app, name):
+ super(ServerGroupEdit, self).__init__(app, name)
+
+ self.param = ServerGroupParameter(app, "id")
+ self.add_parameter(self.param)
+
+ def get_object(self, session):
+ return self.param.get(session)
+
+ def set_server_group(self, session, group):
+ self.param.set(session, group)
+
def render_title(self, session, group):
return "Edit Group '%s'" % group.name
+
+ def on_cancel(self, session, model):
+ branch = session.branch()
+ self.page().main.show_view(branch)
+ session.set_redirect(branch.marshal())
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 14:32:02 UTC (rev 1061)
@@ -76,7 +76,7 @@
margin: 0 0 1em 0;
}
-.ServerBrowser.groups ul li {
+.ServerBrowser.groups ul.groups li {
margin: 0 0 0 0.5em;
}
@@ -96,19 +96,23 @@
[ServerBrowser.html]
<div class="ServerBrowser groups">
<h2>Selection</h2>
- <ul><li>{all_servers_link}</li></ul>
+ <ul class="groups"><li>{all_servers_link}</li></ul>
{groups}
<ul class="actions">
- <li><a href="{add_group_href}">Add Group</a>
+ <li><a href="{add_group_href}">Add Group</a></li>
</ul>
+
+ <ul class="actions">
+ <li><a href="{edit_group_href}">Edit Group</a></li>
+ <li><a href="{remove_group_href}">Remove Group</a></li>
+ </ul>
</div>
<div class="ServerBrowser servers">
<ul class="actions">
<li><a href="">Add Server</a></li>
<li><a href="">Shutdown Servers</a></li>
- {remove_group_link}
</ul>
{servers}
@@ -119,7 +123,7 @@
[BrowserGroups.type_html]
<h2>{type_name}</h2>
-<ul>{groups}</ul>
+<ul class="groups">{groups}</ul>
[BrowserGroups.group_html]
<li>{group_link}</li>
Modified: mgmt/cumin/python/cumin/virtualhost.py
===================================================================
--- mgmt/cumin/python/cumin/virtualhost.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/virtualhost.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -34,7 +34,6 @@
self.param = VirtualHostParameter(app, "id")
self.add_parameter(self.param)
- self.set_object_attribute(self.param)
self.queue = QueueFrame(app, "queue")
self.add_child(self.queue)
@@ -45,6 +44,9 @@
self.view = VirtualHostView(app, "view")
self.add_child(self.view)
+ def get_object(self, session, object):
+ return self.param.get(session)
+
def set_virtual_host(self, session, vhost):
return self.param.set(session, vhost)
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/cumin/widgets.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -15,31 +15,14 @@
return "<span class=\"none\">None</span>"
class CuminFrame(Frame, ModeSet):
- def __init__(self, app, name):
- super(CuminFrame, self).__init__(app, name)
-
- self.object = None
-
- def set_object_attribute(self, attribute):
- self.object = attribute
-
- def get_object(self, session):
- if self.object:
- return self.object.get(session)
-
def show_view(self, session):
pass
def do_process(self, session, object):
self.page().get_frames(session).append(self)
- new_object = self.get_object(session)
- super(CuminFrame, self).do_process(session, new_object)
+ super(CuminFrame, self).do_process(session, object)
- def do_render(self, session, object):
- new_object = self.get_object(session)
- return super(CuminFrame, self).do_render(session, new_object)
-
def render_href(self, session, vhost):
branch = session.branch()
self.page().set_current_frame(branch, self)
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/cumin/python/wooly/__init__.py 2007-10-14 14:32:02 UTC (rev 1061)
@@ -108,12 +108,16 @@
return params
+ def get_object(self, session, object):
+ return object
+
def process(self, session, object):
if session.debug:
call = WidgetCall(session.debug.process_stack,
self, session, object)
call.open()
+ object = self.get_object(session, object)
self.do_process(session, object)
if session.debug:
@@ -129,6 +133,7 @@
self, session, object)
call.open()
+ object = self.get_object(session, object)
string = self.do_render(session, object)
if session.debug:
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-14 13:11:12 UTC (rev 1060)
+++ mgmt/notes/Todo 2007-10-14 14:32:02 UTC (rev 1061)
@@ -70,4 +70,7 @@
* Consider having a cssclass set on widgets
- * Use page attributes for session errors, redirect
\ No newline at end of file
+ * Use page attributes for session errors, redirect
+
+ * See if we can eliminate the attr/param distinction, and use whether
+ or not a param is added to a widget via add_param to do that
17 years, 2 months
rhmessaging commits: r1060 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 09:11:12 -0400 (Sun, 14 Oct 2007)
New Revision: 1060
Modified:
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/wooly/__init__.py
Log:
Moves the set_object functionality off of Frame and on to CuminFrame.
There are cases where just the state-scoping of Frame is desirable.
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2007-10-14 13:09:37 UTC (rev 1059)
+++ mgmt/cumin/python/cumin/widgets.py 2007-10-14 13:11:12 UTC (rev 1060)
@@ -15,14 +15,31 @@
return "<span class=\"none\">None</span>"
class CuminFrame(Frame, ModeSet):
- def do_process(self, session, object):
- self.page().get_frames(session).append(self)
+ def __init__(self, app, name):
+ super(CuminFrame, self).__init__(app, name)
- super(CuminFrame, self).do_process(session, object)
+ self.object = None
+ def set_object_attribute(self, attribute):
+ self.object = attribute
+
+ def get_object(self, session):
+ if self.object:
+ return self.object.get(session)
+
def show_view(self, session):
pass
+ def do_process(self, session, object):
+ self.page().get_frames(session).append(self)
+
+ new_object = self.get_object(session)
+ super(CuminFrame, self).do_process(session, new_object)
+
+ def do_render(self, session, object):
+ new_object = self.get_object(session)
+ return super(CuminFrame, self).do_render(session, new_object)
+
def render_href(self, session, vhost):
branch = session.branch()
self.page().set_current_frame(branch, self)
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-10-14 13:09:37 UTC (rev 1059)
+++ mgmt/cumin/python/wooly/__init__.py 2007-10-14 13:11:12 UTC (rev 1060)
@@ -245,32 +245,12 @@
return string
class Frame(Widget):
- def __init__(self, app, name):
- super(Frame, self).__init__(app, name)
-
- self.object = None
-
- def set_object_attribute(self, attribute):
- self.object = attribute
-
- def get_object(self, session):
- if self.object:
- return self.object.get(session)
-
def get_saved_parameters(self, session):
frame = self.page().get_current_frame(session)
if self is frame or self in frame.ancestors():
return super(Frame, self).get_saved_parameters(session)
- def do_process(self, session, object):
- new_object = self.get_object(session)
- super(Frame, self).do_process(session, new_object)
-
- def do_render(self, session, object):
- new_object = self.get_object(session)
- return super(Frame, self).do_render(session, new_object)
-
class Page(Frame):
xml_content_type = "text/xml"
html_content_type = "text/html"
17 years, 2 months
rhmessaging commits: r1059 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 09:09:37 -0400 (Sun, 14 Oct 2007)
New Revision: 1059
Modified:
mgmt/cumin/python/cumin/server.strings
Log:
Small visual improvements to the group list in the server browser
view.
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 04:30:43 UTC (rev 1058)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 13:09:37 UTC (rev 1059)
@@ -76,6 +76,10 @@
margin: 0 0 1em 0;
}
+.ServerBrowser.groups ul li {
+ margin: 0 0 0 0.5em;
+}
+
.ServerBrowser.groups h2 {
color: #564979;
font-weight: bold;
@@ -91,6 +95,7 @@
[ServerBrowser.html]
<div class="ServerBrowser groups">
+ <h2>Selection</h2>
<ul><li>{all_servers_link}</li></ul>
{groups}
17 years, 2 months