diff --git a/src/api/index.js b/src/api/index.js index 5937ada..45a35ef 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -170,3 +170,36 @@ export function deteleLog(data) { data }) } + +// 获取网络抓包信息 +export function getPacketCaptureInfo(data){ + return request({ + url: '/pcap/status', + method: 'get', + data + }) +} +// 开始抓包 +export function startPacketCapture(data){ + return request({ + url: '/pcap/start', + method: 'post', + data + }) +} +// 停止抓包 +export function stopPacketCapture(data){ + return request({ + url: '/pcap/stop', + method: 'post', + data + }) +} +// 删除抓包文件 +export function deletePacketCapture(data){ + return request({ + url: '/pcap/delete', + method: 'post', + data + }) +} diff --git a/src/lang/en.js b/src/lang/en.js index 5060bc2..3a22f4d 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -79,6 +79,13 @@ export default { toTop: 'Back to top', toBottom: 'Back to bottom', clear: 'Clear Screen', + NetworkPacketCapture: 'Network packet capture', + CapturingPacket: 'Capturing packets (Max 10 MB)......', + PacketCaptureHasBeenStopped: 'Packet capture is stopped and saved as tcpdump.pcap.', + StartPacketCapture: 'Start', + StopPacketCapture: 'Stop', + Download: 'Download', + Delete: 'Delete', refresh: 'Auto Refresh', update: 'Update', choose: 'Choice', diff --git a/src/lang/zh.js b/src/lang/zh.js index 583860c..ed6323b 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -79,6 +79,13 @@ export default { refresh: '自动刷新', choose: '选择', tips: '提示', + NetworkPacketCapture: '网络抓包', + CapturingPacket: '正在抓包(最大10兆)......', + PacketCaptureHasBeenStopped: '抓包已停止,保存为tcpdump.pcap。', + StartPacketCapture: '开始', + StopPacketCapture: '停止', + Download: '下载', + Delete: '删除', factorySettings: '恢复出厂设置', routerRestart: '重启设备', SIPserver: 'SIP服务器', diff --git a/src/views/factorySetting/index.vue b/src/views/factorySetting/index.vue index 1843939..f3f84d4 100644 --- a/src/views/factorySetting/index.vue +++ b/src/views/factorySetting/index.vue @@ -23,19 +23,53 @@ +