index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // Location
  3. //
  4. export interface LocationUpdate {
  5. path?: string;
  6. query?: UrlQueryMap;
  7. routeParams?: UrlQueryMap;
  8. }
  9. export interface LocationState {
  10. url: string;
  11. path: string;
  12. query: UrlQueryMap;
  13. routeParams: UrlQueryMap;
  14. }
  15. export type UrlQueryValue = string | number | boolean | string[] | number[] | boolean[];
  16. export type UrlQueryMap = { [s: string]: UrlQueryValue };
  17. //
  18. // Alerting
  19. //
  20. export interface AlertRule {
  21. id: number;
  22. dashboardId: number;
  23. panelId: number;
  24. name: string;
  25. state: string;
  26. stateText: string;
  27. stateIcon: string;
  28. stateClass: string;
  29. stateAge: string;
  30. info?: string;
  31. url: string;
  32. executionError?: string;
  33. evalData?: { noData: boolean };
  34. }
  35. //
  36. // NavModel
  37. //
  38. export interface NavModelItem {
  39. text: string;
  40. url: string;
  41. subTitle?: string;
  42. icon?: string;
  43. img?: string;
  44. id: string;
  45. active?: boolean;
  46. hideFromTabs?: boolean;
  47. divider?: boolean;
  48. children?: NavModelItem[];
  49. breadcrumbs?: NavModelItem[];
  50. target?: string;
  51. parentItem?: NavModelItem;
  52. }
  53. export interface NavModel {
  54. main: NavModelItem;
  55. node: NavModelItem;
  56. }
  57. export type NavIndex = { [s: string]: NavModelItem };
  58. //
  59. // Store
  60. //
  61. export interface StoreState {
  62. navIndex: NavIndex;
  63. location: LocationState;
  64. alertRules: AlertRule[];
  65. }