Skip to content

Commit

Permalink
feat: 数据包扫描发送数量限制&批量操作不需要编辑tag (#2249)
Browse files Browse the repository at this point in the history
  • Loading branch information
song-xiao-lin authored Dec 27, 2024
1 parent 9116284 commit 09f61d4
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ export const HTTPFlowTable = React.memo<HTTPFlowTableProp>((props) => {
{
key: "数据包扫描",
label: "数据包扫描",
number: 10,
number: 200,
default: true,
webSocket: false,
toWebFuzzer: true,
Expand Down Expand Up @@ -3075,10 +3075,9 @@ export const HTTPFlowTable = React.memo<HTTPFlowTableProp>((props) => {
key: "编辑tag",
label: "编辑tag",
default: true,
webSocket: false,
toWebFuzzer: false,
onClickSingle: (v) => onEditTags(v),
onClickBatch: () => {}
webSocket: true,
toWebFuzzer: true,
onClickSingle: (v) => onEditTags(v)
}
]
/** 菜单自定义快捷键渲染处理事件 */
Expand Down Expand Up @@ -3435,16 +3434,26 @@ export const HTTPFlowTable = React.memo<HTTPFlowTableProp>((props) => {
}

if (keyPath.includes("数据包扫描")) {
let sendIds: string[] = selectedRowKeys
if (isAllSelect) {
yakitNotify("warning", "该批量操作不支持全选")
return
if (total > 200) {
yakitNotify("warning", `最多同时只能发送${200}条数据`)
return
} else {
sendIds = data.map(item => item.Id + "")
}
} else {
if (sendIds.length > 200) {
yakitNotify("warning", `最多同时只能发送${200}条数据`)
return
}
}
const currentItemScan = menuData.find((f) => f.onClickBatch && f.key === "数据包扫描")
const currentItemPacketScan = packetScanDefaultValue.find((f) => f.Verbose === key)
if (!currentItemScan || !currentItemPacketScan) return

onBatchExecPacketScan({
httpFlowIds: selectedRowKeys,
httpFlowIds: sendIds,
maxLength: currentItemScan.number || 0,
currentPacketScan: currentItemPacketScan
})
Expand Down

0 comments on commit 09f61d4

Please sign in to comment.