rhmessaging commits: r1058 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-14 00:30:43 -0400 (Sun, 14 Oct 2007)
New Revision: 1058
Modified:
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Hook up the group add form to main view links.
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-14 02:50:40 UTC (rev 1057)
+++ mgmt/cumin/python/cumin/server.py 2007-10-14 04:30:43 UTC (rev 1058)
@@ -155,6 +155,11 @@
self.param.set(branch, None)
return link(branch.marshal(), "All Servers", class_)
+ def render_add_group_href(self, session, model):
+ branch = session.branch()
+ self.page().main.show_group_add(branch)
+ return branch.marshal()
+
def render_remove_group_link(self, session, model):
group = self.param.get(session)
@@ -169,11 +174,6 @@
self.type_tmpl = Template(self, "type_html")
self.group_tmpl = Template(self, "group_html")
- def render_add_group_href(self, session, model):
- branch = session.branch()
- self.page().main.show_group_add(branch)
- return branch.marshal()
-
def get_items(self, session, model):
return sorted(model.get_server_group_types(), cmp, lambda x: x.name)
@@ -220,6 +220,16 @@
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)
@@ -232,7 +242,9 @@
return "Add Group"
def on_cancel(self, session, model):
- pass
+ branch = session.branch()
+ self.page().main.show_view(branch)
+ session.set_redirect(branch.marshal())
class ServerGroupEdit(ServerGroupForm):
def render_title(self, session, group):
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 02:50:40 UTC (rev 1057)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 04:30:43 UTC (rev 1058)
@@ -92,7 +92,12 @@
[ServerBrowser.html]
<div class="ServerBrowser groups">
<ul><li>{all_servers_link}</li></ul>
+
{groups}
+
+ <ul class="actions">
+ <li><a href="{add_group_href}">Add Group</a>
+ </ul>
</div>
<div class="ServerBrowser servers">
<ul class="actions">
@@ -107,10 +112,6 @@
[BrowserGroups.html]
{types}
-<ul class="actions">
- <li><a href="{add_group_href}">Add Group</a>
-</ul>
-
[BrowserGroups.type_html]
<h2>{type_name}</h2>
<ul>{groups}</ul>
17 years, 2 months
rhmessaging commits: r1057 - in mgmt/cumin/python: wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 22:50:40 -0400 (Sat, 13 Oct 2007)
New Revision: 1057
Modified:
mgmt/cumin/python/cumin/page.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
mgmt/cumin/python/wooly/__init__.py
Log:
Add a preliminary version of the server group form.
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-14 02:47:50 UTC (rev 1056)
+++ mgmt/cumin/python/cumin/page.py 2007-10-14 02:50:40 UTC (rev 1057)
@@ -115,6 +115,9 @@
self.cluster = ClusterFrame(app, "cluster")
self.add_child(self.cluster)
+ self.group_add = ServerGroupAdd(app, "group_add")
+ self.add_child(self.group_add)
+
def get_object(self, session):
return self.app.model
@@ -133,6 +136,9 @@
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 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 02:47:50 UTC (rev 1056)
+++ mgmt/cumin/python/cumin/server.py 2007-10-14 02:50:40 UTC (rev 1057)
@@ -169,6 +169,11 @@
self.type_tmpl = Template(self, "type_html")
self.group_tmpl = Template(self, "group_html")
+ def render_add_group_href(self, session, model):
+ branch = session.branch()
+ self.page().main.show_group_add(branch)
+ return branch.marshal()
+
def get_items(self, session, model):
return sorted(model.get_server_group_types(), cmp, lambda x: x.name)
@@ -215,45 +220,20 @@
def do_marshal(self, group):
return str(group.id)
-class ServerGroupFrame(CuminFrame):
+class ServerGroupForm(CuminForm):
def __init__(self, app, name):
- super(ServerGroupFrame, self).__init__(app, name)
+ super(ServerGroupForm, self).__init__(app, name)
- self.param = ServerGroupParameter(app, "id")
- self.add_parameter(self.param)
- self.set_object_attribute(self.param)
+ self.group_name = TextInput(app, "name", self)
+ self.add_child(self.group_name)
- self.view = ServerGroupView(app, "view")
- self.add_child(self.view)
+class ServerGroupAdd(ServerGroupForm):
+ def render_title(self, session, model):
+ return "Add Group"
- def set_server_group(self, session, group):
- self.param.set(session, group)
+ def on_cancel(self, session, model):
+ pass
- def show_view(self, session):
- self.show_mode(session, self.view)
-
-class ServerGroupView(Widget):
- def __init__(self, app, name):
- super(ServerGroupView, self).__init__(app, name)
-
- self.pgroups = self.GroupParents(app, "parent_groups")
- self.add_child(self.pgroups)
-
- self.tabs = TabSet(app, "tabs")
- self.add_child(self.tabs)
-
- self.tabs.add_child(self.GroupServers(app, "servers"))
-
+class ServerGroupEdit(ServerGroupForm):
def render_title(self, session, group):
- return "Server Group '%s'" % group.name
-
- class GroupParents(ServerGroupSet):
- def get_items(self, session, group):
- return sorted(group.parent_items(), cmp, lambda x: x.name)
-
- class GroupServers(ServerSet):
- def get_items(self, session, group):
- return sorted(group.server_items(), cmp, lambda x: x.name)
-
- def render_title(self, session, group):
- return "Servers (%i)" % len(group.server_items())
+ return "Edit Group '%s'" % group.name
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-14 02:47:50 UTC (rev 1056)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-14 02:50:40 UTC (rev 1057)
@@ -37,9 +37,6 @@
{tabs}
</div>
-[ServerServerGroups.html]
-<ul class="comma">{items}</ul>
-
[ConfigTab.html]
<ul class="actions">
<li><a href="">Edit This Configuration</a></li>
@@ -111,7 +108,7 @@
{types}
<ul class="actions">
- <li><a href="">Add Group</a>
+ <li><a href="{add_group_href}">Add Group</a>
</ul>
[BrowserGroups.type_html]
@@ -120,3 +117,28 @@
[BrowserGroups.group_html]
<li>{group_link}</li>
+
+[ServerGroupForm.html]
+<form id="{id}" class="ServerGroupForm 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">
+ <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>
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2007-10-14 02:47:50 UTC (rev 1056)
+++ mgmt/cumin/python/wooly/__init__.py 2007-10-14 02:50:40 UTC (rev 1057)
@@ -500,9 +500,6 @@
def set_redirect(self, redirect):
self.redirect = redirect
- def save_parameters(self, params):
- self.saved_parameters.extend(params)
-
def marshal(self):
page = self.marshal_page()
vars = self.marshal_url_vars()
17 years, 2 months
rhmessaging commits: r1056 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 22:47:50 -0400 (Sat, 13 Oct 2007)
New Revision: 1056
Modified:
mgmt/cumin/python/cumin/queue.strings
Log:
Remove a workaround for a template bug.
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-10-14 02:43:55 UTC (rev 1055)
+++ mgmt/cumin/python/cumin/queue.strings 2007-10-14 02:47:50 UTC (rev 1056)
@@ -158,10 +158,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: r1055 - mgmt/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 22:43:55 -0400 (Sat, 13 Oct 2007)
New Revision: 1055
Modified:
mgmt/cumin/python/wooly/forms.py
Log:
Use the get_saved_parameters method, which replaced save_parameters.
Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py 2007-10-13 23:43:12 UTC (rev 1054)
+++ mgmt/cumin/python/wooly/forms.py 2007-10-14 02:43:55 UTC (rev 1055)
@@ -17,9 +17,7 @@
def render_hidden_inputs(self, session, object):
writer = Writer()
- session.get_page().save_parameters(session)
-
- params = set(session.saved_parameters)
+ params = set(session.get_page().get_saved_parameters(session))
params.difference_update(self.form_params)
for param in params:
17 years, 2 months
rhmessaging commits: r1054 - mgmt.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 19:43:12 -0400 (Sat, 13 Oct 2007)
New Revision: 1054
Added:
mgmt/README
Log:
Add some simple instructions for using the devel environment.
Added: mgmt/README
===================================================================
--- mgmt/README (rev 0)
+++ mgmt/README 2007-10-13 23:43:12 UTC (rev 1054)
@@ -0,0 +1,24 @@
+This is the development environment for the Red Hat messaging
+management suite.
+
+To use the development environment, you need to source the
+etc/devel.profile file in your shell. Then commands such as
+cumin-test can be run.
+
+For instance:
+
+ $ svn co https://svn.jboss.org/repos/rhmessaging/mgmt/
+ $ cd mgmt
+ $ . etc/devel.profile
+ $ cumin-test
+
+For your convenience, there is a script, bin/devel, which you can use
+to start up the devel environment. I recommend putting a small
+wrapper script like that below somewhere in your path:
+
+ $ cat ~/bin/mgmt
+ #!/bin/bash
+
+ export DEVEL_HOME="${HOME}/mgmt"
+
+ exec "${DEVEL_HOME}/bin/devel"
17 years, 2 months
rhmessaging commits: r1053 - mgmt/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 19:26:38 -0400 (Sat, 13 Oct 2007)
New Revision: 1053
Modified:
mgmt/bin/devel
Log:
Enter the devel dir on starting the devel environment.
Modified: mgmt/bin/devel
===================================================================
--- mgmt/bin/devel 2007-10-13 23:13:07 UTC (rev 1052)
+++ mgmt/bin/devel 2007-10-13 23:26:38 UTC (rev 1053)
@@ -7,8 +7,10 @@
echo "DEVEL_HOME is ${DEVEL_HOME}"
-source "${DEVEL_HOME}/etc/devel.profile"
+cd "$DEVEL_HOME"
+source "etc/devel.profile"
+
devel-etags
-exec emacs -nw -l "${DEVEL_HOME}/etc/devel.el"
+exec emacs -nw -l "etc/devel.el"
17 years, 2 months
rhmessaging commits: r1052 - mgmt/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 19:13:07 -0400 (Sat, 13 Oct 2007)
New Revision: 1052
Modified:
mgmt/bin/devel
Log:
Fixes a rename missed.
Modified: mgmt/bin/devel
===================================================================
--- mgmt/bin/devel 2007-10-13 23:04:22 UTC (rev 1051)
+++ mgmt/bin/devel 2007-10-13 23:13:07 UTC (rev 1052)
@@ -11,4 +11,4 @@
devel-etags
-exec emacs -nw -l "${DEVEL_HOME}/etc/cumindev.el"
+exec emacs -nw -l "${DEVEL_HOME}/etc/devel.el"
17 years, 2 months
rhmessaging commits: r1051 - in mgmt: etc and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 19:04:22 -0400 (Sat, 13 Oct 2007)
New Revision: 1051
Added:
mgmt/bin/devel
mgmt/bin/devel-etags
mgmt/etc/devel.el
mgmt/etc/devel.profile
Removed:
mgmt/bin/cumindev
mgmt/bin/cumindev-etags
mgmt/etc/cumindev.el
mgmt/etc/cumindev.profile
Modified:
mgmt/etc/
Log:
Renames cumindev things to be called "devel", in order to reflect
that the mgmt development area will contain other modules as well.
Deleted: mgmt/bin/cumindev
===================================================================
--- mgmt/bin/cumindev 2007-10-13 22:59:10 UTC (rev 1050)
+++ mgmt/bin/cumindev 2007-10-13 23:04:22 UTC (rev 1051)
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-if [ -z "$CUMINDEV_HOME" ]; then
- echo "CUMINDEV_HOME not set"
- exit 1
-fi
-
-echo "CUMINDEV_HOME is ${CUMINDEV_HOME}"
-
-source "${CUMINDEV_HOME}/etc/cumindev.profile"
-
-cumindev-etags
-
-exec emacs -nw -l "${CUMINDEV_HOME}/etc/cumindev.el"
Deleted: mgmt/bin/cumindev-etags
===================================================================
--- mgmt/bin/cumindev-etags 2007-10-13 22:59:10 UTC (rev 1050)
+++ mgmt/bin/cumindev-etags 2007-10-13 23:04:22 UTC (rev 1051)
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-output="${CUMINDEV_HOME}/etc/cumindev.tags"
-
-find "$CUMINDEV_HOME" -name \*.py -print | etags --output="$output" -
-find "$CUMINDEV_HOME" -name \*.strings -print \
- | etags --append --output="$output" --regex='/^\[.*\][ \t]*$/\1/' -
Added: mgmt/bin/devel
===================================================================
--- mgmt/bin/devel (rev 0)
+++ mgmt/bin/devel 2007-10-13 23:04:22 UTC (rev 1051)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if [ -z "$DEVEL_HOME" ]; then
+ echo "DEVEL_HOME not set"
+ exit 1
+fi
+
+echo "DEVEL_HOME is ${DEVEL_HOME}"
+
+source "${DEVEL_HOME}/etc/devel.profile"
+
+devel-etags
+
+exec emacs -nw -l "${DEVEL_HOME}/etc/cumindev.el"
Property changes on: mgmt/bin/devel
___________________________________________________________________
Name: svn:executable
+ *
Added: mgmt/bin/devel-etags
===================================================================
--- mgmt/bin/devel-etags (rev 0)
+++ mgmt/bin/devel-etags 2007-10-13 23:04:22 UTC (rev 1051)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+output="${DEVEL_HOME}/etc/devel.tags"
+
+find "$DEVEL_HOME" -name \*.py -print | etags --output="$output" -
+find "$DEVEL_HOME" -name \*.strings -print \
+ | etags --append --output="$output" --regex='/^\[.*\][ \t]*$/\1/' -
Property changes on: mgmt/bin/devel-etags
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: mgmt/etc
___________________________________________________________________
Name: svn:ignore
- cumindev.tags
+ devel.tags
Deleted: mgmt/etc/cumindev.el
===================================================================
--- mgmt/etc/cumindev.el 2007-10-13 22:59:10 UTC (rev 1050)
+++ mgmt/etc/cumindev.el 2007-10-13 23:04:22 UTC (rev 1051)
@@ -1,13 +0,0 @@
-(setq cumindev-home (getenv "CUMINDEV_HOME"))
-
-(if cumindev-home
- (progn
- (shell "dev")
- (setq tags-file-name (concat cumindev-home "/etc/cumindev.tags"))
- (setq grep-command (concat "find " cumindev-home
- " -name \\*.py -print | xargs fgrep -n "))
- (setq compile-command "cumin-test")
- (setq auto-mode-alist
- (cons '("\\.strings$" . html-mode) auto-mode-alist)))
- (display-warning 'cumindev
- "Environment variable CUMINDEV_HOME not set" :error))
Deleted: mgmt/etc/cumindev.profile
===================================================================
--- mgmt/etc/cumindev.profile 2007-10-13 22:59:10 UTC (rev 1050)
+++ mgmt/etc/cumindev.profile 2007-10-13 23:04:22 UTC (rev 1051)
@@ -1,11 +0,0 @@
-if [ -z "$CUMINDEV_HOME" ]; then
- export CUMINDEV_HOME="$PWD"
-fi
-
-export CUMIN_HOME="$CUMINDEV_HOME"/cumin-test-0
-
-export PYTHONPATH="$CUMIN_HOME"/lib:"$CUMIN_HOME"/python
-
-export CUMINDEV_ORIGINAL_PATH="$PATH"
-
-export PATH="$CUMIN_HOME"/bin:"$CUMINDEV_HOME"/bin:"$CUMINDEV_ORIGINAL_PATH"
Added: mgmt/etc/devel.el
===================================================================
--- mgmt/etc/devel.el (rev 0)
+++ mgmt/etc/devel.el 2007-10-13 23:04:22 UTC (rev 1051)
@@ -0,0 +1,13 @@
+(setq devel-home (getenv "DEVEL_HOME"))
+
+(if devel-home
+ (progn
+ (shell "dev")
+ (setq tags-file-name (concat devel-home "/etc/devel.tags"))
+ (setq grep-command (concat "find " devel-home
+ " -name \\*.py -print | xargs fgrep -n "))
+ (setq compile-command "cumin-test")
+ (setq auto-mode-alist
+ (cons '("\\.strings$" . html-mode) auto-mode-alist)))
+ (display-warning 'devel
+ "Environment variable DEVEL_HOME not set" :error))
Added: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile (rev 0)
+++ mgmt/etc/devel.profile 2007-10-13 23:04:22 UTC (rev 1051)
@@ -0,0 +1,11 @@
+if [ -z "$DEVEL_HOME" ]; then
+ export DEVEL_HOME="$PWD"
+fi
+
+export CUMIN_HOME="$DEVEL_HOME"/cumin-test-0
+
+export PYTHONPATH="$CUMIN_HOME"/lib:"$CUMIN_HOME"/python
+
+export DEVEL_ORIGINAL_PATH="$PATH"
+
+export PATH="$CUMIN_HOME"/bin:"$DEVEL_HOME"/bin:"$DEVEL_ORIGINAL_PATH"
17 years, 2 months
rhmessaging commits: r1050 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 18:59:10 -0400 (Sat, 13 Oct 2007)
New Revision: 1050
Modified:
mgmt/cumin/python/cumin/page.py
Log:
Removes an import of a file that's been removed
Modified: mgmt/cumin/python/cumin/page.py
===================================================================
--- mgmt/cumin/python/cumin/page.py 2007-10-13 19:20:49 UTC (rev 1049)
+++ mgmt/cumin/python/cumin/page.py 2007-10-13 22:59:10 UTC (rev 1050)
@@ -1,5 +1,4 @@
from wooly import *
-from wooly.debug import *
from wooly.widgets import *
from wooly.resources import *
17 years, 2 months
rhmessaging commits: r1049 - mgmt/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2007-10-13 15:20:49 -0400 (Sat, 13 Oct 2007)
New Revision: 1049
Modified:
mgmt/bin/cumindev
Log:
Instead of assuming, error out if CUMINDEV_HOME isn't set.
Modified: mgmt/bin/cumindev
===================================================================
--- mgmt/bin/cumindev 2007-10-13 19:06:31 UTC (rev 1048)
+++ mgmt/bin/cumindev 2007-10-13 19:20:49 UTC (rev 1049)
@@ -1,7 +1,8 @@
#!/bin/bash
if [ -z "$CUMINDEV_HOME" ]; then
- export CUMINDEV_HOME="${HOME}/cumindev"
+ echo "CUMINDEV_HOME not set"
+ exit 1
fi
echo "CUMINDEV_HOME is ${CUMINDEV_HOME}"
17 years, 2 months