mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-11 18:32:13 +08:00
kafka-manager 2.0
This commit is contained in:
59
kafka-manager-console/src/store/modal.ts
Normal file
59
kafka-manager-console/src/store/modal.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import { observable, action } from 'mobx';
|
||||
import { ITopic, IBatchData } from 'types/base-type';
|
||||
|
||||
class CustomModal {
|
||||
@observable
|
||||
public modalId: string = null;
|
||||
|
||||
@observable
|
||||
public drawerId: string = null;
|
||||
|
||||
@observable
|
||||
public params: any = null;
|
||||
|
||||
@observable
|
||||
public actionAfterClose: any = null;
|
||||
|
||||
@action.bound
|
||||
public setAction(value: any) {
|
||||
this.actionAfterClose = value;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public showOfflineTopicModal(value: ITopic) {
|
||||
this.modalId = 'offlineTopicModal';
|
||||
this.params = value;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public showOfflineAppModal(value: string) {
|
||||
this.modalId = 'offlineAppModal';
|
||||
this.params = value;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public showOrderOpResult() {
|
||||
this.modalId = 'orderOpResult';
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public showOfflineClusterModal(value: number) {
|
||||
this.modalId = 'offlineClusterModal';
|
||||
this.params = value;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public showCancelTopicPermission(value: object) {
|
||||
this.modalId = 'cancelTopicPermission';
|
||||
this.params = value;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public close() {
|
||||
this.modalId = null;
|
||||
this.drawerId = null;
|
||||
this.params = null;
|
||||
}
|
||||
}
|
||||
|
||||
export const modal = new CustomModal();
|
||||
Reference in New Issue
Block a user