datasources.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { LayoutMode } from '../core/components/LayoutSelector/LayoutSelector';
  2. import { Plugin } from './plugins';
  3. export interface DataSourcePermission {
  4. id: number;
  5. datasourceId: number;
  6. permission: number;
  7. permissionName: string;
  8. created: string;
  9. updated: string;
  10. userId?: number;
  11. userLogin?: string;
  12. userEmail?: string;
  13. userAvatarUrl?: string;
  14. teamId?: number;
  15. teamAvatarUrl?: string;
  16. team?: string;
  17. }
  18. export interface DataSourcePermissionDTO {
  19. datasourceId: number;
  20. enabled: boolean;
  21. permissions: DataSourcePermission[];
  22. }
  23. export interface DataSource {
  24. id: number;
  25. orgId: number;
  26. name: string;
  27. typeLogoUrl: string;
  28. type: string;
  29. access: string;
  30. url: string;
  31. password: string;
  32. user: string;
  33. database: string;
  34. basicAuth: boolean;
  35. isDefault: boolean;
  36. jsonData: { authType: string; defaultRegion: string };
  37. readOnly: boolean;
  38. }
  39. export interface DataSourcesState {
  40. dataSources: DataSource[];
  41. searchQuery: string;
  42. dataSourceTypeSearchQuery: string;
  43. layoutMode: LayoutMode;
  44. dataSourcesCount: number;
  45. dataSourceTypes: Plugin[];
  46. dataSource: DataSource;
  47. dataSourceMeta: Plugin;
  48. dataSourcePermission: DataSourcePermissionDTO;
  49. hasFetched: boolean;
  50. }