mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed bug with auto refresh option being reset when changing relative time when now delay is configured, Fixes #2042
This commit is contained in:
parent
921d672a2c
commit
99556057d1
@ -93,7 +93,7 @@ define([
|
||||
_.extend(this.time, time);
|
||||
|
||||
// disable refresh if we have an absolute time
|
||||
if (time.to !== 'now') {
|
||||
if (time.to && time.to.indexOf('now') === -1) {
|
||||
this.old_refresh = this.dashboard.refresh || this.old_refresh;
|
||||
this.set_interval(false);
|
||||
}
|
||||
|
@ -90,6 +90,12 @@ define([
|
||||
ctx.service.setTime({from: '2011-01-01', to: 'now' });
|
||||
expect(_dashboard.refresh).to.be('10s');
|
||||
});
|
||||
|
||||
it('should keep refresh after relative time range is changed and now delay exists', function() {
|
||||
_dashboard.refresh = '10s';
|
||||
ctx.service.setTime({from: 'now-1h', to: 'now-10s' });
|
||||
expect(_dashboard.refresh).to.be('10s');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user