LibraryPanels: No save modal when user is on same dashboard (#31606)

This commit is contained in:
Hugo Häggmark
2021-03-02 16:37:36 +01:00
committed by GitHub
parent a8bf1d68e3
commit d306f417d3
12 changed files with 165 additions and 93 deletions

View File

@@ -6,17 +6,17 @@ import { getNextRefIdChar } from 'app/core/utils/query';
// Types
import {
DataConfigSource,
DataFrameDTO,
DataLink,
DataLinkBuiltInVars,
DataQuery,
DataTransformerConfig,
EventBus,
EventBusSrv,
FieldConfigSource,
PanelPlugin,
ScopedVars,
EventBus,
EventBusSrv,
DataFrameDTO,
urlUtil,
DataLinkBuiltInVars,
} from '@grafana/data';
import { EDIT_PANEL_ID } from 'app/core/constants';
import config from 'app/core/config';
@@ -36,7 +36,7 @@ import {
isStandardFieldProp,
restoreCustomOverrideRules,
} from './getPanelOptionsWithDefaults';
import { LibraryPanelDTO } from 'app/features/library-panels/state/api';
import { PanelModelLibraryPanel } from '../../library-panels/types';
export interface GridPos {
x: number;
@@ -151,7 +151,7 @@ export class PanelModel implements DataConfigSource {
links?: DataLink[];
transparent: boolean;
libraryPanel?: { uid: undefined; name: string } | Pick<LibraryPanelDTO, 'uid' | 'name' | 'meta'>;
libraryPanel?: { uid: undefined; name: string } | PanelModelLibraryPanel;
// non persisted
isViewing: boolean;