Unverified Commit 89153c7c authored by chengchuen's avatar chengchuen Committed by GitHub

Devops page internationalization (#1097)

* International Development

* regist International Development

* regist International Development

* regist International Development
Co-authored-by: 's avatarPeter <peter.zheng.external@tkelevator.com>
Co-authored-by: 's avataraiwenmo <32723967+aiwenmo@users.noreply.github.com>
parent 7c0ed566
...@@ -34,11 +34,14 @@ import StudioCA from "./StudioCA"; ...@@ -34,11 +34,14 @@ import StudioCA from "./StudioCA";
import StudioProcess from "./StudioProcess"; import StudioProcess from "./StudioProcess";
import {Scrollbars} from 'react-custom-scrollbars'; import {Scrollbars} from 'react-custom-scrollbars';
import Chart from "@/components/Chart"; import Chart from "@/components/Chart";
import { useIntl } from 'umi';
const {TabPane} = Tabs; const {TabPane} = Tabs;
const StudioConsole = (props: any) => { const StudioConsole = (props: any) => {
const intl = useIntl();
const {height,current} = props; const {height,current} = props;
let consoleHeight = (height - 37.6); let consoleHeight = (height - 37.6);
return ( return (
...@@ -49,7 +52,7 @@ const StudioConsole = (props: any) => { ...@@ -49,7 +52,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<CodeOutlined/> <CodeOutlined/>
信息 {intl.formatMessage({id: 'pages.datastadio.lable.info', defaultMessage: '信息',})}
</span> </span>
} }
key="StudioMsg" key="StudioMsg"
...@@ -62,7 +65,7 @@ const StudioConsole = (props: any) => { ...@@ -62,7 +65,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<TableOutlined/> <TableOutlined/>
结果 {intl.formatMessage({id: 'pages.datastadio.lable.result', defaultMessage: '结果',})}
</span> </span>
} }
key="StudioTable" key="StudioTable"
...@@ -88,7 +91,7 @@ const StudioConsole = (props: any) => { ...@@ -88,7 +91,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<ApartmentOutlined/> <ApartmentOutlined/>
血缘 {intl.formatMessage({id: 'pages.datastadio.lable.bloodsource', defaultMessage: '血缘',})}
</span> </span>
} }
key="StudioConsanguinity" key="StudioConsanguinity"
...@@ -101,7 +104,7 @@ const StudioConsole = (props: any) => { ...@@ -101,7 +104,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<DesktopOutlined/> <DesktopOutlined/>
进程 {intl.formatMessage({id: 'pages.datastadio.lable.process', defaultMessage: '进程',})}
</span> </span>
} }
key="StudioProcess" key="StudioProcess"
...@@ -114,7 +117,7 @@ const StudioConsole = (props: any) => { ...@@ -114,7 +117,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<CalendarOutlined/> <CalendarOutlined/>
历史 {intl.formatMessage({id: 'pages.datastadio.lable.history', defaultMessage: '历史',})}
</span> </span>
} }
key="StudioHistory" key="StudioHistory"
...@@ -127,7 +130,7 @@ const StudioConsole = (props: any) => { ...@@ -127,7 +130,7 @@ const StudioConsole = (props: any) => {
tab={ tab={
<span> <span>
<FunctionOutlined/> <FunctionOutlined/>
函数 {intl.formatMessage({id: 'pages.datastadio.lable.function', defaultMessage: '函数',})}
</span> </span>
} }
key="StudioFX" key="StudioFX"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
import {Typography,Divider} from 'antd'; import {Typography,Divider} from 'antd';
import React from 'react'; import React from 'react';
import {connect} from 'umi'; import {connect,useIntl} from 'umi';
import {StateType} from '@/pages/DataStudio/model'; import {StateType} from '@/pages/DataStudio/model';
import {Scrollbars} from 'react-custom-scrollbars'; import {Scrollbars} from 'react-custom-scrollbars';
import {VERSION} from "@/components/Common/Version"; import {VERSION} from "@/components/Common/Version";
...@@ -27,14 +27,15 @@ import {VERSION} from "@/components/Common/Version"; ...@@ -27,14 +27,15 @@ import {VERSION} from "@/components/Common/Version";
const {Title, Paragraph, Text} = Typography; const {Title, Paragraph, Text} = Typography;
const StudioHome = (props: any) => { const StudioHome = (props: any) => {
const intl = useIntl();
const {toolHeight} = props; const {toolHeight} = props;
return ( return (
<Scrollbars style={{height: toolHeight}}> <Scrollbars style={{height: toolHeight}}>
<Typography style={{padding:'15px'}}> <Typography style={{padding:'15px'}}>
<Title level={4}>欢迎使用 Dinky v{VERSION}</Title> <Title level={4}>{intl.formatMessage({id: 'pages.datastadio.lable.welcomeuse', defaultMessage: '欢迎使用 Dinky v',})}{VERSION}</Title>
<Paragraph> <Paragraph>
<blockquote>实时即未来,Dinky 为 Apache Flink 而生,让 Flink SQL 纵享丝滑,并致力于实时计算平台建设。</blockquote> <blockquote>{intl.formatMessage({id: 'pages.datastadio.lable.dinkydescribe', defaultMessage: '实时即未来,Dinky 为 Apache Flink 而生,让 Flink SQL 纵享丝滑,并致力于实时计算平台建设。',})}</blockquote>
</Paragraph> </Paragraph>
<Title level={5}>快捷键</Title> <Title level={5}>快捷键</Title>
<Paragraph> <Paragraph>
......
...@@ -30,7 +30,7 @@ import { ...@@ -30,7 +30,7 @@ import {
MessageOutlined MessageOutlined
} from "@ant-design/icons"; } from "@ant-design/icons";
import {StateType} from "@/pages/DataStudio/model"; import {StateType} from "@/pages/DataStudio/model";
import {connect} from "umi"; import {connect,useIntl} from "umi";
import StudioTree from "../StudioTree"; import StudioTree from "../StudioTree";
import StudioConnector from "./StudioConnector"; import StudioConnector from "./StudioConnector";
import StudioDataBase from "./StudioDataBase"; import StudioDataBase from "./StudioDataBase";
...@@ -42,32 +42,33 @@ import StudioFragment from "@/components/Studio/StudioLeftTool/StudioFragment"; ...@@ -42,32 +42,33 @@ import StudioFragment from "@/components/Studio/StudioLeftTool/StudioFragment";
const {TabPane} = Tabs; const {TabPane} = Tabs;
const StudioLeftTool = (props: any) => { const StudioLeftTool = (props: any) => {
const intl = useIntl();
const {toolHeight} = props; const {toolHeight} = props;
return ( return (
<Tabs defaultActiveKey="1" size="small" tabPosition="left" style={{height: toolHeight}}> <Tabs defaultActiveKey="1" size="small" tabPosition="left" style={{height: toolHeight}}>
<TabPane tab={<span><BarsOutlined/> 目录</span>} key="StudioTree"> <TabPane tab={<span><BarsOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.directory', defaultMessage: '目录',})}</span>} key="StudioTree">
<StudioTree/> <StudioTree/>
</TabPane> </TabPane>
<TabPane tab={<span><InsertRowAboveOutlined/> 结构</span>} key="MetaStore"> <TabPane tab={<span><InsertRowAboveOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.structure', defaultMessage: '结构',})}</span>} key="MetaStore">
<StudioMetaStore/> <StudioMetaStore/>
</TabPane> </TabPane>
<TabPane tab={<span><MessageOutlined/> 会话</span>} key="Connectors"> <TabPane tab={<span><MessageOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.session', defaultMessage: '会话',})}</span>} key="Connectors">
<StudioConnector/> <StudioConnector/>
</TabPane> </TabPane>
<TabPane tab={<span><ClusterOutlined/> 集群</span>} key="Cluster"> <TabPane tab={<span><ClusterOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.cluster', defaultMessage: '集群',})}</span>} key="Cluster">
<StudioCluster/> <StudioCluster/>
</TabPane> </TabPane>
<TabPane tab={<span><DatabaseOutlined/> 数据源</span>} key="DataSource"> <TabPane tab={<span><DatabaseOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.datasource', defaultMessage: '数据源',})}</span>} key="DataSource">
<StudioDataBase/> <StudioDataBase/>
</TabPane> </TabPane>
<TabPane tab={<span><AppstoreOutlined/> 元数据</span>} key="MetaData"> <TabPane tab={<span><AppstoreOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.mate', defaultMessage: '元数据',})}</span>} key="MetaData">
<StudioMetaData/> <StudioMetaData/>
</TabPane> </TabPane>
<TabPane tab={<span><CloudOutlined/> 全局变量</span>} key="fragment"> <TabPane tab={<span><CloudOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.globalvariable', defaultMessage: '全局变量',})}</span>} key="fragment">
<StudioFragment/> <StudioFragment/>
</TabPane> </TabPane>
<TabPane tab={<span><FunctionOutlined/> 函数</span>} key="Function"> <TabPane tab={<span><FunctionOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.function', defaultMessage: '函数',})}</span>} key="Function">
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
</TabPane> </TabPane>
</Tabs> </Tabs>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
import {connect} from "umi"; import {connect,useIntl} from "umi";
import {StateType} from "@/pages/DataStudio/model"; import {StateType} from "@/pages/DataStudio/model";
import { import {
Form, InputNumber,Switch, Row, Col, Tooltip, Button, Form, InputNumber,Switch, Row, Col, Tooltip, Button,
...@@ -29,6 +29,8 @@ import { Scrollbars } from 'react-custom-scrollbars'; ...@@ -29,6 +29,8 @@ import { Scrollbars } from 'react-custom-scrollbars';
const StudioConfig = (props: any) => { const StudioConfig = (props: any) => {
const intl = useIntl();
const {current,form,dispatch,tabs,toolHeight} = props; const {current,form,dispatch,tabs,toolHeight} = props;
form.setFieldsValue(current.task); form.setFieldsValue(current.task);
......
...@@ -23,39 +23,40 @@ import React from 'react'; ...@@ -23,39 +23,40 @@ import React from 'react';
import {connect} from 'umi'; import {connect} from 'umi';
import {StateType} from '@/pages/DataStudio/model'; import {StateType} from '@/pages/DataStudio/model';
import {Scrollbars} from 'react-custom-scrollbars'; import {Scrollbars} from 'react-custom-scrollbars';
import { history } from 'umi'; import { history,useIntl } from 'umi';
const {Title, Paragraph,Link, Text} = Typography; const {Title, Paragraph,Link, Text} = Typography;
const StudioGuide = (props: any) => { const StudioGuide = (props: any) => {
const intl = useIntl();
const {toolHeight} = props; const {toolHeight} = props;
return ( return (
<Scrollbars style={{height: toolHeight}}> <Scrollbars style={{height: toolHeight}}>
<Typography style={{padding:'15px'}}> <Typography style={{padding:'15px'}}>
<Title level={5}>快捷引导</Title> <Title level={5}>{intl.formatMessage({id: 'pages.datastadio.lable.quickguide', defaultMessage: '快捷引导',})}</Title>
<Paragraph> <Paragraph>
<ul> <ul>
<li> <li>
<Link onClick={()=>{history.push('/registration/cluster/clusterInstance')}}>注册集群实例</Link> <Link onClick={()=>{history.push('/registration/cluster/clusterInstance')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registcluster', defaultMessage: '注册集群实例',})}</Link>
</li> </li>
<li> <li>
<Link onClick={()=>{history.push('/registration/cluster/clusterConfiguration')}}>注册集群配置</Link> <Link onClick={()=>{history.push('/registration/cluster/clusterConfiguration')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registclusterconfig', defaultMessage: '注册集群配置',})}</Link>
</li> </li>
<li> <li>
<Link onClick={()=>{history.push('/registration/jar')}}>注册 Jar</Link> <Link onClick={()=>{history.push('/registration/jar')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registjar', defaultMessage: '注册 Jar',})}</Link>
</li> </li>
<li> <li>
<Link onClick={()=>{history.push('/registration/database')}}>注册数据源</Link> <Link onClick={()=>{history.push('/registration/database')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registdatasource', defaultMessage: '注册数据源',})}</Link>
</li> </li>
<li> <li>
<Link onClick={()=>{history.push('/registration/document')}}>注册文档</Link> <Link onClick={()=>{history.push('/registration/document')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registdocument', defaultMessage: '注册文档',})}</Link>
</li> </li>
<li> <li>
<Link onClick={()=>{history.push('/settings')}}>修改系统配置</Link> <Link onClick={()=>{history.push('/settings')}}>{intl.formatMessage({id: 'pages.datastadio.lable.configsystemconfig', defaultMessage: '修改系统配置',})}</Link>
</li> </li>
<li> <li>
<Link href="http://www.dlink.top/" target="_blank" >官网文档</Link> <Link href="http://www.dlink.top/" target="_blank" >{intl.formatMessage({id: 'pages.datastadio.lable.officialdocumentation', defaultMessage: '官网文档',})}</Link>
</li> </li>
<li> <li>
<Link href="https://github.com/DataLinkDC/dlink" target="_blank" >Github</Link> <Link href="https://github.com/DataLinkDC/dlink" target="_blank" >Github</Link>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
import {connect} from "umi"; import {connect,useIntl} from "umi";
import {StateType} from "@/pages/DataStudio/model"; import {StateType} from "@/pages/DataStudio/model";
import { import {
Form, InputNumber, Select, Tag, Row, Col, Tooltip, Button, Form, InputNumber, Select, Tag, Row, Col, Tooltip, Button,
...@@ -32,6 +32,8 @@ const { Option } = Select; ...@@ -32,6 +32,8 @@ const { Option } = Select;
const StudioSqlConfig = (props: any) => { const StudioSqlConfig = (props: any) => {
const intl = useIntl();
const {current,form,dispatch,tabs,database,toolHeight} = props; const {current,form,dispatch,tabs,database,toolHeight} = props;
form.setFieldsValue(current.task); form.setFieldsValue(current.task);
...@@ -91,7 +93,7 @@ const StudioSqlConfig = (props: any) => { ...@@ -91,7 +93,7 @@ const StudioSqlConfig = (props: any) => {
> >
<Row> <Row>
<Col span={24}> <Col span={24}>
<Form.Item label="数据源" tooltip={`选择 Sql 语句执行的数据源`} <Form.Item label={intl.formatMessage({id: 'pages.datastadio.lable.datasource', defaultMessage: '数据源',})} tooltip={`选择 Sql 语句执行的数据源`}
name="databaseId" name="databaseId"
className={styles.form_item}> className={styles.form_item}>
<Select <Select
...@@ -105,7 +107,7 @@ const StudioSqlConfig = (props: any) => { ...@@ -105,7 +107,7 @@ const StudioSqlConfig = (props: any) => {
</Col> </Col>
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
label="最大行数" className={styles.form_item} name="maxRowNum" label={intl.formatMessage({id: 'pages.datastadio.lable.maxrows', defaultMessage: '最大行数',})} className={styles.form_item} name="maxRowNum"
tooltip='预览数据的最大行数' tooltip='预览数据的最大行数'
> >
<InputNumber min={1} max={9999} defaultValue={100} /> <InputNumber min={1} max={9999} defaultValue={100} />
......
...@@ -33,4 +33,70 @@ export default { ...@@ -33,4 +33,70 @@ export default {
'component.noticeIcon.cleared': 'Cleared', 'component.noticeIcon.cleared': 'Cleared',
'component.noticeIcon.empty': 'No notifications', 'component.noticeIcon.empty': 'No notifications',
'component.noticeIcon.view-more': 'View more', 'component.noticeIcon.view-more': 'View more',
'global.table.operate': 'Operate',
'global.table.config': 'Config',
'global.table.edit': 'Edit',
'global.table.delete': 'Delete',
'global.table.more': 'More',
'global.table.updateTime': 'Update Time',
'global.table.lastUpdateTime': 'Last Update Time',
'global.table.createTime': 'Create Time',
'global.table.startTime': 'Start Time',
'global.table.endTime': 'End Time',
'global.table.useTime': 'Use Time',
'global.table.registType': 'Regist Type',
'global.table.registType.manual': 'Manual',
'global.table.registType.automatic': 'Automatic',
'global.table.isUse': 'Is Use',
'global.table.inUse': 'In Use',
'global.table.notUse': 'Not Use',
'global.table.status': 'Status',
'global.table.status.normal': 'Normal',
'global.table.status.abnormal': 'Abnormal',
'global.table.version': 'Version',
'global.table.jobManagerAddress': 'JobManger Address',
'global.table.jobManagerHaAddress': 'JobManger HA Address',
'global.table.type': 'Type',
'global.table.nickName': 'Nick Name',
'global.table.instanceName': 'Instance Name',
'global.table.instanceId': 'Instance Id',
'global.table.clusterManagement': 'Cluster Management',
'global.table.create': 'Create',
'global.table.heartbeat': 'Heartbeat',
'global.table.recycle': 'Recycle',
'global.table.refresh': 'Refresh',
'global.table.no': 'No',
'global.table.columnName': 'Column Name',
'global.table.annotation': 'Annotation',
'global.table.primarykey': 'Primary key',
'global.table.automationAdd': 'Automation Add',
'global.table.isNull': 'Is Null',
'global.table.default': 'Default',
'global.table.precision': 'Precision',
'global.table.decimalDigits': 'Decimal Digits',
'global.table.character': 'Character',
'global.table.collationRule': 'Collation Rule',
'global.table.javaType': 'java Type',
'global.table.jobname': 'Job Name',
'global.table.jobid': 'Job Id',
'global.table.lifecycle': 'Life Cycle',
'global.table.lifecycle.all': 'All',
'global.table.lifecycle.dev': 'Develop',
'global.table.lifecycle.publish': 'Publish',
'global.table.lifecycle.online': 'Online',
'global.table.lifecycle.unKnow': 'Unknow',
'global.table.runmode': 'Run Mode',
}; };
This diff is collapsed.
...@@ -40,11 +40,15 @@ import { ...@@ -40,11 +40,15 @@ import {
import {showCluster, showSessionCluster} from "@/components/Studio/StudioEvent/DDL"; import {showCluster, showSessionCluster} from "@/components/Studio/StudioEvent/DDL";
import {RUN_MODE} from "@/components/Studio/conf"; import {RUN_MODE} from "@/components/Studio/conf";
import ClusterForm from "@/pages/Cluster/components/ClusterForm"; import ClusterForm from "@/pages/Cluster/components/ClusterForm";
import { useIntl } from 'umi';
const TextArea = Input.TextArea; const TextArea = Input.TextArea;
const url = '/api/cluster'; const url = '/api/cluster';
const ClusterTableList: React.FC<{}> = (props: any) => { const ClusterTableList: React.FC<{}> = (props: any) => {
const intl = useIntl();
const {dispatch} = props; const {dispatch} = props;
const [modalVisible, handleModalVisible] = useState<boolean>(false); const [modalVisible, handleModalVisible] = useState<boolean>(false);
const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false); const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false);
...@@ -97,20 +101,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -97,20 +101,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
<Dropdown <Dropdown
overlay={ overlay={
<Menu onClick={({key}) => editAndDelete(key, item)}> <Menu onClick={({key}) => editAndDelete(key, item)}>
<Menu.Item key="edit">编辑</Menu.Item> <Menu.Item key="edit">{intl.formatMessage({id: 'global.table.edit', defaultMessage: '编辑',})}</Menu.Item>
<Menu.Item key="delete">删除</Menu.Item> <Menu.Item key="delete">{intl.formatMessage({id: 'global.table.delete', defaultMessage: '删除',})}</Menu.Item>
</Menu> </Menu>
} }
> >
<a> <a>
更多 <DownOutlined/> {intl.formatMessage({id: 'global.table.more', defaultMessage: '更多',})} <DownOutlined/>
</a> </a>
</Dropdown> </Dropdown>
); );
const columns: ProColumns<ClusterTableListItem>[] = [ const columns: ProColumns<ClusterTableListItem>[] = [
{ {
title: '名称', title: intl.formatMessage({id: 'global.table.instanceName', defaultMessage: '名称',}),
dataIndex: 'name', dataIndex: 'name',
tip: '名称是唯一的', tip: '名称是唯一的',
sorter: true, sorter: true,
...@@ -127,20 +131,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -127,20 +131,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '集群ID', title: intl.formatMessage({id: 'global.table.instanceId', defaultMessage: '集群ID',}),
dataIndex: 'id', dataIndex: 'id',
hideInTable: true, hideInTable: true,
hideInForm: true, hideInForm: true,
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '别名', title: intl.formatMessage({id: 'global.table.nickName', defaultMessage: '别名',}),
sorter: true, sorter: true,
dataIndex: 'alias', dataIndex: 'alias',
hideInTable: false, hideInTable: false,
}, },
{ {
title: '类型', title: intl.formatMessage({id: 'global.table.type', defaultMessage: '类型',}),
sorter: true, sorter: true,
dataIndex: 'type', dataIndex: 'type',
hideInForm: false, hideInForm: false,
...@@ -183,7 +187,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -183,7 +187,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: 'JobManager HA 地址', title: intl.formatMessage({id: 'global.table.jobManagerHaAddress', defaultMessage: 'JobManager HA 地址',}),
sorter: true, sorter: true,
dataIndex: 'hosts', dataIndex: 'hosts',
valueType: 'textarea', valueType: 'textarea',
...@@ -195,14 +199,14 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -195,14 +199,14 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '当前 JobManager 地址', title: intl.formatMessage({id: 'global.table.jobManagerAddress', defaultMessage: 'JobManager地址',}),
sorter: true, sorter: true,
dataIndex: 'jobManagerHost', dataIndex: 'jobManagerHost',
hideInForm: true, hideInForm: true,
hideInSearch: true, hideInSearch: true,
hideInTable: false, hideInTable: false,
},{ },{
title: '版本', title: intl.formatMessage({id: 'global.table.version', defaultMessage: '版本',}),
sorter: true, sorter: true,
dataIndex: 'version', dataIndex: 'version',
hideInForm: true, hideInForm: true,
...@@ -210,25 +214,25 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -210,25 +214,25 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
hideInTable: false, hideInTable: false,
}, },
{ {
title: '状态', title: intl.formatMessage({id: 'global.table.status', defaultMessage: '状态',}),
dataIndex: 'status', dataIndex: 'status',
hideInForm: true, hideInForm: true,
hideInSearch: true, hideInSearch: true,
hideInTable: false, hideInTable: false,
filters: [ filters: [
{ {
text: '正常', text: intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',}),
value: 1, value: 1,
}, },
{ {
text: '异常', text: intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',}),
value: 0, value: 0,
}, },
], ],
filterMultiple: false, filterMultiple: false,
valueEnum: { valueEnum: {
1: {text: '正常', status: 'Success'}, 1: {text: intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',}), status: 'Success'},
0: {text: '异常', status: 'Error'}, 0: {text: intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',}), status: 'Error'},
}, },
}, },
{ {
...@@ -241,51 +245,51 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -241,51 +245,51 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
hideInTable: true, hideInTable: true,
}, },
{ {
title: '是否启用', title: intl.formatMessage({id: 'global.table.isUse', defaultMessage: '是否启用',}),
dataIndex: 'enabled', dataIndex: 'enabled',
hideInForm: true, hideInForm: true,
hideInSearch: true, hideInSearch: true,
hideInTable: false, hideInTable: false,
filters: [ filters: [
{ {
text: '已启用', text: intl.formatMessage({id: 'global.table.inUse', defaultMessage: '已启用',}),
value: 1, value: 1,
}, },
{ {
text: '已禁用', text: intl.formatMessage({id: 'global.table.notUse', defaultMessage: '已禁用',}),
value: 0, value: 0,
}, },
], ],
filterMultiple: false, filterMultiple: false,
valueEnum: { valueEnum: {
true: {text: '已启用', status: 'Success'}, true: {text: intl.formatMessage({id: 'global.table.inUse', defaultMessage: '已启用',}), status: 'Success'},
false: {text: '已禁用', status: 'Error'}, false:{text: intl.formatMessage({id: 'global.table.notUse', defaultMessage: '已禁用',}), status: 'Error'},
}, },
}, },
{ {
title: '注册方式', title: intl.formatMessage({id: 'global.table.registType', defaultMessage: '注册方式',}),
dataIndex: 'autoRegisters', dataIndex: 'autoRegisters',
hideInForm: true, hideInForm: true,
hideInSearch: true, hideInSearch: true,
hideInTable: false, hideInTable: false,
filters: [ filters: [
{ {
text: '自动', text: intl.formatMessage({id: 'global.table.registType.automatic', defaultMessage: '自动',}),
value: 1, value: 1,
}, },
{ {
text: '手动', text: intl.formatMessage({id: 'global.table.registType.manual', defaultMessage: '手动',}),
value: 0, value: 0,
}, },
], ],
filterMultiple: false, filterMultiple: false,
valueEnum: { valueEnum: {
true: {text: '自动', status: 'Success'}, true: {text: intl.formatMessage({id: 'global.table.registType.automatic', defaultMessage: '自动',}), status: 'Success'},
false: {text: '手动', status: 'Error'}, false: {text: intl.formatMessage({id: 'global.table.registType.manual', defaultMessage: '手动',}), status: 'Error'},
}, },
}, },
{ {
title: '创建时间', title: intl.formatMessage({id: 'global.table.createTime', defaultMessage: '创建时间',}),
dataIndex: 'createTime', dataIndex: 'createTime',
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
...@@ -303,7 +307,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -303,7 +307,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '最近更新时间', title: intl.formatMessage({id: 'global.table.updateTime', defaultMessage: '最近更新时间',}),
dataIndex: 'updateTime', dataIndex: 'updateTime',
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
...@@ -320,7 +324,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -320,7 +324,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '操作', title: intl.formatMessage({id: 'global.table.operate', defaultMessage: '操作',}),
dataIndex: 'option', dataIndex: 'option',
tooltip: 'FLinkWebUI连接 当集群状态为`可用`时! 支持 KUBERNETES 之外的模式', tooltip: 'FLinkWebUI连接 当集群状态为`可用`时! 支持 KUBERNETES 之外的模式',
valueType: 'option', valueType: 'option',
...@@ -331,7 +335,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -331,7 +335,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
setFormValues(record); setFormValues(record);
}} }}
> >
配置 {intl.formatMessage({id: 'global.table.config', defaultMessage: '配置',})}
</a>, </a>,
<MoreBtn key="more" item={record}/>, <MoreBtn key="more" item={record}/>,
((record.status && (record.type === RUN_MODE.YARN_SESSION ((record.status && (record.type === RUN_MODE.YARN_SESSION
...@@ -356,7 +360,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -356,7 +360,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
return ( return (
<PageContainer> <PageContainer>
<ProTable<ClusterTableListItem> <ProTable<ClusterTableListItem>
headerTitle="集群管理" headerTitle={intl.formatMessage({id: 'global.table.clusterManagement', defaultMessage: '集群管理',})}
actionRef={actionRef} actionRef={actionRef}
rowKey="id" rowKey="id"
search={{ search={{
...@@ -364,13 +368,13 @@ const ClusterTableList: React.FC<{}> = (props: any) => { ...@@ -364,13 +368,13 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}} }}
toolBarRender={() => [ toolBarRender={() => [
<Button type="primary" onClick={() => handleModalVisible(true)}> <Button type="primary" onClick={() => handleModalVisible(true)}>
<PlusOutlined/> 新建 <PlusOutlined/> {intl.formatMessage({id: 'global.table.create', defaultMessage: '新建',})}
</Button>, </Button>,
<Button type="primary" onClick={() => checkHeartBeats()}> <Button type="primary" onClick={() => checkHeartBeats()}>
<HeartOutlined/> 心跳 <HeartOutlined/> {intl.formatMessage({id: 'global.table.heartbeat', defaultMessage: '心跳',})}
</Button>, </Button>,
<Button type="primary" onClick={() => clearCluster()}> <Button type="primary" onClick={() => clearCluster()}>
<ClearOutlined /> 回收 <ClearOutlined /> {intl.formatMessage({id: 'global.table.recycle', defaultMessage: '回收',})}
</Button>, </Button>,
]} ]}
request={(params, sorter, filter) => queryData(url, {...params, sorter, filter})} request={(params, sorter, filter) => queryData(url, {...params, sorter, filter})}
......
...@@ -21,32 +21,34 @@ ...@@ -21,32 +21,34 @@
import React from "react"; import React from "react";
import {CheckSquareOutlined, KeyOutlined} from '@ant-design/icons'; import {CheckSquareOutlined, KeyOutlined} from '@ant-design/icons';
import DTable from "@/components/Common/DTable"; import DTable from "@/components/Common/DTable";
import { useIntl } from 'umi';
const Columns = (props: any) => { const Columns = (props: any) => {
const intl = useIntl();
const {dbId, table, schema, scroll} = props; const {dbId, table, schema, scroll} = props;
const cols = [{ const cols = [{
title: '序号', title: intl.formatMessage({id: 'global.table.no', defaultMessage: '序号',}),
dataIndex: 'position', dataIndex: 'position',
isString: false, isString: false,
}, },
{ {
title: '列名', title: intl.formatMessage({id: 'global.table.columnName', defaultMessage: '字段名称',}),
dataIndex: 'name', dataIndex: 'name',
copyable: true, copyable: true,
}, },
{ {
title: '注释', title: intl.formatMessage({id: 'global.table.annotation', defaultMessage: '注释',}),
dataIndex: 'comment', dataIndex: 'comment',
// ellipsis: true, // ellipsis: true,
}, },
{ {
title: '类型', title: intl.formatMessage({id: 'global.table.type', defaultMessage: '类型',}),
dataIndex: 'type', dataIndex: 'type',
}, },
{ {
title: '主键', title: intl.formatMessage({id: 'global.table.primarykey', defaultMessage: '主键',}),
dataIndex: 'keyFlag', dataIndex: 'keyFlag',
render: (_, record) => ( render: (_, record) => (
<> <>
...@@ -65,7 +67,7 @@ const Columns = (props: any) => { ...@@ -65,7 +67,7 @@ const Columns = (props: any) => {
], ],
openSearch: 'dict', openSearch: 'dict',
}, { }, {
title: '自增', title: intl.formatMessage({id: 'global.table.automationAdd', defaultMessage: '自增',}),
dataIndex: 'autoIncrement', dataIndex: 'autoIncrement',
render: (_, record) => ( render: (_, record) => (
<> <>
...@@ -84,7 +86,7 @@ const Columns = (props: any) => { ...@@ -84,7 +86,7 @@ const Columns = (props: any) => {
], ],
openSearch: 'dict', openSearch: 'dict',
}, { }, {
title: '非空', title: intl.formatMessage({id: 'global.table.isNull', defaultMessage: '非空',}),
dataIndex: 'nullable', dataIndex: 'nullable',
render: (_, record) => ( render: (_, record) => (
<> <>
...@@ -103,24 +105,24 @@ const Columns = (props: any) => { ...@@ -103,24 +105,24 @@ const Columns = (props: any) => {
], ],
openSearch: 'dict', openSearch: 'dict',
}, { }, {
title: '默认值', title: intl.formatMessage({id: 'global.table.default', defaultMessage: '默认值',}),
dataIndex: 'defaultValue', dataIndex: 'defaultValue',
}, { }, {
title: '精度', title: intl.formatMessage({id: 'global.table.precision', defaultMessage: '精度',}),
dataIndex: 'precision', dataIndex: 'precision',
isString: false, isString: false,
}, { }, {
title: '小数范围', title: intl.formatMessage({id: 'global.table.decimalDigits', defaultMessage: '小数范围',}),
dataIndex: 'scale', dataIndex: 'scale',
isString: false, isString: false,
}, { }, {
title: '字符集', title: intl.formatMessage({id: 'global.table.character', defaultMessage: '字符集',}),
dataIndex: 'characterSet', dataIndex: 'characterSet',
}, { }, {
title: '排序规则', title: intl.formatMessage({id: 'global.table.collationRule', defaultMessage: '排序规则',}),
dataIndex: 'collation', dataIndex: 'collation',
}, { }, {
title: 'Java 类型', title: intl.formatMessage({id: 'global.table.javaType', defaultMessage: 'Java 类型',}),
dataIndex: 'javaType', dataIndex: 'javaType',
},] },]
return ( return (
......
...@@ -25,9 +25,12 @@ import styles from './index.less'; ...@@ -25,9 +25,12 @@ import styles from './index.less';
import {SearchOutlined} from "@ant-design/icons"; import {SearchOutlined} from "@ant-design/icons";
import Divider from "antd/es/divider"; import Divider from "antd/es/divider";
import {ProTable} from "@ant-design/pro-table"; import {ProTable} from "@ant-design/pro-table";
import { useIntl } from 'umi';
const TableData = (props: any) => { const TableData = (props: any) => {
const intl = useIntl();
// 数据库id,数据库名称,表名称 // 数据库id,数据库名称,表名称
const {dbId, table, schema} = props; const {dbId, table, schema} = props;
// 表数据 // 表数据
...@@ -163,7 +166,7 @@ const TableData = (props: any) => { ...@@ -163,7 +166,7 @@ const TableData = (props: any) => {
}) })
}} }}
> >
<Input addonBefore="WHERE" placeholder="查询条件" <Input addonBefore="WHERE" placeholder= {intl.formatMessage({id: 'pages.TableData.QueryConditions', defaultMessage: '查询条件',})}
onChange={(value) => { onChange={(value) => {
setOptionInput({ setOptionInput({
whereInput: value.target.value, whereInput: value.target.value,
...@@ -187,7 +190,7 @@ const TableData = (props: any) => { ...@@ -187,7 +190,7 @@ const TableData = (props: any) => {
}) })
}} }}
> >
<Input addonBefore="ORDER BY" placeholder="排序" onChange={(value) => { <Input addonBefore="ORDER BY" placeholder={intl.formatMessage({id: 'pages.TableData.sorting', defaultMessage: '排序',})} onChange={(value) => {
setOptionInput({ setOptionInput({
whereInput: optionInput.whereInput, whereInput: optionInput.whereInput,
orderInput: value.target.value orderInput: value.target.value
...@@ -196,7 +199,7 @@ const TableData = (props: any) => { ...@@ -196,7 +199,7 @@ const TableData = (props: any) => {
</AutoComplete> </AutoComplete>
</Col> </Col>
<Col span={2}> <Col span={2}>
<Tooltip title="查询"> <Tooltip title={intl.formatMessage({id: 'pages.TableData.serch', defaultMessage: '查询',})}>
<Button type="primary" shape="circle" icon={<SearchOutlined/>} size="middle" onClick={(event) => { <Button type="primary" shape="circle" icon={<SearchOutlined/>} size="middle" onClick={(event) => {
fetchData(optionInput.whereInput, optionInput.orderInput) fetchData(optionInput.whereInput, optionInput.orderInput)
}}/> }}/>
...@@ -207,7 +210,7 @@ const TableData = (props: any) => { ...@@ -207,7 +210,7 @@ const TableData = (props: any) => {
</div> </div>
<Divider orientation="left" plain>数据</Divider> <Divider orientation="left" plain>{intl.formatMessage({id: 'pages.TableData.data', defaultMessage: '数据',})}</Divider>
<div> <div>
<ProTable <ProTable
......
...@@ -43,12 +43,14 @@ import Generation from '@/pages/DataBase/Generation'; ...@@ -43,12 +43,14 @@ import Generation from '@/pages/DataBase/Generation';
import TableData from '@/pages/DataCenter/MetaData/TableData'; import TableData from '@/pages/DataCenter/MetaData/TableData';
import {FALLBACK, getDBImage} from "@/pages/DataBase/DB"; import {FALLBACK, getDBImage} from "@/pages/DataBase/DB";
import Meta from "antd/lib/card/Meta"; import Meta from "antd/lib/card/Meta";
import { useIntl } from 'umi';
const {DirectoryTree} = Tree; const {DirectoryTree} = Tree;
const {TabPane} = Tabs; const {TabPane} = Tabs;
const MetaDataContainer: React.FC<{}> = (props: any) => { const MetaDataContainer: React.FC<{}> = (props: any) => {
const intl = useIntl();
let [database, setDatabase] = useState<[{ let [database, setDatabase] = useState<[{
id: number, id: number,
...@@ -167,10 +169,10 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -167,10 +169,10 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
</Tag> </Tag>
{(item.status) ? {(item.status) ?
(<Tag icon={<CheckCircleOutlined/>} color="success"> (<Tag icon={<CheckCircleOutlined/>} color="success">
正常 {intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',})}
</Tag>) : </Tag>) :
<Tag icon={<ExclamationCircleOutlined/>} color="warning"> <Tag icon={<ExclamationCircleOutlined/>} color="warning">
异常 {intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',})}
</Tag>} </Tag>}
</div> </div>
</Col> </Col>
...@@ -195,14 +197,14 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -195,14 +197,14 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
refeshDataBase(databaseId) refeshDataBase(databaseId)
setTableChecked(true) setTableChecked(true)
}} }}
>刷新</Button> >{intl.formatMessage({id: 'global.table.refresh', defaultMessage: '刷新',})}</Button>
</div> </div>
<div>{item.alias}</div> <div>{item.alias}</div>
</div> </div>
) )
} }
} }
return (<div>未选择数据库</div>) return (<div>{intl.formatMessage({id: 'pages.matedata.NoDatabaseSelected', defaultMessage: '未选择数据库',})}</div>)
} }
...@@ -224,7 +226,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -224,7 +226,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
> >
<Meta title={buildListTitle()} <Meta title={buildListTitle()}
className={styles.tableListHead} className={styles.tableListHead}
description={"上次更新:" + treeData.updateTime} description={"Last Update:" + treeData.updateTime}
/> />
{treeData.tables.length > 0 ? ( {treeData.tables.length > 0 ? (
<Scrollbars style={{height: 800}}> <Scrollbars style={{height: 800}}>
...@@ -256,13 +258,13 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -256,13 +258,13 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={ tab={
<span> <span>
<ReadOutlined/> <ReadOutlined/>
描述 {intl.formatMessage({id: 'pages.matedata.Description', defaultMessage: '描述',})}
</span> </span>
} }
key="describe" key="describe"
> >
<Divider orientation="left" plain> <Divider orientation="left" plain>
表信息 {intl.formatMessage({id: 'pages.matedata.TableInfo', defaultMessage: '表信息',})}
</Divider> </Divider>
{row ? ( {row ? (
<Tables table={row}/> <Tables table={row}/>
...@@ -270,7 +272,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -270,7 +272,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
)} )}
<Divider orientation="left" plain> <Divider orientation="left" plain>
字段信息 {intl.formatMessage({id: 'pages.matedata.FieldInformation', defaultMessage: '字段信息',})}
</Divider> </Divider>
{row ? ( {row ? (
<Columns dbId={databaseId} schema={row.schema} table={row.table}/> <Columns dbId={databaseId} schema={row.schema} table={row.table}/>
...@@ -283,7 +285,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -283,7 +285,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={ tab={
<span> <span>
<BarsOutlined/> <BarsOutlined/>
数据查询 {intl.formatMessage({id: 'pages.matedata.DataSerch', defaultMessage: '数据查询',})}
</span> </span>
} }
key="exampleData" key="exampleData"
...@@ -299,7 +301,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => { ...@@ -299,7 +301,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={ tab={
<span> <span>
<ConsoleSqlOutlined/> <ConsoleSqlOutlined/>
SQL 生成 {intl.formatMessage({id: 'pages.matedata.GenerateSQL', defaultMessage: 'SQL 生成',})}
</span> </span>
} }
key="sqlGeneration" key="sqlGeneration"
......
...@@ -240,8 +240,8 @@ export type ModelType = { ...@@ -240,8 +240,8 @@ export type ModelType = {
renameTab: Reducer<StateType>; renameTab: Reducer<StateType>;
}; };
}; };
const Model: ModelType = { const Model: ModelType = {
namespace: 'Studio', namespace: 'Studio',
state: { state: {
isFullScreen: false, isFullScreen: false,
...@@ -259,7 +259,7 @@ const Model: ModelType = { ...@@ -259,7 +259,7 @@ const Model: ModelType = {
current: undefined, current: undefined,
sql: '', sql: '',
// monaco: {}, // monaco: {},
currentPath: ['引导页'], currentPath: ['Guide Page'],
tabs: { tabs: {
activeKey: 0, activeKey: 0,
panes: [], panes: [],
...@@ -411,7 +411,7 @@ const Model: ModelType = { ...@@ -411,7 +411,7 @@ const Model: ModelType = {
...state, ...state,
current: undefined, current: undefined,
tabs: payload, tabs: payload,
currentPath: ['引导页'], currentPath: ['Guide Page'],
}; };
} }
return { return {
...@@ -645,7 +645,7 @@ const Model: ModelType = { ...@@ -645,7 +645,7 @@ const Model: ModelType = {
...state, ...state,
current: undefined, current: undefined,
tabs: {...newTabs}, tabs: {...newTabs},
currentPath: ['引导页'], currentPath: ['Guide Page'],
}; };
} }
return { return {
......
...@@ -85,7 +85,7 @@ const JobInstanceTable = (props: any) => { ...@@ -85,7 +85,7 @@ const JobInstanceTable = (props: any) => {
if (values) { if (values) {
try { try {
await onClickOperatingTask(values) await onClickOperatingTask(values)
message.success('操作成功') message.success(intl.formatMessage({id: 'pages.devops.result.success', defaultMessage: '操作成功',}))
setOpsStatusVisible(false) setOpsStatusVisible(false)
} catch (e) { } catch (e) {
console.log(e) console.log(e)
...@@ -127,30 +127,30 @@ const JobInstanceTable = (props: any) => { ...@@ -127,30 +127,30 @@ const JobInstanceTable = (props: any) => {
const getColumns = () => { const getColumns = () => {
const columns: ProColumns<JobInstanceTableListItem>[] = [{ const columns: ProColumns<JobInstanceTableListItem>[] = [{
title: "作业名", title: intl.formatMessage({id: 'global.table.jobname', defaultMessage: '作业名',}),
dataIndex: "name", dataIndex: "name",
sorter: true, sorter: true,
}, { }, {
title: "生命周期", title: intl.formatMessage({id: 'global.table.lifecycle', defaultMessage: '生命周期',}),
dataIndex: "step", dataIndex: "step",
sorter: true, sorter: true,
valueType: 'radio', valueType: 'radio',
valueEnum: { valueEnum: {
'': {text: '全部', status: 'ALL'}, '': {text: intl.formatMessage({id: 'global.table.lifecycle.all', defaultMessage: '全部',}), status: 'ALL'},
2: { 2: {
text: '开发中', text: intl.formatMessage({id: 'global.table.lifecycle.dev', defaultMessage: '开发中',}),
status: JOB_LIFE_CYCLE.DEVELOP, status: JOB_LIFE_CYCLE.DEVELOP,
}, },
4: { 4: {
text: '已发布', text: intl.formatMessage({id: 'global.table.lifecycle.publish', defaultMessage: '已发布',}),
status: JOB_LIFE_CYCLE.RELEASE, status: JOB_LIFE_CYCLE.RELEASE,
}, },
5: { 5: {
text: '已上线', text: intl.formatMessage({id: 'global.table.lifecycle.online', defaultMessage: '已上线',}),
status: JOB_LIFE_CYCLE.ONLINE, status: JOB_LIFE_CYCLE.ONLINE,
}, },
0: { 0: {
text: '未知', text: intl.formatMessage({id: 'global.table.lifecycle.unKnow', defaultMessage: '未知',}),
status: JOB_LIFE_CYCLE.UNKNOWN, status: JOB_LIFE_CYCLE.UNKNOWN,
}, },
}, },
...@@ -158,12 +158,12 @@ const JobInstanceTable = (props: any) => { ...@@ -158,12 +158,12 @@ const JobInstanceTable = (props: any) => {
return (<JobLifeCycle step={row.step}/>); return (<JobLifeCycle step={row.step}/>);
} }
}, { }, {
title: "运行模式", title: intl.formatMessage({id: 'global.table.runmode', defaultMessage: '运行模式',}),
dataIndex: "type", dataIndex: "type",
sorter: true, sorter: true,
valueType: 'radio', valueType: 'radio',
valueEnum: { valueEnum: {
'': {text: '全部', status: 'ALL'}, '': {text: intl.formatMessage({id: 'global.table.lifecycle.all', defaultMessage: '全部',}), status: 'ALL'},
'local': { 'local': {
text: RUN_MODE.LOCAL, text: RUN_MODE.LOCAL,
status: RUN_MODE.LOCAL, status: RUN_MODE.LOCAL,
...@@ -194,15 +194,15 @@ const JobInstanceTable = (props: any) => { ...@@ -194,15 +194,15 @@ const JobInstanceTable = (props: any) => {
}, },
}, },
}, { }, {
title: "集群实例", title: intl.formatMessage({id: 'global.table.instanceName', defaultMessage: '集群实例',}),
dataIndex: "clusterAlias", dataIndex: "clusterAlias",
sorter: true, sorter: true,
}, { }, {
title: "作业ID", title: intl.formatMessage({id: 'global.table.jobid', defaultMessage: '作业ID',}),
dataIndex: "jid", dataIndex: "jid",
key: "jid", key: "jid",
}, { }, {
title: "状态", title: intl.formatMessage({id: 'global.table.status', defaultMessage: '状态',}),
dataIndex: "status", dataIndex: "status",
sorter: true, sorter: true,
hideInSearch: true, hideInSearch: true,
...@@ -212,27 +212,27 @@ const JobInstanceTable = (props: any) => { ...@@ -212,27 +212,27 @@ const JobInstanceTable = (props: any) => {
; ;
} }
}, { }, {
title: "开始时间", title: intl.formatMessage({id: 'global.table.startTime', defaultMessage: '开始时间',}),
dataIndex: "createTime", dataIndex: "createTime",
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
hideInSearch: true, hideInSearch: true,
}, { }, {
title: "更新时间", title: intl.formatMessage({id: 'global.table.updateTime', defaultMessage: '更新时间',}),
dataIndex: "updateTime", dataIndex: "updateTime",
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
hideInTable: true, hideInTable: true,
hideInSearch: true, hideInSearch: true,
}, { }, {
title: "结束时间", title: intl.formatMessage({id: 'global.table.endTime', defaultMessage: '结束时间',}),
dataIndex: "finishTime", dataIndex: "finishTime",
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
hideInTable: true, hideInTable: true,
hideInSearch: true, hideInSearch: true,
}, { }, {
title: "耗时", title: intl.formatMessage({id: 'global.table.useTime', defaultMessage: '耗时',}),
dataIndex: "duration", dataIndex: "duration",
sorter: true, sorter: true,
valueType: 'second', valueType: 'second',
...@@ -248,20 +248,20 @@ const JobInstanceTable = (props: any) => { ...@@ -248,20 +248,20 @@ const JobInstanceTable = (props: any) => {
color={taskStatus?.onlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success} text={<a color={taskStatus?.onlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success} text={<a
onClick={() => { onClick={() => {
onStatusChange('1') onStatusChange('1')
}}>一键上线</a>}/>, }}>{intl.formatMessage({id: 'pages.devops.lable.online', defaultMessage: '一键上线',})}</a>}/>,
<a <a
style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}} style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}}
onClick={() => { onClick={() => {
onStatusDetailed('1') onStatusDetailed('1')
}}>上线明细</a>, }}>{intl.formatMessage({id: 'pages.devops.lable.onlinelist', defaultMessage: '上线明细',})}</a>,
<Badge color={taskStatus?.offlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success} <Badge color={taskStatus?.offlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success}
text={<a onClick={() => { text={<a onClick={() => {
onStatusChange('2') onStatusChange('2')
}}>一键下线</a>}/>, <a }}>{intl.formatMessage({id: 'pages.devops.lable.offline', defaultMessage: '一键下线',})}</a>}/>, <a
style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}} style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}}
onClick={() => { onClick={() => {
onStatusDetailed('2') onStatusDetailed('2')
}}>下线明细</a>,]} }}>{intl.formatMessage({id: 'pages.devops.lable.offlinelist', defaultMessage: '下线明细',})}</a>,]}
request={(params, sorter, filter) => { request={(params, sorter, filter) => {
setTime(Date.now()); setTime(Date.now());
return queryData(url, {...params, status, isHistory, sorter: {id: 'descend'}, filter}); return queryData(url, {...params, status, isHistory, sorter: {id: 'descend'}, filter});
...@@ -272,7 +272,7 @@ const JobInstanceTable = (props: any) => { ...@@ -272,7 +272,7 @@ const JobInstanceTable = (props: any) => {
filterType: 'light', filterType: 'light',
}} }}
headerTitle={intl.formatMessage({id: 'pages.devops.JobInstanceTable.LastUpdateTime', defaultMessage: '上次更新时间',})+`:${moment(time).format('HH:mm:ss')}`} headerTitle={intl.formatMessage({id: 'pages.devops.JobInstanceTable.LastUpdateTime', defaultMessage: intl.formatMessage({id: 'global.table.lastUpdateTime', defaultMessage: '上次更新时间',}),})+`:${moment(time).format('HH:mm:ss')}`}
polling={status == activeKey ? 3000 : undefined} polling={status == activeKey ? 3000 : undefined}
pagination={{ pagination={{
pageSize: 10, pageSize: 10,
......
...@@ -41,7 +41,7 @@ const DevOps = () => { ...@@ -41,7 +41,7 @@ const DevOps = () => {
}; };
const renderSwitch = () => { const renderSwitch = () => {
return (<Switch checkedChildren="历史" unCheckedChildren="实例" onChange={handleHistorySwicthChange}/>); return (<Switch checkedChildren={intl.formatMessage({id: 'pages.datastadio.lable.history', defaultMessage: '历史',})} unCheckedChildren={intl.formatMessage({id: 'pages.devops.lable.instance', defaultMessage: '实例',})} onChange={handleHistorySwicthChange}/>);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment