rhmessaging commits: r3380 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-05-14 15:11:13 -0400 (Thu, 14 May 2009)
New Revision: 3380
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Fixed bad check for QPID_DIR
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-05-13 16:47:28 UTC (rev 3379)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-05-14 19:11:13 UTC (rev 3380)
@@ -52,10 +52,13 @@
echo $* | newgrp ais
}
+# QPID_DIR is defined for source tree builds because of the --with-qpid-checkout config parameter
CLUSTER_EXEC=cluster_test
-if test -d ${QPID_DIR}; then
+if test "${QPID_DIR}" -a -d {QPID_DIR} ; then
+ # Source tree path
CLUSTER_DIR=${QPID_DIR}/cpp/src/tests
else
+ # Path from known installed locations
CLUSTER_PATH=`which ${CLUSTER_EXEC}`
if test -z ${CLUSTER_PATH} ; then
echo "No executable \"${CLUSTER_EXEC}\" found in path"
15 years, 7 months
rhmessaging commits: r3379 - in mgmt/trunk/wooly: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-13 12:47:28 -0400 (Wed, 13 May 2009)
New Revision: 3379
Modified:
mgmt/trunk/wooly/python/wooly/pages.strings
mgmt/trunk/wooly/resources/wooly.js
Log:
Double the update interval every hour
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-05-13 16:46:29 UTC (rev 3378)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-05-13 16:47:28 UTC (rev 3379)
@@ -32,6 +32,14 @@
// ]]>
</script>
+[UpdateScript.html]
+<script type="text/javascript">
+ // <![CDATA[
+ wooly.setIntervalUpdate('{url}', wooly.updatePage, {interval});
+ setInterval(wooly.doubleIntervalUpdate, 1000 * 60 * 60);
+ // ]]>
+</script>
+
[UpdatePage.html]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE widgets [
Modified: mgmt/trunk/wooly/resources/wooly.js
===================================================================
--- mgmt/trunk/wooly/resources/wooly.js 2009-05-13 16:46:29 UTC (rev 3378)
+++ mgmt/trunk/wooly/resources/wooly.js 2009-05-13 16:47:28 UTC (rev 3379)
@@ -376,7 +376,8 @@
timerId: 0,
url: "",
callback: "",
- interval: 0
+ interval: 0,
+ passback: null
};
this.setIntervalUpdate = function(url, callback, interval, passback) {
@@ -403,6 +404,7 @@
this.intervalUpdateInfo.url = url;
this.intervalUpdateInfo.callback = callback;
this.intervalUpdateInfo.interval = interval;
+ this.intervalUpdateInfo.passback = passback;
}
function update() {
@@ -436,13 +438,24 @@
this.restartIntervalUpdate = function (url) {
this.cancelIntervalUpdate();
- this.setIntervalUpdate(url, this.intervalUpdateInfo.callback, this.intervalUpdateInfo.interval);
+ this.setIntervalUpdate(url, this.intervalUpdateInfo.callback,
+ this.intervalUpdateInfo.interval,
+ this.intervalUpdateInfo.passback);
}
this.branchIntervalUpdate = function () {
return this.session.branch(this.intervalUpdateInfo.url);
}
+ this.doubleIntervalUpdate = function () {
+ wooly.cancelIntervalUpdate();
+ wooly.intervalUpdateInfo.interval *= 2;
+ wooly.setIntervalUpdate(wooly.intervalUpdateInfo.url,
+ wooly.intervalUpdateInfo.callback,
+ wooly.intervalUpdateInfo.interval,
+ wooly.intervalUpdateInfo.passback);
+ }
+
this._doc = new WoolyDocument(document);
this.doc = function(doc) {
15 years, 7 months
rhmessaging commits: r3378 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-13 12:46:29 -0400 (Wed, 13 May 2009)
New Revision: 3378
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Fix caching of slot maps
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-05-13 15:57:14 UTC (rev 3377)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-05-13 16:46:29 UTC (rev 3378)
@@ -304,11 +304,11 @@
return writer.to_string()
def get_cached(self, session, zl):
- filename = self.gen_filename(session, zl)
+ filename = self.gen_filename(session)
return self.cache.find_recent(filename, self.max_png_age)
def cache_it(self, session, zl, map, args):
- filename = self.gen_filename(session, zl)
+ filename = self.gen_filename(session)
writer = self.cache.create_cache_file(filename, args)
map.write(writer)
15 years, 7 months
rhmessaging commits: r3377 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-13 11:57:14 -0400 (Wed, 13 May 2009)
New Revision: 3377
Modified:
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Cache line and stacked bar graphs
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-05-11 20:23:02 UTC (rev 3376)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-05-13 15:57:14 UTC (rev 3377)
@@ -363,6 +363,13 @@
def init(self):
pass
+ def recent(self, object):
+ stats = object.stats
+
+ stats = stats.orderBy("-qmfUpdateTime")
+ if stats.count():
+ return stats[0].qmfUpdateTime
+
def samples(self, object, secs):
stats = object.stats
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-05-11 20:23:02 UTC (rev 3376)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-05-13 15:57:14 UTC (rev 3377)
@@ -8,7 +8,8 @@
from parameters import *
from util import *
from formats import *
-import tempfile
+#import tempfile
+import cStringIO
from datetime import timedelta, datetime
from visualizations import CuminVisualization
@@ -183,23 +184,21 @@
self.__files = dict() # {name: {"time": time_created, "file": file object, "cookie": (cookie values)}}
def find_recent(self, name, max_age):
- for cname in self.__files:
- if cname == name:
- age = timedelta(seconds=max_age)
- now = datetime.now()
- then = self.__files[cname]["time"]
- if now - then < age:
- file = self.__files[cname]["file"]
- file.seek(0)
- return (file.read(), self.__files[cname]["cookie"])
- else:
- break
+ if name in self.__files:
+ age = timedelta(seconds=max_age)
+ now = datetime.now()
+ then = self.__files[name]["time"]
+ if now - then < age:
+ file = self.__files[name]["file"]
+ file.seek(0)
+ return (file.read(), self.__files[name]["cookie"])
return (None, None)
def create_cache_file(self, name, args):
if name not in self.__files:
- file = tempfile.TemporaryFile()
+ #file = tempfile.TemporaryFile()
+ file = cStringIO.StringIO()
else:
file = self.__files[name]["file"]
file.seek(0)
@@ -305,18 +304,16 @@
return writer.to_string()
def get_cached(self, session, zl):
- filename = self.__gen_filename(session, zl)
+ filename = self.gen_filename(session, zl)
return self.cache.find_recent(filename, self.max_png_age)
def cache_it(self, session, zl, map, args):
- filename = self.__gen_filename(session, zl)
+ filename = self.gen_filename(session, zl)
writer = self.cache.create_cache_file(filename, args)
map.write(writer)
- def __gen_filename(self, session, zl):
- cls = self.class_.get(session)
- id = self.id.get(session)
- return "-".join((cls, str(id), str(zl)))
+ def gen_filename(self, session):
+ return session.marshal()
def set_cookie(self, session, args):
cookie = "|".join((str(x) for x in args))
@@ -346,6 +343,8 @@
self.duration.default = 600
self.add_parameter(self.duration)
+ self.cache = ImageCache()
+
def get_content_type(self, session):
return "image/png"
@@ -357,12 +356,34 @@
id = self.id.get(session)
return (cls.get(id),)
+ def gen_filename(self, session):
+ return session.marshal()
+
+ def get_cached(self, session, recent):
+ filename = self.gen_filename(session)
+ chart, last_recent = self.cache.find_recent(filename, 3)
+ if recent == last_recent:
+ return chart
+
+ def cache_it(self, session, chart, recent):
+ filename = self.gen_filename(session)
+ writer = self.cache.create_cache_file(filename, recent)
+ chart.write(writer)
+
def do_render(self, session, object):
- chart = TimeSeriesChart(360, 100)
-
cls = self.class_.get(session)
stats = [getattr(cls, x) for x in self.stats.get(session)]
+ if len(stats):
+ stat = stats[0]
+ recent = stat.recent(object)
+ if recent:
+ cached_png = self.get_cached(session, recent)
+ if cached_png:
+ return cached_png
+
+ chart = TimeSeriesChart(360, 100)
+
samples = dict()
values = dict()
@@ -439,11 +460,12 @@
chart.plot_legend(titles, colors)
+ self.cache_it(session, chart, recent)
+
writer = Writer()
chart.write(writer)
return writer.to_string()
-from random import *
class StatStackedPage(StatChartPage):
def __init__(self, app, name):
super(StatStackedPage, self).__init__(app, name)
@@ -459,6 +481,15 @@
def do_render(self, session, object):
cls = self.class_.get(session)
stats = [getattr(cls, x) for x in self.stats.get(session)]
+
+ if len(stats):
+ stat = stats[0]
+ recent = stat.recent(object)
+ if recent:
+ cached_png = self.get_cached(session, recent)
+ if cached_png:
+ return cached_png
+
legend_height = len(stats) * 16 + 16
chart = StackedValueChart(self.container_width.get(session),
@@ -525,6 +556,8 @@
chart.plot_legend(reversed(titles), reversed(colors[:len(titles)]))
+ self.cache_it(session, chart, recent)
+
writer = Writer()
chart.write(writer)
return writer.to_string()
15 years, 7 months
rhmessaging commits: r3376 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-11 16:23:02 -0400 (Mon, 11 May 2009)
New Revision: 3376
Modified:
mgmt/trunk/cumin/resources/app.css
Log:
Remove the light purple "fullpage" bars when not in full page.
Modified: mgmt/trunk/cumin/resources/app.css
===================================================================
--- mgmt/trunk/cumin/resources/app.css 2009-05-11 19:43:07 UTC (rev 3375)
+++ mgmt/trunk/cumin/resources/app.css 2009-05-11 20:23:02 UTC (rev 3376)
@@ -494,12 +494,11 @@
}
div.fullpageTitle {
- background-color: #E7E7F7;
height: 22px;
width: 100%;
position: absolute;
padding-top: 2px;
- display: block;
+ display: none;
top: -2px;
left: -4px;
overflow: hidden;
@@ -530,8 +529,8 @@
z-index: 4;
position: absolute;
top: -2px;
- right: 4px;
- display: block;
+ right: 14px;
+ display: none;
}
div.fullpageable:hover div.fullpageTitle,
div.fullpageable:hover p.fullpageIcon,
@@ -547,6 +546,10 @@
border-right: 1px solid #cbb4ff;
}
+div.fullpaged div.fullpageTitle {
+ background-color: #E7E7F7;
+}
+
div.widgetContainer {
position: relative;
z-index: 1;
15 years, 7 months
rhmessaging commits: r3375 - in mgmt/trunk/cumin/python/cumin: grid and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-11 15:43:07 -0400 (Mon, 11 May 2009)
New Revision: 3375
Modified:
mgmt/trunk/cumin/python/cumin/grid/pool.py
mgmt/trunk/cumin/python/cumin/inventory/system.py
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/python/cumin/visualizations.py
Log:
Moved visualizations out of model
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-05-11 14:17:45 UTC (rev 3374)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-05-11 19:43:07 UTC (rev 3375)
@@ -19,6 +19,8 @@
from limit import LimitsSet, LimitsFrame
from slot import SlotSet, SlotStatSet, SlotFrame
+import cumin.model
+
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.pool")
@@ -287,6 +289,21 @@
def filter(self, session, system, slots):
return slots
+class PoolVisualization(PoolSlotSet):
+ def __init__(self, vis, app, name):
+ super(PoolVisualization, self).__init__(app, name)
+ vis.add_visualization(self, name)
+
+ def get_info(self, session, id):
+ pool = model.Pool.get(id)
+ return self.get_items(session, pool)
+
+ def render_sql_limit(self, session, *args):
+ pass
+
+ def render_sql_orderby(self, session, *args):
+ return "order by machine, name asc"
+
class PoolStats(Widget):
def __init__(self, app, name):
super(PoolStats, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/inventory/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-05-11 14:17:45 UTC (rev 3374)
+++ mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-05-11 19:43:07 UTC (rev 3375)
@@ -201,11 +201,8 @@
def get_args(self, session):
return self.frame.get_args(session)
- def render_title(self, session, system):
- # dont' use self.get_item_count because it will cause a costly sql query
- # instead, use the systemslotset in model so it will be cached
- count = self.app.model.system.slots.get_slot_count(session, system)
- return "Grid Slots %s" % fmt_count(count)
+ def render_title(self, session, *args):
+ return "Grid Slots %s" % fmt_count(self.get_item_count(session, *args))
def render_sql_where(self, session, system):
elems = list()
@@ -219,6 +216,21 @@
def get_sql_values(self, session, system):
return {"nodeName": system.nodeName}
+class SystemVisualization(SystemSlotSet):
+ def __init__(self, vis, app, name):
+ super(SystemVisualization, self).__init__(app, name)
+ vis.add_visualization(self, name)
+
+ def get_info(self, session, id):
+ system = Sysimage.get(id)
+ return self.get_items(session, system)
+
+ def render_sql_limit(self, session, *args):
+ pass
+
+ def render_sql_orderby(self, session, *args):
+ return "order by machine, name asc"
+
class SystemServices(ItemSet):
def render_title(self, session, *args):
return "Services"
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-05-11 14:17:45 UTC (rev 3374)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-05-11 19:43:07 UTC (rev 3375)
@@ -8,9 +8,8 @@
from wooly.widgets import *
from grid.job import *
-from grid.pool import PoolSlotSet, PoolJobStats
+from grid.pool import PoolJobStats
from grid.slot import SlotStatSet
-from inventory.system import SystemSlotSet
from formats import *
from parameters import *
from util import *
@@ -218,7 +217,6 @@
self.summary = False
self.navigable = True
self.aggregate = False
- self.visualization = False
self.cumin_class.add_action(self)
@@ -547,11 +545,6 @@
def get_object_name(self, object):
return object.name
- def get_visualization_action(self):
- for action in self.actions:
- if action.visualization:
- return action
-
def write_event_xml(self, writer, object):
writer.write("<events errors=\"%i\" warnings=\"%i\"/>" % (0, 0))
@@ -705,19 +698,6 @@
def get_object_name(self, slot):
return slot.Name
-class Visualization(CuminAction):
- def __init__(self, cls, name):
- super(Visualization, self).__init__(cls, name)
-
- self.itemset = None
-
- def get_boxes(self, session, object):
- if self.itemset:
- box_list = self.itemset.get_items(session, object)
- return box_list
- else:
- return ()
-
class CuminSystem(RemoteClass):
def __init__(self, model):
super(CuminSystem, self).__init__(model, "system", Sysimage, SysimageStats)
@@ -767,10 +747,6 @@
stat = CuminStat(self, "procRunning")
stat.title = "Running processes"
- action = self.SystemSlotVisualization(self, "slots")
- action.navigable = False
- action.visualization = True
-
#action = CuminAction(self, "ping")
#action.title = "Send Ping"
#action.summary = True
@@ -793,24 +769,6 @@
text = value and "%0.2f" % value or ""
return text
- class SystemSlotVisualization(Visualization):
- def __init__(self, cls, name):
- super(CuminSystem.SystemSlotVisualization, self).__init__(cls, name)
-
- self.itemset = self.ModelSystemSlotSet(cls.model.app, "slot")
- self.itemset.items.path = "CuminSystem.SystemSlotVisualization.slot"
-
- def get_slot_count(self, session, system):
- items = self.itemset.get_items(session, system)
- return len(items)
-
- class ModelSystemSlotSet(SystemSlotSet):
- def render_sql_limit(self, session, *args):
- pass
-
- def render_sql_orderby(self, session, *args):
- return "order by machine, name asc"
-
class CuminMaster(RemoteClass):
def __init__(self, model):
super(CuminMaster, self).__init__(model, "master", Master, MasterStats)
@@ -1993,40 +1951,15 @@
prop.title = "Collector"
prop.summary = True
- stat = self.PercentStat(self, "running")
- stat.title = "Running Jobs"
-
- stat = self.PercentStat(self, "completed")
- stat.title = "Completed Jobs"
-
- stat = self.PercentStat(self, "idle")
- stat.title = "Idle Jobs"
-
- stat = self.PercentStat(self, "held")
- stat.title = "Held Jobs"
-
- stat = self.PercentStat(self, "removed")
- stat.title = "Removed Jobs"
-
- stat = self.PercentStat(self, "total")
- stat.title = "Total Jobs"
-
stat = self.StatusStat(self, "idl")
stat.category = "status"
stat = self.StatusStat(self, "all")
stat.category = "status"
- action = self.PoolSlotVisualization(self, "slots")
- action.navigable = False
- action.visualization = True
-
action = self.SeeAllPools(self, "allpools")
action.summary = True
- self.fake_stats = self.FakeJobStats(self, "fakestats")
- self.fake_stats.navigable = False
-
self.status = self.PoolStatus(self, "poolstatus")
self.status.navigable = False
@@ -2078,64 +2011,6 @@
def rate_text(self, record):
return ""
- class PercentStat(CuminStat):
- def value_text(self, record):
- if record:
- state = self.name
- value = record[state]
- return str(value)
- return ""
-
- def rate_text(self, record):
- if record:
- state = self.name
- value = record[state]
- total = record["total"]
- if total:
- percent = float(value) / float(total) * 100.0
- return total and "%2.2f" % percent or "-"
- return ""
-
- class PoolSlotVisualization(Visualization):
- def __init__(self, cls, name):
- super(CuminPool.PoolSlotVisualization, self).__init__(cls, name)
-
- self.itemset = self.ModelPoolSlotSet(cls.model.app, "slot")
- self.itemset.items.path = "CuminPool.PoolSlotVisualization.slot"
-
- class ModelPoolSlotSet(PoolSlotSet):
- def render_sql_where(self, session, pool):
- elems = list()
- elems.append("s.pool = %(pool)s")
- recent = self.get_recent_sql_where(session)
- if recent:
- elems.append(recent)
-
- return "where %s" % " and ".join(elems)
-
- def get_sql_values(self, session, pool):
- values = {"pool": pool.id}
- return values
-
- def render_sql_limit(self, session, *args):
- pass
-
- def render_sql_orderby(self, session, *args):
- return "order by machine, name asc"
-
- class FakeJobStats(CuminAction):
- def __init__(self, cls, name):
- super(CuminPool.FakeJobStats, self).__init__(cls, name)
-
- self.itemset = PoolJobStats(cls.model.app, "stats")
- self.itemset.items.path = "CuminPool.FakeJobStats.stats"
-
- def get_stat_record(self, session, pool):
- cursor = self.itemset.get_items(session, pool)
- rows = self.itemset.cursor_to_rows(cursor)
- if len(rows):
- return rows[0]
-
class PoolStatus(CuminAction):
def __init__(self, cls, name):
super(CuminPool.PoolStatus, self).__init__(cls, name)
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-05-11 14:17:45 UTC (rev 3374)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-05-11 19:43:07 UTC (rev 3375)
@@ -10,6 +10,7 @@
from formats import *
import tempfile
from datetime import timedelta, datetime
+from visualizations import CuminVisualization
strings = StringCatalog(__file__)
@@ -222,7 +223,9 @@
def __init__(self, app, name):
super(SlotMapPage, self).__init__(app, name)
- self.class_ = CuminClassParameter(app, "class")
+ self.vis = CuminVisualization(app)
+
+ self.class_ = Parameter(app, "class")
self.add_parameter(self.class_)
self.id = IntegerParameter(app, "id")
@@ -249,10 +252,10 @@
return "no-cache"
def get_args(self, session):
- cls = self.class_.get(session)
- if cls:
+ name = self.class_.get(session)
+ if name:
id = self.id.get(session)
- return (cls.mint_class.get(id),)
+ return (self.vis.get_itemset_by_name(name),)
else:
return (None,)
@@ -284,9 +287,7 @@
#print "starting rendering png at zoom %i, x %i, y %i" % (zl, zx, zy)
map = HeatMapChart(self.max_width, self.max_width)
- cls = self.class_.get(session)
- action = cls.get_visualization_action()
- slot_info = action.get_boxes(session, object)
+ slot_info = object.get_info(session, self.id.get(session))
if len(slot_info) == 0:
return ""
@@ -315,7 +316,7 @@
def __gen_filename(self, session, zl):
cls = self.class_.get(session)
id = self.id.get(session)
- return "-".join((cls.cumin_name, str(id), str(zl)))
+ return "-".join((cls, str(id), str(zl)))
def set_cookie(self, session, args):
cookie = "|".join((str(x) for x in args))
Modified: mgmt/trunk/cumin/python/cumin/visualizations.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.py 2009-05-11 14:17:45 UTC (rev 3374)
+++ mgmt/trunk/cumin/python/cumin/visualizations.py 2009-05-11 19:43:07 UTC (rev 3375)
@@ -124,8 +124,9 @@
if info_index is not None:
#print "rendering slot info for %i" % info_index
cls = self.app.model.get_class_by_object(object)
- action = cls.get_visualization_action()
- slot_info = action.get_boxes(session, object)
+ vis = CuminVisualization(self.app)
+ itemset = vis.get_itemset_by_name(cls.cumin_name)
+ slot_info = itemset.get_info(session, object.id)
writer = Writer()
self.info_div_tmpl.render(writer, session, slot_info[info_index])
return writer.to_string()
@@ -153,3 +154,20 @@
def render_row_class(self, session, item):
return item[0] == "jid" and "class='hidden_row'" or ""
+
+class CuminVisualization(object):
+ def __init__(self, app):
+ self.app = app
+ self.itemsets = dict()
+
+ from grid.pool import PoolVisualization
+ from inventory.system import SystemVisualization
+ PoolVisualization(self, app, "pool")
+ SystemVisualization(self, app, "system")
+
+ def get_itemset_by_name(self, name):
+ if name in self.itemsets:
+ return self.itemsets[name]
+
+ def add_visualization(self, itemset, name):
+ self.itemsets[name] = itemset
15 years, 7 months
rhmessaging commits: r3374 - in store/trunk/cpp/lib: gen/qmf/com/redhat/rhm/store and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2009-05-11 10:17:45 -0400 (Mon, 11 May 2009)
New Revision: 3374
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/MessageStoreImpl.cpp
store/trunk/cpp/lib/MessageStoreImpl.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.h
Log:
Updated to adapt to changes in the QPID plugin API for management.
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -26,7 +26,7 @@
#include "jrnl/jerrno.hpp"
#include "jrnl/jexception.hpp"
#include "qpid/log/Statement.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "qmf/com/redhat/rhm/store/ArgsJournalExpand.h"
#include "qmf/com/redhat/rhm/store/EventCreated.h"
#include "qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h"
@@ -51,7 +51,8 @@
const std::string& journalDirectory,
const std::string& journalBaseFilename,
const qpid::sys::Duration getEventsTimeout,
- const qpid::sys::Duration flushTimeout):
+ const qpid::sys::Duration flushTimeout,
+ qpid::management::ManagementAgent* a):
jcntl(journalId, journalDirectory, journalBaseFilename),
getEventsTimerSetFlag(false),
lastReadRid(0),
@@ -62,6 +63,7 @@
_dlen(0),
_dtok(),
_external(false),
+ _agent(a),
_mgmtObject(0)
{
::pthread_mutex_init(&_getf_mutex, 0);
@@ -74,7 +76,6 @@
journalTimerPtr->start();
journalTimerPtr->add(inactivityFireEventPtr);
- _agent = ManagementAgent::Singleton::getInstance();
if (_agent != 0)
{
_mgmtObject = new _qmf::Journal
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/JournalImpl.h 2009-05-11 14:17:45 UTC (rev 3374)
@@ -99,7 +99,8 @@
const std::string& journalDirectory,
const std::string& journalBaseFilename,
const qpid::sys::Duration getEventsTimeout,
- const qpid::sys::Duration flushTimeout);
+ const qpid::sys::Duration flushTimeout,
+ qpid::management::ManagementAgent* agent);
virtual ~JournalImpl();
@@ -226,8 +227,9 @@
const std::string& journalDirectory,
const std::string& journalBaseFilename,
const qpid::sys::Duration getEventsTimeout,
- const qpid::sys::Duration flushTimeout) :
- JournalImpl(journalId, journalDirectory, journalBaseFilename, getEventsTimeout, flushTimeout)
+ const qpid::sys::Duration flushTimeout,
+ qpid::management::ManagementAgent* agent) :
+ JournalImpl(journalId, journalDirectory, journalBaseFilename, getEventsTimeout, flushTimeout, agent)
{}
~TplJournalImpl() {}
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -77,7 +77,8 @@
highestRid(0),
isInit(false),
envPath(envpath),
- mgmtObject(0)
+ mgmtObject(0),
+ agent(0)
{}
u_int16_t MessageStoreImpl::chkJrnlNumFilesParam(const u_int16_t param, const std::string paramName)
@@ -210,7 +211,7 @@
void MessageStoreImpl::initManagement (Broker* broker)
{
if (broker != 0) {
- ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
+ agent = broker->getManagementAgent();
if (agent != 0) {
_qmf::Package packageInitializer(agent);
mgmtObject = new _qmf::Store(agent, this, broker);
@@ -331,7 +332,7 @@
open(mappingDb, txn.get(), "mappings.db", true);
open(bindingDb, txn.get(), "bindings.db", true);
open(generalDb, txn.get(), "general.db", false);
- tplStorePtr.reset(new TplJournalImpl("TplStore", getTplBaseDir(), "tpl", defJournalGetEventsTimeout, defJournalFlushTimeout));
+ tplStorePtr.reset(new TplJournalImpl("TplStore", getTplBaseDir(), "tpl", defJournalGetEventsTimeout, defJournalFlushTimeout, agent));
txn.commit();
} catch (const journal::jexception& e) {
txn.abort();
@@ -488,7 +489,7 @@
qpid::sys::Mutex::ScopedLock sl(jrnlCreateLock);
jQueue = new JournalImpl(queue.getName(), getJrnlDir(queue),
std::string("JournalData"), defJournalGetEventsTimeout,
- defJournalFlushTimeout);
+ defJournalFlushTimeout, agent);
}
value = args.get("qpid.auto_expand");
@@ -765,7 +766,7 @@
}
{
qpid::sys::Mutex::ScopedLock sl(jrnlCreateLock);
- jQueue = new JournalImpl(queueName, getJrnlDir(queueName), std::string("JournalData"), defJournalGetEventsTimeout, defJournalFlushTimeout);
+ jQueue = new JournalImpl(queueName, getJrnlDir(queueName), std::string("JournalData"), defJournalGetEventsTimeout, defJournalFlushTimeout, agent);
}
queue->setExternalQueueStore(dynamic_cast<ExternalQueueStore*>(jQueue));
Modified: store/trunk/cpp/lib/MessageStoreImpl.h
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.h 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/MessageStoreImpl.h 2009-05-11 14:17:45 UTC (rev 3374)
@@ -138,6 +138,7 @@
static qpid::sys::Duration defJournalFlushTimeout;
qmf::com::redhat::rhm::store::Store* mgmtObject;
qpid::sys::Mutex jrnlCreateLock;
+ qpid::management::ManagementAgent* agent;
// Parameter validation and calculation
static u_int16_t chkJrnlNumFilesParam(const u_int16_t param,
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "EventCreated.h"
using namespace qmf::com::redhat::rhm::store;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "EventEnqThresholdExceeded.h"
using namespace qmf::com::redhat::rhm::store;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "EventFull.h"
using namespace qmf::com::redhat::rhm::store;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "EventRecovered.h"
using namespace qmf::com::redhat::rhm::store;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "Journal.h"
#include "ArgsJournalExpand.h"
@@ -42,8 +42,8 @@
uint8_t Journal::md5Sum[16] =
{0x9,0xc2,0xe2,0xfc,0xcc,0x2e,0x72,0xaa,0x3f,0xce,0x36,0x28,0xce,0x81,0xc,0xd4};
-Journal::Journal (ManagementAgent* _agent, Manageable* _core) :
- ManagementObject(_agent, _core)
+Journal::Journal (ManagementAgent*, Manageable* _core) :
+ ManagementObject(_core)
{
queueRef = ::qpid::management::ObjectId();
@@ -80,7 +80,6 @@
- maxThreads = agent->getMaxThreads();
perThreadStatsArray = new struct PerThreadStats*[maxThreads];
for (int idx = 0; idx < maxThreads; idx++)
perThreadStatsArray[idx] = 0;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2009-05-11 14:17:45 UTC (rev 3374)
@@ -28,6 +28,12 @@
#include "qpid/framing/FieldTable.h"
#include "qpid/framing/Uuid.h"
+namespace qpid {
+ namespace management {
+ class ManagementAgent;
+ }
+}
+
namespace qmf {
namespace com {
namespace redhat {
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.h 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.h 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
// This source file was created by a code generator.
// Please do not edit.
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
namespace qmf {
namespace com {
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2009-05-11 14:17:45 UTC (rev 3374)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/agent/ManagementAgent.h"
+#include "qpid/management/ManagementAgent.h"
#include "Store.h"
@@ -41,8 +41,8 @@
uint8_t Store::md5Sum[16] =
{0x18,0xd,0xd4,0x15,0xd3,0x9a,0xf,0xbe,0x3a,0x40,0xe1,0x1b,0x9e,0x5b,0x7e,0x86};
-Store::Store (ManagementAgent* _agent, Manageable* _core, ::qpid::management::Manageable* _parent) :
- ManagementObject(_agent, _core)
+Store::Store (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent) :
+ ManagementObject(_core)
{
brokerRef = _parent->GetManagementObject ()->getObjectId ();
location = "";
@@ -64,7 +64,6 @@
- maxThreads = agent->getMaxThreads();
perThreadStatsArray = new struct PerThreadStats*[maxThreads];
for (int idx = 0; idx < maxThreads; idx++)
perThreadStatsArray[idx] = 0;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.h 2009-05-11 13:31:02 UTC (rev 3373)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Store.h 2009-05-11 14:17:45 UTC (rev 3374)
@@ -28,6 +28,12 @@
#include "qpid/framing/FieldTable.h"
#include "qpid/framing/Uuid.h"
+namespace qpid {
+ namespace management {
+ class ManagementAgent;
+ }
+}
+
namespace qmf {
namespace com {
namespace redhat {
15 years, 7 months
rhmessaging commits: r3373 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-11 09:31:02 -0400 (Mon, 11 May 2009)
New Revision: 3373
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.py
mgmt/trunk/cumin/python/cumin/grid/job.strings
Log:
Removed the outer joins on job stats from the jobs queries since there are no job stats. Using job.qmf_update time for selecting instead.
Modified: mgmt/trunk/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-08 20:11:51 UTC (rev 3372)
+++ mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-11 13:31:02 UTC (rev 3373)
@@ -1331,8 +1331,8 @@
if not phase:
phase = self.get(session)
- alive = "((c.qmf_update_time is null or " + \
- "c.qmf_update_time <= now() - interval '10 minutes')" + \
+ alive = "((j.qmf_update_time is null or " + \
+ "j.qmf_update_time <= now() - interval '10 minutes')" + \
" and j.qmf_delete_time is null and j.job_status != %i)" % JobStatusInfo.get_status_int("Removed")
if phase == "a":
Modified: mgmt/trunk/cumin/python/cumin/grid/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-08 20:11:51 UTC (rev 3372)
+++ mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-11 13:31:02 UTC (rev 3373)
@@ -17,8 +17,6 @@
j.cmd,
j.qmf_delete_time
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
{sql_where}
@@ -30,16 +28,12 @@
j.id,
j.custom_id
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
[JobSet.count_sql]
select count(1)
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
{sql_where}
15 years, 8 months
rhmessaging commits: r3372 - store/trunk/cpp/lib.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-05-08 16:11:51 -0400 (Fri, 08 May 2009)
New Revision: 3372
Modified:
store/trunk/cpp/lib/PreparedTransaction.h
Log:
Fix for gcc 4.4 (Fedora 11) compiler
Modified: store/trunk/cpp/lib/PreparedTransaction.h
===================================================================
--- store/trunk/cpp/lib/PreparedTransaction.h 2009-05-08 18:58:49 UTC (rev 3371)
+++ store/trunk/cpp/lib/PreparedTransaction.h 2009-05-08 20:11:51 UTC (rev 3372)
@@ -34,8 +34,8 @@
namespace mrg{
namespace msgstore{
-typedef uint64_t queue_id;
-typedef uint64_t message_id;
+typedef u_int64_t queue_id;
+typedef u_int64_t message_id;
class LockedMappings
{
15 years, 8 months
rhmessaging commits: r3371 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-08 14:58:49 -0400 (Fri, 08 May 2009)
New Revision: 3371
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Save non-sql table checkboxes in hash if widget is update_enabled
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-05-08 15:02:55 UTC (rev 3370)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-05-08 18:58:49 UTC (rev 3371)
@@ -936,10 +936,11 @@
name = self.param.path
id = data[self.name]
attr = id in self.param.get(session) and "checked=\"checked\"" or ""
+ click = self.parent.update_enabled and " onclick=\"cumin.clickTableCheckbox(this, '%s')\"" % name or ""
html = "<td><input type=\"checkbox\" name=\"%s\" " + \
- "value=\"%i\" %s/></td>"
+ "value=\"%i\" %s%s/></td>"
- return html % (name, id, attr)
+ return html % (name, id, attr, click)
class CheckboxIdColumn(FormInput, SqlTableColumn):
def __init__(self, app, name):
@@ -962,34 +963,23 @@
attr = id in self.param.get(session) and "checked=\"checked\"" or ""
disa = disabled and "disabled=\"disabled\"" or ""
click = self.parent.update_enabled and " onclick=\"cumin.clickTableCheckbox(this, '%s')\"" % name or ""
- t = "<td><input type=\"checkbox\" name=\"%s\" value=\"%i\" %s %s%s/></td>"
+ t = "<td><input type=\"checkbox\" name=\"%s\" value=\"%s\" %s %s%s/></td>"
- return t % (name, id, attr, disa, click)
+ return t % (name, str(id), attr, disa, click)
-class CheckboxStringIdColumn(FormInput, SqlTableColumn):
+class CheckboxStringIdColumn(CheckboxIdColumn):
def __init__(self, app, name):
- super(CheckboxStringIdColumn, self).__init__(app, name, None)
+ """ calls wrong super to avoid adding integer param """
+ super(CheckboxIdColumn, self).__init__(app, name, None)
self.header_class = CheckboxIdColumnHeader
- param = Parameter(app, "param")
- self.add_parameter(param)
+ item = Parameter(app, "param")
+ self.add_parameter(item)
- self.param = ListParameter(app, "id", param)
+ self.param = ListParameter(app, "id", item)
self.add_parameter(self.param)
- def clear(self, session):
- self.param.set(session, list())
-
- def do_render(self, session, data, disabled=False):
- name = self.param.path
- id = data[self.name]
- attr = id in self.param.get(session) and "checked=\"checked\"" or ""
- disa = disabled and "disabled=\"disabled\"" or ""
- t = "<td><input type=\"checkbox\" name=\"%s\" value=\"%s\" %s %s/></td>"
-
- return t % (name, id, attr, disa)
-
class CheckboxIdColumnHeader(ItemTableColumnHeader):
def render_form_id(self, session, *args):
return self.column.form.path
15 years, 8 months