Bug 1193222 - Handle invalid logviewer jobs in the UI

This commit is contained in:
Jonathan French 2015-08-20 16:26:41 -04:00
Родитель e2955ef187
Коммит e94fdf2455
2 изменённых файлов: 15 добавлений и 4 удалений

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

@ -29,6 +29,7 @@ logViewerApp.controller('LogviewerCtrl', [
$scope.displayedLogLines = [];
$scope.loading = false;
$scope.logError = false;
$scope.jobExists = true;
$scope.currentLineNumber = 0;
$scope.highestLine = 0;
$scope.showSuccessful = true;
@ -144,7 +145,7 @@ logViewerApp.controller('LogviewerCtrl', [
}, function (error) {
$scope.loading = false;
$scope.logError = true;
thNotify.send("The log no longer exists or has expired", 'warning', 'true');
thNotify.send("The log no longer exists or has expired", 'warning', true);
deferred.reject();
});
} else {
@ -204,6 +205,11 @@ logViewerApp.controller('LogviewerCtrl', [
var revision = data.data.revision;
$scope.logProperties.push({label: "Revision", value: revision});
});
}, function (error) {
$scope.loading = false;
$scope.jobExists = false;
thNotify.send("The job does not exist or has expired", 'danger', true);
});
// Make the log and job artifacts available

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

@ -32,15 +32,20 @@
</li>
<!-- Job status -->
<li class="{{::resultStatusShading}}">
<li ng-if="jobExists" class="{{::resultStatusShading}}">
<div>
<span ng-cloak><strong>{{result.label}}: </strong></span>
<span ng-cloak class="break-word">{{result.value}}</span>
<span ng-cloak>{{result.value}}</span>
</div>
</li>
<li ng-if="!jobExists" class="alert-danger">
<div>
<span title="The job does not exist or has expired">Unavailable</span>
</div>
</li>
<!-- Raw log button -->
<li>
<li ng-if="jobExists">
<a title="{{logError ? 'Raw log link no longer exists or has expired (click for path)' :
'Open the raw log in a new window'}}"
target="_blank"