mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02: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:
committed by
Jake McDermott
parent
033314e4f6
commit
a23e5e920f
@@ -72,12 +72,13 @@ function JobsIndexController (
|
|||||||
|
|
||||||
function init (pageMode) {
|
function init (pageMode) {
|
||||||
page.init({
|
page.init({
|
||||||
resource
|
resource,
|
||||||
});
|
});
|
||||||
|
|
||||||
render.init({
|
render.init({
|
||||||
get: () => resource.model.get(`related.${resource.related}.results`),
|
get: () => resource.model.get(`related.${resource.related}.results`),
|
||||||
compile: html => $compile(html)($scope)
|
compile: html => $compile(html)($scope),
|
||||||
|
isStreamActive: stream.isActive
|
||||||
});
|
});
|
||||||
|
|
||||||
scroll.init({
|
scroll.init({
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ const ansi = new Ansi();
|
|||||||
const entities = new Entities.AllHtmlEntities();
|
const entities = new Entities.AllHtmlEntities();
|
||||||
|
|
||||||
function JobRenderService ($q, $sce, $window) {
|
function JobRenderService ($q, $sce, $window) {
|
||||||
this.init = ({ compile, apply, get }) => {
|
this.init = ({ compile, apply, isStreamActive }) => {
|
||||||
this.parent = null;
|
this.parent = null;
|
||||||
this.record = {};
|
this.record = {};
|
||||||
this.el = $(ELEMENT_TBODY);
|
this.el = $(ELEMENT_TBODY);
|
||||||
this.hooks = { get, compile, apply };
|
this.hooks = { isStreamActive, compile, apply };
|
||||||
};
|
};
|
||||||
|
|
||||||
this.sortByLineNumber = (a, b) => {
|
this.sortByLineNumber = (a, b) => {
|
||||||
@@ -155,7 +155,7 @@ function JobRenderService ($q, $sce, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (current) {
|
if (current) {
|
||||||
if (current.isParent && current.line === ln) {
|
if (!this.hooks.isStreamActive() && current.isParent && current.line === ln) {
|
||||||
id = current.uuid;
|
id = current.uuid;
|
||||||
tdToggle = `<td class="at-Stdout-toggle" ng-click="vm.toggle('${id}')"><i class="fa fa-angle-down can-toggle"></i></td>`;
|
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
|
this.chain = this.chain
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (data.event === JOB_START) {
|
if (!this.isActive()) {
|
||||||
this.start();
|
this.start();
|
||||||
} else if (data.event === JOB_END) {
|
} else if (data.event === JOB_END) {
|
||||||
if (this.isPaused()) {
|
if (this.isPaused()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user