mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
fix: 重置 Offset 部分 partationId 修改为 Select & Offset 数值限制
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
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 EditTable from '../TestingProduce/component/EditTable';
|
||||
import Api from '@src/api/index';
|
||||
@@ -53,11 +53,28 @@ export default (props: any) => {
|
||||
const [resetOffsetVisible, setResetOffsetVisible] = useState(false);
|
||||
const customFormRef: any = React.createRef();
|
||||
const clusterPhyId = Number(routeParams.clusterId);
|
||||
const [partitionIdList, setPartitionIdList] = useState([]);
|
||||
useEffect(() => {
|
||||
form.setFieldsValue({
|
||||
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 = () => {
|
||||
let tableData;
|
||||
if (customFormRef.current) {
|
||||
@@ -160,8 +177,9 @@ export default (props: any) => {
|
||||
colCustomConfigs={[
|
||||
{
|
||||
title: 'PartitionID',
|
||||
inputType: 'number',
|
||||
inputType: 'select',
|
||||
placeholder: '请输入Partition',
|
||||
options: partitionIdList,
|
||||
},
|
||||
{
|
||||
title: 'Offset',
|
||||
|
||||
@@ -30,7 +30,7 @@ const AutoPage = (props: any) => {
|
||||
|
||||
const searchFn = () => {
|
||||
const params: getOperatingStateListParams = {
|
||||
pageNo: pageIndex,
|
||||
pageNo: 1,
|
||||
pageSize,
|
||||
fuzzySearchDTOList: [],
|
||||
};
|
||||
|
||||
@@ -651,3 +651,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.@{ant-prefix}-empty-img-default{
|
||||
width: 100% !important;
|
||||
}
|
||||
Reference in New Issue
Block a user