Skip to content

Commit 8281301

Browse files
committed
fix: 修复 Consumer 点击 Stop 不发停止检索问题修复
1 parent 0043ab8 commit 8281301

File tree

1 file changed

+8
-4
lines changed
  • km-console/packages/layout-clusters-fe/src/pages/TestingConsumer

1 file changed

+8
-4
lines changed

km-console/packages/layout-clusters-fe/src/pages/TestingConsumer/Consume.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ const ConsumeClientTest = () => {
192192
// 过滤出消费数量不足设定值的partition
193193
const filtersPartition = _partitionList.filter((item: any) => item.recordCount < untilMsgNum);
194194
curPartitionList.current = filtersPartition; // 用作下一次请求的入参
195-
setIsStop(filtersPartition.length < 1);
196-
isStopStatus.current = filtersPartition.length < 1;
195+
if (!isStop) {
196+
setIsStop(filtersPartition.length < 1);
197+
isStopStatus.current = filtersPartition.length < 1;
198+
}
197199
break;
198200
case 'max size':
199201
setIsStop(+recordSizeCur.current >= unitMsgSize);
@@ -202,8 +204,10 @@ const ConsumeClientTest = () => {
202204
case 'max size per partition':
203205
// 过滤出消费size不足设定值的partition
204206
const filters = partitionConsumedList.filter((item: any) => item.recordSizeUnitB < unitMsgSize);
205-
setIsStop(filters.length < 1);
206-
isStopStatus.current = filters.length < 1;
207+
if (!isStop) {
208+
setIsStop(filters.length < 1);
209+
isStopStatus.current = filters.length < 1;
210+
}
207211
curPartitionList.current = filters;
208212
break;
209213
}

0 commit comments

Comments
 (0)