This commit is contained in:
zengqiao
2020-03-19 17:59:34 +08:00
commit 229140f067
407 changed files with 46207 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { observable, action } from 'mobx';
import { getController } from 'lib/api';
export interface IController {
brokerId: number;
controllerTimestamp: number;
controllerVersion: number;
host: string;
}
class Controller {
@observable
public data: IController[] = [];
@action.bound
public setData(data: IController[]) {
this.data = data;
}
public getController(clusterId: number) {
getController(clusterId).then(this.setData);
}
}
export const controller = new Controller();