implement output follow-scroll behavior

This commit is contained in:
Jake McDermott
2018-08-03 15:46:04 -04:00
parent fed729f101
commit 80d6b0167c
12 changed files with 697 additions and 410 deletions

View File

@@ -69,6 +69,10 @@ function JobRenderService ($q, $sce, $window) {
};
this.transformEvent = event => {
if (this.record[event.uuid]) {
return { html: '', count: 0 };
}
if (!event || !event.stdout) {
return { html: '', count: 0 };
}
@@ -127,6 +131,7 @@ function JobRenderService ($q, $sce, $window) {
start: event.start_line,
end: event.end_line,
isTruncated: (event.end_line - event.start_line) > lines.length,
lineCount: lines.length,
isHost: this.isHostEvent(event),
};
@@ -167,6 +172,8 @@ function JobRenderService ($q, $sce, $window) {
return info;
};
this.getRecord = uuid => this.record[uuid];
this.deleteRecord = uuid => {
delete this.record[uuid];
};