This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4170 from HassenRiahi/FixUTCTimeMon
Fix UTC conversion in the monitor views.
- Loading branch information
Showing
12 changed files
with
39 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
function(doc) { | ||
if((doc.state)&&(doc.start_time)&&(doc.state != 'done')&&(doc.state != 'failed')&&(doc.state != 'killed')&&(doc.end_time == '')){ | ||
var start = doc.start_time; | ||
var day = start.split(' ')[0]; | ||
var time = start.split(' ')[1]; | ||
if((doc.state)&&(doc.start_time)&&(doc.state != 'done')&&(doc.state != 'failed')&&(doc.state != 'killed')&&(doc.end_time == '')){ | ||
var start = doc.start_time; | ||
var day = start.split(' ')[0]; | ||
var time = start.split(' ')[1]; | ||
|
||
var yy = day.split('-')[0]; | ||
var mm = day.split('-')[1]; | ||
var dd = day.split('-')[2]; | ||
var yy = day.split('-')[0]; | ||
var mm = parseInt(day.split('-')[1]) - 1; | ||
var dd = day.split('-')[2]; | ||
|
||
var h = time.split(':')[0]; | ||
var m = time.split(':')[1]; | ||
var s = time.split(':')[2].split('.')[0]; | ||
var h = time.split(':')[0]; | ||
var m = time.split(':')[1]; | ||
var s = time.split(':')[2].split('.')[0]; | ||
|
||
var startDate = new Date(yy, mm, dd, h, m, s); | ||
var startDate = new Date(yy, mm, dd, h, m, s); | ||
yy_utc = startDate.getUTCFullYear(); | ||
mm_utc = startDate.getUTCMonth(); | ||
dd_utc = startDate.getUTCDate(); | ||
h_utc = startDate.getUTCHours(); | ||
m_utc = startDate.getUTCMinutes(); | ||
s_utc = startDate.getUTCSeconds(); | ||
if ( mm == "12"){ | ||
emit([parseInt(yy), parseInt(mm), parseInt(dd), parseInt(h), parseInt(m), parseInt(s)], {"state": doc.state}); | ||
} | ||
else { | ||
emit([yy_utc, mm_utc, dd_utc, h_utc, m_utc, s_utc], {"state": doc.state}); | ||
|
||
} | ||
emit([yy_utc, mm_utc + 1, dd_utc, h_utc, m_utc, s_utc], {"state": doc.state}); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters