mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* mobx: poc in using each store as individual prop on the react containers * prettier test * fix: end the war between prettier vs tslint. * mobx: Move stores into their own folders * mobx: Refactor the AlertRule into its own file and add a helper-file * mobx: Move NavItem out of NavStore and remove lodash dependancy * mobx: Move ResultItem and SearchResultSection models out of the SearchStore * mobx: ServerStatsStore rename .tsx => .ts. And move ServerStat-model to its own file. * mobx: Remove lodash and jquery dependancy from ViewStore * mobx: Remove issue with double question mark
27 lines
804 B
TypeScript
27 lines
804 B
TypeScript
import { types } from 'mobx-state-tree';
|
|
import { SearchStore } from './../SearchStore/SearchStore';
|
|
import { ServerStatsStore } from './../ServerStatsStore/ServerStatsStore';
|
|
import { NavStore } from './../NavStore/NavStore';
|
|
import { AlertListStore } from './../AlertListStore/AlertListStore';
|
|
import { ViewStore } from './../ViewStore/ViewStore';
|
|
|
|
export const RootStore = types.model({
|
|
search: types.optional(SearchStore, {
|
|
sections: [],
|
|
}),
|
|
serverStats: types.optional(ServerStatsStore, {
|
|
stats: [],
|
|
}),
|
|
nav: types.optional(NavStore, {}),
|
|
alertList: types.optional(AlertListStore, {
|
|
rules: [],
|
|
}),
|
|
view: types.optional(ViewStore, {
|
|
path: '',
|
|
query: {},
|
|
}),
|
|
});
|
|
|
|
type IRootStoreType = typeof RootStore.Type;
|
|
export interface IRootStore extends IRootStoreType {}
|