diff --git a/sysom_web/src/locales/en-US/pages.js b/sysom_web/src/locales/en-US/pages.js index 14f0a3050cb867112a54690a98be3f8db6b56c38..4ba2ead5b678f7dbeecbcb786955804022341063 100644 --- a/sysom_web/src/locales/en-US/pages.js +++ b/sysom_web/src/locales/en-US/pages.js @@ -305,14 +305,14 @@ export default { 'pages.diagnose.startdiagnosis': 'Start diagnosis', 'pages.diagnose.creationtime': 'Creation time', 'pages.diagnose.diagnosticID': 'Diagnostic ID', - 'pages.diagnose.state': 'State', - 'pages.diagnose.operation': 'In operation', + 'pages.diagnose.state': 'Status', + 'pages.diagnose.inoperation': 'In operation', 'pages.diagnose.completediagnosis': 'Complete diagnosis', 'pages.diagnose.anomaly': 'Anomaly', 'pages.diagnose.operation': 'Operation', 'pages.diagnose.viewdiagnosisresults': 'Viewing diagnosis results', 'pages.diagnose.viewerrormessages': 'Viewing error messages', - 'pages.diagnose.nooperation': 'No operation is available for the time being', + 'pages.diagnose.nooperation': 'No operation available', 'pages.diagnose.checkitem': 'Check item', 'pages.diagnose.normal': 'Normal', 'pages.diagnose.prompt': 'Prompt', @@ -330,4 +330,54 @@ export default { 'pages.diagnose.dispatchingflamediagram': 'Dispatching flame diagram', 'pages.diagnose.importdiagnosisresultsoffline': 'Import diagnosis results offline', 'pages.diagnose.carddeckexpansion': 'Card deck expansion', + 'pages.diagnose.diagnosticid': 'Diagnostic ID:', + 'pages.diagnose.diagnosistime': 'Diagnostic time:', + 'pages.diagnose.averagesystemload': 'System average load', + 'pages.diagnose.sysinfluencedetection': 'Sys influence detection', + 'pages.diagnose.danger': 'Danger', + 'pages.diagnose.hardwaredetection': 'Hardware interrupt affects detection', + 'pages.diagnose.Softdetection': 'Soft interrupt affects detection', + 'pages.diagnose.IOdetection': 'IO influence detection', + 'pages.diagnose.RDprocesses': 'R/D Indicates the number of status processes', + 'pages.diagnose.DStatuslevel': 'D Status load impact level', + 'pages.diagnose.systemhealthy': 'The system is healthy and no process is in D state. Procedure', + 'pages.diagnose.RStatuslevel': 'R Status load impact level', + 'pages.diagnose.diagnosedetail': 'Diagnostic details', + 'pages.diagnose.metricpresent': 'Metric presentation', + 'pages.diagnose.timedelay': 'Time delay (us)', + 'pages.diagnose.sourceinstanceIP': 'Source instance IP', + 'pages.diagnose.targetinstanceIP': 'Target instance IP', + 'pages.diagnose.trackingpacket': 'Tracking packet number', + 'pages.diagnose.intervalmilliseconds': 'Interval milliseconds', + 'pages.diagnose.messageprotocol': 'Message protocol', + 'pages.diagnose.viewdetails': 'View details', + 'pages.diagnose.delayanalysis': 'Phase delay analysis', + 'pages.diagnose.timedelayanalysis': 'Time delay analysis', + 'pages.diagnose.sendingend': 'Sending end', + 'pages.diagnose.receivingend': 'Receiving end', + 'pages.diagnose.usermode': 'User mode', + 'pages.diagnose.kernelmode': 'Kernel mode', + 'pages.diagnose.kernelresident': 'Kernel resident', + 'pages.diagnose.qdiscqueue': 'qdisc queue', + 'pages.diagnose.virtioringresides': 'The virtio ring resides', + 'pages.diagnose.externalink': 'External link', + 'pages.diagnose.virtioring': 'virtio ring and kernel resident', + 'pages.diagnose.processwakeup': 'Process wake up', + 'pages.diagnose.processqueue': 'Process queue', + 'pages.diagnose.packetloss': 'Packet loss statistics', + 'pages.diagnose.diagnostictime': 'Diagnostic time', + 'pages.diagnose.contractquantity': 'Contract quantity', + 'pages.diagnose.lostpackets': 'Number of lost packets', + 'pages.diagnose.quantitypacket': 'Quantity of return packet', + 'pages.diagnose.successdiagnosis': 'Successful diagnosis', + 'pages.diagnose.diagnosiscomplete': 'The diagnosis is complete without abnormal timeout I/O', + 'pages.diagnose.errormessage': 'Error message:', + 'pages.diagnose.diagnosticstage': 'IO diagnostic stage delay analysis', + 'pages.diagnose.diagnosticlink': 'Diagnostic link', + 'pages.diagnose.diagnostictime': 'Diagnostic time', + 'pages.diagnose.timethreshold': 'Time threshold', + 'pages.diagnose.destinationdisk': 'Destination disk', + 'pages.diagnose.diagnostictime_tooltip': 'Duration of diagnosis, unit: s', + 'pages.diagnose.timethreshold_tooltip': 'Retention I/O whose latency is greater than the time threshold (time unit: ms)', + 'pages.diagnose.destinationdisk_tooltip': 'If empty, detect all disks!', }; \ No newline at end of file diff --git a/sysom_web/src/locales/zh-CN/pages.js b/sysom_web/src/locales/zh-CN/pages.js index 8baecf58eaeb4494935244bacb653d7a4f6da78b..3433ae36a051011e6472f944db61efa6691bddc4 100644 --- a/sysom_web/src/locales/zh-CN/pages.js +++ b/sysom_web/src/locales/zh-CN/pages.js @@ -366,4 +366,36 @@ export default { 'pages.diagnose.DStatuslevel': 'D状态负载影响度', 'pages.diagnose.systemhealthy': '系统目前健康,无D状态进程', 'pages.diagnose.RStatuslevel': 'R状态负载影响度', + 'pages.diagnose.diagnosedetail': '诊断详情', + 'pages.diagnose.metricpresent': 'Metric展示', + 'pages.diagnose.timedelay': '时延(us)', + 'pages.diagnose.sourceinstanceIP': '源实例IP', + 'pages.diagnose.targetinstanceIP': '目标实例IP', + 'pages.diagnose.trackingpacket': '追踪包数', + 'pages.diagnose.intervalmilliseconds': '间隔毫秒数', + 'pages.diagnose.messageprotocol': '报文协议', + 'pages.diagnose.viewdetails': '查看详细信息', + 'pages.diagnose.delayanalysis': '阶段时延分析', + 'pages.diagnose.timedelayanalysis': '时延分析', + 'pages.diagnose.sendingend': '发送端', + 'pages.diagnose.receivingend': '接收端', + 'pages.diagnose.usermode': '用户态', + 'pages.diagnose.kernelmode': '内核态', + 'pages.diagnose.kernelresident': '内核驻留', + 'pages.diagnose.qdiscqueue': 'qdisc排队', + 'pages.diagnose.virtioringresides': 'virtio ring驻留', + 'pages.diagnose.externalink': '外部链路', + 'pages.diagnose.virtioring': 'virtio ring及内核驻留', + 'pages.diagnose.processwakeup': '进程唤醒', + 'pages.diagnose.processqueue': '进程排队', + 'pages.diagnose.packetloss': '丢包统计', + 'pages.diagnose.diagnostictime': '诊断时间', + 'pages.diagnose.contractquantity': '发包数量', + 'pages.diagnose.lostpackets': '丢包数量', + 'pages.diagnose.quantitypacket': '回包数量', + 'pages.diagnose.successdiagnosis': '诊断成功', + 'pages.diagnose.diagnosiscomplete': '诊断完成,无异常超时IO', + 'pages.diagnose.errormessage': '错误信息:', + 'pages.diagnose.diagnosticstage': 'IO 诊断各阶段延迟分析', + 'pages.diagnose.diagnosticlink': '诊断链路', }; \ No newline at end of file diff --git a/sysom_web/src/pages/diagnose/Net/Network/NetTableList.jsx b/sysom_web/src/pages/diagnose/Net/Network/NetTableList.jsx index e99721a6b2d213bc9c9961c2340f3fa22d61a233..82dfc2bbf29d493bdd68878a8a4ba97ae3d403fd 100644 --- a/sysom_web/src/pages/diagnose/Net/Network/NetTableList.jsx +++ b/sysom_web/src/pages/diagnose/Net/Network/NetTableList.jsx @@ -1,4 +1,5 @@ import React, { useRef } from "react"; +import { useIntl, FormattedMessage } from 'umi'; import ProTable from "@ant-design/pro-table"; import { getTaskList } from "../../service"; import { Button } from "antd"; @@ -10,31 +11,31 @@ const getPingTraceList = async () => { const DiagnoTableList = React.forwardRef((props, ref) => { - + const intl = useIntl(); const columns = [ { - title: "源实例IP", + title: , dataIndex: "origin_instance", valueType: "textarea" }, { - title: "目标实例IP", + title: , dataIndex: "target_instance", valueType: "textarea" }, { - title: "追踪包数", + title: , dataIndex: "pkg_num", valueType: "textarea", }, { - title: "间隔毫秒数", + title: , dataIndex: "time_gap", valueType: "textarea", }, { - title: "报文协议", + title: , dataIndex: "protocol", valueType: "select", valueEnum: { @@ -43,28 +44,28 @@ const DiagnoTableList = React.forwardRef((props, ref) => { } }, { - title: "创建时间", + title: , sortOrder: "descend", dataIndex: "created_at", valueType: "dateTime", }, { - title: "诊断ID", + title: , dataIndex: "task_id", valueType: "textarea", }, { - title: '状态', + title: , dataIndex: 'status', width: 150, valueEnum: { - Running: { text: '运行中', status: 'Processing' }, - Success: { text: '诊断完毕', status: 'Success' }, - Fail: { text: '异常', status: 'Error' }, + Running: { text: , status: 'Processing' }, + Success: { text: , status: 'Success' }, + Fail: { text: , status: 'Error' }, }, }, { - title: "操作", + title: , dataIndex: "option", valueType: "option", render: (_, record) => { @@ -72,18 +73,18 @@ const DiagnoTableList = React.forwardRef((props, ref) => { return ( { props?.onClick?.(record) - }}>查看诊断结果 + }}> ) } else if (record.status == "Fail") { return ( { props?.onError?.(record) - }}>查看出错信息 + }}> ) } else { - return (暂无可用操作); + return (); } }, } diff --git a/sysom_web/src/pages/diagnose/Net/Network/NetTaskForm.jsx b/sysom_web/src/pages/diagnose/Net/Network/NetTaskForm.jsx index 294df2f5731869d9b5a82e7394df6ef803cbfe41..db5e2f46746fc60003c17bf43c6746d8dc510b4d 100644 --- a/sysom_web/src/pages/diagnose/Net/Network/NetTaskForm.jsx +++ b/sysom_web/src/pages/diagnose/Net/Network/NetTaskForm.jsx @@ -1,10 +1,11 @@ import ProForm, { ProFormSelect, ProFormText, ProFormDigit } from '@ant-design/pro-form'; import { message, Button, Row, Col } from 'antd'; -import { useRequest } from 'umi'; +import { useRequest, useIntl, FormattedMessage } from 'umi'; import ProCard from '@ant-design/pro-card'; import { postTask } from '../../service' export default (props) => { + const intl = useIntl(); const { loading, error, run } = useRequest(postTask, { manual: true, onSuccess: (result, params) => { @@ -43,26 +44,38 @@ export default (props) => { @@ -84,10 +97,13 @@ export default (props) => { initialValue={"ICMP"} name={"protocol"} width="md" - label="报文协议" + label={intl.formatMessage({ + id: 'pages.diagnose.messageprotocol', + defaultMessage: 'Message protocol', + })} /> - + diff --git a/sysom_web/src/pages/diagnose/Net/Network/NetworkFlow.js b/sysom_web/src/pages/diagnose/Net/Network/NetworkFlow.js index 9e1ddc703eae0c1be3708c1c1a6ada3ede51424d..b51e66de4dddd97d6dde80906c9ba7a3acff4672 100644 --- a/sysom_web/src/pages/diagnose/Net/Network/NetworkFlow.js +++ b/sysom_web/src/pages/diagnose/Net/Network/NetworkFlow.js @@ -1,10 +1,12 @@ import { useState} from 'react'; import { Popover, Modal, Button } from 'antd'; +import { useIntl, FormattedMessage } from 'umi'; import MetricShow from '../../components/MetricShow' import ProCard from '@ant-design/pro-card'; import { Line } from '@ant-design/charts'; const FlowPopover = (props) => { + const intl = useIntl(); const [isModalVisible, setIsModalVisible] = useState(false); const showModal = () => { setIsModalVisible(true); @@ -40,7 +42,7 @@ const FlowPopover = (props) => { Max:{props.tips?.max}
Min:{props.tips?.min}
Avg:{props.tips?.avg}
- 查看详细信息 + ); return ( @@ -48,7 +50,7 @@ const FlowPopover = (props) => { {props.children} - } visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}> @@ -63,7 +65,10 @@ const NetworkFlow = (props) => { }, {}) return ( - + { - 发送端 + - 接收端 + - 用户态 + - 内核态 + - 用户态 + - 内核态 + { x="130" y="180" > - 内核驻留 + @@ -535,7 +540,7 @@ const NetworkFlow = (props) => { x="130" y="270" > - qdisc排队 + { x="110" y="325" > - virtio ring驻留 + { x="600" y="520" > - 外部链路 + @@ -563,7 +568,7 @@ const NetworkFlow = (props) => { x="1010" y="230" > - virtio ring及内核驻留 + { x="820" y="215" > - 内核驻留 + { x="800" y="315" > - virtio ring驻留 + { x="600" y="440" > - 外部链路 + @@ -600,7 +605,7 @@ const NetworkFlow = (props) => { x="310" y="315" > - virtio ring驻留 + @@ -610,7 +615,7 @@ const NetworkFlow = (props) => { x="310" y="240" > - 内核驻留 + @@ -620,7 +625,7 @@ const NetworkFlow = (props) => { x="310" y="180" > - 进程唤醒 + @@ -630,7 +635,7 @@ const NetworkFlow = (props) => { x="310" y="140" > - 进程排队 + diff --git a/sysom_web/src/pages/diagnose/Net/Network/PacketLoss.js b/sysom_web/src/pages/diagnose/Net/Network/PacketLoss.js index 05b2ca31ebb60ed120ef237dea53842b011be6fe..3b687dd66a065bf74a908c35065b3c329b77e032 100644 --- a/sysom_web/src/pages/diagnose/Net/Network/PacketLoss.js +++ b/sysom_web/src/pages/diagnose/Net/Network/PacketLoss.js @@ -1,5 +1,6 @@ import { Button, Statistic } from 'antd'; import { useState, useRef } from 'react'; +import { useIntl, FormattedMessage } from 'umi'; import ProCard from '@ant-design/pro-card'; import RcResizeObserver from 'rc-resize-observer'; @@ -7,6 +8,7 @@ const { Divider } = ProCard; const PacketLoss = (props) => { const [responsive, setResponsive] = useState(false); + const intl = useIntl(); return ( { setResponsive(offset.width < 596); }} > - + - + - + - + - + - + diff --git a/sysom_web/src/pages/diagnose/Net/Network/index.jsx b/sysom_web/src/pages/diagnose/Net/Network/index.jsx index 08ce37ea357c59345aff48a9391d829a9a6d3f90..88c21c3867277d4b580b0b3e892ed61a8d443ab5 100644 --- a/sysom_web/src/pages/diagnose/Net/Network/index.jsx +++ b/sysom_web/src/pages/diagnose/Net/Network/index.jsx @@ -1,7 +1,7 @@ import { PageContainer } from '@ant-design/pro-layout'; import { Button, Modal } from "antd"; import { useState, useRef, useEffect } from 'react'; -import { request } from 'umi'; +import { request, useIntl, FormattedMessage } from 'umi'; import ProCard from '@ant-design/pro-card'; import NetTableList from './NetTableList'; import PacketLoss from './PacketLoss' @@ -13,7 +13,7 @@ import { getTask } from '../../service' const { Divider } = ProCard; const NetList = () => { - + const intl = useIntl(); const refNetListTable = useRef(); const [data, setData] = useState(); @@ -36,10 +36,10 @@ const NetList = () => { const onError = async (record) => { const msg = await getTask(record.task_id); Modal.error({ - title: '诊断失败', + title: , content: (
-
错误信息:{msg.result}
+
{msg.result}
), }); @@ -49,7 +49,10 @@ const NetList = () => { - { @@ -60,8 +63,14 @@ const NetList = () => { diff --git a/sysom_web/src/pages/diagnose/Storage/Io/IOResults.jsx b/sysom_web/src/pages/diagnose/Storage/Io/IOResults.jsx index 554662c54bebf992d6335e9768826312010ec1fa..743edf89a9b6a510ec670464e4974eb3d286845d 100644 --- a/sysom_web/src/pages/diagnose/Storage/Io/IOResults.jsx +++ b/sysom_web/src/pages/diagnose/Storage/Io/IOResults.jsx @@ -1,6 +1,7 @@ import { ArrowRightOutlined } from "@ant-design/icons"; import ProForm, { ProFormSelect } from "@ant-design/pro-form"; import { useState } from "react"; +import { useIntl, FormattedMessage } from 'umi'; import ProCard from "@ant-design/pro-card"; import RcResizeObserver from "rc-resize-observer"; import styles from "../../diagnose.less"; @@ -47,15 +48,16 @@ const DiagTitle = (props) => { const DiagExtra = (props) => { return ( <> -
诊断ID:
+
{props.dataSour.task_id}
-
诊断时间:
+
{props.dataSour.created_at}
); }; export default (props) => { + const intl = useIntl(); const [responsive, setResponsive] = useState(false); //Find the index of The longest delay @@ -85,7 +87,10 @@ export default (props) => { split={responsive ? "horizontal" : "vertical"} headerBordered > - + {props.data[props.diskIdx].delays.map((item, index) => { const length = props.data[props.diskIdx].delays.length return ( diff --git a/sysom_web/src/pages/diagnose/Storage/Io/IOTableList.jsx b/sysom_web/src/pages/diagnose/Storage/Io/IOTableList.jsx index 4e9ec0fef880b190f5c3047bc887bb4993aaa6f0..b7b8418cda5b66e5af470269f04f8a0fbc4ee1eb 100644 --- a/sysom_web/src/pages/diagnose/Storage/Io/IOTableList.jsx +++ b/sysom_web/src/pages/diagnose/Storage/Io/IOTableList.jsx @@ -1,4 +1,5 @@ import React, { useRef } from "react"; +import { useIntl, FormattedMessage } from 'umi'; import ProTable from "@ant-design/pro-table"; import { getTaskList } from "../../service"; @@ -11,47 +12,47 @@ const IOTableList = React.forwardRef((props, ref) => { const columns = [ { - title: "实例IP", + title: , dataIndex: "instance", valueType: "textarea", }, { - title: "诊断时长", + title: , dataIndex: "diag_time", valueType: "textarea", }, { - title: "时间阈值", + title: , dataIndex: "thresh", valueType: "textarea", }, { - title: "目标磁盘", + title: , dataIndex: "disk", valueType: "textarea", }, { - title: "诊断时间", + title: , dataIndex: "created_at", valueType: "dateTime", }, { - title: "诊断ID", + title: , dataIndex: "task_id", valueType: "textarea", }, { - title: '状态', + title: , dataIndex: 'status', width: 150, valueEnum: { - Running: { text: '运行中', status: 'Processing' }, - Success: { text: '诊断完毕', status: 'Success' }, - Fail: { text: '异常', status: 'Error' }, + Running: { text: , status: 'Processing' }, + Success: { text: , status: 'Success' }, + Fail: { text: , status: 'Error' }, }, }, { - title: "操作", + title: , dataIndex: "option", valueType: "option", render: (_, record) => { @@ -59,18 +60,18 @@ const IOTableList = React.forwardRef((props, ref) => { return ( { props?.onClick?.(record) - }}>查看诊断结果 + }}> ) } else if (record.status == "Fail") { return ( { props?.onError?.(record) - }}>查看出错信息 + }}> ) } else { - return (暂无可用操作); + return (); } }, } diff --git a/sysom_web/src/pages/diagnose/Storage/Io/IOTaskForm.jsx b/sysom_web/src/pages/diagnose/Storage/Io/IOTaskForm.jsx index ebb84c2c6a1c2ba6bd3e4f1b180e4a127fd8f85b..32a8abee87e2b7ceb4baa5eb134ecf08ca898ada 100644 --- a/sysom_web/src/pages/diagnose/Storage/Io/IOTaskForm.jsx +++ b/sysom_web/src/pages/diagnose/Storage/Io/IOTaskForm.jsx @@ -1,10 +1,11 @@ import ProForm, { ProFormText, ProFormDigit } from '@ant-design/pro-form'; import { Button } from 'antd'; -import { useRequest } from 'umi'; +import { useRequest, useIntl, FormattedMessage } from 'umi'; import ProCard from '@ant-design/pro-card'; import { postTask } from '../../service' export default (props) => { + const intl = useIntl(); const { loading, error, run } = useRequest(postTask, { manual: true, onSuccess: (result, params) => { @@ -42,33 +43,54 @@ export default (props) => { - + diff --git a/sysom_web/src/pages/diagnose/Storage/Io/index.jsx b/sysom_web/src/pages/diagnose/Storage/Io/index.jsx index cf7ef81ca26cc53c75d5f55d8971f748c980c9ce..eece7de1f53671e671e7c2c77b3dce762f66e898 100644 --- a/sysom_web/src/pages/diagnose/Storage/Io/index.jsx +++ b/sysom_web/src/pages/diagnose/Storage/Io/index.jsx @@ -1,7 +1,7 @@ import { PageContainer } from '@ant-design/pro-layout'; import { useState, useRef } from 'react'; import { Modal } from "antd"; -import { request } from 'umi'; +import { request, useIntl, FormattedMessage } from 'umi'; import ProCard from '@ant-design/pro-card'; import IOTableList from './IOTableList'; import IOResults from './IOResults' @@ -15,16 +15,17 @@ const IOList = () => { const refIoTableList = useRef(); const [data, setData] = useState(); const [diskIdx, setDiskIdx] = useState(0); + const intl = useIntl(); const onListClick = async (record) => { const recorded = record; const msg = await getTask(record.task_id); if (msg.result.status == "success" && msg.result["IO timeout"] == "false") { Modal.success({ - title: '诊断成功', + title: , content: (
-
诊断完成,无异常超时IO
+
), }); @@ -64,10 +65,10 @@ const IOList = () => { const onError = async (record) => { const msg = await getTask(record.task_id); Modal.error({ - title: '诊断失败', + title: , content: (
-
错误信息: {msg.result}
+
{msg.result}
), }); @@ -76,17 +77,26 @@ const IOList = () => { - onListClick(record)} onError={onError} ref={refIoTableList} /> + onListClick(record)} onError={onError} ref={refIoTableList} /> { data ? <> : diff --git a/sysom_web/src/pages/diagnose/detail/index.jsx b/sysom_web/src/pages/diagnose/detail/index.jsx index 49495c1b1704a7bbd04c231db5d9b33d6e22f9bf..89b3c0ba589f288ee54eb77ada93440c3cc3d372 100644 --- a/sysom_web/src/pages/diagnose/detail/index.jsx +++ b/sysom_web/src/pages/diagnose/detail/index.jsx @@ -1,6 +1,6 @@ import { PageContainer } from '@ant-design/pro-layout'; import React, { useState, useEffect } from 'react'; -import { request } from 'umi'; +import { request, useIntl, FormattedMessage } from 'umi'; import Dashboard from '../components/Dashboard'; import { getTask } from '../service' import _ from "lodash"; @@ -8,6 +8,7 @@ import _ from "lodash"; const DiagnoseDetai = (props) => { const [pannelConfig, setPannelConfig] = useState({}); const [data, setData] = useState(); + const intl = useIntl(); let taskId = props?.match?.params?.task_id; useEffect(async () => { @@ -38,7 +39,10 @@ const DiagnoseDetai = (props) => { }, []) return ( - + { data && { const onError = async (record) => { const msg = await getTask(record.task_id); Modal.error({ - title: '诊断失败', + title: , content: (
-
错误信息: {msg.result}
+
{msg.result}
), });