Dashboards: Fixes week relative time ranges when weekStart was changed (#98167)

* Dashborads: Fixes week relative time ranges when weekStart was changed

* Fix

* Update
This commit is contained in:
Torkel Ödegaard 2024-12-19 15:24:59 +01:00 committed by GitHub
parent 29db5a9d8a
commit 02aded2743
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -149,6 +149,11 @@ jest.mock('@grafana/runtime', () => ({
getPluginLinkExtensions: jest.fn(),
}));
jest.mock('@grafana/data', () => ({
...jest.requireActual('@grafana/data'),
setWeekStart: jest.fn(),
}));
const getPluginLinkExtensionsMock = jest.mocked(getPluginLinkExtensions);
jest.mock('@grafana/scenes', () => ({

View File

@ -123,9 +123,7 @@ export class GeneralSettingsEditView
};
public onWeekStartChange = (value: string) => {
this.getTimeRange().setState({
weekStart: value,
});
this.getTimeRange().setState({ weekStart: value });
};
public onRefreshIntervalChange = (value: string[]) => {