fix: 网元抓包loading状态禁止重复开始任务
This commit is contained in:
@@ -6,6 +6,7 @@ export function dumpStart(data: Record<string, string>) {
|
|||||||
url: '/trace/tcpdump/start',
|
url: '/trace/tcpdump/start',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ export function dumpStop(data: Record<string, string>) {
|
|||||||
url: '/trace/tcpdump/stop',
|
url: '/trace/tcpdump/stop',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,5 +37,6 @@ export function traceUPF(data: Record<string, string>) {
|
|||||||
url: '/trace/tcpdump/upf',
|
url: '/trace/tcpdump/upf',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
|
timeout: 60_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ let modalState: ModalStateType = reactive({
|
|||||||
{
|
{
|
||||||
label: t('views.traceManage.pcap.execCmd2'),
|
label: t('views.traceManage.pcap.execCmd2'),
|
||||||
value: 'any2',
|
value: 'any2',
|
||||||
start: 'sctp or tcp port 3030 or 8088',
|
start: 'sctp or tcp port 8088 or 33030',
|
||||||
stop: '',
|
stop: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -243,6 +243,7 @@ function fnRecordStart(row?: Record<string, any>) {
|
|||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
const fromArr = neIDs.map(id => modalState.from[id]);
|
const fromArr = neIDs.map(id => modalState.from[id]);
|
||||||
const reqArr = fromArr.map(from => {
|
const reqArr = fromArr.map(from => {
|
||||||
|
from.loading = true;
|
||||||
const data = Object.assign({ cmd: from.cmdStart }, from.data);
|
const data = Object.assign({ cmd: from.cmdStart }, from.data);
|
||||||
if (from.data.neType === 'UPF' && from.cmdStart.startsWith('pcap')) {
|
if (from.data.neType === 'UPF' && from.cmdStart.startsWith('pcap')) {
|
||||||
return traceUPF(data);
|
return traceUPF(data);
|
||||||
@@ -265,12 +266,14 @@ function fnRecordStart(row?: Record<string, any>) {
|
|||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
fromArr[idx].loading = false;
|
||||||
message.warning({
|
message.warning({
|
||||||
content: `${resV.msg}`,
|
content: `${resV.msg}`,
|
||||||
duration: 3,
|
duration: 3,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
fromArr[idx].loading = false;
|
||||||
message.error({
|
message.error({
|
||||||
content: t('views.traceManage.pcap.startErr', { title }),
|
content: t('views.traceManage.pcap.startErr', { title }),
|
||||||
duration: 3,
|
duration: 3,
|
||||||
|
|||||||
Reference in New Issue
Block a user