[ARVADOS] updated: 23616a315b032181958ef05772870caa2eaf1277
git at public.curoverse.com
git at public.curoverse.com
Sat Nov 22 07:27:46 EST 2014
Summary of changes:
apps/workbench/app/assets/javascripts/event_log.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
via 23616a315b032181958ef05772870caa2eaf1277 (commit)
from 6b49793347e98146ec96373a6b48f56fac46b881 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 23616a315b032181958ef05772870caa2eaf1277
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date: Sat Nov 22 13:27:40 2014 +0100
4233: consistent use of ISO time-zone in timestamps corrects differences between Firefox and Chrome's charting results
diff --git a/apps/workbench/app/assets/javascripts/event_log.js b/apps/workbench/app/assets/javascripts/event_log.js
index bd5e78c..e6c18c5 100644
--- a/apps/workbench/app/assets/javascripts/event_log.js
+++ b/apps/workbench/app/assets/javascripts/event_log.js
@@ -77,7 +77,7 @@ function processLogLineForChart( logLine ) {
var datum = null;
// the timestamp comes first
- var timestamp = match[1].replace('_','T');
+ var timestamp = match[1].replace('_','T') + 'Z';
// we are interested in "-- interval" recordings
var intervalMatch = match[6].match(/(.*) -- interval (.*)/);
@@ -188,7 +188,7 @@ function addJobGraphDatum(timestamp, datum, series, rawDetailData) {
var shifted = [];
// now let's see about "scrolling" the graph, dropping entries that are too old (>10 minutes)
while( jobGraphData.length > 0
- && (Date.parse( jobGraphData[0]['t'] ).valueOf() + 10*60000 < Date.parse( jobGraphData[jobGraphData.length-1]['t'] ).valueOf()) ) {
+ && (Date.parse( jobGraphData[0]['t'] ) + 10*60000 < Date.parse( jobGraphData[jobGraphData.length-1]['t'] )) ) {
shifted.push(jobGraphData.shift());
}
if( shifted.length > 0 ) {
@@ -221,10 +221,13 @@ function addJobGraphDatum(timestamp, datum, series, rawDetailData) {
});
}
// add a 10 minute old null data point to keep the chart honest if the oldest point is less than 9.9 minutes old
- if( jobGraphData.length > 0
- && (Date.parse( jobGraphData[0]['t'] ).valueOf() + 9.9*60000 > Date.parse( jobGraphData[jobGraphData.length-1]['t'] ).valueOf()) ) {
- var tenMinutesBefore = (new Date(Date.parse( jobGraphData[jobGraphData.length-1]['t'] ).valueOf() - 600*1000)).toISOString().replace('Z','');
- jobGraphData.unshift( { 't': tenMinutesBefore } );
+ if( jobGraphData.length > 0 ) {
+ var earliestTimestamp = jobGraphData[0]['t'];
+ var mostRecentTimestamp = jobGraphData[jobGraphData.length-1]['t'];
+ if( (Date.parse( earliestTimestamp ) + 9.9*60000 > Date.parse( mostRecentTimestamp )) ) {
+ var tenMinutesBefore = (new Date(Date.parse( mostRecentTimestamp ) - 600*1000)).toISOString();
+ jobGraphData.unshift( { 't': tenMinutesBefore } );
+ }
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list