зеркало из https://github.com/mozilla/treeherder.git
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:
Родитель
3d21e5bbb2
Коммит
b00d8caa3b
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче