Dashboards: Avoid adding unused revision property (#64362)

This commit is contained in:
Ryan McKinley
2023-03-08 08:26:38 -08:00
committed by GitHub
parent a186f036dd
commit 5f2fecfda7
11 changed files with 7 additions and 14 deletions

View File

@@ -90,7 +90,7 @@ export class DashboardModel implements TimeModel {
snapshot: any;
schemaVersion: number;
version: number;
revision: number;
revision?: number; // Only used for dashboards managed by plugins
links: DashboardLink[];
gnetId: any;
panels: PanelModel[];
@@ -131,7 +131,7 @@ export class DashboardModel implements TimeModel {
this.id = data.id || null;
// UID is not there for newly created dashboards
this.uid = data.uid || null;
this.revision = data.revision || 1;
this.revision = data.revision ?? undefined;
this.title = data.title ?? 'No Title';
this.description = data.description;
this.tags = data.tags ?? [];

View File

@@ -22,7 +22,6 @@ export function createDashboardModelFixture(
editable: true,
graphTooltip: defaultDashboardCursorSync,
schemaVersion: 1,
revision: 1,
style: 'dark',
timezone: '',
...dashboardInput,