From 9ae1b9f28a74a95853fc3f6f6c09a885fdc705d2 Mon Sep 17 00:00:00 2001 From: wb-msm261421 Date: Tue, 12 Mar 2024 14:29:21 +0800 Subject: [PATCH] fix(sysom-web): delete diagnosis custom command --- .../e2e/diagnosis/custom_command.cy.js | 81 ------------------- .../resource/diagnose/v2/custom/command.json | 29 ------- .../public/resource/diagnose/v2/locales.json | 3 - 3 files changed, 113 deletions(-) delete mode 100644 sysom_web/cypress/e2e/diagnosis/custom_command.cy.js delete mode 100644 sysom_web/public/resource/diagnose/v2/custom/command.json diff --git a/sysom_web/cypress/e2e/diagnosis/custom_command.cy.js b/sysom_web/cypress/e2e/diagnosis/custom_command.cy.js deleted file mode 100644 index 3a6d6946..00000000 --- a/sysom_web/cypress/e2e/diagnosis/custom_command.cy.js +++ /dev/null @@ -1,81 +0,0 @@ -/// - -describe("SysOM Cluster Manager Test", () => { - beforeEach(() => { - // 自动登录 - cy.login() - }) - it.only("Invoke command diagnosis, and check result", () => { - cy.sysomDiagnosisCheck( - // 诊断前端url - "/diagnose/custom/command", - - // 诊断参数 - { - "instance": "127.0.0.1", - "command": "ls -ltrh" - }, - - // 诊断结果处理(在此处判断诊断的结果数据是否符合预期) - // { - // "id": 83, - // "created_at": "2023-09-11 17:34:59", - // "updated_at": "2023-09-11 17:34:59", - // "task_id": "d4KvXgub", - // "status": "Success", - // "service_name": "command", - // "code": 0, - // "err_msg": "", - // "result": { - // "CommandResult": { - // "data": [ - // { - // "key": "", - // "value": "total 600M\n-rw-r--r-- 1 root root 45M Jun 26 22:17 sysom.tar.gz\ndrwxr-xr-x 14 root root 4.0K Aug" - // } - // ] - // } - // }, - // "params": { - // "service_name": "command", - // "instance": "127.0.0.1", - // "command": "ls -ltrh" - // }, - // "created_by": 1, - // "url": "/diagnose/detail/d4KvXgub" - // } - (result) => { - // result => 包含诊断API返回的诊断详情数据 - - //////////////////////////////////////////////////////////// - // 在此处补充诊断详情渲染后的前端页面是否符合预期 - // 断言文档:https://docs.cypress.io/guides/references/assertions#Text-Content - //////////////////////////////////////////////////////////// - /* ==== Generated with Cypress Studio ==== */ - cy.get('.ant-statistic-content-value').should("contain.text", "total") - cy.get('.ant-statistic-content-value').should(($element) => { - // total 600M - // -rw-r--r-- 1 root root 45M Jun 26 22:17 sysom.tar.gz - // drwxr-xr-x 14 root root 4.0K Aug 2 11:36 sysom-2.2 - // -rw-r--r-- 1 root root 238M Aug 2 11:38 sysom-2.2.tar.gz - // drwxr-xr-x 14 root root 4.0K Aug 2 14:53 sysom-3.0 - // drwxr-xr-x 8 root root 4.0K Aug 2 14:55 rpmbuild - // -rw-r--r-- 1 root root 238M Aug 2 14:56 sysom-3.0.tar.gz - // drwxr-xr-x 14 root root 4.0K Sep 11 20:31 sysom - let lines = $element.text().split("\n") - - // 断言结果文本至少大于 1 行 - expect(lines.length).to.be.gt(1) - - // total 600M - let first_line = lines[0] - first_line = first_line.replace("total ", "") - - // 断言总文件大小至少大于0 - expect(parseInt(first_line)).to.be.gt(0) - }) - cy.get('.ant-pro-card-border > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "Command Result") - /* ==== End Cypress Studio ==== */ - }) - }) -}) \ No newline at end of file diff --git a/sysom_web/public/resource/diagnose/v2/custom/command.json b/sysom_web/public/resource/diagnose/v2/custom/command.json deleted file mode 100644 index 76503843..00000000 --- a/sysom_web/public/resource/diagnose/v2/custom/command.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "servicename": "command", - "version":1.0, - "taskform": [ - { - "type": "select_host", - "name": "instance", - "initialValue": "", - "label": "实例IP", - "tooltips": "请输入你要诊断的IP" - }, - { - "type": "text", - "name": "command", - "initialValue": "", - "label": "命令", - "tooltips": "请输入你需要执行的命令" - } - ], - "variables": [], - "pannels": [ - { - "key": "CommandResult", - "type": "stat", - "title": "Command Result:", - "datasource": "CommandResult" - } - ] -} diff --git a/sysom_web/public/resource/diagnose/v2/locales.json b/sysom_web/public/resource/diagnose/v2/locales.json index 87049be0..9d01653b 100644 --- a/sysom_web/public/resource/diagnose/v2/locales.json +++ b/sysom_web/public/resource/diagnose/v2/locales.json @@ -19,7 +19,6 @@ "menu.diagnose.link.rtdelay", "menu.diagnose.link.procdiag", "menu.diagnose.link.jruntime", - "menu.diagnose.custom.command", "menu.diagnose.custom.rca", "menu.diagnose.colocation.cpi", "menu.diagnose.colocation.serveutil" @@ -51,7 +50,6 @@ "menu.diagnose.link.rtdelay": "RT时延分析", "menu.diagnose.link.jruntime": "java运行时分析", "menu.diagnose.link.procdiag": "应用抖动诊断", - "menu.diagnose.custom.command": "命令诊断", "menu.diagnose.custom.rca": "指标异常分析", "menu.diagnose.colocation.cpi": "混部CPI干扰诊断", "menu.diagnose.colocation.serveutil": "混部CFS满足率干扰诊断", @@ -88,7 +86,6 @@ "menu.diagnose.link.rtdelay": "RT Latency Analysis", "menu.diagnose.link.jruntime": "Java Runtime Analysis", "menu.diagnose.link.procdiag": "Application jitter Diagnosis", - "menu.diagnose.custom.command": "Command Diagnosis", "menu.diagnose.custom.rca": "Metric Exception Analysis", "menu.diagnose.colocation.cpi": "Colocation CPI Disturb Diagnosis", "menu.diagnose.colocation.serveutil": "Colocation CFS Satisfication Disturb Diagnosis", -- Gitee