rhmessaging commits: r3236 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-30 17:05:09 -0400 (Mon, 30 Mar 2009)
New Revision: 3236
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Made refreshTime public so it can be called from the slot visualization code.
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-27 20:51:17 UTC (rev 3235)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-30 21:05:09 UTC (rev 3236)
@@ -55,7 +55,7 @@
[StatValueChart.javascript]
(function() {
- function refreshTime(src) {
+ cumin.refreshTime = function(src) {
var sep = src.lastIndexOf(";");
var time = new Date().getTime();
@@ -73,7 +73,7 @@
var img = chart.elem("img")
var src = img.getattr("src");
- src = refreshTime(src);
+ src = cumin.refreshTime(src);
img.setattr("src", src);
}
15 years, 9 months
rhmessaging commits: r3235 - in mgmt/trunk: wooly/python/wooly and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-27 16:51:17 -0400 (Fri, 27 Mar 2009)
New Revision: 3235
Modified:
mgmt/trunk/cumin/python/cumin/action.strings
mgmt/trunk/cumin/python/cumin/broker.py
mgmt/trunk/cumin/python/cumin/broker.strings
mgmt/trunk/cumin/python/cumin/brokerlink.py
mgmt/trunk/cumin/python/cumin/brokerlink.strings
mgmt/trunk/cumin/python/cumin/client.py
mgmt/trunk/cumin/python/cumin/client.strings
mgmt/trunk/cumin/python/cumin/collector.py
mgmt/trunk/cumin/python/cumin/collector.strings
mgmt/trunk/cumin/python/cumin/exchange.py
mgmt/trunk/cumin/python/cumin/exchange.strings
mgmt/trunk/cumin/python/cumin/negotiator.strings
mgmt/trunk/cumin/python/cumin/page.py
mgmt/trunk/cumin/python/cumin/page.strings
mgmt/trunk/cumin/python/cumin/pool.py
mgmt/trunk/cumin/python/cumin/pool.strings
mgmt/trunk/cumin/python/cumin/queue.py
mgmt/trunk/cumin/python/cumin/queue.strings
mgmt/trunk/cumin/python/cumin/scheduler.py
mgmt/trunk/cumin/python/cumin/scheduler.strings
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/python/cumin/submitter.py
mgmt/trunk/cumin/python/cumin/submitter.strings
mgmt/trunk/cumin/python/cumin/system.py
mgmt/trunk/cumin/python/cumin/system.strings
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
mgmt/trunk/wooly/python/wooly/pages.strings
mgmt/trunk/wooly/resources/wooly.js
Log:
Switch the custom ajax update code to use the generic widget update
approach instead.
Remove the old setIntervalUpdate and rename newSetIntervalUpdate.
Modified: mgmt/trunk/cumin/python/cumin/action.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/action.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/action.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -11,10 +11,18 @@
<tbody>{items}</tbody>
</table>
+[ActionInvocationStatus.javascript]
+(function() {
+ cumin.popupActions = function() {
+ window.open("actions.html", "actions",
+ "width=640,height=480,scrollbars=yes");
+ }
+}())
+
[ActionInvocationStatus.html]
<span id="{id}">
Actions:
- <a href="javascript:popupActions()">
+ <a href="javascript:cumin.popupActions()">
<span>{pending_count}</span> pending,
<span>{completed_count}</span> completed,
<span>{failed_count}</span> failed
Modified: mgmt/trunk/cumin/python/cumin/broker.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/broker.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -197,15 +197,12 @@
class ConnectedAttribute(Attribute):
def get_default(self, session):
- # XXXX this should be done with heartbeats instead?
- return False
-
- reg = self.widget.frame.get_object(session)
connected = False
+ broker = self.widget.frame.get_object(session)
try:
- mbroker = self.app.model.data.mintBrokersByUrl[reg.url]
-
+ id = broker.qmfBrokerId
+ mbroker = self.app.model.data.mintBrokersById[id]
connected = mbroker.connected
except KeyError:
pass
@@ -233,11 +230,6 @@
tabs.add_tab(BrokerClustering(app, "cluster", self.vhost))
tabs.add_tab(self.BrokerDetailsTab(app, "details", self.vhost))
- def render_script(self, session, object):
- broker = self.vhost.get(session).broker
- data = "model.xml?class=broker;id=%i" % broker.id
- return "wooly.setIntervalUpdate('%s', updateBroker, 3000)" % data
-
def render_group_links(self, session, object):
return "XXX"
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -62,48 +62,6 @@
from broker as b
{sql_where}
-[BrokerView.javascript]
-function updateBroker(data) {
- var model = data.objectify();
- var brokers = model.broker;
- var broker;
-
- for (var key in brokers) {
- broker = brokers[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(broker);
-
- //throw new Error();
-}
-
-
-[BrokerMissing.html]
-<div class="notice">
- The broker at this address is currently unavailable. This page will
- reload in <span id="timer_count">10</span> <span id="timer_word">seconds</span>.
-</div>
-<script type="text/javascript">
-//<![CDATA[
-var secs = 10
-
-function updateTimer() {
- secs -= 1;
-
- count = wooly.doc().elembyid("timer_count").set("" + secs);
- ending = wooly.doc().elembyid("timer_word").set(secs == 1 ? "second" : "seconds");
-
- if (secs < 1) {
- location.reload();
- }
-}
-
-window.setInterval(updateTimer, 1000);
-//]]>
-</script>
-
[BrokerQueueTab.html]
{items}
@@ -123,25 +81,12 @@
</tbody>
</table>
-[BrokerStatus.javascript]
-function updateBrokerStatus(id, broker) {
- var s = broker.stat;
- var sdata = {"div": [s.connection.value]};
-
- wooly.doc().elembyid(id).update(sdata);
-}
-
[BrokerStatus.html]
<div id="{id}" class="CuminStatus {color}">
<h2>Broker Status</h2>
<div>{status}</div>
</div>
-<script type="text/javascript">
-//<![CDATA[
- cumin.objectListeners["{id}"] = updateBrokerStatus;
-//]]>
-</script>
[BrokerStats.html]
<table class="twocol">
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -273,7 +273,6 @@
return "No, Cancel"
class PeerStatus(CuminStatus):
-
def render_color(self, session, link):
if link.statsCurr:
return link.statsCurr.lastError and "red" or "green"
@@ -306,10 +305,6 @@
def show_routes(self, session):
return self.__tabs.show_mode(session, self.__routes);
- def render_script(self, session, peer):
- data = "model.xml?class=peer;id=%i" % peer.id
- return "wooly.setIntervalUpdate('%s', updatePeer, 3000)" % data
-
class PeerStats(TabbedModeSet):
def __init__(self, app, name):
super(PeerStats, self).__init__(app, name)
@@ -391,7 +386,6 @@
def render_title(self, session):
return "Choose an Exchange"
-
class BridgeAddForm(CuminFieldForm):
def __init__(self, app, name):
super(BridgeAddForm, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -46,34 +46,6 @@
<div>{hidden_inputs}</div>
</form>
-[PeerView.javascript]
-function updatePeer(data) {
- var model = data.objectify();
- var peers = model.peer;
- var peer;
-
- for (var key in peers) {
- peer = peers[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(peer);
-
- //throw new Error();
-}
-[PeerView.html]
-<script type="text/javascript">
-{script}
-</script>
-
-{status}
-
-{summary}
-
-{tabs}
-
-
[PeerRouteSet.sql]
select
b.id,
Modified: mgmt/trunk/cumin/python/cumin/client.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/client.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/client.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -259,10 +259,6 @@
def show_sessions(self, session):
return self.__tabs.show_mode(session, self.__sessions)
- def render_script(self, session, conn):
- data = "model.xml?class=connection;id=%i" % conn.id
- return "wooly.setIntervalUpdate('%s', updateConnection, 3000)" % data
-
class ConnectionStats(Widget):
def __init__(self, app, name):
super(ConnectionStats, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/client.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/client.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/client.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -57,22 +57,6 @@
<div>{hidden_inputs}</div>
</form>
-[ConnectionStatus.javascript]
-function updateConnectionStatus(id, conn) {
- updateStatus(id, conn);
-
- var s = conn.stat;
- var sdata = {
- "tr": [
- null,
- {"td": [s.framesFromClient.rate, s.bytesFromClient.rate]},
- {"td": [s.framesToClient.rate, s.bytesToClient.rate]}
- ]
- };
-
- wooly.doc().elembyid(id).descendant("table.tbody").update(sdata);
-}
-
[ConnectionStatus.html]
<div id="{id}" class="CuminStatus {color}">
<table>
@@ -93,25 +77,7 @@
</tr>
</table>
</div>
-<script type="text/javascript">
- cumin.objectListeners["{id}"] = updateConnectionStatus, 3000;
-</script>
-[ConnectionView.javascript]
-function updateConnection(data) {
- var model = data.objectify();
- var conns = model.connection;
- var conn;
-
- for (var key in conns) {
- conn = conns[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(conn);
-}
-
[ConnectionStats.html]
<table class="twocol">
<tbody>
Modified: mgmt/trunk/cumin/python/cumin/collector.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/collector.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/collector.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -121,10 +121,6 @@
details = CuminDetails(app, "details")
self.__tabs.add_tab(details)
- def render_script(self, session, coll):
- data = "model.xml?class=collector;id=%i" % coll.id
- return "wooly.setIntervalUpdate('%s', updateCollector, 3000)" % data
-
class CollectorStatus(CuminStatus):
def render_title(self, session, object):
return "Collector Status"
Modified: mgmt/trunk/cumin/python/cumin/collector.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/collector.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/collector.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -16,23 +16,6 @@
left outer join collector_stats as cs on cs.id = c.stats_curr_id
{sql_where}
-[CollectorView.javascript]
-function updateCollector(data) {
- var model = data.objectify();
- var colls = model.collector;
- var col;
-
- for (var key in colls) {
- col = colls[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(col);
-
- //throw new Error();
-}
-
[CollectorSet.html]
<form id="{id}" method="post" action="?">
<div class="sactions">
Modified: mgmt/trunk/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/exchange.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -284,10 +284,6 @@
def show_bindings(self, session):
return self.__tabs.show_mode(session, self.__bindings);
- def render_script(self, session, exchange):
- data = "model.xml?class=exchange;id=%i" % exchange.id
- return "wooly.setIntervalUpdate('%s', updateExchange, 3000)" % data
-
class ExchangeBindingSet(BindingSet, Form):
def __init__(self, app, name):
super(ExchangeBindingSet, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/exchange.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/exchange.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -79,23 +79,6 @@
[ExchangeSet.item_html]
<tr>{cells}</tr>
-[ExchangeStatus.javascript]
-function updateExchangeStatus(id, exchange) {
- updateStatus(id, exchange);
-
- var s = exchange.stat;
- var sdata = {
- "tr": [
- null,
- {"td": [s.msgReceives.rate, s.byteReceives.rate]},
- {"td": [s.msgRoutes.rate, s.byteRoutes.rate]},
- {"td": [s.msgDrops.value, s.byteDrops.value]}
- ]
- };
-
- wooly.doc().elembyid(id).descendant("table.tbody").update(sdata);
-}
-
[ExchangeStatus.html]
<div id="{id}" class="CuminStatus {color}">
<table>
@@ -121,49 +104,31 @@
</tr>
</table>
</div>
-<script type="text/javascript">
- cumin.objectListeners["{id}"] = updateExchangeStatus
-</script>
-[ExchangeView.javascript]
-function updateExchange(data) {
- var model = data.objectify();
- var exchanges = model.exchange;
- var exchange;
-
- for (var key in exchanges) {
- exchange = exchanges[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(exchange);
-}
-
[ExchangeBindingSet.html]
<form id="{id}" method="post" action="?">
- <div class="rfloat">{phase}</div>
- <ul class="radiotabs"><li> </li></ul>
+ <div class="rfloat">{phase}</div>
+ <ul class="radiotabs"><li> </li></ul>
- <div class="sactions">
- <h2>Act on Selected Bindings:</h2>
- {remove}
- </div>
+ <div class="sactions">
+ <h2>Act on Selected Bindings:</h2>
+ {remove}
+ </div>
- <table class="mobjects">
- <thead>
- <tr>
- <th class="setnav" colspan="{column_count}">
- <div class="rfloat">{page}</div>
- {count}
- </th>
- </tr>
- <tr>{headers}</tr>
- </thead>
- <tbody>{items}</tbody>
- </table>
- <div>{hidden_inputs}</div>
+ <table class="mobjects">
+ <thead>
+ <tr>
+ <th class="setnav" colspan="{column_count}">
+ <div class="rfloat">{page}</div>
+ {count}
+ </th>
+ </tr>
+ <tr>{headers}</tr>
+ </thead>
+ <tbody>{items}</tbody>
+ </table>
+ <div>{hidden_inputs}</div>
</form>
[ExchangeBindingSet.item_html]
Modified: mgmt/trunk/cumin/python/cumin/negotiator.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/negotiator.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/negotiator.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -16,23 +16,6 @@
left outer join negotiator_stats as c on c.id = n.stats_curr_id
{sql_where}
-[NegotiatorView.javascript]
-function updateNegotiator(data) {
- var model = data.objectify();
- var colls = model.negotiator;
- var col;
-
- for (var key in colls) {
- col = colls[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(col);
-
- //throw new Error();
-}
-
[NegotiatorSet.html]
<form id="{id}" method="post" action="?">
Modified: mgmt/trunk/cumin/python/cumin/page.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/page.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -261,9 +261,6 @@
self.frame.change_password.show(branch)
return branch.marshal()
- def render_data_url(self, session):
- return "model.xml"
-
class Heading(CuminHeading):
def render_title(self, session):
return "MRG Management"
@@ -343,9 +340,6 @@
#self.add_tab(BrokerProfileSet(app, "profiles"))
#self.add_tab(BrokerClusterSet(app, "clusters"))
- def render_data_url(self, session):
- return "model.xml"
-
class Heading(CuminHeading):
def render_title(self, session):
return "Messaging"
@@ -362,9 +356,6 @@
self.add_tab(PoolSet(app, "pools"))
- def render_data_url(self, session):
- return "model.xml"
-
class Heading(CuminHeading):
def render_title(self, session):
return "Grid"
@@ -381,9 +372,6 @@
self.add_tab(SystemSet(app, "systems"))
- def render_data_url(self, session):
- return "model.xml"
-
class Heading(CuminHeading):
def render_title(self, session):
return "Systems"
Modified: mgmt/trunk/cumin/python/cumin/page.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/page.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -107,12 +107,6 @@
border-bottom: 1px solid #ddd;
}
-[MainFrame.javascript]
-function popupActions() {
- window.open("actions.html", "actions",
- "width=640,height=480,scrollbars=yes");
-}
-
[MainFrame.html]
<div id="trans0"/>
<div id="head">
@@ -223,11 +217,6 @@
</ul>
[MessagingView.html]
-<script type="text/javascript">
-//<![CDATA[
- wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
-//]]>
-</script>
<div class="oblock">
{heading}
@@ -236,11 +225,6 @@
</div>
[GridView.html]
-<script type="text/javascript">
-//<![CDATA[
- wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
-//]]>
-</script>
<div class="oblock">
{heading}
@@ -249,11 +233,6 @@
</div>
[SystemsView.html]
-<script type="text/javascript">
-//<![CDATA[
- wooly.setIntervalUpdate("{data_url}", updateMain, 3000);
-//]]>
-</script>
<div class="oblock">
{heading}
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -197,10 +197,6 @@
class LimitsTab(LimitsSet):
pass
- def render_script(self, session, pool):
- data = "model.xml?class=pool;id=%s" % pool.id
- return "wooly.setIntervalUpdate('%s', updatePool, 4000)" % data
-
def set_collector_tab(self, session):
self.__tabs.set_selected_mode(session, self.colls)
Modified: mgmt/trunk/cumin/python/cumin/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/pool.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -18,12 +18,12 @@
[PoolJobStats.sql]
select
- sum( case when job_status=2 then 1 else 0 end) as running,
- sum( case when job_status=4 then 1 else 0 end) as completed,
- sum( case when job_status=5 then 1 else 0 end) as held,
- sum( case when job_status=1 and j.qmf_delete_time is null then 1 else 0 end) as idle,
- sum( case when job_status=3 or (job_status=1 and j.qmf_delete_time is not null) then 1 else 0 end) as removed,
- sum( 1 ) as total,
+ sum(case when job_status=2 then 1 else 0 end) as running,
+ sum(case when job_status=4 then 1 else 0 end) as completed,
+ sum(case when job_status=5 then 1 else 0 end) as held,
+ sum(case when job_status=1 and j.qmf_delete_time is null then 1 else 0 end) as idle,
+ sum(case when job_status=3 or (job_status=1 and j.qmf_delete_time is not null) then 1 else 0 end) as removed,
+ sum(1) as total,
s.pool
from job as j
left outer join scheduler as s on s.id = j.scheduler_id
@@ -33,53 +33,12 @@
[PoolJobStats.count_sql]
1
-[PoolView.javascript]
-function updatePool(data) {
- var model = data.objectify();
- var pools = model.pool;
- var pool;
-
- for (var key in pools) {
- pool = pools[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(pool);
-
- //throw new Error();
-}
-
-
-[PoolStatus.javascript]
-var pool_stats_last_all = "";
-
-function updatePoolStatus(id, pool) {
- var s = pool.stat;
- var sdata = {"div": {"span": [s.idl.value, s.all.value]}};
-
- wooly.doc().elembyid(id).update(sdata);
-
- if (pool_stats_last_all != "") {
- if (s.all.value != pool_stats_last_all) {
- window.location.reload(true);
- }
- }
-
- pool_stats_last_all = s.all.value;
-}
-
[PoolStatus.html]
<div id="{id}" class="CuminStatus {color}">
<h2>{title}</h2>
{status}
</div>
-<script type="text/javascript">
- //<![CDATA[
- cumin.objectListeners["{id}"] = updatePoolStatus;
-//]]>
-</script>
[PoolStatus.status_html]
<div>
@@ -94,6 +53,6 @@
</div>
</div>
<div style="float: left; margin-left: 4em;">
- {pool_slot_map}
+ {pool_slot_map}
</div>
<div style="clear:left;"><!-- --></div>
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -300,10 +300,6 @@
def show_bindings(self, session):
self.__tabs.show_mode(session, self.bindings);
- def render_script(self, session, queue):
- data = "model.xml?class=queue;id=%i" % queue.id
- return "wooly.setIntervalUpdate('%s', updateQueue, 3000)" % data
-
class QueueBindingSet(BindingSet, Form):
def __init__(self, app, name):
super(QueueBindingSet, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/queue.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -79,23 +79,6 @@
[TopQueueSet.count_sql]
--
-[QueueStatus.javascript]
-function updateQueueStatus(id, queue) {
- updateStatus(id, queue);
-
- var s = queue.stat;
- var sdata = {
- "tr": [
- null,
- {"td": [s.msgTotalEnqueues.rate, s.byteTotalEnqueues.rate]},
- {"td": [s.msgTotalDequeues.rate, s.byteTotalDequeues.rate]},
- {"td": [s.msgDepth.value, s.byteDepth.value]}
- ]
- };
-
- wooly.doc().elembyid(id).descendant("table.tbody").update(sdata);
-}
-
[QueueStatus.html]
<div id="{id}" class="CuminStatus {color}">
<table>
@@ -121,29 +104,7 @@
</tr>
</table>
</div>
-<script type="text/javascript">
-//<![CDATA[
- cumin.objectListeners["{id}"] = updateQueueStatus
-//]]>
-</script>
-[QueueView.javascript]
-function updateQueue(data) {
- var model = data.objectify();
- var queues = model.queue;
- var queue;
-
- for (var key in queues) {
- queue = queues[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(queue);
-
- //throw new Error();
-}
-
[QueueBindingSet.html]
<form id="{id}" method="post" action="?">
<div class="rfloat">{phase}</div>
Modified: mgmt/trunk/cumin/python/cumin/scheduler.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/scheduler.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/scheduler.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -140,10 +140,6 @@
details = CuminDetails(app, "details")
self.__tabs.add_tab(details)
- def render_script(self, session, sched):
- data = "model.xml?class=scheduler;id=%i" % sched.id
- return "wooly.setIntervalUpdate('%s', updateScheduler, 3000)" % data
-
class SchedulerStatus(StartStopStatus):
def get_url(self, session):
scheduler = self.get_args(session)[0]
Modified: mgmt/trunk/cumin/python/cumin/scheduler.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/scheduler.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/scheduler.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -18,23 +18,6 @@
select count(1) from scheduler as s
{sql_where}
-[SchedulerView.javascript]
-function updateScheduler(data) {
- var model = data.objectify();
- var scheds = model.scheduler;
- var sched;
-
- for (var key in scheds) {
- sched = scheds[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(sched);
-
- //throw new Error();
-}
-
[SchedulerSet.html]
<form id="{id}" method="post" action="?">
<div class="sactions">
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -54,39 +54,31 @@
</tr>
[StatValueChart.javascript]
-function updateChart(id, object) {
- var chart = wooly.doc().elembyid(id);
+(function() {
+ function refreshTime(src) {
+ var sep = src.lastIndexOf(";");
+ var time = new Date().getTime();
- var img = chart.elem("img")
- var src = img.getattr("src");
- src = refreshTime(src);
+ if (isNaN(parseInt(src.substring(sep + 1)))) {
+ src = src + ";" + time;
+ } else {
+ src = src.substring(0, sep) + ";" + time;
+ }
- img.setattr("src", src);
-
-/*
- var ph = chart.elem("span", "class", "ph")
- var statname = ph.getattr("statname")
- var statmode = ph.getattr("statmode")
- if (statmode == "rate") {
- ph.text().set(object.stat[statname].rate)
- } else {
- ph.text().set(object.stat[statname].value)
+ return src;
}
-*/
-}
-function refreshTime(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;
- }
+ cumin.updateChart = function(id) {
+ var chart = wooly.doc().elembyid(id);
- return src;
-}
+ var img = chart.elem("img")
+ var src = img.getattr("src");
+ src = refreshTime(src);
+ img.setattr("src", src);
+ }
+}())
+
[StatValueChart.css]
div.StatValueChart {
font-size: 0.9em;
@@ -115,7 +107,13 @@
<img id="{id}" src="{href}" height="100" width="360" alt="stats" />
</div>
<script type="text/javascript">
- cumin.objectListeners["{id}"] = updateChart
+(function() {
+ function update() {
+ cumin.updateChart("{id}");
+ }
+
+ wooly.addPageUpdateListener(update);
+}())
</script>
[StatValueChart.stat_html]
Modified: mgmt/trunk/cumin/python/cumin/submitter.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/submitter.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/submitter.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -67,10 +67,6 @@
details = CuminDetails(app, "details")
self.__tabs.add_tab(details)
- def render_script(self, session, sched):
- data = "model.xml?class=submitter;id=%i" % sched.id
- return "wooly.setIntervalUpdate('%s', updateSubmitter, 3000)" % data
-
class SubmitterStatus(CuminStatus):
def render_title(self, session, submitter):
return "Submitter Status"
Modified: mgmt/trunk/cumin/python/cumin/submitter.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/submitter.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/submitter.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -13,23 +13,6 @@
inner join scheduler as d on s.scheduler_id = d.id
{sql_where}
-[SubmitterView.javascript]
-function updateSubmitter(data) {
- var model = data.objectify();
- var subs = model.submitter;
- var sub;
-
- for (var key in subs) {
- sub = subs[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(sub);
-
- //throw new Error();
-}
-
[SubmitterStats.html]
<table class="twocol">
<tbody>
Modified: mgmt/trunk/cumin/python/cumin/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/system.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -177,10 +177,6 @@
self.__tabs.add_tab(SystemServices(app, "services"))
self.__tabs.add_tab(CuminDetails(app, "details"))
- def render_script(self, session, system):
- data = "model.xml?class=system;id=%i" % system.id
- return "wooly.setIntervalUpdate('%s', updateSystem, 3000)" % data
-
from job import JobTab
class SystemJobSet(JobTab):
Modified: mgmt/trunk/cumin/python/cumin/system.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/system.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -46,21 +46,6 @@
[TopSystemSet.count_sql]
--
-[SystemStatus.javascript]
-function updateSystemStatus(id, system) {
- updateStatus(id, system);
-
- var s = system.stat;
- var sdata = {
- "tr": [
- {"td": [s.memFree.value]},
- {"td": [s.loadAverage1Min.value]}
- ]
- };
-
- wooly.doc().elembyid(id).descendant("table.tbody").update(sdata);
-}
-
[SystemStatus.html]
<div id="{id}" class="CuminStatus {color}">
<table>
@@ -74,67 +59,48 @@
</tr>
</table>
</div>
-<script type="text/javascript">
- cumin.objectListeners["{id}"] = updateSystemStatus
-</script>
[SystemStats.html]
<table class="twocol">
<tbody>
- <tr>
- <td>
- <h2>Memory/Load</h2>
+ <tr>
+ <td>
+ <h2>Memory/Load</h2>
{stats}
-
{system_slot_map}
- </td>
- <td>
- {freemem}
- {loadavg}
- </td>
- </tr>
+ </td>
+ <td>
+ {freemem}
+ {loadavg}
+ </td>
+ </tr>
</tbody>
</table>
<script type="text/javascript">
-var show_slot_job_url = "{slot_job_url}";
+ // <![CDATA[
+ var show_slot_job_url = "{slot_job_url}";
+ // ]]>
</script>
-[SystemView.javascript]
-function updateSystem(data) {
- var model = data.objectify();
- var systems = model.system;
- var system;
-
- for (var key in systems) {
- system = systems[key];
- break;
- }
-
- cumin.runModelListeners(model);
- cumin.runObjectListeners(system);
-}
-
-
[SystemJobSet.html]
- <div class="rfloat">{phase}</div>
-<form id="{id}" style="clear:right;" method="post" action="?">
+<div class="rfloat">{phase}</div>
- <table class="mobjects">
- <thead>
- <tr>
- <th class="setnav" colspan="{column_count}">
- <div class="rfloat">{page}</div>
- {count}
- </th>
- </tr>
- <tr>{headers}</tr>
- </thead>
- <tbody>{items}</tbody>
- </table>
- <div>{hidden_inputs}</div>
+<form id="{id}" style="clear:right;" method="post" action="?">
+ <table class="mobjects">
+ <thead>
+ <tr>
+ <th class="setnav" colspan="{column_count}">
+ <div class="rfloat">{page}</div>
+ {count}
+ </th>
+ </tr>
+ <tr>{headers}</tr>
+ </thead>
+ <tbody>{items}</tbody>
+ </table>
+ <div>{hidden_inputs}</div>
</form>
-
[SystemServices.html]
<h2>Services</h2>
<table class="PropertySet">
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-27 20:51:17 UTC (rev 3235)
@@ -292,6 +292,11 @@
return self.ids.get(session)
class CuminStatus(Widget):
+ def __init__(self, app, name):
+ super(CuminStatus, self).__init__(app, name)
+
+ self.update_enabled = True
+
def get_args(self, session):
return self.frame.get_args(session)
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -18,10 +18,6 @@
[CuminView.html]
-<script type="text/javascript">
-{script}
-</script>
-
{status}
{summary}
@@ -119,37 +115,6 @@
[CuminBulkActionForm.item_html]
<li>{item_content}</li>
-[CuminStatus.javascript]
-function updateStatus(id, object) {
- var status = wooly.doc().elembyid(id);
- /*
- var ecount = object.events.errors
- var errors = ecount + " " + (ecount == "1" && "error" || "errors");
-
- var wcount = object.events.warnings
- var warnings = wcount + " " + (wcount == "1" && "warning" || "warnings");
-
- if (ecount != "0") {
- status.setattr("class", "CuminStatus red");
- } else if (wcount != "0") {
- status.setattr("class", "CuminStatus yellow");
- } else {
- status.setattr("class", "CuminStatus green");
- }
- */
-
- /*
- var divs = status.elems("div", null, null, 0, 2)
-
- divs.next().set(errors + ", " + warnings);
-
- var acount = object.actions.pending;
- var actions = acount + " " + (acount == "1" && "action" || "actions") + " pending";
-
- divs.next().set(actions);
- */
-}
-
[CuminStatus.css]
div.CuminStatus {
float: right;
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-03-27 20:51:17 UTC (rev 3235)
@@ -26,7 +26,7 @@
[UpdateScript.html]
<script type="text/javascript">
// <![CDATA[
- wooly.newSetIntervalUpdate('{url}', wooly.updatePage, 3000);
+ wooly.setIntervalUpdate('{url}', wooly.updatePage, 3000);
// ]]>
</script>
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-03-27 17:10:46 UTC (rev 3234)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-03-27 20:51:17 UTC (rev 3235)
@@ -198,31 +198,6 @@
}
}
- function updatePage(xml) {
- var child = xml.documentElement.firstChild;
-
- while (child) {
- if (child.nodeType == 1 && child.nodeName == "widget") {
- var id = child.getAttribute("id");
- var oldElem = document.getElementById(id);
-
- if (oldElem) {
- var newElem = child.firstChild;
-
- if (newElem.nodeType != 1) {
- newElem = newElem.nextSibling;
- }
-
- replaceNode(newElem, oldElem);
- } else {
- wooly.log("Element '" + id + "' not found");
- }
- }
-
- child = child.nextSibling;
- }
- }
-
var damnyouie = /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
function replaceNode(newNode, oldNode) {
@@ -303,13 +278,52 @@
this.log = log;
this.dir = dir;
- this.getNewRequest = getNewRequest
- this.updatePage = updatePage
-
this.updaterIDs = [];
this.session = new Session();
-
- // pass the responseXML directly back to function
+
+ this.getNewRequest = getNewRequest
+
+ // Updates
+
+ this.pageUpdateListeners = new Array();
+
+ this.addPageUpdateListener = function(listener) {
+ this.pageUpdateListeners.push(listener);
+ }
+
+ this.updatePage = function(xml) {
+ var child = xml.documentElement.firstChild;
+
+ while (child) {
+ if (child.nodeType == 1 && child.nodeName == "widget") {
+ var id = child.getAttribute("id");
+ var oldElem = document.getElementById(id);
+
+ if (oldElem) {
+ var newElem = child.firstChild;
+
+ if (newElem.nodeType != 1) {
+ newElem = newElem.nextSibling;
+ }
+
+ replaceNode(newElem, oldElem);
+ } else {
+ wooly.log("Element '" + id + "' not found");
+ }
+ }
+
+ child = child.nextSibling;
+ }
+
+ var len = wooly.pageUpdateListeners.length;
+
+ for (var i = 0; i < len; i++) {
+ wooly.pageUpdateListeners[i]();
+ }
+ }
+
+ // pass the responseXML directly back to function
+
this.directUpdate = function(url, callback, interval, passback) {
var req = this.getNewRequest();
@@ -322,9 +336,9 @@
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) {
@@ -358,44 +372,14 @@
}
}
- this.setIntervalUpdate = function(url, callback, interval) {
- var req = this.getNewRequest();
-
- function fetch() {
- req.open("get", url, true);
- req.onreadystatechange = update;
- req.send(null);
- }
-
- var id = window.setInterval(fetch, interval);
-
- this.updaterIDs.push(id);
-
- function update() {
- try {
- if (req.readyState == 4 && req.status == 200) {
- //dir(req);
-
- callback(wooly.doc(req.responseXML));
- }
- } catch (e) {
- log(e);
- // XXX might want to retry for a bit before we do
- // this
- window.clearInterval(id);
- throw e;
- }
- }
- }
-
this.intervalUpdateInfo = {
timerId: 0,
url: "",
callback: "",
interval: 0
};
- this.newSetIntervalUpdate = function(url, callback, interval) {
-
+
+ this.setIntervalUpdate = function(url, callback, interval) {
var req = this.getNewRequest();
// save the arguments in case we need to modify the url
@@ -449,7 +433,7 @@
this.cancelIntervalUpdate();
this.newSetIntervalUpdate(url, this.intervalUpdateInfo.callback, this.intervalUpdateInfo.interval);
}
-
+
this.branchIntervalUpdate = function () {
return this.session.branch(this.intervalUpdateInfo.url);
}
@@ -690,7 +674,7 @@
return this;
}
}
-
+
function Session() {
this.branch = function (url) {
if (arguments.length == 0) url = window.location;
@@ -699,7 +683,7 @@
/* convert string query into cumin session object */
function Branch (s) {
-
+
/* convert this branch object to string */
this.marshal = function () {
var nvs = [];
@@ -741,15 +725,15 @@
// find the other nv pairs
var q = (query.length > 1) ? query[1] : s;
$extend(this, parseQuery(q));
-
+
// background updates have another session object under the key "session"
if (this.session) {
var sess = decodeURIComponent(this.session);
this.session = wooly.session.branch(sess);
}
}
-
- /* convert ; separated string to and object.
+
+ /* convert ; separated string to and object.
supports names with no values and
puts duplicate names into an array */
function parseQuery(s) {
@@ -777,7 +761,5 @@
return obj;
}
}
-
-}())
-
+}())
15 years, 9 months
rhmessaging commits: r3234 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 13:10:46 -0400 (Fri, 27 Mar 2009)
New Revision: 3234
Modified:
mgmt/trunk/cumin/python/cumin/pool.py
mgmt/trunk/cumin/python/cumin/slot.py
mgmt/trunk/cumin/python/cumin/slot.strings
Log:
Remove unused MachineSet class
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2009-03-27 15:00:51 UTC (rev 3233)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2009-03-27 17:10:46 UTC (rev 3234)
@@ -17,7 +17,7 @@
from collector import CollectorSet, CollectorFrame, CollectorStart, CollectorStop
from negotiator import NegotiatorSet, NegotiatorFrame, NegStart, NegStop
from limits import LimitsSet, LimitsFrame
-from slot import SlotSet, MachineSet, SlotStatSet
+from slot import SlotSet, SlotStatSet
from visualizations import SlotMap
strings = StringCatalog(__file__)
Modified: mgmt/trunk/cumin/python/cumin/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/slot.py 2009-03-27 15:00:51 UTC (rev 3233)
+++ mgmt/trunk/cumin/python/cumin/slot.py 2009-03-27 17:10:46 UTC (rev 3234)
@@ -47,8 +47,5 @@
return writer.to_string()
-class MachineSet(UniqueSlot):
- pass
-
class SlotStatSet(UniqueSlot):
pass
Modified: mgmt/trunk/cumin/python/cumin/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/slot.strings 2009-03-27 15:00:51 UTC (rev 3233)
+++ mgmt/trunk/cumin/python/cumin/slot.strings 2009-03-27 17:10:46 UTC (rev 3234)
@@ -34,27 +34,3 @@
[SlotStatSet.count_sql]
1
-
-[MachineSet.sql]
-select
- machine as id,
- machine,
- sum(case activity when 'Busy' then 1 else 0 end) as busy,
- sum(case activity when 'Idle' then 1 else 0 end) as idle,
- sum(1) as total
-from
-(select
- s.name,
- s.machine,
- s.pool,
- s.qmf_update_time,
- c.activity
- from slot as s
- left outer join slot_stats as c on c.id = s.stats_curr_id) as s
-{sql_where}
-group by machine
-{sql_orderby}
-
-[MachineSet.count_sql]
-select count(1)
-from (select distinct machine from slot) as s
15 years, 9 months
rhmessaging commits: r3233 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 11:00:51 -0400 (Fri, 27 Mar 2009)
New Revision: 3233
Modified:
mgmt/trunk/cumin/python/cumin/charts.py
Log:
Make the letter for the slot state legible
Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py 2009-03-27 14:55:20 UTC (rev 3232)
+++ mgmt/trunk/cumin/python/cumin/charts.py 2009-03-27 15:00:51 UTC (rev 3233)
@@ -93,17 +93,14 @@
# draw the state if the slots are big enough
if state and slot_size >= self.min_font:
- #cr.set_source_rgb(interior[0]/10, interior[1]/10, interior[2]/10)
- cr.set_source_rgb(1, 1, 1)
+ cr.set_source_rgb(interior[0]/10, interior[1]/10, interior[2]/10)
cr.select_font_face("verdana", FONT_SLANT_NORMAL, FONT_WEIGHT_BOLD)
cr.set_font_size(slot_size/3)
width, height = cr.text_extents(state[0])[2:4]
dx = (slot_size / 2) - (width / 2)
dy = (slot_size / 2) + (height / 2)
- if slot_size >= self.min_sphere_size:
- cr.set_source_rgb(*interior)
- else:
+ if slot_size < self.min_sphere_size:
cr.set_source_rgb(1,1,1)
cr.move_to(x + dx, y + dy)
cr.show_text(state[0])
15 years, 9 months
rhmessaging commits: r3232 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 10:55:20 -0400 (Fri, 27 Mar 2009)
New Revision: 3232
Modified:
mgmt/trunk/cumin/python/cumin/system.py
Log:
Increasing size of slot vis for systems
Modified: mgmt/trunk/cumin/python/cumin/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.py 2009-03-27 14:49:02 UTC (rev 3231)
+++ mgmt/trunk/cumin/python/cumin/system.py 2009-03-27 14:55:20 UTC (rev 3232)
@@ -156,7 +156,7 @@
return sysimage.nodeName
def render_slot_clip_size(self, session, *args):
- return 120
+ return 240
class SystemView(CuminView):
def __init__(self, app, name):
15 years, 9 months
rhmessaging commits: r3231 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 10:49:02 -0400 (Fri, 27 Mar 2009)
New Revision: 3231
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
session is now under wooly
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-27 14:48:23 UTC (rev 3230)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-03-27 14:49:02 UTC (rev 3231)
@@ -227,10 +227,12 @@
var oImg = document.images[slot_current_id];
if (oImg) {
var src = oImg.src;
- src = replace_value(src, "zl", level, ";");
- src = replace_value(src, "zx", slot_clip_left, ";");
- src = replace_value(src, "zy", slot_clip_top, ";");
-
+ var branch = wooly.session.branch(src);
+ branch.zl = level;
+ branch.zx = slot_clip_left;
+ branch.zy = slot_clip_top;
+ src = branch.marshal();
+
src = refreshTime(src);
oImg.src = src;
}
@@ -559,13 +561,9 @@
}
function do_info_request(index) {
- args = slot_info_url.split("?");
- var session = get_value(args[1], "session", ";")
- sess = unescape(session);
- sess = sess + ";" + slot_info_index + "=" + index;
- sess = escape(sess);
- var newreq = replace_value(slot_info_url, "session", sess, ";");
-
+ 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});
}
@@ -590,7 +588,7 @@
return;
}
- promote_to_body(oInfo); // so position is absolute to entire page
+ document.body.appendChild(oInfo); // so position is absolute to entire page
oInfo.style.left = "-1000px";
oInfo.style.visibility = "hidden";
@@ -807,16 +805,6 @@
}
}
-/* move an element to the body to break out of any relative positioning */
-function promote_to_body(obj) {
- if (obj) {
- var bodyList = document.getElementsByTagName("body");
- if (bodyList) {
- bodyList[0].appendChild(obj);
- }
- }
-}
-
[SlotMap.css]
div#slot_hover {
visibility: hidden;
@@ -1062,8 +1050,8 @@
oWait.style.visibility = "hidden";
oWait.style.display = "block";
- promote_to_body(oGlass); // so it covers the entire page
- promote_to_body(oWait); // so it can be centered on the page
+ document.body.appendChild(oGlass); // so it covers the entire page
+ document.body.appendChild(oWait); // so it can be centered on the page
var cp = get_center_point();
oWait.style.left = (cp.x - (oWait.offsetWidth / 2)) + "px";
15 years, 9 months
rhmessaging commits: r3230 - mgmt/trunk/wooly/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 10:48:23 -0400 (Fri, 27 Mar 2009)
New Revision: 3230
Modified:
mgmt/trunk/wooly/resources/wooly.js
Log:
decode session parameter values when creating a branch since they will be re-encoded on a branch.marshal
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-03-27 14:33:25 UTC (rev 3229)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-03-27 14:48:23 UTC (rev 3230)
@@ -759,7 +759,7 @@
var val = vars[i];
var keys = val.split('=');
if (keys.length == 2) {
- var value = keys[1];
+ var value = decodeURIComponent(keys[1]);
if (typeof obj[keys[0]] != "undefined") {
var oldval = obj[keys[0]];
if (oldval.push) {
15 years, 9 months
rhmessaging commits: r3229 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-27 10:33:25 -0400 (Fri, 27 Mar 2009)
New Revision: 3229
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Fix number of arguments to ajax update script
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-26 20:31:11 UTC (rev 3228)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-03-27 14:33:25 UTC (rev 3229)
@@ -1149,7 +1149,7 @@
got_fn = self.got_fn(session)
elem_id = self.elem_id(session)
- return url and script % (get_fn, url, got_fn, elem_id, get_fn) or ""
+ return url and script % (get_fn, url, got_fn, elem_id) or ""
def get_url(self, session):
pass
15 years, 9 months
RE: UK Pharmacy Discount ID 5789
by 1998-2009 Pfizer Inc.
About this mailing:
You are receiving this e-mail because you subscribed to MSN Featured Offers. Microsoft respects your privacy. If you do not wish to receive this MSN Featured Offers e-mail, please click the "Unsubscribe" link below. This will not unsubscribe you from e-mail communications from third-party advertisers that may appear in MSN Feature Offers. This shall not constitute an offer by MSN. MSN shall not be responsible or liable for the advertisers' content nor any of the goods or service advertised. Prices and item availability subject to change without notice.
©2009 Microsoft | Unsubscribe at http://jexcapoc.cn | More news at http://jexcapoc.cn | Prvacy at http://jexcapoc.cn
Microsoft Corporation, One Microsoft Way, Redmond, WA 98052
15 years, 9 months
rhmessaging commits: r3228 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-26 16:31:11 -0400 (Thu, 26 Mar 2009)
New Revision: 3228
Modified:
mgmt/trunk/cumin/python/cumin/queue.py
Log:
Made TopQueues aware when it's in full page mode. It will not shorten the name column in full page mode.
Modified: mgmt/trunk/cumin/python/cumin/queue.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/queue.py 2009-03-26 20:29:41 UTC (rev 3227)
+++ mgmt/trunk/cumin/python/cumin/queue.py 2009-03-26 20:31:11 UTC (rev 3228)
@@ -198,11 +198,13 @@
broker = Identifiable(data["broker_id"])
queue = Identifiable(data["id"])
+ big = self.parent.get_fullpage(session)
branch = session.branch()
self.page.main.broker.object.set(branch, broker)
self.page.main.broker.queue.object.set(branch, queue)
self.page.main.broker.queue.show(branch)
- return fmt_link(branch.marshal(), fmt_shorten(data["name"]))
+ name = big and data["name"] or fmt_shorten(data["name"])
+ return fmt_link(branch.marshal(), name)
class EnqueuesColumn(TopTableColumn):
def render_title(self, session, data):
15 years, 9 months