1
0
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:
Jake McDermott 2018-09-04 11:39:22 -04:00
parent c4a29ded1c
commit 0e696d0515
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
3 changed files with 20 additions and 0 deletions

View File

@ -838,6 +838,15 @@ function OutputIndexController (
return last();
});
$scope.$on('$destroy', () => {
stopListening();
render.clear();
render.el.remove();
slide.clear();
stream.bufferInit();
});
}
OutputIndexController.$inject = [

View File

@ -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 };
};

View File

@ -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 = () => {