mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 07:27:28 -02:30
add destroy hook to index controller
This commit is contained in:
@@ -838,6 +838,15 @@ function OutputIndexController (
|
||||
|
||||
return last();
|
||||
});
|
||||
|
||||
$scope.$on('$destroy', () => {
|
||||
stopListening();
|
||||
|
||||
render.clear();
|
||||
render.el.remove();
|
||||
slide.clear();
|
||||
stream.bufferInit();
|
||||
});
|
||||
}
|
||||
|
||||
OutputIndexController.$inject = [
|
||||
|
||||
@@ -228,6 +228,10 @@ function JobRenderService ($q, $sce, $window) {
|
||||
html += row;
|
||||
}
|
||||
|
||||
if (this.records[event.uuid]) {
|
||||
this.records[event.uuid].lineCount = count;
|
||||
}
|
||||
|
||||
return { html, count };
|
||||
};
|
||||
|
||||
|
||||
@@ -126,6 +126,13 @@ function SlidingWindowService ($q) {
|
||||
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.getMaxCounter = () => {
|
||||
|
||||
Reference in New Issue
Block a user