Makes user-facing dates local when possible
[?]
Jan 22, 2019, 12:58 AM
ORWUR47ZCFUFUU2LX7SEBTZA7R2ET4WSBX5F4BGEIRWIYHSHV4SQCDependencies
- [2]
XA4U3RP6Jobset job tab: Show eval date rather than eval ID - [3]
EPWEMRI2Allow determinism checking for entire jobsets - [4]
PMTIAQEPBuild page: Show output / closure sizes - [5]
4WZQW2N6Fix indentation and get rid of some unnecessary whitespace in the output - [6]
IK53RV4V - [7]
GNIEG2GC* Disambiguate jobs by jobset name. I.e. jobs with the same name in - [8]
E5DMQRPORemove unnecessary whitespace in the HTML output - [9]
JLDUSNUO* Unify rendering of finished and scheduled builds. - [10]
6KIJX24RGet rid of unnecessary [%- and -%] tags - [11]
H7CNGK4O* Log evaluation errors etc. in the DB. - [12]
JAH3UPWASupport revision control systems via plugins - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
2P7VNAACMove common Javascript code into a separate file - [*]
KSBB33REAdd a dashboard
Change contents
- edit in src/root/common.tt at line 9[4.76]→[4.5204:5205](∅→∅),[4.412]→[4.5204:5205](∅→∅),[4.609]→[4.5204:5205](∅→∅),[4.623]→[4.5204:5205](∅→∅),[4.3027]→[4.5204:5205](∅→∅)
- replacement in src/root/common.tt at line 10
BLOCK renderDateTime;# Formatted date time, in hydra-local timezone.# Use only where an HTML element cannot be used.BLOCK dateTimeText; - edit in src/root/common.tt at line 16
# HTML-rendered date. Formatted in hydra-local timezone.# It is enhanced with JavaScript to show user-local and UTC time zones.BLOCK renderDateTime %]<time [% HTML.attributes("data-timestamp" => timestamp,title => date.format(timestamp, '%Y-%m-%d %H:%M:%S (%Z)'),datetime => date.format(timestamp, "%Y-%m-%dT%H:%M:%SZ", gmt => 1),) %] class="date is-absolute">[% INCLUDE dateTimeText %]</time>[% END; - replacement in src/root/common.tt at line 28
BLOCK renderRelativeDate;# Relative date, as text.# Use only where an HTML element cannot be used.BLOCK relativeDateText; - edit in src/root/common.tt at line 45
# HTML-rendered relative date.# It is enhanced with JavaScript to show user-local and UTC time zones.BLOCK renderRelativeDate %]<time [% HTML.attributes("data-timestamp" => timestamp,title => date.format(timestamp, '%Y-%m-%d %H:%M:%S (%Z)'),datetime => date.format(timestamp, "%Y-%m-%dT%H:%M:%SZ", gmt => 1),) %] class="date is-relative">[% INCLUDE relativeDateText %]</time>[% END; - edit in src/root/static/css/hydra.css at line 145[3.4195]
.date {cursor: help;border-bottom: 1px dotted #999;} - edit in src/root/static/js/common.js at line 100[16.7712][15.2151]
/* Makes dates more user friendly. */// Friendly date formatvar DATE_FORMAT = "YYYY-MM-DD HH:mm:ss";// Local timezone offset to display.var tz = moment().format("Z");$("time.date").each(function(i, el) {var el = $(el);var localTime = moment(el.data("timestamp"), "%X");var hydraTime = el.attr("title");if (el.hasClass("is-absolute")) {el.attr( "title", ["Adjusted to local time (" + tz + ")","Other timezones:"," UTC: " + localTime.clone().utc().format(DATE_FORMAT)," As Hydra reported: " + hydraTime,].join("\n"));el.text(localTime.format(DATE_FORMAT));el.addClass("is-local");}else if (el.hasClass("is-relative")) {el.attr( "title", ["Local (" + tz + "): " + localTime.format(DATE_FORMAT),"UTC: " + localTime.clone().utc().format(DATE_FORMAT),"As Hydra reported: " + hydraTime,].join("\n"));el.addClass("is-local");}});