r4726 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-20 12:59:54 +0000 (Wed, 20 Apr 2011)
New Revision: 4726
Modified:
trunk/cumin/python/cumin/grid/negotiator.py
Log:
Remove unused attribute
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2011-04-19 19:23:44 UTC (rev 4725)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2011-04-20 12:59:54 UTC (rev 4726)
@@ -64,9 +64,6 @@
self.info = Attribute(app, "info")
self.add_attribute(self.info)
- self.loading = Attribute(app, "loading")
- self.add_attribute(self.loading)
-
self.results = Attribute(app, "results")
self.add_attribute(self.results)
@@ -190,7 +187,6 @@
info = self.get_config_for_groups(session, config, [group])
return info[group][config]
except:
- self.loading.set(session, "loading")
return "<em>loading</em>"
def get_unclaimed_dyn_quota(self, session, groups):
13 years, 1 month
r4725 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-19 19:23:44 +0000 (Tue, 19 Apr 2011)
New Revision: 4725
Modified:
trunk/cumin/python/cumin/grid/slotvis.py
Log:
Prevent the slot vis from being too short
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-04-19 19:22:02 UTC (rev 4724)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-04-19 19:23:44 UTC (rev 4725)
@@ -168,7 +168,7 @@
cols = int(width / slot_size) * 4
rows = int(math.ceil(count / cols))
- return rows * slot_size
+ return max(rows * slot_size, width)
def render_fullpageable(self, session):
return self.fullpageable and "fullpageable" or ""
13 years, 1 month
r4724 - in trunk/cumin: python/cumin/grid resources
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-19 19:22:02 +0000 (Tue, 19 Apr 2011)
New Revision: 4724
Modified:
trunk/cumin/python/cumin/grid/slotvis.py
trunk/cumin/resources/slots.swf
Log:
Attempt to remove the black space around the slot vis
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-04-18 21:04:17 UTC (rev 4723)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-04-19 19:22:02 UTC (rev 4724)
@@ -165,7 +165,7 @@
count = len(data)
# individual slots are 51 px wide and tall
width = self.render_slot_chart_width(session)
- cols = int(width / slot_size)
+ cols = int(width / slot_size) * 4
rows = int(math.ceil(count / cols))
return rows * slot_size
Modified: trunk/cumin/resources/slots.swf
===================================================================
(Binary files differ)
13 years, 1 month
r4723 - trunk/cumin/python/cumin
by croberts@fedoraproject.org
Author: croberts
Date: 2011-04-18 21:04:17 +0000 (Mon, 18 Apr 2011)
New Revision: 4723
Modified:
trunk/cumin/python/cumin/model.py
trunk/cumin/python/cumin/widgets.py
Log:
In order to resolve BZ https://bugzilla.redhat.com/show_bug.cgi?id=696635 I have made several job attributes un-writable.
Modified: trunk/cumin/python/cumin/model.py
===================================================================
--- trunk/cumin/python/cumin/model.py 2011-04-18 19:58:27 UTC (rev 4722)
+++ trunk/cumin/python/cumin/model.py 2011-04-18 21:04:17 UTC (rev 4723)
@@ -797,6 +797,10 @@
prop.group = "Other"
prop.title = "Cluster ID"
prop.writable = False
+
+ prop = AdProperty(self, "CurrentTime")
+ prop.group = "Other"
+ prop.writable = False
###### Dates
prop = DateAdProperty(self, "QDate")
@@ -880,7 +884,103 @@
prop = AdProperty(self, "RequestDisk")
prop.description = "Required for scheduling to partitionable slots."
prop.group = "Other"
+
+ prop = AdProperty(self, "NumShadowStarts")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "NumJobStarts")
+ prop.group = "Other"
+ prop.writable = False
+ prop = AdProperty(self, "AutoClusterId")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "NumJobMatches")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "DiskUsage_RAW")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "JobRunCount")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "RemoteSlotID")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "OrigMaxHosts")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "TransferFiles")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "RemoteSysCpu")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "ImageSize_RAW")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "CurrentHosts")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "ClaimId")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "PublicClaimId")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "StartdIpAddr")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "StartdPrincipal")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "RemoteHost")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "NumShadowExceptions")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "LastRemoteHost")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "LastPublicClaimId")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "BytesRecvd")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "RemoteWallClockTime")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "BytesSent")
+ prop.group = "Other"
+ prop.writable = False
+
+ prop = AdProperty(self, "CumulativeSlotTime")
+ prop.group = "Other"
+ prop.writable = False
+
class JobStatusProperty(AdProperty):
def render_status(self, session, status):
return JobStatusInfo.get_status_string(status)
Modified: trunk/cumin/python/cumin/widgets.py
===================================================================
--- trunk/cumin/python/cumin/widgets.py 2011-04-18 19:58:27 UTC (rev 4722)
+++ trunk/cumin/python/cumin/widgets.py 2011-04-18 21:04:17 UTC (rev 4723)
@@ -386,7 +386,7 @@
if renderer:
value = renderer(session, value)
- return escape_amp(str(value))
+ return escape_entity(str(value))
def get_val(self, session, item):
try:
13 years, 1 month
r4722 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-18 19:58:27 +0000 (Mon, 18 Apr 2011)
New Revision: 4722
Modified:
trunk/cumin/python/cumin/grid/quota.py
Log:
Fix for BZ 695800 - The exception type for python 2.4 differs from python 2.7. Python 2.4 raises an AttributeError if you attempt to convert and Exception to a float. 2.7 raises a TypeError.
Modified: trunk/cumin/python/cumin/grid/quota.py
===================================================================
--- trunk/cumin/python/cumin/grid/quota.py 2011-04-18 18:46:49 UTC (rev 4721)
+++ trunk/cumin/python/cumin/grid/quota.py 2011-04-18 19:58:27 UTC (rev 4722)
@@ -240,7 +240,7 @@
fval = float(value)
except ValueError:
return value
- except TypeError:
+ except:
if isinstance(value, Exception):
content = "<span class='QuotaError'>error</span>"
val = len(value.args) > 0 and value.args[0] or ""
13 years, 1 month
r4721 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-18 18:46:49 +0000 (Mon, 18 Apr 2011)
New Revision: 4721
Modified:
trunk/cumin/python/cumin/grid/negotiator.py
trunk/cumin/python/cumin/grid/negotiator.strings
Log:
Fix for BZ 696693 - Don't defer the rendering of the chart since the javascript needs to run at page load. Call setPieSlice action script method to force the chart tooltips to initialize.
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2011-04-18 18:07:25 UTC (rev 4720)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2011-04-18 18:46:49 UTC (rev 4721)
@@ -229,7 +229,7 @@
self.buttons = list()
- self.defer_enabled = True
+ #self.defer_enabled = True
def render_group_name(self, session, group):
return group
Modified: trunk/cumin/python/cumin/grid/negotiator.strings
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.strings 2011-04-18 18:07:25 UTC (rev 4720)
+++ trunk/cumin/python/cumin/grid/negotiator.strings 2011-04-18 18:46:49 UTC (rev 4721)
@@ -1,4 +1,4 @@
-[GroupForm.html]
+[EditDynamicQuotaForm.html]
<form id="{id}" class="mform {form_class}" method="post" action="?">
<div class="head">
<h1>{title}</h1>
@@ -26,8 +26,6 @@
<![CDATA[
cumin.initializeGroupForm = function () {
- var elem = $("{id}").elements[0];
- elem.focus();
cumin.init_sliders("{chart_id}");
var myFormValidator = new Form.Validator($('{id}'), {
@@ -55,9 +53,25 @@
});
}
-(function() {
-wooly.addPageUpdateListener( cumin.initializeGroupForm );
-}())
+window.addEvent("domready",
+ function () {
+ cumin.initializeGroupForm();
+ var elem = $("{id}").elements[0];
+ elem.focus();
+ });
+
+function ofc_resize(left, width, top, height, id)
+{
+ var jsonVals = cumin.get_quota_sum();
+ var chart = cumin.getFlashChart(id);
+ if (chart) {
+ if (typeof chart.setpieslice != "undefined") {
+ var obj = {'values': jsonVals};
+ var myJson = JSON.encode(obj);
+ chart.setpieslice("", myJson);
+ }
+ }
+}
]]>
</script>
@@ -103,6 +117,24 @@
}
[EditDynamicQuotaForm.javascript]
+cumin.get_quota_sum = function () {
+ var elems = document.forms[0].elements;
+ var sum = 0.0;
+ var changedIndex = 0;
+ var new_values = new Array();
+ $$("div.slider").each(function(elem) {
+ var input = elem.getParent("tr").getElement("input");
+ var val = parseFloat(input.value);
+ sum += val;
+ new_values[new_values.length] = {'value': val, 'label': elem.id, 'on-show': false};
+ });
+ if (sum < 100.0) {
+ val = (100.0 - sum);
+ new_values[new_values.length] = {'value': val, 'label': 'Unclaimed', 'on-show': false };
+ }
+ return new_values;
+}
+
cumin.init_sliders = function(priority_chart_id){
$$('div.slider').each(function(el, i){
var input = el.getParent("tr").getElement("input");
@@ -113,12 +145,13 @@
range: [0, 10000], // min and max value
onChange: function (pos) {
var new_values = new Array();
+ var sum = 0.0;
+ var changedIndex = 0;
+
var changedEl = this.element;
var changedInp = changedEl.getParent("tr").getElement("input");
changedInp.value = (Math.round(pos) / 100) + "";
// get the new total percent
- var sum = 0.0;
- var changedIndex = 0;
$$('div.slider').each(function (el, i) {
var inp = el.getParent("tr").getElement("input");
var val = parseFloat(inp.value);
@@ -145,7 +178,7 @@
unclaimed.value = "0.0";
}
}
-
+
var chart = cumin.getFlashChart(priority_chart_id);
if (chart) {
if (chart.setpieslice != "undefined") {
13 years, 1 month
r4720 - branches/scale_testing/wooly/python/wooly
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-04-18 18:07:25 +0000 (Mon, 18 Apr 2011)
New Revision: 4720
Modified:
branches/scale_testing/wooly/python/wooly/server.py
Log:
Put link logging stuff in an if block
Modified: branches/scale_testing/wooly/python/wooly/server.py
===================================================================
--- branches/scale_testing/wooly/python/wooly/server.py 2011-04-18 14:34:00 UTC (rev 4719)
+++ branches/scale_testing/wooly/python/wooly/server.py 2011-04-18 18:07:25 UTC (rev 4720)
@@ -139,16 +139,20 @@
headers = ()
content = ""
- #ccindex = -1
- #for cc in range(len(headers)):
- # if headers[cc][0] == "Cache-Control" and "max-age" in headers[cc][1]:
- # ccindex = cc
+ # Link logging stuff for automated web testing.
+ if False:
+ # See if we have a cache-control header. In the automated testing we
+ # want to skip links that have cache-control on them aft
+ ccindex = -1
+ for cc in range(len(headers)):
+ if headers[cc][0] == "Cache-Control" and "max-age" in headers[cc][1]:
+ ccindex = cc
- #ccPresent = ccindex != -1
- #self.log_link(env["REQUEST_URI"], self.get_last_requested(env) != None, ccPresent)
- ## Remove cache control for link logging so that we get the flag, but not the behavior.
- #if ccPresent:
- # del headers[ccindex]
+ ccPresent = ccindex != -1
+ self.log_link(env["REQUEST_URI"], self.get_last_requested(env) != None, ccPresent)
+ #Remove cache control for link logging so that we get the flag, but not the behavior.
+ if ccPresent:
+ del headers[ccindex]
response(status, headers)
13 years, 1 month
r4719 - trunk/mint/python/mint
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-04-18 14:34:00 +0000 (Mon, 18 Apr 2011)
New Revision: 4719
Modified:
trunk/mint/python/mint/util.py
Log:
Fix coding error that causes exception and ends thread if processing time takes longer than interval for MintPeriodicProcessThread.
Modified: trunk/mint/python/mint/util.py
===================================================================
--- trunk/mint/python/mint/util.py 2011-04-15 21:21:00 UTC (rev 4718)
+++ trunk/mint/python/mint/util.py 2011-04-18 14:34:00 UTC (rev 4719)
@@ -60,7 +60,7 @@
delta = self.interval - elapsed
if delta < 0:
- delta = elapsed % interval
+ delta = elapsed % self.interval
then = datetime.now() + timedelta(seconds=delta)
log.debug("Sleeping until %s", then.strftime("%H:%M:%S"))
13 years, 1 month
r4717 - trunk/cumin/model
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-15 20:39:48 +0000 (Fri, 15 Apr 2011)
New Revision: 4717
Modified:
trunk/cumin/model/rosemary.xml
Log:
Shorten the collector host stats names for the timeseries charts
Modified: trunk/cumin/model/rosemary.xml
===================================================================
--- trunk/cumin/model/rosemary.xml 2011-04-15 20:30:46 UTC (rev 4716)
+++ trunk/cumin/model/rosemary.xml 2011-04-15 20:39:48 UTC (rev 4717)
@@ -390,14 +390,17 @@
<statistic name="HostsClaimed">
<title>Claimed hosts</title>
+ <short>Claimed</short>
</statistic>
<statistic name="HostsUnclaimed">
<title>Unclaimed hosts</title>
+ <short>Unclaimed</short>
</statistic>
<statistic name="HostsOwner">
<title>Unavailable hosts</title>
+ <short>Unavailable</short>
</statistic>
<statistic name="HostsTotal">
13 years, 1 month
r4716 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-15 20:30:46 +0000 (Fri, 15 Apr 2011)
New Revision: 4716
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
Log:
Change the Host info chart to stacked area
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-04-14 20:15:40 UTC (rev 4715)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-04-15 20:30:46 UTC (rev 4716)
@@ -604,7 +604,8 @@
self.color_scheme = PieChartPage.BLUES
self.chart_link = StatFlashChart(app, "popup", collector)
- self.chart_link.stats = self.attrs
+ self.chart_link.stats = list(reversed(self.attrs[:-1]))
+ self.chart_link.chart_type = "stacked"
self.chart_link.duration.param.default = "3600"
self.add_child(self.chart_link)
13 years, 1 month