mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
show message when too many events come back for a job detail view
This commit is contained in:
parent
b8ce360227
commit
c0bbc4a9dd
@ -162,6 +162,7 @@
|
||||
|
||||
.JobResultsStdOut-stdoutColumn {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
color: @default-interface-txt;
|
||||
@ -171,6 +172,11 @@
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.JobResultsStdOut-stdoutColumn--tooMany {
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.JobResultsStdOut-stdoutColumn {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -31,6 +31,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="JobResultsStdOut-stdoutContainer">
|
||||
<div class="JobResultsStdOut-aLineOfStdOut"
|
||||
ng-show="tooManyEvents">
|
||||
<div class="JobResultsStdOut-lineNumberColumn">
|
||||
<span class="JobResultsStdOut-lineExpander"> </span>
|
||||
</div>
|
||||
<div class="JobResultsStdOut-stdoutColumn JobResultsStdOut-stdoutColumn--tooMany">The standard out based on the current filter is too large to display. Please use additional filters to view results.</div>
|
||||
</div>
|
||||
<div id="topAnchor" class="JobResultsStdOut-topAnchor"></div>
|
||||
<div class="JobResultsStdOut-numberColumnPreload"></div>
|
||||
<div id='lineAnchor' class="JobResultsStdOut-lineAnchor"></div>
|
||||
|
||||
@ -383,7 +383,11 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
// making rest calls for next pages/etc. (you can see context is
|
||||
// also passed into getEvents and processEvent and similar checks
|
||||
// exist in these functions)
|
||||
if (context !== currentContext) {
|
||||
//
|
||||
// also, if the page doesn't contain results (i.e.: the response
|
||||
// returns an error), don't process the page
|
||||
if (context !== currentContext || events === undefined ||
|
||||
events.results === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -441,7 +445,16 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
||||
|
||||
$( ".JobResultsStdOut-aLineOfStdOut.not_skeleton" ).remove();
|
||||
$scope.hasSkeleton.promise.then(() => {
|
||||
processPage(val, context);
|
||||
if (val.count > parseInt(val.maxEvents)) {
|
||||
$(".header_task").hide();
|
||||
$(".header_play").hide();
|
||||
$scope.tooManyEvents = true;
|
||||
} else {
|
||||
$(".header_task").show();
|
||||
$(".header_play").show();
|
||||
$scope.tooManyEvents = false;
|
||||
processPage(val, context);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
@ -147,20 +147,33 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear
|
||||
Wait('start');
|
||||
this.url = `${endpoint}${this.encodeQueryset(params)}`;
|
||||
Rest.setUrl(this.url);
|
||||
|
||||
return Rest.get()
|
||||
.success(this.success.bind(this))
|
||||
.error(this.error.bind(this))
|
||||
.finally(Wait('stop'));
|
||||
.then(function(response) {
|
||||
Wait('stop');
|
||||
|
||||
if (response
|
||||
.headers('X-UI-Max-Events') !== null) {
|
||||
response.data.maxEvents = response.
|
||||
headers('X-UI-Max-Events');
|
||||
}
|
||||
|
||||
return response;
|
||||
})
|
||||
.catch(function(response) {
|
||||
Wait('stop');
|
||||
|
||||
this.error(response.data, response.status);
|
||||
|
||||
return response;
|
||||
}.bind(this));
|
||||
},
|
||||
error(data, status) {
|
||||
ProcessErrors($rootScope, data, status, null, {
|
||||
hdr: 'Error!',
|
||||
msg: 'Call to ' + this.url + '. GET returned: ' + status
|
||||
});
|
||||
},
|
||||
success(data) {
|
||||
return data;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user