Author: justi9
Date: 2007-11-12 13:51:01 -0500 (Mon, 12 Nov 2007)
New Revision: 1289
Modified:
mgmt/cumin/python/cumin/page.strings
mgmt/cumin/python/cumin/queue.strings
Log:
Makes queue charts refresh.
Modified: mgmt/cumin/python/cumin/page.strings
===================================================================
--- mgmt/cumin/python/cumin/page.strings 2007-11-12 16:55:45 UTC (rev 1288)
+++ mgmt/cumin/python/cumin/page.strings 2007-11-12 18:51:01 UTC (rev 1289)
@@ -584,6 +584,17 @@
status.elem("div").set(errors + ", " + warnings);
}
+counter = 0;
+
+function updateImage(id, object) {
+ var img = wooly.doc().elembyid(id);
+
+ src = img.getattr("src");
+ sep = src.lastIndexOf(";");
+
+ img.setattr("src", src + ";");
+}
+
[CuminPage.html]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Modified: mgmt/cumin/python/cumin/queue.strings
===================================================================
--- mgmt/cumin/python/cumin/queue.strings 2007-11-12 16:55:45 UTC (rev 1288)
+++ mgmt/cumin/python/cumin/queue.strings 2007-11-12 18:51:01 UTC (rev 1289)
@@ -258,19 +258,25 @@
[StatisticsHistory.html]
<h2>Depth</h2>
<div class="iblock chart">
- <img src="{depth_chart_url}"/>
+ <img id="{id}.depth" src="{depth_chart_url}"/>
</div>
<h2>Consumers</h2>
<div class="iblock chart">
- <img src="{consumers_chart_url}"/>
+ <img id="{id}.consumers" src="{consumers_chart_url}"/>
</div>
<h2>Transactions</h2>
<div class="iblock chart">
- <img src="{transactions_chart_url}"/>
+ <img id="{id}.transactions" src="{transactions_chart_url}"/>
</div>
+<script>
+ cumin.queue.listeners["{id}.depth"] = updateImage
+ cumin.queue.listeners["{id}.consumers"] = updateImage
+ cumin.queue.listeners["{id}.transactions"] = updateImage
+</script>
+
[QueueConsumerSet.html]
<div class="sactions">
<h2>Act on Selected Consumers:</h2>
Show replies by date