datasources.ts 872 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { LayoutMode } from '../core/components/LayoutSelector/LayoutSelector';
  2. import { Plugin, PluginExports, PluginMeta } from './plugins';
  3. export interface DataSource {
  4. id: number;
  5. orgId: number;
  6. name: string;
  7. typeLogoUrl: string;
  8. type: string;
  9. access: string;
  10. url: string;
  11. password: string;
  12. user: string;
  13. database: string;
  14. basicAuth: boolean;
  15. isDefault: boolean;
  16. jsonData: { authType: string; defaultRegion: string };
  17. readOnly: boolean;
  18. meta?: PluginMeta;
  19. pluginExports?: PluginExports;
  20. init?: () => void;
  21. testDatasource?: () => Promise<any>;
  22. }
  23. export interface DataSourcesState {
  24. dataSources: DataSource[];
  25. searchQuery: string;
  26. dataSourceTypeSearchQuery: string;
  27. layoutMode: LayoutMode;
  28. dataSourcesCount: number;
  29. dataSourceTypes: Plugin[];
  30. dataSource: DataSource;
  31. dataSourceMeta: Plugin;
  32. hasFetched: boolean;
  33. }