RootStore.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { types } from 'mobx-state-tree';
  2. import { SearchStore } from './../SearchStore/SearchStore';
  3. import { ServerStatsStore } from './../ServerStatsStore/ServerStatsStore';
  4. import { NavStore } from './../NavStore/NavStore';
  5. import { AlertListStore } from './../AlertListStore/AlertListStore';
  6. import { ViewStore } from './../ViewStore/ViewStore';
  7. import { FolderStore } from './../FolderStore/FolderStore';
  8. import { PermissionsStore } from './../PermissionsStore/PermissionsStore';
  9. export const RootStore = types.model({
  10. search: types.optional(SearchStore, {
  11. sections: [],
  12. }),
  13. serverStats: types.optional(ServerStatsStore, {
  14. stats: [],
  15. }),
  16. nav: types.optional(NavStore, {}),
  17. alertList: types.optional(AlertListStore, {
  18. rules: [],
  19. }),
  20. permissions: types.optional(PermissionsStore, {
  21. fetching: false,
  22. items: [],
  23. }),
  24. view: types.optional(ViewStore, {
  25. path: '',
  26. query: {},
  27. routeParams: {},
  28. }),
  29. folder: types.optional(FolderStore, {}),
  30. });
  31. type IRootStoreType = typeof RootStore.Type;
  32. export interface IRootStore extends IRootStoreType {}