mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 00:57:48 -02:30
add destroy hook to index controller
This commit is contained in:
@@ -838,6 +838,15 @@ function OutputIndexController (
|
|||||||
|
|
||||||
return last();
|
return last();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.$on('$destroy', () => {
|
||||||
|
stopListening();
|
||||||
|
|
||||||
|
render.clear();
|
||||||
|
render.el.remove();
|
||||||
|
slide.clear();
|
||||||
|
stream.bufferInit();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputIndexController.$inject = [
|
OutputIndexController.$inject = [
|
||||||
|
|||||||
@@ -228,6 +228,10 @@ function JobRenderService ($q, $sce, $window) {
|
|||||||
html += row;
|
html += row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.records[event.uuid]) {
|
||||||
|
this.records[event.uuid].lineCount = count;
|
||||||
|
}
|
||||||
|
|
||||||
return { html, count };
|
return { html, count };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,13 @@ function SlidingWindowService ($q) {
|
|||||||
return frames.filter(({ counter }) => counter > tail);
|
return frames.filter(({ counter }) => counter > tail);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.clear = () => {
|
||||||
|
this.buffer.events.length = 0;
|
||||||
|
this.buffer.min = 0;
|
||||||
|
this.buffer.max = 0;
|
||||||
|
this.buffer.count = 0;
|
||||||
|
};
|
||||||
|
|
||||||
this.getFrames = () => $q.resolve(this.buffer.events);
|
this.getFrames = () => $q.resolve(this.buffer.events);
|
||||||
|
|
||||||
this.getMaxCounter = () => {
|
this.getMaxCounter = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user