mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Do not break dashboard settings UI when time intervals end with trailing comma (#26126)
This commit is contained in:
@@ -255,7 +255,7 @@ export class SettingsCtrl {
|
||||
};
|
||||
|
||||
onRefreshIntervalChange = (intervals: string[]) => {
|
||||
this.dashboard.timepicker.refresh_intervals = intervals;
|
||||
this.dashboard.timepicker.refresh_intervals = intervals.filter(i => i.trim() !== '');
|
||||
};
|
||||
|
||||
onNowDelayChange = (nowDelay: string) => {
|
||||
|
||||
@@ -112,7 +112,7 @@ export class TimePickerSettings extends PureComponent<Props, State> {
|
||||
|
||||
<div className="gf-form">
|
||||
<span className="gf-form-label width-7">Auto-refresh</span>
|
||||
<Input width={60} value={this.getRefreshIntervals()} onChange={this.onRefreshIntervalChange} />
|
||||
<Input width={60} defaultValue={this.getRefreshIntervals()} onBlur={this.onRefreshIntervalChange} />
|
||||
</div>
|
||||
<div className="gf-form">
|
||||
<span className="gf-form-label width-7">Now delay now-</span>
|
||||
|
||||
Reference in New Issue
Block a user