2023-01-29 22:14:12 -06:00
|
|
|
package kind
|
|
|
|
|
2023-03-21 04:42:19 -05:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
)
|
2023-01-29 22:14:12 -06:00
|
|
|
|
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
|
|
|
|
{
|
2023-04-27 15:32:38 -05:00
|
|
|
spec: {
|
|
|
|
// Folder UID
|
|
|
|
folderUid?: string @grafanamaturity(ToMetadata="sys")
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// Library element UID
|
|
|
|
uid: string
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// Panel name (also saved in the model)
|
|
|
|
name: string & strings.MinRunes(1)
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// Panel description
|
|
|
|
description?: string
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// The panel type (from inside the model)
|
|
|
|
type: string & strings.MinRunes(1)
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// Dashboard version when this was saved (zero if unknown)
|
|
|
|
schemaVersion?: uint16
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// panel version, incremented each time the dashboard is updated.
|
|
|
|
version: int64 @grafanamaturity(NeedsExpertReview)
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// TODO: should be the same panel schema defined in dashboard
|
|
|
|
// Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
|
|
|
|
model: {...}
|
2023-01-29 22:14:12 -06:00
|
|
|
|
2023-04-27 15:32:38 -05:00
|
|
|
// Object storage metadata
|
|
|
|
meta?: #LibraryElementDTOMeta @grafanamaturity(ToMetadata="sys")
|
|
|
|
} @cuetsy(kind="interface") @grafana(TSVeneer="type")
|
2023-01-29 22:14:12 -06:00
|
|
|
|
|
|
|
#LibraryElementDTOMetaUser: {
|
|
|
|
id: int64
|
|
|
|
name: string
|
|
|
|
avatarUrl: string
|
|
|
|
} @cuetsy(kind="interface") @grafanamaturity(NeedsExpertReview)
|
|
|
|
|
|
|
|
#LibraryElementDTOMeta: {
|
|
|
|
folderName: string
|
|
|
|
folderUid: string @grafanamaturity(ToMetadata="sys")
|
|
|
|
connectedDashboards: int64
|
|
|
|
|
2023-03-21 04:42:19 -05:00
|
|
|
created: string & time.Time
|
|
|
|
updated: string & time.Time
|
2023-01-29 22:14:12 -06:00
|
|
|
|
|
|
|
createdBy: #LibraryElementDTOMetaUser @grafanamaturity(ToMetadata="sys")
|
|
|
|
updatedBy: #LibraryElementDTOMetaUser @grafanamaturity(ToMetadata="sys")
|
|
|
|
} @cuetsy(kind="interface") @grafanamaturity(NeedsExpertReview)
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
]
|