mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-10 09:04:26 +08:00
fix: 重置 Offset 部分 partationId 修改为 Select & Offset 数值限制
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Button, DatePicker, Drawer, Form, notification, Radio, Utils, Space, Divider } from 'knowdesign';
|
import { Button, DatePicker, Drawer, Form, notification, Radio, Utils, Space, Divider, message } from 'knowdesign';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import EditTable from '../TestingProduce/component/EditTable';
|
import EditTable from '../TestingProduce/component/EditTable';
|
||||||
import Api from '@src/api/index';
|
import Api from '@src/api/index';
|
||||||
@@ -53,11 +53,28 @@ export default (props: any) => {
|
|||||||
const [resetOffsetVisible, setResetOffsetVisible] = useState(false);
|
const [resetOffsetVisible, setResetOffsetVisible] = useState(false);
|
||||||
const customFormRef: any = React.createRef();
|
const customFormRef: any = React.createRef();
|
||||||
const clusterPhyId = Number(routeParams.clusterId);
|
const clusterPhyId = Number(routeParams.clusterId);
|
||||||
|
const [partitionIdList, setPartitionIdList] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
resetType: defaultResetType,
|
resetType: defaultResetType,
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
Utils.request(Api.getTopicsMetaData(record?.topicName, +routeParams.clusterId))
|
||||||
|
.then((res: any) => {
|
||||||
|
const partitionLists = (res?.partitionIdList || []).map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item,
|
||||||
|
value: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
setPartitionIdList(partitionLists);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
message.error(err);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
let tableData;
|
let tableData;
|
||||||
if (customFormRef.current) {
|
if (customFormRef.current) {
|
||||||
@@ -160,8 +177,9 @@ export default (props: any) => {
|
|||||||
colCustomConfigs={[
|
colCustomConfigs={[
|
||||||
{
|
{
|
||||||
title: 'PartitionID',
|
title: 'PartitionID',
|
||||||
inputType: 'number',
|
inputType: 'select',
|
||||||
placeholder: '请输入Partition',
|
placeholder: '请输入Partition',
|
||||||
|
options: partitionIdList,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Offset',
|
title: 'Offset',
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const AutoPage = (props: any) => {
|
|||||||
|
|
||||||
const searchFn = () => {
|
const searchFn = () => {
|
||||||
const params: getOperatingStateListParams = {
|
const params: getOperatingStateListParams = {
|
||||||
pageNo: pageIndex,
|
pageNo: 1,
|
||||||
pageSize,
|
pageSize,
|
||||||
fuzzySearchDTOList: [],
|
fuzzySearchDTOList: [],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -651,3 +651,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.@{ant-prefix}-empty-img-default{
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user