mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: some type fixes (#69860)
* some type fixes * restore empty object * undo 1 fix for now * commit betterer update * explicitly type slug and uid as string | undefined
This commit is contained in:
@@ -2,7 +2,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
||||
|
||||
import { PanelPlugin } from '@grafana/data';
|
||||
import { AngularComponent } from '@grafana/runtime';
|
||||
import { Dashboard, defaultDashboard } from '@grafana/schema';
|
||||
import { defaultDashboard } from '@grafana/schema';
|
||||
import { processAclItems } from 'app/core/utils/acl';
|
||||
import { DashboardAclDTO, DashboardInitError, DashboardInitPhase, DashboardState } from 'app/types';
|
||||
|
||||
@@ -38,10 +38,8 @@ const dashboardSlice = createSlice({
|
||||
state.initPhase = DashboardInitPhase.Failed;
|
||||
state.initError = action.payload;
|
||||
state.getModel = () => {
|
||||
// TODO this is a type conflict,
|
||||
// we need to fix the defaultDashboard init type when generated by cue
|
||||
return new DashboardModel(
|
||||
{ ...(defaultDashboard as Dashboard), title: 'Dashboard init failed' },
|
||||
{ ...defaultDashboard, title: 'Dashboard init failed' },
|
||||
{ canSave: false, canEdit: false }
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user