rhmessaging commits: r3246 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-31 10:07:45 -0400 (Tue, 31 Mar 2009)
New Revision: 3246
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Changed the full page icon title to "Restore" when in full page mode.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-03-31 14:06:24 UTC (rev 3245)
+++ mgmt/trunk/cumin/resources/app.js 2009-03-31 14:07:45 UTC (rev 3246)
@@ -128,13 +128,13 @@
document.body.style.height = "100%";
document.body.appendChild(oFullPage);
- oFullPage.getElement("p.fullpageIcon").setProperty("title", "Minimize");
+ oFullPage.getElement("p.fullpageIcon").setProperty("title", "Restore");
setFullpageParam(true, oFullPage);
var onfullpage = oFullPage.onfullpage;
if (onfullpage) onfullpage($(oFullPage).getCoordinates().width);
}
}
-
+
// sets/clears the fullpage parameter in the wooly background update url
function setFullpageParam(set, oFullPage) {
var branch = wooly.branchIntervalUpdate();
@@ -150,5 +150,4 @@
}
wooly.restartIntervalUpdate(branch.marshal());
}
-}
-
+}
\ No newline at end of file
15 years, 8 months
rhmessaging commits: r3245 - mgmt/trunk/notes.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-31 10:06:24 -0400 (Tue, 31 Mar 2009)
New Revision: 3245
Modified:
mgmt/trunk/notes/fullpage widgets.txt
Log:
Added info about calling a javascript function when a widget is made full page and restored.
Modified: mgmt/trunk/notes/fullpage widgets.txt
===================================================================
--- mgmt/trunk/notes/fullpage widgets.txt 2009-03-31 13:31:54 UTC (rev 3244)
+++ mgmt/trunk/notes/fullpage widgets.txt 2009-03-31 14:06:24 UTC (rev 3245)
@@ -23,8 +23,12 @@
<p class="explain fullpageable">
{important_stuff}
</p>
-
-Background updating of widgets and fullpage:
+
+If you need to be notified when the widget is made full page, there are two mechanisms:
+1) Notify the python code that the widget is now in full page mode. This lets the widget render itself based on it's container size.
+2) Notify the javascript code. If the widget doesn't auto-update, this lets you adjust the widget's presentation in javascript.
+
+1) Background updating of widgets and fullpage:
Sometimes the HTML you want to make fullpagable will contain one or more widgets.
If those widgets get automatically updated (using self.update_enabled = True),
AND you want the widgets to be aware of when they are being rendered full page, you need
@@ -45,6 +49,12 @@
# if width is None, we are not in fullpage
# if width has a value, we are in fullpage and width is the available size in pixels
+2) To have a javascript function called when the widget is made full page, add the onfullpage and onrestore attributes to the widget.
+For example:
+ $('slot_visualization').onfullpage = function (width) { vis.notify(true, width); };
+ $('slot_visualization').onrestore = function () { vis.notify(false, original_clip_size); };
+The width passed to the onfullpage function is the new width of the widget when in full page mode.
+
How it looks:
A block of HTML that is fullpageable will have a special mouseover style.
When the mouse if over any part of the HTML, there will be a light purple bar at the top of the HTML with a
15 years, 8 months
rhmessaging commits: r3244 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-31 09:31:54 -0400 (Tue, 31 Mar 2009)
New Revision: 3244
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
Prevent slot info popup from showing above the top of the page.
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-31 10:06:45 UTC (rev 3243)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-31 13:31:54 UTC (rev 3244)
@@ -606,13 +606,22 @@
var y = Math.floor(args.index / slot_map_info.cols) * slot_map_info.size + slot_clip_top;
// candidate pos for popup
- var top = (abs_pos.y + y) + Math.floor(slot_map_info.size * 1.5);
-
+ // just under the clicked slot
+ var topUnder = (abs_pos.y + y) + Math.floor(slot_map_info.size * 1.5);
+ var top = topUnder;
+
// if off the bottom of the map
- if (top + oInfo.offsetHeight > abs_pos.y + oMap.offsetHeight) {
+ if (topUnder + oInfo.offsetHeight > abs_pos.y + oMap.offsetHeight) {
// position popup above clicked slot
top = (abs_pos.y + y) - oInfo.offsetHeight - Math.floor(slot_map_info.size * .5);
}
+
+ // if off the top of the page
+ if (top < 0) {
+ // revert to under the item
+ top = topUnder;
+ }
+
oInfo.style.top = top + "px";
oInfo.style.left = abs_pos.x + "px";
}
15 years, 8 months
rhmessaging commits: r3243 - in mgmt/trunk: etc and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-31 06:06:45 -0400 (Tue, 31 Mar 2009)
New Revision: 3243
Added:
mgmt/trunk/bin/find-code
Modified:
mgmt/trunk/etc/devel.el
Log:
Add a project script that attempts to find all code; use it for emacs grepping
Added: mgmt/trunk/bin/find-code
===================================================================
--- mgmt/trunk/bin/find-code (rev 0)
+++ mgmt/trunk/bin/find-code 2009-03-31 10:06:45 UTC (rev 3243)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+find "$DEVEL_HOME" \
+ -regextype posix-awk \
+ -regex '.*\.(py|strings|sql|xml|js|css)$' \
+ -or \
+ -regex '.*/bin/[^/]+$' -executable -type f
Property changes on: mgmt/trunk/bin/find-code
___________________________________________________________________
Name: svn:executable
+ *
Modified: mgmt/trunk/etc/devel.el
===================================================================
--- mgmt/trunk/etc/devel.el 2009-03-30 22:27:37 UTC (rev 3242)
+++ mgmt/trunk/etc/devel.el 2009-03-31 10:06:45 UTC (rev 3243)
@@ -4,8 +4,7 @@
(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 grep-command "find-code | xargs fgrep -n ")
(setq compile-command "cumin-test")
(setq auto-mode-alist
(cons '("\\.strings$" . html-mode) auto-mode-alist)))
15 years, 8 months
rhmessaging commits: r3242 - in mgmt/trunk/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 18:27:37 -0400 (Mon, 30 Mar 2009)
New Revision: 3242
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/resources/app.js
Log:
Moved cumin functions into app.js
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-30 22:22:08 UTC (rev 3241)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-30 22:27:37 UTC (rev 3242)
@@ -53,32 +53,6 @@
<td class="ralign"> {item_rate}</td>
</tr>
-[StatValueChart.javascript]
-(function() {
- cumin.refreshTime = function(src) {
- var sep = src.lastIndexOf(";");
- var time = new Date().getTime();
-
- if (isNaN(parseInt(src.substring(sep + 1)))) {
- src = src + ";" + time;
- } else {
- src = src.substring(0, sep) + ";" + time;
- }
-
- return src;
- }
-
- cumin.updateChart = function(id) {
- var chart = wooly.doc().elembyid(id);
-
- var img = chart.elem("img")
- var src = img.getattr("src");
- src = cumin.refreshTime(src);
-
- img.setattr("src", src);
- }
-}())
-
[StatValueChart.css]
div.StatValueChart {
font-size: 0.9em;
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-03-30 22:22:08 UTC (rev 3241)
+++ mgmt/trunk/cumin/resources/app.js 2009-03-30 22:27:37 UTC (rev 3242)
@@ -21,6 +21,30 @@
this.runModelListeners = runModelListeners;
this.runObjectListeners = runObjectListeners;
+
+ this.refreshTime = function(src) {
+ var sep = src.lastIndexOf(";");
+ var time = new Date().getTime();
+
+ if (isNaN(parseInt(src.substring(sep + 1)))) {
+ src = src + ";" + time;
+ } else {
+ src = src.substring(0, sep) + ";" + time;
+ }
+
+ return src;
+ }
+
+ this.updateChart = function(id) {
+ var chart = wooly.doc().elembyid(id);
+
+ var img = chart.elem("img")
+ var src = img.getattr("src");
+ src = cumin.refreshTime(src);
+
+ img.setattr("src", src);
+ }
+
}
}())
15 years, 8 months
rhmessaging commits: r3241 - in mgmt/trunk: wooly/resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 18:22:08 -0400 (Mon, 30 Mar 2009)
New Revision: 3241
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/wooly/resources/wooly.js
Log:
Consolidating update functions into two functions:
backgroundUpdate: single request returns objectified xml
intervalUpdate: recurring request returns responseXML
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-30 21:49:02 UTC (rev 3240)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-30 22:22:08 UTC (rev 3241)
@@ -568,7 +568,7 @@
var branch = wooly.session.branch(slot_info_url);
branch.session[slot_info_index] = index;
var newreq = branch.marshal();
- wooly.directUpdate(newreq, got_slot_info, 0, {index: index});
+ wooly.setIntervalUpdate(newreq, got_slot_info, 0, {index: index});
}
function got_slot_info(xhtml, args) {
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-30 21:49:02 UTC (rev 3240)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-30 22:22:08 UTC (rev 3241)
@@ -1145,7 +1145,7 @@
<script type="text/javascript">
window.addEvent('domready', function get_%s() {
var now = new Date();
- wooly.deferredUpdate('%s'+';ts='+now.getTime(), got_%s, "%s");
+ wooly.backgroundUpdate('%s'+';ts='+now.getTime(), got_%s, "%s");
});
</script>
"""
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-03-30 21:49:02 UTC (rev 3240)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-03-30 22:22:08 UTC (rev 3241)
@@ -322,38 +322,9 @@
}
}
- // pass the responseXML directly back to function
-
- this.directUpdate = function(url, callback, interval, passback) {
+ this.backgroundUpdate = function(url, callback, passback) {
var req = this.getNewRequest();
- function fetch() {
- req.open("get", url, true);
- req.onreadystatechange = update;
- req.send(null);
- }
-
- if (interval > 0) {
- var id = window.setInterval(fetch, interval);
- this.updater_ids.push(id);
- }
- fetch(); // send request immediately
-
- function update() {
- try {
- if (req.readyState == 4 && req.status == 200) {
- callback(req.responseXML, passback);
- }
- } catch (e) {
- log(e);
- throw e;
- }
- }
- }
-
- this.deferredUpdate = function(url, callback, passback) {
- var req = this.getNewRequest();
-
req.open("get", url, true);
req.onreadystatechange = update;
req.send(null);
@@ -379,15 +350,9 @@
interval: 0
};
- this.setIntervalUpdate = function(url, callback, interval) {
+ this.setIntervalUpdate = function(url, callback, interval, passback) {
var req = this.getNewRequest();
- // save the arguments in case we need to modify the url
- // and restart the interval
- this.intervalUpdateInfo.url = url;
- this.intervalUpdateInfo.callback = callback;
- this.intervalUpdateInfo.interval = interval;
-
function fetch() {
req.open("get", url, true);
req.onreadystatechange = update;
@@ -396,14 +361,22 @@
fetch();
- var id = window.setInterval(fetch, interval);
- this.intervalUpdateInfo.timerId = id;
- this.updaterIDs.push(id);
+ if (interval > 0) {
+ var id = window.setInterval(fetch, interval);
+ this.updaterIDs.push(id);
+ // save the arguments in case we need to modify the url
+ // and restart the interval
+ this.intervalUpdateInfo.timerId = id;
+ this.intervalUpdateInfo.url = url;
+ this.intervalUpdateInfo.callback = callback;
+ this.intervalUpdateInfo.interval = interval;
+ }
+
function update() {
try {
if (req.readyState == 4 && req.status == 200) {
- callback(req.responseXML);
+ callback(req.responseXML, passback);
}
} catch (e) {
log(e);
15 years, 8 months
rhmessaging commits: r3240 - mgmt/trunk/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-30 17:49:02 -0400 (Mon, 30 Mar 2009)
New Revision: 3240
Modified:
mgmt/trunk/bin/reschema
Log:
Set the guest user's password non-interactively
Modified: mgmt/trunk/bin/reschema
===================================================================
--- mgmt/trunk/bin/reschema 2009-03-30 21:27:30 UTC (rev 3239)
+++ mgmt/trunk/bin/reschema 2009-03-30 21:49:02 UTC (rev 3240)
@@ -2,6 +2,6 @@
cumin-admin drop-schema --force || :
cumin-admin create-schema
-cumin-admin add-user guest
+cumin-admin add-user guest guest
cumin-admin assign guest admin
cumin-load-demo-data
15 years, 8 months
rhmessaging commits: r3239 - mgmt/trunk/wooly/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 17:27:30 -0400 (Mon, 30 Mar 2009)
New Revision: 3239
Modified:
mgmt/trunk/wooly/resources/wooly.js
Log:
Changing straggler reference to newSetIntervalUpdate
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-03-30 21:07:32 UTC (rev 3238)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-03-30 21:27:30 UTC (rev 3239)
@@ -431,7 +431,7 @@
this.restartIntervalUpdate = function (url) {
this.cancelIntervalUpdate();
- this.newSetIntervalUpdate(url, this.intervalUpdateInfo.callback, this.intervalUpdateInfo.interval);
+ this.setIntervalUpdate(url, this.intervalUpdateInfo.callback, this.intervalUpdateInfo.interval);
}
this.branchIntervalUpdate = function () {
15 years, 8 months
rhmessaging commits: r3238 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 17:07:32 -0400 (Mon, 30 Mar 2009)
New Revision: 3238
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
Made slot vis fullpageable
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-30 21:06:42 UTC (rev 3237)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-30 21:07:32 UTC (rev 3238)
@@ -25,6 +25,10 @@
slot_zoom_initialized = false;
slot_center_index = -1;
+ this.notify = function(fullpage, size) {
+ slot_clip_size = size;
+ this.img_loaded(document.images[slot_current_id]);
+ }
this.pan_left = function () {
if (slot_clip_left == 0) return;
var now = new Date();
@@ -233,7 +237,7 @@
branch.zy = slot_clip_top;
src = branch.marshal();
- src = refreshTime(src);
+ src = cumin.refreshTime(src);
oImg.src = src;
}
@@ -275,7 +279,7 @@
function update_png() {
stop_auto_updates();
- updateChart(slot_current_id, null);
+ cumin.updateChart(slot_current_id, null);
}
function set_pan(id, which, value, fn) {
@@ -616,7 +620,6 @@
}
}
-
}())
var clicks;
@@ -986,7 +989,7 @@
}
[SlotMap.html]
-<div id="slot_visualization">
+<div id="slot_visualization" class="fullpageable">
<h2>{title}</h2>
<div id="slot_controls">
<div id="zoom_text">Zoom</div><div id="zoom_levels"><div id="zoom_pos"></div></div><div style="clear:left;"><!-- --></div>
@@ -1014,6 +1017,9 @@
var slot_job_index = "{job_index_param}";
var slot_map_info = {size: 0, width: 0, height: 0, count: 0, rows: 0, cols: 0};
var slot_clip_size = {slot_clip_size};
+ var original_clip_size = slot_clip_size;
+ $('slot_visualization').onfullpage = function (width) { vis.notify(true, width); };
+ $('slot_visualization').onrestore = function () { vis.notify(false, original_clip_size); };
var oGlass = document.getElementById("slot_glass");
if (oGlass) {
oGlass.onmousedown = vis.downGlass;
@@ -1127,7 +1133,7 @@
top: 0;
left: 0.5em;
visibility: hidden;
- z-index: 101;
+ z-index: 301;
}
div.slot_container {
15 years, 8 months
rhmessaging commits: r3237 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 17:06:42 -0400 (Mon, 30 Mar 2009)
New Revision: 3237
Modified:
mgmt/trunk/cumin/resources/app.css
mgmt/trunk/cumin/resources/app.js
Log:
Added support for javascript notification functions when widget is made full page.
Modified: mgmt/trunk/cumin/resources/app.css
===================================================================
--- mgmt/trunk/cumin/resources/app.css 2009-03-30 21:05:09 UTC (rev 3236)
+++ mgmt/trunk/cumin/resources/app.css 2009-03-30 21:06:42 UTC (rev 3237)
@@ -481,13 +481,11 @@
div.fullpaged {
background-color: white;
- border: 10px solid white; /* instead of padding */
- -moz-border-radius: 3px;
- width: 96%;
- height: 90%;
+ border: 10px solid white;
+ width: 98%;
position: absolute;
- left: 10px;
- top: 10px;
+ left: 0px;
+ top: 0px;
z-index: 201;
}
@@ -538,8 +536,9 @@
z-index: 1;
}
div.fullpageBack {
- background-color: black;
- opacity: .8;
+/* background-color: black;
+ opacity: .8; */
+ background-color: white;
position: absolute;
width: 100%;
height: 100%;
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-03-30 21:05:09 UTC (rev 3236)
+++ mgmt/trunk/cumin/resources/app.js 2009-03-30 21:06:42 UTC (rev 3237)
@@ -56,6 +56,13 @@
outer.widgetPaths.push(widget.get("id"));
}
});
+
+ if (element.onfullpage) {
+ outer.onfullpage = element.onfullpage;
+ }
+ if (element.onrestore) {
+ outer.onrestore = element.onrestore;
+ }
}
});
@@ -86,9 +93,12 @@
oFullPage.originalParent.appendChild(oFullPage);
oFullPage.getElement("p.fullpageIcon").setProperty("title", "Full Page");
setFullpageParam(false, oFullPage);
+ var onrestore = oFullPage.onrestore;
+ if (onrestore) onrestore();
} else {
// make it full page
oBack.style.display = "block";
+ oBack.style.height = Math.max($(document.body).getCoordinates().height, window.getScrollSize().y) + "px";
oFullPage.id = "fullpage";
oFullPage.className = "fullpaged";
@@ -96,6 +106,8 @@
document.body.appendChild(oFullPage);
oFullPage.getElement("p.fullpageIcon").setProperty("title", "Minimize");
setFullpageParam(true, oFullPage);
+ var onfullpage = oFullPage.onfullpage;
+ if (onfullpage) onfullpage($(oFullPage).getCoordinates().width);
}
}
15 years, 8 months