[ML] Fixing jobs list refresh interval issue (#21593)

This commit is contained in:
James Gowdy 2018-08-02 17:16:34 +01:00 committed by GitHub
parent 6aaddb9488
commit 7659cc2489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,9 +65,10 @@ export class JobsListView extends Component {
}
initAutoRefresh() {
const { value, pause } = timefilter.getRefreshInterval();
if (pause === false && value === 0) {
// if the auto refresher isn't set, set it to the default
const { value } = timefilter.getRefreshInterval();
if (value === 0) {
// the auto refresher starts in an off state
// so switch it on and set the interval to 30s
timefilter.setRefreshInterval({
pause: false,
value: DEFAULT_REFRESH_INTERVAL_MS