Bug 1188444 - Log viewer: Handle missing duration or start/finish time

Taskcluster logs are often missing step metadata for some of the log
content, so generic placeholder steps have to be created by the log
parser, that can be missing one or more of start time, finish time or
duration.
This commit is contained in:
Ed Morley 2015-08-17 16:17:37 +01:00
Родитель 3d21e5bbb2
Коммит b00d8caa3b
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -170,8 +170,8 @@ logViewerApp.controller('LogviewerCtrl', [
};
$scope.displayTime = function(started, finished) {
var start = started.substr(started.indexOf(" ")+1, 8);
var end = finished.substr(finished.indexOf(" ")+1, 8);
var start = started ? started.substr(started.indexOf(" ")+1, 8) : '?';
var end = finished ? finished.substr(finished.indexOf(" ")+1, 8) : '?';
return start + "-" + end;
};

Просмотреть файл

@ -9,9 +9,9 @@
{{::step.order+1}}. {{::step.name}}
</span>
<span ng-init="time=formatTime(step.duration)"
<span ng-init="time=(step.duration !== null ? formatTime(step.duration) : 'Duration unknown')"
ng-mouseover="time=displayTime(step.started, step.finished)"
ng-mouseleave="time=formatTime(step.duration)"
ng-mouseleave="time=(step.duration !== null ? formatTime(step.duration) : 'Duration unknown')"
class="pull-right clearfix">
{{::time}}
</span>