mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
use el.contents() to remove lines
This commit is contained in:
parent
b3f2f7efe5
commit
c4a29ded1c
@ -433,18 +433,24 @@ function JobRenderService ($q, $sce, $window) {
|
||||
};
|
||||
|
||||
this.removeAll = () => {
|
||||
const elements = this.el.children();
|
||||
const elements = this.el.contents();
|
||||
return this.remove(elements);
|
||||
};
|
||||
|
||||
this.shift = lines => {
|
||||
const elements = this.el.children().slice(0, lines);
|
||||
// We multiply by two here under the assumption that one element and one text node
|
||||
// is generated for each line of output.
|
||||
const count = 2 * lines;
|
||||
const elements = this.el.contents().slice(0, count);
|
||||
|
||||
return this.remove(elements);
|
||||
};
|
||||
|
||||
this.pop = lines => {
|
||||
const elements = this.el.children().slice(-lines);
|
||||
// We multiply by two here under the assumption that one element and one text node
|
||||
// is generated for each line of output.
|
||||
const count = 2 * lines;
|
||||
const elements = this.el.contents().slice(-count);
|
||||
|
||||
return this.remove(elements);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user