2023-01-29 22:14:12 -06:00
|
|
|
package kind
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
2023-01-31 16:54:22 -06:00
|
|
|
name: "LibraryPanel"
|
|
|
|
maturity: "experimental"
|
|
|
|
description: "A standalone panel"
|
2023-01-29 22:14:12 -06:00
|
|
|
|
|
|
|
lineage: seqs: [
|
|
|
|
{
|
|
|
|
schemas: [
|
|
|
|
// 0.0
|
|
|
|
{
|
|
|
|
@grafana(TSVeneer="type")
|
|
|
|
|
|
|
|
// Folder UID
|
|
|
|
folderUid?: string @grafanamaturity(ToMetadata="sys")
|
|
|
|
|
|
|
|
// Library element UID
|
|
|
|
uid: string
|
|
|
|
|
|
|
|
// Panel name (also saved in the model)
|
|
|
|
name: string & strings.MinRunes(1)
|
|
|
|
|
|
|
|
// Panel description
|
|
|
|
description?: string
|
|
|
|
|
|
|
|
// The panel type (from inside the model)
|
|
|
|
type: string & strings.MinRunes(1)
|
|
|
|
|
|
|
|
// Dashboard version when this was saved (zero if unknown)
|
|
|
|
schemaVersion?: uint16
|
|
|
|
|
|
|
|
// panel version, incremented each time the dashboard is updated.
|
|
|
|
version: int64 @grafanamaturity(NeedsExpertReview)
|
|
|
|
|
|
|
|
// TODO: should be the same panel schema defined in dashboard
|
|
|
|
// Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
|
|
|
|
model: {...}
|
|
|
|
|
|
|
|
// Object storage metadata
|
|
|
|
meta?: #LibraryElementDTOMeta @grafanamaturity(ToMetadata="sys")
|
|
|
|
|
|
|
|
#LibraryElementDTOMetaUser: {
|
|
|
|
id: int64
|
|
|
|
name: string
|
|
|
|
avatarUrl: string
|
|
|
|
} @cuetsy(kind="interface") @grafanamaturity(NeedsExpertReview)
|
|
|
|
|
|
|
|
#LibraryElementDTOMeta: {
|
|
|
|
folderName: string
|
|
|
|
folderUid: string @grafanamaturity(ToMetadata="sys")
|
|
|
|
connectedDashboards: int64
|
|
|
|
|
|
|
|
created: string @grafanamaturity(ToMetadata="sys") // time.Time in golang
|
|
|
|
updated: string @grafanamaturity(ToMetadata="sys") // time.Time in golang
|
|
|
|
|
|
|
|
createdBy: #LibraryElementDTOMetaUser @grafanamaturity(ToMetadata="sys")
|
|
|
|
updatedBy: #LibraryElementDTOMetaUser @grafanamaturity(ToMetadata="sys")
|
|
|
|
} @cuetsy(kind="interface") @grafanamaturity(NeedsExpertReview)
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
]
|