rhmessaging commits: r4247 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-31 11:16:19 -0400 (Tue, 31 Aug 2010)
New Revision: 4247
Modified:
mgmt/newdata/cumin/python/cumin/main.py
Log:
Fix BZ 628605. Now using submission.jobserverRef to get a jobserver and then jobserver.Pool to get a Collector
Modified: mgmt/newdata/cumin/python/cumin/main.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/main.py 2010-08-30 14:30:15 UTC (rev 4246)
+++ mgmt/newdata/cumin/python/cumin/main.py 2010-08-31 15:16:19 UTC (rev 4247)
@@ -367,21 +367,30 @@
self.adapter.query.add_filter(filter)
filter = SqlComparisonFilter(table._qmf_update_time,
- "now() - interval '60 seconds'", ">=")
+ "now() - interval '600000 seconds'", ">=")
self.adapter.query.add_filter(filter)
+ def get_collector(self, session, submission_id):
+ cls = self.cls
+ submission = cls.get_object_by_id(session.cursor, submission_id)
+
+ cls = self.app.model.com_redhat_grid.JobServer
+ job_server = cls.get_object_by_id(session.cursor, submission._jobserverRef_id)
+
+ cls = self.app.model.com_redhat_grid.Collector
+ return cls.get_object(session.cursor, Pool=job_server.Pool)
+
class NameColumn(ObjectLinkColumn):
def render_cell_href(self, session, record):
- # XXX fix this when submission has collector ref
- pool = 1
- submission = record[0]
+ submission_id = record[0]
+ collector = self.parent.get_collector(session, submission_id)
+ if collector:
+ branch = session.branch()
+ self.page.main.grid.pool.id.set(session, collector._id)
+ self.page.main.grid.pool.submission.id.set(session, submission_id)
+ self.page.main.grid.pool.submission.view.show(session)
+ return branch.marshal()
- branch = session.branch()
- self.page.main.grid.pool.id.set(session, pool)
- self.page.main.grid.pool.submission.id.set(session, submission)
- self.page.main.grid.pool.submission.view.show(session)
- return branch.marshal()
-
class DurationColumn(TopTableColumn):
def render_header_content(self, session):
return "Duration"
14 years, 4 months
rhmessaging commits: r4246 - mgmt/newdata/cumin/python/cumin/inventory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-30 10:30:15 -0400 (Mon, 30 Aug 2010)
New Revision: 4246
Modified:
mgmt/newdata/cumin/python/cumin/inventory/system.py
mgmt/newdata/cumin/python/cumin/inventory/system.strings
Log:
Add legend back into system slots.
Increase system slot vis size to match pool slot vis size.
Modified: mgmt/newdata/cumin/python/cumin/inventory/system.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/inventory/system.py 2010-08-27 20:44:29 UTC (rev 4245)
+++ mgmt/newdata/cumin/python/cumin/inventory/system.py 2010-08-30 14:30:15 UTC (rev 4246)
@@ -123,10 +123,10 @@
return sess.marshal()
def render_slot_chart_width(self, session):
- return 360
+ return 400
def render_slot_chart_height(self, session):
- return 200
+ return 400
class OldSystemView(CuminView):
def __init__(self, app, name, system):
Modified: mgmt/newdata/cumin/python/cumin/inventory/system.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/inventory/system.strings 2010-08-27 20:44:29 UTC (rev 4245)
+++ mgmt/newdata/cumin/python/cumin/inventory/system.strings 2010-08-30 14:30:15 UTC (rev 4246)
@@ -54,6 +54,7 @@
<h2>Slots</h2>
<div class="StatValueChart" id="{id}">
<div id="{id}_chart"></div>
+ {slot_legend}
</div>
</div>
<script type="text/javascript">
14 years, 4 months
rhmessaging commits: r4245 - mgmt/newdata/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-27 16:44:29 -0400 (Fri, 27 Aug 2010)
New Revision: 4245
Modified:
mgmt/newdata/cumin/resources/slots.swf
Log:
Don't center the slots vertically.
Modified: mgmt/newdata/cumin/resources/slots.swf
===================================================================
(Binary files differ)
14 years, 4 months
rhmessaging commits: r4244 - mgmt/newdata/cumin/python/cumin/account.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-08-27 15:48:54 -0400 (Fri, 27 Aug 2010)
New Revision: 4244
Modified:
mgmt/newdata/cumin/python/cumin/account/widgets.py
Log:
Render the change password form's title
Modified: mgmt/newdata/cumin/python/cumin/account/widgets.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/account/widgets.py 2010-08-27 19:41:33 UTC (rev 4243)
+++ mgmt/newdata/cumin/python/cumin/account/widgets.py 2010-08-27 19:48:54 UTC (rev 4244)
@@ -216,6 +216,9 @@
url = self.return_url.get(session)
self.page.redirect.set(session, url)
+ def render_title(self, session):
+ return "Change password"
+
class Current(PasswordField):
def render_title(self, session):
return "Current password"
14 years, 4 months
rhmessaging commits: r4243 - mgmt/newdata/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-08-27 15:41:33 -0400 (Fri, 27 Aug 2010)
New Revision: 4243
Modified:
mgmt/newdata/mint/python/mint/session.py
Log:
Fixes package-specific user bindings
Modified: mgmt/newdata/mint/python/mint/session.py
===================================================================
--- mgmt/newdata/mint/python/mint/session.py 2010-08-27 18:41:20 UTC (rev 4242)
+++ mgmt/newdata/mint/python/mint/session.py 2010-08-27 19:41:33 UTC (rev 4243)
@@ -40,7 +40,7 @@
rcvHeartbeats=True,
userBindings=True)
- for pkg in self.app.model._packages:
+ for pkg in self.qmf_packages:
self.qmf_session.bindPackage(pkg._name)
for uri in self.broker_uris:
14 years, 4 months
rhmessaging commits: r4241 - in mgmt/newdata/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-27 14:24:21 -0400 (Fri, 27 Aug 2010)
New Revision: 4241
Modified:
mgmt/newdata/cumin/python/cumin/grid/pool.py
mgmt/newdata/cumin/python/cumin/grid/pool.strings
mgmt/newdata/cumin/resources/slots.swf
Log:
Further fixes for BZ 623677
- Allow lists that are too tall to overflow the flash area
- Allow scrolling in the flash vis by mouse dragging
- Reset the scroll position back to top when loading a new set of slots
Modified: mgmt/newdata/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/pool.py 2010-08-27 16:36:59 UTC (rev 4240)
+++ mgmt/newdata/cumin/python/cumin/grid/pool.py 2010-08-27 18:24:21 UTC (rev 4241)
@@ -301,27 +301,12 @@
return sess.marshal()
- def render_ctrl_href(self, session):
- collector = self.collector.get(session)
-
- page = self.app.grid.pool_slots_page
- sess = Session(page)
-
- page.collector.set(sess, collector)
- page.json.set(sess, "ctrl")
- page.groups.set(sess, [self.group_by.get(session)])
-
- return sess.marshal()
-
def render_slot_chart_width(self, session):
return self.render_slot_clip_size(session)
def render_slot_chart_height(self, session):
return self.render_slot_clip_size(session)
- def render_slot_ctrl_height(self, session):
- return 80
-
def render_fullpageable(self, session):
return self.fullpageable and "fullpageable" or ""
Modified: mgmt/newdata/cumin/python/cumin/grid/pool.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/pool.strings 2010-08-27 16:36:59 UTC (rev 4240)
+++ mgmt/newdata/cumin/python/cumin/grid/pool.strings 2010-08-27 18:24:21 UTC (rev 4241)
@@ -52,16 +52,15 @@
//<![CDATA[
function updatePoolSlotVis(id, loadType) {
var chart = cumin.getFlashChart(id);
+ if (typeof loadType == "undefined")
+ loadType = "load";
if ((chart != null) && (typeof chart.src != "undefined")) {
- if (typeof loadType != "undefined") {
- if (typeof chart.reload != "undefined")
- chart.reload(chart.src, false);
- } else {
- if (typeof chart.load != "undefined")
- chart.load(chart.src, false);
- else
- wooly.log("load not defined for " + id);
- }
+ if ((loadType == "reload") && (typeof chart.reload != "undefined"))
+ chart.reload(chart.src, false);
+ else if ((loadType == "load") && (typeof chart.load != "undefined"))
+ chart.load(chart.src, false);
+ else
+ wooly.log("load not defined for " + id);
}
}
function vis_loaded(data) {
@@ -73,11 +72,7 @@
if (vis == "slots") {
var chart = cumin.getFlashChart("{id}");
chart.src = "{slots_href}";
- updatePoolSlotVis('{id}');
- } else {
- var chart = cumin.getFlashChart("{id}ctrl");
- chart.src = "{ctrl_href}";
- updatePoolSlotVis('{id}ctrl');
+ updatePoolSlotVis('{id}', "load");
}
}
function vis_expand(parent) {
@@ -89,7 +84,7 @@
var branch = wooly.session.branch(src);
branch['expanded'] = parent;
chart.src = branch.marshal();
- updatePoolSlotVis("{id}", "reload");
+ updatePoolSlotVis("{id}", "load");
}
function vis_back() {
var chart = cumin.getFlashChart("{id}");
@@ -98,7 +93,7 @@
if (typeof branch.expanded != "undefined")
delete branch.expanded;
chart.src = branch.marshal();
- updatePoolSlotVis("{id}", "reload");
+ updatePoolSlotVis("{id}", "load");
}
function vis_treemap_over(type, value) {
var chart = cumin.getFlashChart("{id}");
@@ -132,7 +127,7 @@
var src = branch.marshal();
var chart = cumin.getFlashChart(id);
chart.src = src
- updatePoolSlotVis(id, "reload");
+ updatePoolSlotVis(id, "load");
return false;
}
@@ -151,10 +146,8 @@
}
swfobject.embedSWF("resource?name=slots.swf", "{id}_chart", "{slot_chart_width}", "{slot_chart_height}", "9.0.0", "", {vis:"slots"}, params);
- swfobject.embedSWF("resource?name=slots.swf", "{id}ctrl_chart", "{slot_chart_width}", "{slot_ctrl_height}", "9.0.0", "", {vis:"ctrl"}, params);
wooly.addPageUpdateListener(function () { updatePoolSlotVis('{id}', "reload"); });
- wooly.addPageUpdateListener(function () { updatePoolSlotVis('{id}ctrl', "reload"); });
window.addEvent('domready',function () {
cumin.setFullpageHandler('{id}', '{fullpage_href}');
});
Modified: mgmt/newdata/cumin/resources/slots.swf
===================================================================
(Binary files differ)
14 years, 4 months
rhmessaging commits: r4240 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-08-27 12:36:59 -0400 (Fri, 27 Aug 2010)
New Revision: 4240
Modified:
mgmt/newdata/cumin/python/cumin/grid/submission.py
Log:
Prevent users from overriding job credentials
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-27 16:24:11 UTC (rev 4239)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-27 16:36:59 UTC (rev 4240)
@@ -194,6 +194,8 @@
self.input.columns = 50
+ self.illegal_attributes = ("owner", "user")
+
def render_title(self, session):
return "Extra attributes"
@@ -212,11 +214,17 @@
try:
name, value = self.parse_attribute(line)
except:
- error = FormError("Failed parsing attribute: %s" % line)
- self.form.errors.get(session).append(error)
+ msg = "Failed parsing attribute '%s'" % line
+ self.form.errors.get(session).append(FormError(msg))
continue
+ if name.lower() in self.illegal_attributes:
+ msg = "Setting extra attribute '%s' is prohibited" % name
+ self.form.errors.get(session).append(FormError(msg))
+
+ continue
+
attrs[name] = value
return attrs
14 years, 4 months
rhmessaging commits: r4239 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-08-27 12:24:11 -0400 (Fri, 27 Aug 2010)
New Revision: 4239
Modified:
mgmt/newdata/cumin/python/cumin/grid/submission.py
Log:
Pursuant to bz 618243, add a set of standard job attributes; include DiskUsage = 0
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-26 22:27:13 UTC (rev 4238)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-08-27 16:24:11 UTC (rev 4239)
@@ -288,6 +288,7 @@
put("Err", stderr)
put("UserLog", usrlog)
+ ad.update(standard_job_attributes)
ad.update(attrs)
descriptors = dict()
@@ -557,6 +558,7 @@
# Extra attributes
+ ad.update(standard_job_attributes)
ad.update(attrs)
# Descriptors
@@ -684,6 +686,7 @@
ad["Environment"] = " ".join(vars)
+ ad.update(standard_job_attributes)
ad.update(attrs)
descriptors = dict()
@@ -746,6 +749,10 @@
def render_title(self, session):
return "DAG file location"
+standard_job_attributes = {
+ "DiskUsage": 0,
+ }
+
def log_job_ad(ad):
log.debug("Job ad:")
14 years, 4 months
rhmessaging commits: r4238 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-26 18:27:13 -0400 (Thu, 26 Aug 2010)
New Revision: 4238
Modified:
mgmt/newdata/cumin/python/cumin/grid/slot.py
mgmt/newdata/cumin/python/cumin/grid/slot.strings
Log:
Remove the qmf_update_time where clause from the slot query.
Center the slot vis legend
Modified: mgmt/newdata/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/slot.py 2010-08-26 22:12:38 UTC (rev 4237)
+++ mgmt/newdata/cumin/python/cumin/grid/slot.py 2010-08-26 22:27:13 UTC (rev 4238)
@@ -43,11 +43,8 @@
def __init__(self, app):
super(SlotDataSet, self).__init__(app)
- exprs = list()
- exprs.append("_qmf_update_time > now() - interval '60 minutes'")
+ self.where_exprs.default = list()
- self.where_exprs.default = exprs
-
def render_sql_order_by(self, session):
return "Order by \"System\",\"Name\""
Modified: mgmt/newdata/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/slot.strings 2010-08-26 22:12:38 UTC (rev 4237)
+++ mgmt/newdata/cumin/python/cumin/grid/slot.strings 2010-08-26 22:27:13 UTC (rev 4238)
@@ -1192,6 +1192,9 @@
[SlotLegend.css]
div.slot_legend {
margin-top: 0.1em;
+ margin-left: auto;
+ margin-right: auto;
+ width: 20em;
}
div.slot_legend h3 {
14 years, 4 months
rhmessaging commits: r4237 - mgmt/newdata/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-08-26 18:12:38 -0400 (Thu, 26 Aug 2010)
New Revision: 4237
Modified:
mgmt/newdata/cumin/resources/slots.swf
Log:
Move the Back button to the right to avoid overlapping the label
Modified: mgmt/newdata/cumin/resources/slots.swf
===================================================================
(Binary files differ)
14 years, 4 months