datasources.ts 1.1 KB

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