-
{
@@ -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: (
),
});
@@ -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}
),
});