mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
Reload on stats when live updates are disabled
This commit is contained in:
committed by
Ryan Petrello
parent
bed2dea04d
commit
b6afc085a7
@@ -119,6 +119,10 @@ function OutputStream ($q) {
|
|||||||
this.counters.ready = ready;
|
this.counters.ready = ready;
|
||||||
this.counters.used = used;
|
this.counters.used = used;
|
||||||
this.counters.missing = missing;
|
this.counters.missing = missing;
|
||||||
|
|
||||||
|
if (!window.liveUpdates) {
|
||||||
|
this.counters.ready = event.counter;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.bufferEmpty = threshold => {
|
this.bufferEmpty = threshold => {
|
||||||
@@ -141,6 +145,10 @@ function OutputStream ($q) {
|
|||||||
const { total } = this.counters;
|
const { total } = this.counters;
|
||||||
const readyCount = this.getReadyCount();
|
const readyCount = this.getReadyCount();
|
||||||
|
|
||||||
|
if (!window.liveUpdates) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (readyCount <= 0) {
|
if (readyCount <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,13 @@ describe('Output | StreamService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('isReadyToRender', () => {
|
describe('isReadyToRender', () => {
|
||||||
it("it's never ready to render unless the result of getReadyCount is greater than 0", () => {
|
it("it's never ready to render when live updates are enabled unless the result of getReadyCount is greater than 0", () => {
|
||||||
|
delete window.liveUpdates;
|
||||||
|
Object.defineProperty(window, 'liveUpdates', {
|
||||||
|
value: true,
|
||||||
|
writable: false
|
||||||
|
});
|
||||||
|
|
||||||
const params = [
|
const params = [
|
||||||
[-1, false],
|
[-1, false],
|
||||||
[0, false],
|
[0, false],
|
||||||
|
|||||||
Reference in New Issue
Block a user