Исправлена модель виджета дашборда
This commit is contained in:
parent
6e2fc1de6c
commit
05b6364ae5
2 changed files with 4 additions and 6 deletions
|
|
@ -1,9 +1,7 @@
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Instance, types } from 'mobx-state-tree';
|
import { Instance, types } from 'mobx-state-tree';
|
||||||
|
|
||||||
type _WidgetParams = {
|
type _WidgetParams = Record<string, any> | null;
|
||||||
collapsed?: boolean;
|
|
||||||
} & Record<string, any>;
|
|
||||||
|
|
||||||
export const WidgetParams = types.frozen<_WidgetParams>();
|
export const WidgetParams = types.frozen<_WidgetParams>();
|
||||||
|
|
||||||
|
|
@ -15,6 +13,7 @@ export const Widget = types.model({
|
||||||
type: types.string,
|
type: types.string,
|
||||||
id: types.string,
|
id: types.string,
|
||||||
title: types.string,
|
title: types.string,
|
||||||
|
collapsed: types.maybe(types.boolean),
|
||||||
widgetParams: types.maybe(WidgetParams),
|
widgetParams: types.maybe(WidgetParams),
|
||||||
dataLoaderParams: types.maybe(DataLoaderParams),
|
dataLoaderParams: types.maybe(DataLoaderParams),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@ export type Dashboard = {
|
||||||
/**
|
/**
|
||||||
* Параметры для отрисовки данных
|
* Параметры для отрисовки данных
|
||||||
*/
|
*/
|
||||||
export type WidgetParams = {
|
export type WidgetParams = Record<string, any> | null;
|
||||||
collapsed?: boolean;
|
|
||||||
} & Record<string, any>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Параметры для загрузки данных
|
* Параметры для загрузки данных
|
||||||
|
|
@ -24,6 +22,7 @@ export type Widget = {
|
||||||
type: string;
|
type: string;
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
collapsed?: boolean;
|
||||||
widgetParams?: WidgetParams;
|
widgetParams?: WidgetParams;
|
||||||
dataLoaderParams?: DataLoaderParams;
|
dataLoaderParams?: DataLoaderParams;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue