diff --git a/.env.development b/.env.development index 521e2116..422867bd 100644 --- a/.env.development +++ b/.env.development @@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network OMC" VITE_APP_CODE = "OMC" # 应用版本 -VITE_APP_VERSION = "2.240920" +VITE_APP_VERSION = "2.240927" # 接口基础URL地址-不带/后缀 VITE_API_BASE_URL = "/omc-api" diff --git a/.env.production b/.env.production index 0859613f..5c1fdad0 100644 --- a/.env.production +++ b/.env.production @@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network OMC" VITE_APP_CODE = "OMC" # 应用版本 -VITE_APP_VERSION = "2.240920" +VITE_APP_VERSION = "2.240927" # 接口基础URL地址-不带/后缀 VITE_API_BASE_URL = "/omc-api" diff --git a/README.md b/README.md index 4d036d7e..2dc4d7d9 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,8 @@ ## 测试环境 ```text -Jenkins: http://192.168.2.166:3185/ Nginx: http://192.168.2.166:3188/#/index 后端暴露端口: http://192.168.2.166:33030 - - -新网管:192.168.5.13 -旧网管:192.168.5.14 -登录账户:manager/manager ``` ## 程序命令 diff --git a/public/wiregasm/wiregasm.js b/public/wiregasm/wiregasm_load.js similarity index 100% rename from public/wiregasm/wiregasm.js rename to public/wiregasm/wiregasm_load.js diff --git a/public/wiregasm/worker.js b/public/wiregasm/worker.js index e4f1c208..7b5872af 100644 --- a/public/wiregasm/worker.js +++ b/public/wiregasm/worker.js @@ -1,7 +1,7 @@ // load the Wiregasm library importScripts( - '/wiregasm/wiregasm_new.js', - '/wiregasm/wiregasm.js' + '/wiregasm/wiregasm_new.js', // self-compilation es5 + '/wiregasm/wiregasm_load.js' // 'https://cdn.jsdelivr.net/npm/@goodtools/wiregasm/dist/wiregasm.js' ); @@ -63,6 +63,9 @@ function replacer(key, value) { this.onmessage = ev => { const data = ev.data; switch (data.type) { + case 'close': + wg.destroy(); + break; case 'columns': const columns = wg.columns(); if (Array.isArray(columns)) { 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/api/trace/task.ts b/src/api/trace/task.ts index f48ac1db..e5620942 100644 --- a/src/api/trace/task.ts +++ b/src/api/trace/task.ts @@ -65,6 +65,21 @@ export async function delTraceTask(ids: string) { }); } +/** + * 跟踪任务文件 + * @param query 对象 + * @returns object + */ +export function filePullTask(traceId: string) { + return request({ + url: '/trace/task/filePull', + method: 'get', + params: { traceId }, + responseType: 'blob', + timeout: 60_000, + }); +} + /** * 获取网元跟踪接口列表 * @returns object diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index ff7bdf2a..20abb4ff 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -740,11 +740,11 @@ export default { upgrade: "Upgrade To New Version", upgradeTip: "Confirmed to upgrade to the new version?", upgradeTipEmpty: "There are currently no new versions available", - upgradeTipEqual: "Current version is the same as the new version", + upgradeTipEqual: "The current version is the same as the new version, confirmed to update?", rollback: 'Switch to previous version', rollbackTip: "Confirm switching to the previous version?", rollbackTipEmpty: "There is currently no previous version available", - rollbackTipEqual: 'The current version is the same as the previous version', + rollbackTipEqual: 'The current version is the same as the previous version, are you sure you want to make the switch?', version: "Current Version", preVersion: "Previous Version", newVersion: "New Version", @@ -1135,9 +1135,7 @@ export default { stopNotRun: "{title} not running", }, task: { - neTypePlease: 'Query network element type', - neType: 'NE Type', - neID: 'NE ID', + traceId: 'Tracing No', trackType: 'Tracing Type', trackTypePlease: 'Please select a tracing type', creater: 'Created by', @@ -1174,6 +1172,7 @@ export default { delTaskTip: 'Are you sure to delete the data item with record ID {id} ?', stopTask: 'Successful cessation of tasks {id}', stopTaskTip: 'Confirm stopping the task with record ID {id} ?', + pcapView: "Tracking Data Analysis", traceFile: "Tracking File", errMsg: "Error Message", imsiORmsisdn: "imsi or msisdn is null, cannot start task", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index d24bacee..f5b539a1 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -740,11 +740,11 @@ export default { upgrade: "升级到新版本", upgradeTip: "确认要升级到新版本吗?", upgradeTipEmpty: "当前没有可用的新版本", - upgradeTipEqual: "当前版本与新版本相同", + upgradeTipEqual: "当前版本与新版本相同,确认要进行更新吗?", rollback: '切换到上一个版本', rollbackTip: "确认切换到上一个版本吗?", rollbackTipEmpty: "目前没有可用的上一个版本", - rollbackTipEqual: '当前版本与之前版本相同', + rollbackTipEqual: '当前版本与之前版本相同,确认要进行切换吗?', version: "当前版本", preVersion: "上一个版本", newVersion: "新版本", @@ -1135,9 +1135,7 @@ export default { stopNotRun: "{title} 任务未运行", }, task: { - neTypePlease: '请选择网元类型', - neType: '网元类型', - neID: '网元内部标识', + traceId: '跟踪编号', trackType: '跟踪类型', trackTypePlease: '请选择跟踪类型', creater: '创建人', @@ -1174,6 +1172,7 @@ export default { delTaskTip: '确认删除记录编号为 {id} 的数据项?', stopTask: '成功停止任务 {id}', stopTaskTip: '确认停止记录编号为 {id} 的任务?', + pcapView: "跟踪数据分析", traceFile: "跟踪文件", errMsg: "错误信息", imsiORmsisdn: "imsi 或 msisdn 是空值,不能开始任务", diff --git a/src/utils/parse-utils.ts b/src/utils/parse-utils.ts index bfaed055..508f6a6d 100644 --- a/src/utils/parse-utils.ts +++ b/src/utils/parse-utils.ts @@ -37,7 +37,10 @@ export function parseStrLineToHump(str: string): string { */ export function parseStrHumpToLine(str: string): string { if (!str) return str; - return str.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, ''); + return str + .replace(/([A-Z])/g, '_$1') + .toLowerCase() + .replace(/^_/, ''); } /** @@ -63,9 +66,6 @@ export function parseObjHumpToLine(obj: any): any { }); return obj; } - if (typeof obj === 'string') { - return parseStrHumpToLine(obj); - } return obj; } @@ -92,9 +92,6 @@ export function parseObjLineToHump(obj: any): any { }); return obj; } - if (typeof obj === 'string') { - return parseStrLineToHump(obj); - } return obj; } diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 7c87a117..69aa41e2 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -174,12 +174,12 @@ let tableColumns: ColumnsType = [ dataIndex: 'cdrJSON', key: 'cause', align: 'left', - width: 120, + width: 200, }, { title: t('views.dashboard.cdr.time'), dataIndex: 'cdrJSON', - align: 'center', + align: 'left', width: 150, customRender(opt) { const cdrJSON = opt.value; @@ -713,6 +713,7 @@ onBeforeUnmount(() => {