Playlist: Split PlaylistItem into standalone TS type (#56343)

* playlist: Split PlaylistItem into standalone TS type

* update playlist model

* actually set the title

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
sam boyer
2022-10-04 16:08:26 -04:00
committed by GitHub
parent 2c1c98f3b6
commit ba97b268d0
6 changed files with 40 additions and 30 deletions

View File

@@ -1,3 +1,5 @@
import { PlaylistItem as PlaylistItemFromSchema } from '@grafana/schema/src/raw/playlist/x/playlist.gen';
import { DashboardQueryResult } from '../search/service';
export type PlaylistMode = boolean | 'tv';
@@ -16,10 +18,7 @@ export interface Playlist {
items?: PlaylistItem[];
}
export interface PlaylistItem {
type: 'dashboard_by_tag' | 'dashboard_by_uid' | 'dashboard_by_id'; // _by_id is deprecated
value: string; // tag or uid
export interface PlaylistItem extends PlaylistItemFromSchema {
// Loaded in the frontend
dashboards?: DashboardQueryResult[];
}