rhmessaging commits: r3293 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-15 15:26:33 -0400 (Wed, 15 Apr 2009)
New Revision: 3293
Modified:
mgmt/trunk/wooly/python/wooly/widgets.py
Log:
Avoid app error when escaping empty string (or None)
Modified: mgmt/trunk/wooly/python/wooly/widgets.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/widgets.py 2009-04-15 19:11:51 UTC (rev 3292)
+++ mgmt/trunk/wooly/python/wooly/widgets.py 2009-04-15 19:26:33 UTC (rev 3293)
@@ -468,6 +468,8 @@
return str(string).replace("&", "&")
def escape_entity(string, exceptions=None):
+ if not string:
+ return ""
t = ""
ex = exceptions or list()
for i in string:
15 years, 2 months
rhmessaging commits: r3292 - store/branches.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-04-15 15:11:51 -0400 (Wed, 15 Apr 2009)
New Revision: 3292
Added:
store/branches/mrg-1.0.1/
Log:
Created mrg-1.0.1 branch
Copied: store/branches/mrg-1.0.1 (from rev 2518, store/trunk)
15 years, 2 months
rhmessaging commits: r3291 - store/branches.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-04-15 15:11:09 -0400 (Wed, 15 Apr 2009)
New Revision: 3291
Added:
store/branches/mrg-1.1/
Log:
Created mrg-1.1 branch
Copied: store/branches/mrg-1.1 (from rev 3036, store/trunk)
15 years, 2 months
rhmessaging commits: r3290 - store/branches.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-04-15 15:06:29 -0400 (Wed, 15 Apr 2009)
New Revision: 3290
Added:
store/branches/mrg-1.1.1/
Log:
Created mrg-1.1.1 branch
Copied: store/branches/mrg-1.1.1 (from rev 3206, store/trunk)
15 years, 2 months
rhmessaging commits: r3289 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-15 11:45:36 -0400 (Wed, 15 Apr 2009)
New Revision: 3289
Modified:
mgmt/trunk/wooly/python/wooly/pages.strings
Log:
Added DOCTYPE to UpdatePage xml for background updates (some tables contained – which was causing xml parsing errors)
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-04-14 19:33:26 UTC (rev 3288)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-04-15 15:45:36 UTC (rev 3289)
@@ -32,6 +32,10 @@
[UpdatePage.html]
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE widgets [
+ <!ELEMENT widgets (#PCDATA)>
+ <!ENTITY ndash "–">
+]>
<widgets>{widgets}</widgets>
[UpdatePage.widget_html]
15 years, 2 months
rhmessaging commits: r3288 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-14 15:33:26 -0400 (Tue, 14 Apr 2009)
New Revision: 3288
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Using anonymous function for chart updates
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-14 15:50:32 UTC (rev 3287)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-14 19:33:26 UTC (rev 3288)
@@ -138,15 +138,12 @@
</div>
<script type="text/javascript">
//<![CDATA[
-(function() {
- function update() {
- if (document.images["{id}"].className == "Loading")
- return;
- cumin.updateChart("{id}");
- }
-
- wooly.addPageUpdateListener(update);
-}())
+ wooly.addPageUpdateListener(
+ function () {
+ if (document.images["{id}"].className == "Loading")
+ return;
+ cumin.updateChart("{id}");
+ });
//]]>
</script>
15 years, 2 months
rhmessaging commits: r3287 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-14 11:50:32 -0400 (Tue, 14 Apr 2009)
New Revision: 3287
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Save and restore state of javascript duration switches.
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-04-14 15:46:34 UTC (rev 3286)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-04-14 15:50:32 UTC (rev 3287)
@@ -86,6 +86,9 @@
def get_click(self, state):
return "return changeDuration('%s', this, '%s')" % (state, self.parent.path)
+ def get_attributes(self, state):
+ return {'state': state}
+
class StatValueChart(Widget):
def __init__(self, app, name):
super(StatValueChart, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-14 15:46:34 UTC (rev 3286)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-14 15:50:32 UTC (rev 3287)
@@ -95,11 +95,39 @@
$(oImg).addEvent('load', function () {this.className = ""});
oImg.className = "Loading";
oImg.src = src;
+
+ var hash = wooly.session.hash();
+ hash[id] = state;
+ var href = window.location.href;
+ var hashIndex = href.indexOf("#");
+ if (hashIndex > 0) {
+ href = href.substring(0, hashIndex);
+ }
+ window.location.replace(href + "#" + hash.marshal());
}
return false;
-
}
+window.addEvent('domready',function () {
+ var hash = wooly.session.hash();
+ for (var key in hash) {
+ if (!(hash[key] instanceof Function)) {
+ var oChart = $(key);
+ if (oChart) {
+ var links = oChart.getElements('a');
+ var state = hash[key];
+
+ $each(links, function (item) {
+ if (item.get('state') == state) {
+ changeDuration(state, item, key);
+ }
+ });
+ }
+ }
+ }
+});
+
+
[StatValueChart.html]
<div class="StatValueChart" id="{id}">
<h2>{title}</h2>
15 years, 2 months
rhmessaging commits: r3286 - mgmt/trunk/wooly/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-14 11:46:34 -0400 (Tue, 14 Apr 2009)
New Revision: 3286
Modified:
mgmt/trunk/wooly/resources/wooly.js
Log:
Added session method to get current location.hash as a object
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-04-14 15:44:07 UTC (rev 3285)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-04-14 15:46:34 UTC (rev 3286)
@@ -654,6 +654,13 @@
return new Branch(url);
}
+ this.hash = function () {
+ var h = window.location.hash;
+ if ((h.length > 0) && (h.substring(0, 1) == "#"))
+ h = h.substring(1, h.length );
+ return wooly.session.branch(h);
+ }
+
/* convert string query into cumin session object */
function Branch (s) {
15 years, 2 months
rhmessaging commits: r3285 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-14 11:44:07 -0400 (Tue, 14 Apr 2009)
New Revision: 3285
Modified:
mgmt/trunk/cumin/python/cumin/formats.py
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
New optional argument to add attributes to a link <a foo="bar">
Modified: mgmt/trunk/cumin/python/cumin/formats.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/formats.py 2009-04-13 17:51:06 UTC (rev 3284)
+++ mgmt/trunk/cumin/python/cumin/formats.py 2009-04-14 15:44:07 UTC (rev 3285)
@@ -119,16 +119,17 @@
return string
-def fmt_link(href, content, class_="", id="", link_title="", bm="", click=""):
+def fmt_link(href, content, class_="", id="", link_title="", bm="", click="", attribs={}):
full_id = id and " id=\"%s\"" % id or ""
full_bm = bm and "#%s" % bm or ""
full_class = class_ and " class=\"%s\"" % class_ or ""
full_title = link_title and " title=\"%s\"" % link_title or ""
full_click = click and " onclick=\"%s\"" % click or ""
+ full_attribs = " ".join(("%s=\"%s\"" % (x, attribs[x]) for x in attribs)) or ""
- return "<a%s href=\"%s%s\"%s%s%s>%s</a>" % \
+ return "<a%s href=\"%s%s\"%s%s%s %s>%s</a>" % \
(full_id, href, full_bm, full_class,
- full_title, full_click, content)
+ full_title, full_click, full_attribs, content)
def fmt_olink(session, object, selected=False, name=None, pre=16, post=0):
if name is None:
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-04-13 17:51:06 UTC (rev 3284)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-04-14 15:44:07 UTC (rev 3285)
@@ -562,6 +562,9 @@
def get_click(self, state):
return ""
+
+ def get_attributes(self, state):
+ return dict()
def get_param_id(self):
""" needed because the SubmitSwitch class uses
@@ -578,8 +581,9 @@
class_ = self.get(session) == state and "selected"
bm = self.get_bookmark(state)
click = self.get_click(state)
+ attribs = self.get_attributes(state)
- return fmt_link(branch.marshal(), title, class_, link_title=hover, bm=bm, click=click)
+ return fmt_link(branch.marshal(), title, class_, link_title=hover, bm=bm, click=click, attribs=attribs)
class GroupSwitch(StateSwitch):
def __init__(self, app, name):
15 years, 2 months
rhmessaging commits: r3284 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-13 13:51:06 -0400 (Mon, 13 Apr 2009)
New Revision: 3284
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Disable auto-update of charts while duration is being switched (allows charts that take longer than the update interval to be drawn).
Change style of chart while duration is being switched.
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-13 17:25:15 UTC (rev 3283)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-13 17:51:06 UTC (rev 3284)
@@ -71,6 +71,10 @@
div.StatValueChart img {
margin: 0 0 0 1em;
}
+div.StatValueChart img.Loading {
+ opacity: 0.5;
+ cursor: wait;
+}
[JSDurationSwitch.javascript]
function changeDuration(state, a, id) {
@@ -87,9 +91,13 @@
branch.duration = state;
src = branch.marshal();
src = cumin.refreshTime(src);
+
+ $(oImg).addEvent('load', function () {this.className = ""});
+ oImg.className = "Loading";
oImg.src = src;
}
return false;
+
}
[StatValueChart.html]
@@ -101,13 +109,17 @@
<img id="{id}" src="{href}" height="{height}" width="{width}" alt="stats" />
</div>
<script type="text/javascript">
+//<![CDATA[
(function() {
function update() {
+ if (document.images["{id}"].className == "Loading")
+ return;
cumin.updateChart("{id}");
}
wooly.addPageUpdateListener(update);
}())
+//]]>
</script>
[StatValueChart.stat_html]
@@ -143,13 +155,14 @@
src = branch.marshal();
src = cumin.refreshTime(src);
- oImg.style.visibility = "hidden"
+ oImg.style.visibility = "hidden";
oImg.src = src;
}
}
$('{id}').onfullpage = function (width, height) { stackedNotify(true, width, height); };
$('{id}').onrestore = function () { stackedNotify(false, {width}, 100); };
- document.images['{id}'].onload = function () {this.style.visibility = "visible"};
- document.images['{id}'].ondblclick = function () {fullpage(this.parentNode.parentNode.parentNode.getElementsByTagName('p')[0])};
+ var oImg = document.images['{id}'];
+ $(oImg).addEvent('load', function () { this.style.visibility = "visible" });
+ $(oImg).addEvent('dblclick', function () {fullpage(this.parentNode.parentNode.parentNode.getElementsByTagName('p')[0])});
//]]>
</script>
15 years, 2 months