Dashboard schema: Review and mature refresh property (#62104)

* Review and mature refresh property

* Update type

* Update report
This commit is contained in:
Dominik Prokop
2023-01-26 01:45:12 -08:00
committed by GitHub
parent 1423f15b0d
commit b9a1d8e5f9
9 changed files with 13 additions and 15 deletions

View File

@@ -8,7 +8,6 @@ import { hasChanges, ignoreChanges } from './DashboardPrompt';
function getDefaultDashboardModel() {
return createDashboardModelFixture({
refresh: false,
panels: [
createPanelJSONFixture({
id: 1,
@@ -56,7 +55,7 @@ describe('DashboardPrompt', () => {
it('Should ignore a lot of changes', () => {
const { original, dash } = getTestContext();
dash.time = { from: '1h' };
dash.refresh = true;
dash.refresh = '30s';
dash.schemaVersion = 10;
expect(hasChanges(dash, original)).toBe(false);
});

View File

@@ -178,7 +178,7 @@ function cleanDashboardFromIgnoredChanges(dashData: Dashboard) {
// ignore time and refresh
dash.time = 0;
dash.refresh = 0;
dash.refresh = '';
dash.schemaVersion = 0;
dash.timezone = 0;