import React, { FC } from 'react'; import { selectors } from '@grafana/e2e-selectors'; import { config } from '@grafana/runtime'; import { Button, Field, Form, HorizontalGroup, Input, LinkButton } from '@grafana/ui'; import { DashboardPickerByID } from 'app/core/components/editors/DashboardPickerByID'; import { TagFilter } from '../../core/components/TagFilter/TagFilter'; import { SearchSrv } from '../../core/services/search_srv'; import { PlaylistTable } from './PlaylistTable'; import { Playlist } from './types'; import { usePlaylistItems } from './usePlaylistItems'; interface PlaylistFormProps { onSubmit: (playlist: Playlist) => void; playlist: Playlist; } const searchSrv = new SearchSrv(); export const PlaylistForm: FC = ({ onSubmit, playlist }) => { const { name, interval, items: propItems } = playlist; const { items, addById, addByTag, deleteItem, moveDown, moveUp } = usePlaylistItems(propItems); return ( <>
onSubmit({ ...list, items })} validateOn={'onBlur'}> {({ register, errors }) => { const isDisabled = items.length === 0 || Object.keys(errors).length > 0; return ( <>

Add dashboards

Cancel ); }} ); };