diff --git a/src/api/trace/packet.ts b/src/api/trace/packet.ts new file mode 100644 index 00000000..dd6c2535 --- /dev/null +++ b/src/api/trace/packet.ts @@ -0,0 +1,64 @@ +import { request } from '@/plugins/http-fetch'; + +/** + * 信令跟踪网卡设备列表 + * @returns + */ +export function packetDevices() { + return request({ + url: '/trace/packet/devices', + method: 'get', + }); +} + +/** + * 信令跟踪开始 + * @param data 对象 + * @returns + */ +export function packetStart(data: Record) { + return request({ + url: '/trace/packet/start', + method: 'post', + data: data, + }); +} + +/** + * 信令跟踪结束 + * @param data 对象 + * @returns + */ +export function packetStop(taskNo: string) { + return request({ + url: '/trace/packet/stop', + method: 'post', + data: { taskNo }, + }); +} + +/** + * 信令跟踪过滤 + * @param data 对象 + * @returns + */ +export function packetFilter(taskNo: string, expr: string) { + return request({ + url: '/trace/packet/filter', + method: 'put', + data: { taskNo, expr }, + }); +} + +/** + * 信令跟踪续期保活 + * @param data 对象 + * @returns + */ +export function packetKeep(taskNo: string, duration: number = 120) { + return request({ + url: '/trace/packet/keep-alive', + method: 'put', + data: { taskNo, duration }, + }); +} diff --git a/src/views/traceManage/tshark/components/PacketTable.vue b/src/views/traceManage/tshark/components/PacketTable.vue index 770a38f4..f31e66c4 100644 --- a/src/views/traceManage/tshark/components/PacketTable.vue +++ b/src/views/traceManage/tshark/components/PacketTable.vue @@ -1,5 +1,5 @@