mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
add destroy hook to index controller
This commit is contained in:
parent
c4a29ded1c
commit
0e696d0515
@ -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 = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user