mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 15:38:06 -03:30
Add support for in progress jobs and omit expand
* Any event received by the stream service will start rendering (instead of JOB_START events only) * Expand/collapse only shown for static results
This commit is contained in:
parent
033314e4f6
commit
a23e5e920f
@ -72,12 +72,13 @@ function JobsIndexController (
|
||||
|
||||
function init (pageMode) {
|
||||
page.init({
|
||||
resource
|
||||
resource,
|
||||
});
|
||||
|
||||
render.init({
|
||||
get: () => resource.model.get(`related.${resource.related}.results`),
|
||||
compile: html => $compile(html)($scope)
|
||||
compile: html => $compile(html)($scope),
|
||||
isStreamActive: stream.isActive
|
||||
});
|
||||
|
||||
scroll.init({
|
||||
|
||||
@ -22,11 +22,11 @@ const ansi = new Ansi();
|
||||
const entities = new Entities.AllHtmlEntities();
|
||||
|
||||
function JobRenderService ($q, $sce, $window) {
|
||||
this.init = ({ compile, apply, get }) => {
|
||||
this.init = ({ compile, apply, isStreamActive }) => {
|
||||
this.parent = null;
|
||||
this.record = {};
|
||||
this.el = $(ELEMENT_TBODY);
|
||||
this.hooks = { get, compile, apply };
|
||||
this.hooks = { isStreamActive, compile, apply };
|
||||
};
|
||||
|
||||
this.sortByLineNumber = (a, b) => {
|
||||
@ -155,7 +155,7 @@ function JobRenderService ($q, $sce, $window) {
|
||||
}
|
||||
|
||||
if (current) {
|
||||
if (current.isParent && current.line === ln) {
|
||||
if (!this.hooks.isStreamActive() && current.isParent && current.line === ln) {
|
||||
id = current.uuid;
|
||||
tdToggle = `<td class="at-Stdout-toggle" ng-click="vm.toggle('${id}')"><i class="fa fa-angle-down can-toggle"></i></td>`;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ function JobStreamService ($q) {
|
||||
|
||||
this.chain = this.chain
|
||||
.then(() => {
|
||||
if (data.event === JOB_START) {
|
||||
if (!this.isActive()) {
|
||||
this.start();
|
||||
} else if (data.event === JOB_END) {
|
||||
if (this.isPaused()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user