From 6b04f8fe04d898eae703db69f50887753e43e11c Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 16 Jan 2024 18:47:20 +0800 Subject: [PATCH] =?UTF-8?q?ref:=20=E9=87=8D=E6=9E=84=E6=8A=93=E5=8C=85?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/traceManage/pcap.ts | 24 +- src/i18n/locales/en-US.ts | 50 +- src/i18n/locales/zh-CN.ts | 46 +- src/views/traceManage/pcap/index.vue | 824 ++++++++++++++------------- 4 files changed, 472 insertions(+), 472 deletions(-) diff --git a/src/api/traceManage/pcap.ts b/src/api/traceManage/pcap.ts index 05a25c35..ed82aecb 100644 --- a/src/api/traceManage/pcap.ts +++ b/src/api/traceManage/pcap.ts @@ -1,33 +1,27 @@ import { request } from '@/plugins/http-fetch'; -// 网元抓包生成pcap -export function tcpdumpNeTask( - signal: AbortSignal, - data: Record -) { +// 网元抓包PACP 开始 +export function dumpStart(data: Record) { return request({ - url: '/tcpdump/ne', + url: '/tcpdump/start', method: 'post', data: data, - signal: signal, }); } -// 网元抓包pcap文件下载 -export function tcpdumpPcapDownload(data: Record) { +// 网元抓包PACP 结束 +export function dumpStop(data: Record) { return request({ - url: '/tcpdump/download', + url: '/tcpdump/stop', method: 'post', data: data, - responseType: 'blob', - timeout: 180_000, }); } -// 网元抓包生成pcap -export function tcpdumpNeUPFTask(data: Record) { +// UPF标准版内部抓包 +export function traceUPF(data: Record) { return request({ - url: '/tcpdump/neUPF', + url: '/tcpdump/traceUPF', method: 'post', data: data, }); diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 417c3ba1..cc467287 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -685,33 +685,29 @@ export default { taskDownTip: 'Confirm downloading the signaling details HTML file?', }, pcap: { - cardTitle: 'PCAP Capture', - neType: 'Type', - neTypePlease: 'Please select the type of network element', - neIp: 'IP Address', - capArg: 'Capture Parameters', - capArgPlease: 'Please enter tcpdump any support parameters!', - capTime: 'Duration in seconds', - capTimePlease: 'Please enter the duration, up to 120 seconds', - capLog: 'Execution Log', - capDownText: 'Download PCAP file', - runText: 'Execute', - runTimeText: 'Execute {s} seconds', - stopText: 'Interrupt', - capArgUPFPlease: 'Please select the packet capture command supported by UPF', - capStart: 'Start capturing packets', - capStop: 'Stop capturing packets', - execTimeout: 'Execution timeout', - execSuccess: 'Execution completed', - execFailed: 'Execution failed', - execBreak: 'Break Execution', - noFileName: 'Invalid file name', - execUPFStartA: 'Executed, please stop capturing packets according to the situation', - execUPFStart: 'Execution successful, please stop capturing packets according to the situation', - execUPFStopA: 'Stopped, please start capturing packets according to the situation', - execUPFStop: 'Execution successful, packet capture stopped', - execUPFCmdA: 'Suitable for other network element anomalies', - execUPFCmdB: 'Suitable for UPF anomalies', + capArgPlease: 'Please enter tcpdump -i any support parameter', + cmd: 'Command', + execCmd: "Generic tcpdump packet capture command", + execCmdsSctp: "Generic tcpdump filter sctp and port commands", + execUPFCmdA: 'Suitable for anomalous packet capture of other NE', + execUPFCmdB: 'Suitable for UPF anomaly packet capture analysis', + textStart: "Start", + textStartBatch: "Batch Start", + textStop: "Stop", + textStopBatch: "Batch Stop", + textLog: "Log", + textLogMsg: "Log Info", + textDown: "Download", + downOk: "{title} file download complete", + downErr: "{title} file download exception", + textSelect: "check list", + startTip: "Are you sure you want to start the {title} packet grabbing task?", + startOk: "{title} the mission has begun", + startErr: "{title} mission anomaly", + stopTip: "Are you sure you want to stop the {title} grabbing task?", + stopOk: "{title} mandate closed", + stopErr: "{title} mission anomaly", + stopNotRun: "{title} not running", }, task: { neTypePlease: 'Query network element type', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 31176198..e8225ce0 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -685,33 +685,29 @@ export default { taskDownTip: '确认下载信令详情HTML文件?', }, pcap: { - cardTitle: 'PCAP捕获', - neType: '网元类型', - neTypePlease: '请选择网元类型', - neIp: '网元IP地址', - capArg: '抓包参数', - capArgPlease: '请输入tcpdump any支持参数!', - capTime: "时长(秒's)", - capTimePlease: '请输入持续时长,最长120秒', - capLog: '执行日志', - capDownText: '下载PCAP文件', - runText: '执行', - runTimeText: '执行 {s} 秒', - stopText: '中断', - capArgUPFPlease: '请选择UPF支持的抓包命令', - capStart: '开始抓包', - capStop: '停止抓包', - execTimeout: '执行超时', - execSuccess: '执行完成', - execFailed: '执行失败', - execBreak: '中断执行', - noFileName: '无效文件名', - execUPFStartA: '已经执行, 请根据情况停止抓包', - execUPFStart: '执行成功, 请根据情况停止抓包', - execUPFStopA: '已经停止, 请根据情况开始抓包', - execUPFStop: '执行成功, 抓包已停止', + capArgPlease: '请输入tcpdump -i any支持参数', + cmd: '命令', + execCmd: "通用tcpdump抓包命令", + execCmdsSctp: "过滤sctp和port命令", execUPFCmdA: '适合其他网元异常,UPF配合抓包的情况', execUPFCmdB: '适合UPF异常需要抓包分析的情况', + textStart: "开始", + textStartBatch: "批量开始", + textStop: "停止", + textStopBatch: "批量停止", + textLog: "日志", + textLogMsg: "日志信息", + textDown: "下载", + downOk: "{title} 文件下载完成", + downErr: "{title} 文件下载异常", + textSelect: "勾选的", + startTip: "确认要开始 {title} 抓包任务吗?", + startOk: "{title} 任务已开始", + startErr: "{title} 任务异常", + stopTip: "确认要停止 {title} 抓包任务吗?", + stopOk: "{title} 任务已结束", + stopErr: "{title} 任务异常", + stopNotRun: "{title} 任务未运行", }, task: { neTypePlease: '请选择网元类型', diff --git a/src/views/traceManage/pcap/index.vue b/src/views/traceManage/pcap/index.vue index 7dd4f09f..467a21a8 100644 --- a/src/views/traceManage/pcap/index.vue +++ b/src/views/traceManage/pcap/index.vue @@ -1,57 +1,48 @@