fix: 解决 SSH 日志批量操作失败的问题 (#2515)

This commit is contained in:
ssongliu 2023-10-12 09:44:30 +08:00 committed by GitHub
parent 7f53c9bc57
commit 9f35e26e22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,19 +225,13 @@ const onChangeStatus = async (status: string, row: Host.logAnalysis | null) => {
};
const submitOperation = async () => {
const pros = [];
for (const item of operationList.value) {
pros.push(
operateIPRule({
operation: operation.value === 'drop' ? 'add' : 'remove',
address: item,
strategy: 'drop',
description: '',
}),
);
}
loading.value = true;
Promise.all(pros)
operateIPRule({
operation: operation.value === 'drop' ? 'add' : 'remove',
address: operationList.value.join(','),
strategy: 'drop',
description: '',
})
.then(() => {
loading.value = false;
dialogVisible.value = false;