datasources.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. basicAuthPassword: string;
  36. basicAuthUser: string;
  37. isDefault: boolean;
  38. jsonData: { authType: string; defaultRegion: string };
  39. readOnly: boolean;
  40. withCredentials: boolean;
  41. }
  42. export interface DataSourcesState {
  43. dataSources: DataSource[];
  44. searchQuery: string;
  45. dataSourceTypeSearchQuery: string;
  46. layoutMode: LayoutMode;
  47. dataSourcesCount: number;
  48. dataSourceTypes: Plugin[];
  49. hasFetched: boolean;
  50. dataSource: DataSource;
  51. dataSourceMeta: Plugin;
  52. dataSourcePermission: DataSourcePermissionDTO;
  53. }