Chore: Remove library panel thema (#112154)

This commit is contained in:
Ryan McKinley
2025-10-09 09:38:52 -03:00
committed by GitHub
parent 3658b1fce7
commit 7ceb4b90f6
35 changed files with 149 additions and 684 deletions
-17
View File
@@ -104,20 +104,3 @@ export {
defaultFieldConfig,
defaultRowPanel
} from './veneer/dashboard.types';
// Raw generated types from LibraryPanel kind.
export type {
LibraryElementDTOMetaUser,
LibraryElementDTOMeta
} from './raw/librarypanel/x/librarypanel_types.gen';
// The following exported declarations correspond to types in the librarypanel@0.0 kind's
// schema with attribute @grafana(TSVeneer="type").
//
// The handwritten file for these type and default veneers is expected to be at
// packages/grafana-schema/src/veneer/librarypanel.types.ts.
// This re-export declaration enforces that the handwritten veneer file exists,
// and exports all the symbols in the list.
//
// TODO generate code such that tsc enforces type compatibility between raw and veneer decls
export type { LibraryPanel } from './veneer/librarypanel.types';
+1
View File
@@ -4,4 +4,5 @@
* @packageDocumentation
*/
export * from './veneer/common.types';
export * from './veneer/librarypanel.types';
export * from './index.gen';
@@ -1,65 +0,0 @@
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
//
// Generated by:
// kinds/gen.go
// Using jennies:
// TSTypesJenny
// LatestMajorsOrXJenny
//
// Run 'make gen-cue' from repository root to regenerate.
export interface LibraryElementDTOMetaUser {
avatarUrl: string;
id: number;
name: string;
}
export interface LibraryElementDTOMeta {
connectedDashboards: number;
created: string;
createdBy: LibraryElementDTOMetaUser;
folderName: string;
folderUid: string;
updated: string;
updatedBy: LibraryElementDTOMetaUser;
}
export interface LibraryPanel {
/**
* Panel description
*/
description?: string;
/**
* Folder UID
*/
folderUid?: string;
/**
* Object storage metadata
*/
meta?: LibraryElementDTOMeta;
/**
* TODO: should be the same panel schema defined in dashboard
* Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
*/
model: Record<string, unknown>;
/**
* Panel name (also saved in the model)
*/
name: string;
/**
* Dashboard version when this was saved (zero if unknown)
*/
schemaVersion?: number;
/**
* The panel type (from inside the model)
*/
type: string;
/**
* Library element UID
*/
uid: string;
/**
* panel version, incremented each time the dashboard is updated.
*/
version: number;
}
@@ -1,7 +1,55 @@
import * as raw from '../raw/librarypanel/x/librarypanel_types.gen';
import { Panel } from './dashboard.types';
export interface LibraryPanel extends raw.LibraryPanel {
export interface LibraryElementDTOMetaUser {
avatarUrl: string;
id: number;
name: string;
}
export interface LibraryElementDTOMeta {
connectedDashboards: number;
created: string;
createdBy: LibraryElementDTOMetaUser;
folderName: string;
folderUid: string;
updated: string;
updatedBy: LibraryElementDTOMetaUser;
}
export interface LibraryPanel {
/**
* Panel description
*/
description?: string;
/**
* Folder UID
*/
folderUid?: string;
/**
* Object storage metadata
*/
meta?: LibraryElementDTOMeta;
// The panel
model: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
/**
* Panel name (also saved in the model)
*/
name: string;
/**
* Dashboard version when this was saved (zero if unknown)
*/
schemaVersion?: number;
/**
* The panel type (from inside the model)
*/
type: string;
/**
* Library element UID
*/
uid: string;
/**
* panel version, incremented each time the dashboard is updated.
*/
version: number;
}