mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 11:28:12 +08:00
v2.8.0_e初始化
1、测试代码,开源用户尽量不要使用; 2、包含Kafka-HA的相关功能; 3、并非基于2.6.0拉的分支,是基于master分支的 commit-id:462303fca0拉的2.8.0_e的分支。出现这个情况的原因是v2.6.0的代码并不是最新的,2.x最新的代码是462303fca0这个commit对应的代码;
This commit is contained in:
@@ -57,8 +57,9 @@ import {
|
||||
getBillStaffDetail,
|
||||
getCandidateController,
|
||||
addCandidateController,
|
||||
deleteCandidateCancel
|
||||
} from 'lib/api';
|
||||
deleteCandidateCancel,
|
||||
getHaMetaData,
|
||||
} from 'lib/api';
|
||||
import { getControlMetricOption, getClusterMetricOption } from 'lib/line-charts-config';
|
||||
|
||||
import { copyValueMap } from 'constants/status-map';
|
||||
@@ -104,12 +105,15 @@ class Admin {
|
||||
@observable
|
||||
public metaList: IMetaData[] = [];
|
||||
|
||||
@observable
|
||||
public haMetaList: IMetaData[] = [];
|
||||
|
||||
@observable
|
||||
public oRList: any[] = [];
|
||||
|
||||
@observable
|
||||
public oRparams:any={
|
||||
moduleId:0
|
||||
public oRparams: any = {
|
||||
moduleId: 0
|
||||
};
|
||||
|
||||
@observable
|
||||
@@ -169,9 +173,9 @@ class Admin {
|
||||
@observable
|
||||
public controllerCandidate: IController[] = [];
|
||||
|
||||
@observable
|
||||
@observable
|
||||
public filtercontrollerCandidate: string = '';
|
||||
|
||||
|
||||
@observable
|
||||
public brokersPartitions: IBrokersPartitions[] = [];
|
||||
|
||||
@@ -329,9 +333,20 @@ class Admin {
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public setOperationRecordList(data:any){
|
||||
public setHaMetaList(data: IMetaData[]) {
|
||||
this.setLoading(false);
|
||||
this.oRList = data ? data.map((item:any, index: any) => {
|
||||
this.haMetaList = data ? data.map((item, index) => {
|
||||
item.key = index;
|
||||
return item;
|
||||
}) : [];
|
||||
this.haMetaList = this.haMetaList.sort((a, b) => a.clusterId - b.clusterId);
|
||||
return this.haMetaList;
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public setOperationRecordList(data: any) {
|
||||
this.setLoading(false);
|
||||
this.oRList = data ? data.map((item: any, index: any) => {
|
||||
item.key = index;
|
||||
return item;
|
||||
}) : [];
|
||||
@@ -394,9 +409,9 @@ class Admin {
|
||||
item.key = index;
|
||||
return item;
|
||||
}) : [];
|
||||
this.filtercontrollerCandidate = data?data.map((item,index)=>{
|
||||
this.filtercontrollerCandidate = data ? data.map((item, index) => {
|
||||
return item.brokerId
|
||||
}).join(','):''
|
||||
}).join(',') : ''
|
||||
}
|
||||
|
||||
@action.bound
|
||||
@@ -479,8 +494,8 @@ class Admin {
|
||||
}
|
||||
|
||||
@action.bound
|
||||
public setBrokersMetadata(data: IBrokersMetadata[]|any) {
|
||||
this.brokersMetadata = data ? data.map((item:any, index:any) => {
|
||||
public setBrokersMetadata(data: IBrokersMetadata[] | any) {
|
||||
this.brokersMetadata = data ? data.map((item: any, index: any) => {
|
||||
item.key = index;
|
||||
return {
|
||||
...item,
|
||||
@@ -675,6 +690,11 @@ class Admin {
|
||||
getMetaData(needDetail).then(this.setMetaList);
|
||||
}
|
||||
|
||||
public getHaMetaData() {
|
||||
this.setLoading(true);
|
||||
return getHaMetaData().then(this.setHaMetaList);
|
||||
}
|
||||
|
||||
public getOperationRecordData(params: any) {
|
||||
this.setLoading(true);
|
||||
this.oRparams = params
|
||||
@@ -738,17 +758,17 @@ class Admin {
|
||||
}
|
||||
|
||||
public getCandidateController(clusterId: number) {
|
||||
return getCandidateController(clusterId).then(data=>{
|
||||
return getCandidateController(clusterId).then(data => {
|
||||
return this.setCandidateController(data)
|
||||
});
|
||||
}
|
||||
|
||||
public addCandidateController(clusterId: number, brokerIdList: any) {
|
||||
return addCandidateController({clusterId, brokerIdList}).then(()=>this.getCandidateController(clusterId));
|
||||
return addCandidateController({ clusterId, brokerIdList }).then(() => this.getCandidateController(clusterId));
|
||||
}
|
||||
|
||||
public deleteCandidateCancel(clusterId: number, brokerIdList: any){
|
||||
return deleteCandidateCancel({clusterId, brokerIdList}).then(()=>this.getCandidateController(clusterId));
|
||||
public deleteCandidateCancel(clusterId: number, brokerIdList: any) {
|
||||
return deleteCandidateCancel({ clusterId, brokerIdList }).then(() => this.getCandidateController(clusterId));
|
||||
}
|
||||
|
||||
public getBrokersBasicInfo(clusterId: number, brokerId: number) {
|
||||
|
||||
Reference in New Issue
Block a user