From 8dd84a5255e2ca1679e5d11203bb0297a4a0cefe Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 8 Oct 2024 16:49:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E6=8A=93=E5=8C=85load?= =?UTF-8?q?ing=E7=8A=B6=E6=80=81=E7=A6=81=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trace/pcap.ts | 3 +++ src/views/traceManage/pcap/index.vue | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/api/trace/pcap.ts b/src/api/trace/pcap.ts index 5fc6a651..b65e6d91 100644 --- a/src/api/trace/pcap.ts +++ b/src/api/trace/pcap.ts @@ -6,6 +6,7 @@ export function dumpStart(data: Record) { url: '/trace/tcpdump/start', method: 'post', data: data, + timeout: 60_000, }); } @@ -15,6 +16,7 @@ export function dumpStop(data: Record) { url: '/trace/tcpdump/stop', method: 'post', data: data, + timeout: 60_000, }); } @@ -35,5 +37,6 @@ export function traceUPF(data: Record) { url: '/trace/tcpdump/upf', method: 'post', data: data, + timeout: 60_000, }); } diff --git a/src/views/traceManage/pcap/index.vue b/src/views/traceManage/pcap/index.vue index 46469475..e0bca8bf 100644 --- a/src/views/traceManage/pcap/index.vue +++ b/src/views/traceManage/pcap/index.vue @@ -81,7 +81,7 @@ let modalState: ModalStateType = reactive({ { label: t('views.traceManage.pcap.execCmd2'), value: 'any2', - start: 'sctp or tcp port 3030 or 8088', + start: 'sctp or tcp port 8088 or 33030', stop: '', }, { @@ -243,6 +243,7 @@ function fnRecordStart(row?: Record) { const hide = message.loading(t('common.loading'), 0); const fromArr = neIDs.map(id => modalState.from[id]); const reqArr = fromArr.map(from => { + from.loading = true; const data = Object.assign({ cmd: from.cmdStart }, from.data); if (from.data.neType === 'UPF' && from.cmdStart.startsWith('pcap')) { return traceUPF(data); @@ -265,12 +266,14 @@ function fnRecordStart(row?: Record) { duration: 3, }); } else { + fromArr[idx].loading = false; message.warning({ content: `${resV.msg}`, duration: 3, }); } } else { + fromArr[idx].loading = false; message.error({ content: t('views.traceManage.pcap.startErr', { title }), duration: 3,