Merge pull request #5440 from jlmitch5/errorMessageForLegacyJobs

show error message for <= 3.0.x jobs
This commit is contained in:
jlmitch5 2017-02-17 17:04:29 -05:00 committed by GitHub
commit 7b8f8b88ea
2 changed files with 18 additions and 1 deletions

View File

@ -35,7 +35,7 @@
<div class="JobResultsStdOut-numberColumnPreload"></div>
<div id='lineAnchor' class="JobResultsStdOut-lineAnchor"></div>
<div class="JobResultsStdOut-aLineOfStdOut"
ng-show="tooManyEvents || tooManyPastEvents">
ng-show="tooManyEvents || tooManyPastEvents || showLegacyJobErrorMessage">
<div class="JobResultsStdOut-lineNumberColumn">
<span class="JobResultsStdOut-lineExpander"> </span>
</div>
@ -43,6 +43,8 @@
ng-show="tooManyEvents">The standard output is too large to display. Please specify additional filters to narrow the standard out.</div>
<div class="JobResultsStdOut-stdoutColumn JobResultsStdOut-stdoutColumn--tooMany"
ng-show="tooManyPastEvents">Too much previous output to display. Showing running standard output.</div>
<div class="JobResultsStdOut-stdoutColumn JobResultsStdOut-stdoutColumn--tooMany"
ng-show="showLegacyJobErrorMessage">Job details are not available for this job. Please download to view standard out.</div>
</div>
<!-- next is 1 is a hack to get the first line to be put in the pane in the
right place -->

View File

@ -437,6 +437,18 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
$scope.playCount = 0;
$scope.taskCount = 0;
// used to show a message to just download for old jobs
// remove in 3.2.0
$scope.isOld = 0;
$scope.showLegacyJobErrorMessage = false;
toDestroy.push($scope.$watch('isOld', function (val) {
if (val >= 2) {
$scope.showLegacyJobErrorMessage = true;
}
}));
// get header and recap lines
var skeletonPlayCount = 0;
var skeletonTaskCount = 0;
@ -444,6 +456,9 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
jobResultsService.getEvents(url)
.then(events => {
events.results.forEach(event => {
if (event.start_line === 0 && event.end_line === 0) {
$scope.isOld++;
}
// get the name in the same format as the data
// coming over the websocket
event.event_name = event.event;