1import { DataSourcePluginMeta, DataSourceSettings, LayoutMode } from '@grafana/data';
2import { GenericDataSourcePlugin } from 'app/features/datasources/settings/PluginSettings';
3import { HealthCheckResultDetails } from '@grafana/runtime/src/utils/DataSourceWithBackend';
4
5export interface DataSourcesState {
6  dataSources: DataSourceSettings[];
7  searchQuery: string;
8  dataSourceTypeSearchQuery: string;
9  layoutMode: LayoutMode;
10  dataSourcesCount: number;
11  dataSource: DataSourceSettings;
12  dataSourceMeta: DataSourcePluginMeta;
13  hasFetched: boolean;
14  isLoadingDataSources: boolean;
15  plugins: DataSourcePluginMeta[];
16  categories: DataSourcePluginCategory[];
17}
18
19export interface TestingStatus {
20  message?: string | null;
21  status?: string | null;
22  details?: HealthCheckResultDetails;
23}
24
25export interface DataSourceSettingsState {
26  plugin?: GenericDataSourcePlugin | null;
27  testingStatus?: TestingStatus;
28  loadError?: string | null;
29  loading: boolean;
30}
31
32export interface DataSourcePluginCategory {
33  id: string;
34  title: string;
35  plugins: DataSourcePluginMeta[];
36}
37