Anton Shestakov <av6@dwimlabs.net>, Mon, 18 Sep 2017 14:27:41 +0800
viewer: short summary and a link to compare on check page when makes sense
static/candolint.js
Permissions: -rw-r--r--
var humanizeTimestamps = function() { $('time[datetime]').each(function() { $this.text(moment($this.attr('datetime')).fromNow()); window.setInterval(humanizeTimestamps, 15 * 1000); $('.check-log div.task').each(function() { var task = $line.attr('data-task'); var $lines = $line.nextAll('[data-task="' + task + '"]'); if ($lines.length === 0) { return; } var $collapser = $('<a>').addClass('collapser'); $line.append($collapser); var toggle = function() { var collapsed = $collapser.hasClass('collapsed'); $lines.toggleClass('uk-hidden', collapsed); $collapser.on('click', function() { $collapser.toggleClass('collapsed'); var important = '.error, .warning, .failure, :target'; if (task !== 'checks' && $lines.filter(important).length === 0) { $collapser.addClass('collapsed');