mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
show message when too many events come back for a job detail view
This commit is contained in:
@@ -162,6 +162,7 @@
|
|||||||
|
|
||||||
.JobResultsStdOut-stdoutColumn {
|
.JobResultsStdOut-stdoutColumn {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
color: @default-interface-txt;
|
color: @default-interface-txt;
|
||||||
@@ -171,6 +172,11 @@
|
|||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.JobResultsStdOut-stdoutColumn--tooMany {
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
.JobResultsStdOut-stdoutColumn {
|
.JobResultsStdOut-stdoutColumn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="JobResultsStdOut-stdoutContainer">
|
<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 id="topAnchor" class="JobResultsStdOut-topAnchor"></div>
|
||||||
<div class="JobResultsStdOut-numberColumnPreload"></div>
|
<div class="JobResultsStdOut-numberColumnPreload"></div>
|
||||||
<div id='lineAnchor' class="JobResultsStdOut-lineAnchor"></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
|
// making rest calls for next pages/etc. (you can see context is
|
||||||
// also passed into getEvents and processEvent and similar checks
|
// also passed into getEvents and processEvent and similar checks
|
||||||
// exist in these functions)
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,7 +445,16 @@ function(jobData, jobDataOptions, jobLabels, jobFinished, count, $scope, ParseTy
|
|||||||
|
|
||||||
$( ".JobResultsStdOut-aLineOfStdOut.not_skeleton" ).remove();
|
$( ".JobResultsStdOut-aLineOfStdOut.not_skeleton" ).remove();
|
||||||
$scope.hasSkeleton.promise.then(() => {
|
$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');
|
Wait('start');
|
||||||
this.url = `${endpoint}${this.encodeQueryset(params)}`;
|
this.url = `${endpoint}${this.encodeQueryset(params)}`;
|
||||||
Rest.setUrl(this.url);
|
Rest.setUrl(this.url);
|
||||||
|
|
||||||
return Rest.get()
|
return Rest.get()
|
||||||
.success(this.success.bind(this))
|
.then(function(response) {
|
||||||
.error(this.error.bind(this))
|
Wait('stop');
|
||||||
.finally(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) {
|
error(data, status) {
|
||||||
ProcessErrors($rootScope, data, status, null, {
|
ProcessErrors($rootScope, data, status, null, {
|
||||||
hdr: 'Error!',
|
hdr: 'Error!',
|
||||||
msg: 'Call to ' + this.url + '. GET returned: ' + status
|
msg: 'Call to ' + this.url + '. GET returned: ' + status
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
success(data) {
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user