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";
import StudioProcess from "./StudioProcess";
import {Scrollbars} from 'react-custom-scrollbars';
import Chart from "@/components/Chart";
import { useIntl } from 'umi';
const {TabPane} = Tabs;
const StudioConsole = (props: any) => {
const intl = useIntl();
const {height,current} = props;
let consoleHeight = (height - 37.6);
return (
......@@ -49,7 +52,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<CodeOutlined/>
信息
{intl.formatMessage({id: 'pages.datastadio.lable.info', defaultMessage: '信息',})}
</span>
}
key="StudioMsg"
......@@ -62,7 +65,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<TableOutlined/>
结果
{intl.formatMessage({id: 'pages.datastadio.lable.result', defaultMessage: '结果',})}
</span>
}
key="StudioTable"
......@@ -88,7 +91,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<ApartmentOutlined/>
血缘
{intl.formatMessage({id: 'pages.datastadio.lable.bloodsource', defaultMessage: '血缘',})}
</span>
}
key="StudioConsanguinity"
......@@ -101,7 +104,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<DesktopOutlined/>
进程
{intl.formatMessage({id: 'pages.datastadio.lable.process', defaultMessage: '进程',})}
</span>
}
key="StudioProcess"
......@@ -114,7 +117,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<CalendarOutlined/>
历史
{intl.formatMessage({id: 'pages.datastadio.lable.history', defaultMessage: '历史',})}
</span>
}
key="StudioHistory"
......@@ -127,7 +130,7 @@ const StudioConsole = (props: any) => {
tab={
<span>
<FunctionOutlined/>
函数
{intl.formatMessage({id: 'pages.datastadio.lable.function', defaultMessage: '函数',})}
</span>
}
key="StudioFX"
......
......@@ -19,7 +19,7 @@
import {Typography,Divider} from 'antd';
import React from 'react';
import {connect} from 'umi';
import {connect,useIntl} from 'umi';
import {StateType} from '@/pages/DataStudio/model';
import {Scrollbars} from 'react-custom-scrollbars';
import {VERSION} from "@/components/Common/Version";
......@@ -27,14 +27,15 @@ import {VERSION} from "@/components/Common/Version";
const {Title, Paragraph, Text} = Typography;
const StudioHome = (props: any) => {
const intl = useIntl();
const {toolHeight} = props;
return (
<Scrollbars style={{height: toolHeight}}>
<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>
<blockquote>实时即未来,Dinky 为 Apache Flink 而生,让 Flink SQL 纵享丝滑,并致力于实时计算平台建设。</blockquote>
<blockquote>{intl.formatMessage({id: 'pages.datastadio.lable.dinkydescribe', defaultMessage: '实时即未来,Dinky 为 Apache Flink 而生,让 Flink SQL 纵享丝滑,并致力于实时计算平台建设。',})}</blockquote>
</Paragraph>
<Title level={5}>快捷键</Title>
<Paragraph>
......
......@@ -30,7 +30,7 @@ import {
MessageOutlined
} from "@ant-design/icons";
import {StateType} from "@/pages/DataStudio/model";
import {connect} from "umi";
import {connect,useIntl} from "umi";
import StudioTree from "../StudioTree";
import StudioConnector from "./StudioConnector";
import StudioDataBase from "./StudioDataBase";
......@@ -42,32 +42,33 @@ import StudioFragment from "@/components/Studio/StudioLeftTool/StudioFragment";
const {TabPane} = Tabs;
const StudioLeftTool = (props: any) => {
const intl = useIntl();
const {toolHeight} = props;
return (
<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/>
</TabPane>
<TabPane tab={<span><InsertRowAboveOutlined/> 结构</span>} key="MetaStore">
<TabPane tab={<span><InsertRowAboveOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.structure', defaultMessage: '结构',})}</span>} key="MetaStore">
<StudioMetaStore/>
</TabPane>
<TabPane tab={<span><MessageOutlined/> 会话</span>} key="Connectors">
<TabPane tab={<span><MessageOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.session', defaultMessage: '会话',})}</span>} key="Connectors">
<StudioConnector/>
</TabPane>
<TabPane tab={<span><ClusterOutlined/> 集群</span>} key="Cluster">
<TabPane tab={<span><ClusterOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.cluster', defaultMessage: '集群',})}</span>} key="Cluster">
<StudioCluster/>
</TabPane>
<TabPane tab={<span><DatabaseOutlined/> 数据源</span>} key="DataSource">
<TabPane tab={<span><DatabaseOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.datasource', defaultMessage: '数据源',})}</span>} key="DataSource">
<StudioDataBase/>
</TabPane>
<TabPane tab={<span><AppstoreOutlined/> 元数据</span>} key="MetaData">
<TabPane tab={<span><AppstoreOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.mate', defaultMessage: '元数据',})}</span>} key="MetaData">
<StudioMetaData/>
</TabPane>
<TabPane tab={<span><CloudOutlined/> 全局变量</span>} key="fragment">
<TabPane tab={<span><CloudOutlined/> {intl.formatMessage({id: 'pages.datastadio.lable.globalvariable', defaultMessage: '全局变量',})}</span>} key="fragment">
<StudioFragment/>
</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}/>
</TabPane>
</Tabs>
......
......@@ -18,7 +18,7 @@
*/
import {connect} from "umi";
import {connect,useIntl} from "umi";
import {StateType} from "@/pages/DataStudio/model";
import {
Form, InputNumber,Switch, Row, Col, Tooltip, Button,
......@@ -29,6 +29,8 @@ import { Scrollbars } from 'react-custom-scrollbars';
const StudioConfig = (props: any) => {
const intl = useIntl();
const {current,form,dispatch,tabs,toolHeight} = props;
form.setFieldsValue(current.task);
......
......@@ -23,39 +23,40 @@ import React from 'react';
import {connect} from 'umi';
import {StateType} from '@/pages/DataStudio/model';
import {Scrollbars} from 'react-custom-scrollbars';
import { history } from 'umi';
import { history,useIntl } from 'umi';
const {Title, Paragraph,Link, Text} = Typography;
const StudioGuide = (props: any) => {
const intl = useIntl();
const {toolHeight} = props;
return (
<Scrollbars style={{height: toolHeight}}>
<Typography style={{padding:'15px'}}>
<Title level={5}>快捷引导</Title>
<Title level={5}>{intl.formatMessage({id: 'pages.datastadio.lable.quickguide', defaultMessage: '快捷引导',})}</Title>
<Paragraph>
<ul>
<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>
<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>
<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>
<Link onClick={()=>{history.push('/registration/database')}}>注册数据源</Link>
<Link onClick={()=>{history.push('/registration/database')}}>{intl.formatMessage({id: 'pages.datastadio.lable.registdatasource', defaultMessage: '注册数据源',})}</Link>
</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>
<Link onClick={()=>{history.push('/settings')}}>修改系统配置</Link>
<Link onClick={()=>{history.push('/settings')}}>{intl.formatMessage({id: 'pages.datastadio.lable.configsystemconfig', defaultMessage: '修改系统配置',})}</Link>
</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>
<Link href="https://github.com/DataLinkDC/dlink" target="_blank" >Github</Link>
......
......@@ -18,7 +18,7 @@
*/
import {connect} from "umi";
import {connect,useIntl} from "umi";
import {StateType} from "@/pages/DataStudio/model";
import {
Form, InputNumber, Select, Tag, Row, Col, Tooltip, Button,
......@@ -32,6 +32,8 @@ const { Option } = Select;
const StudioSqlConfig = (props: any) => {
const intl = useIntl();
const {current,form,dispatch,tabs,database,toolHeight} = props;
form.setFieldsValue(current.task);
......@@ -91,7 +93,7 @@ const StudioSqlConfig = (props: any) => {
>
<Row>
<Col span={24}>
<Form.Item label="数据源" tooltip={`选择 Sql 语句执行的数据源`}
<Form.Item label={intl.formatMessage({id: 'pages.datastadio.lable.datasource', defaultMessage: '数据源',})} tooltip={`选择 Sql 语句执行的数据源`}
name="databaseId"
className={styles.form_item}>
<Select
......@@ -105,7 +107,7 @@ const StudioSqlConfig = (props: any) => {
</Col>
<Col span={24}>
<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='预览数据的最大行数'
>
<InputNumber min={1} max={9999} defaultValue={100} />
......
......@@ -33,4 +33,70 @@ export default {
'component.noticeIcon.cleared': 'Cleared',
'component.noticeIcon.empty': 'No notifications',
'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',
};
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
export default {
'pages.layouts.userLayout.title': 'Dinky Real-time Computing Platform',
......@@ -88,82 +69,131 @@ export default {
'pages.searchTable.batchDeletion': 'Bacth Deletion',
'pages.searchTable.batchApproval': 'Batch Approval',
'pages.devops.jobstatus.CREATED': 'Created',
'pages.devops.jobstatus.INITIALIZING': 'Initialize',
'pages.devops.jobstatus.RUNNING': 'Running',
'pages.devops.jobstatus.FINISHED': 'Finished',
'pages.devops.jobstatus.FAILING': 'Abnormal',
'pages.devops.jobstatus.FAILED': 'Failed',
'pages.devops.jobstatus.SUSPENDED': 'Paused',
'pages.devops.jobstatus.CANCELLING': 'Canceling',
'pages.devops.jobstatus.CANCELED': 'Canceled',
'pages.devops.jobstatus.RESTARTING': 'Restarting',
'pages.devops.jobstatus.UNKNOWN': 'Unknown',
'pages.devops.LastUpdateTime': 'LastUpdateTime',
'pages.settings.UserManagement': 'User Management',
'pages.settings.Flink': 'Flink Setting',
'pages.settings.FlinkURL': 'Submit the Jar file path to FlinkSQL',
'pages.settings.FlinkSQLJarMainParameter': 'Submit The Main Class entry To the Jar For FlinkSQL',
'pages.settings.FlinkSQLJarMainClass': 'The Main Class Of The Jar That Submitted FlinkSQL',
'pages.settings.FlinkRestAPI': 'Using Rest API',
'pages.settings.FlinkURLSplit': 'FlinkSQL Statement Separator',
'pages.settings.FlinkSQLLogic': 'Calculate Consanguinity Using A Logical Plan',
'pages.settings.FlinkJobID': 'Maximum Waiting Time For Getting A Job ID (seconds)',
'pages.settings.FlinkNoSetting': 'Not Setting',
'pages.settings.FlinkNoUseSetting': 'After The Flink Task Is Enabled, Operations Such As Savepoint And Stop Are Performed Through The RestAPI Of JobManager',
'pages.settings.FlinkLogic': 'Whether The Calculation Of Field Consanguinity Analysis For Flink Tasks Is Based On A Logical Plan Is Supported Only In Version 1.14',
'pages.settings.FlinkUpdate': 'Update',
'pages.settings.FlinkSave': 'Save',
'pages.settings.FlinkCancel': 'Cancel',
'pages.settings.FlinkUse': 'In Use',
'pages.settings.FlinkNotUse': 'Not Use',
'pages.user.UserEdit': 'Edit',
'pages.user.UserDelete': 'Delete',
'pages.user.UserChangePassword': 'Update Password',
'pages.user.UserConfig': 'Config',
'pages.user.UserMore': 'More',
'pages.user.UserCreate': 'Create',
'pages.user.UserManger': 'User Management',
'pages.user.UserName': 'User Name',//用户名
'pages.user.UserJobNumber': 'Job Number',//工号
'pages.user.UserPhoneNumber': 'Phone Number',//手机号
'pages.user.UserNickName': 'Nick Name',//昵称
'pages.user.UserIsUse': 'Is Use',//是否启用
'pages.user.UserUpdateTime': 'Update Time',//最近更新时间
'pages.user.UserOperate': 'Operate',//操作
'pages.user.UserInUse': 'In Use',//已启用
'pages.user.UserNotUse': 'Not Use',//已禁用
'pages.user.UserCreateTime': 'Create Time',//创建时间
'pages.user.UserComplete': 'Complete',
'pages.user.UserConfirm': 'Confirm',
'pages.user.UserCancel': 'Cancel',
'pages.user.UserDeleteUser': 'Delete User',
'pages.user.UserCreateUser': 'Create User',
'pages.user.UserUpdateUser': 'Update User',
'pages.user.UserEnterUserName': 'Please enter user name',
'pages.user.UserEnterUniqueUserName': 'Please enter unique user name',
'pages.user.UserEnterJobNumber': 'Please enter job number',
'pages.user.UserEnterNickName': 'Please enter nickname',
'pages.user.UserEnterPhoneNumber': 'Please enter phone number',
'pages.user.UserOldPassword': 'Old Password',
'pages.user.UserNewPassword': 'New Password',
'pages.user.UserRepeatNewPassword': 'Repeat New Password',
'pages.user.UserEnterOldPassword': 'Please enter old password',
'pages.user.UserEnterNewPassword': 'Please enter new password',
'pages.user.UserEnterRepeatNewPassword': 'Please enter repeat new password',
'pages.user.UserNewPasswordNotMatch': 'The new passwords do not match',
'pages.user.UserUpdatePassword': 'Update Password',
'pages.regist.openAPI': 'openAPI Document',
'pages.regist.BusinessComponent': 'Business Component Document',
'pages.devops.jobstatus.CREATED' : 'Created',
'pages.devops.jobstatus.INITIALIZING' : 'Initialize',
'pages.devops.jobstatus.RUNNING' : 'Running',
'pages.devops.jobstatus.FINISHED' : 'Finished',
'pages.devops.jobstatus.FAILING' : 'Abnormal',
'pages.devops.jobstatus.FAILED' : 'Failed',
'pages.devops.jobstatus.SUSPENDED' : 'Paused',
'pages.devops.jobstatus.CANCELLING' : 'Canceling',
'pages.devops.jobstatus.CANCELED' : 'Canceled',
'pages.devops.jobstatus.RESTARTING' : 'Restarting',
'pages.devops.jobstatus.UNKNOWN' : 'Unknown',
'pages.devops.LastUpdateTime' : 'LastUpdateTime',
'pages.settings.UserManagement' : 'User Management',
'pages.settings.Flink' : 'Flink Setting',
'pages.settings.FlinkURL' : 'Submit the Jar file path to FlinkSQL',
'pages.settings.FlinkSQLJarMainParameter' : 'Submit The Main Class entry To the Jar For FlinkSQL',
'pages.settings.FlinkSQLJarMainClass' : 'The Main Class Of The Jar That Submitted FlinkSQL',
'pages.settings.FlinkRestAPI' : 'Using Rest API',
'pages.settings.FlinkURLSplit' : 'FlinkSQL Statement Separator',
'pages.settings.FlinkSQLLogic' : 'Calculate Consanguinity Using A Logical Plan',
'pages.settings.FlinkJobID' : 'Maximum Waiting Time For Getting A Job ID (seconds)',
'pages.settings.FlinkNoSetting' : 'Not Setting',
'pages.settings.FlinkNoUseSetting' : 'After The Flink Task Is Enabled, Operations Such As Savepoint And Stop Are Performed Through The RestAPI Of JobManager',
'pages.settings.FlinkLogic' : 'Whether The Calculation Of Field Consanguinity Analysis For Flink Tasks Is Based On A Logical Plan Is Supported Only In Version 1.14',
'pages.settings.FlinkUpdate' : 'Update',
'pages.settings.FlinkSave' : 'Save',
'pages.settings.FlinkCancel' : 'Cancel',
'pages.settings.FlinkUse' : 'In Use',
'pages.settings.FlinkNotUse' : 'Not Use',
'pages.user.UserEdit' : 'Edit',
'pages.user.UserDelete' : 'Delete',
'pages.user.UserChangePassword' : 'Update Password',
'pages.user.UserConfig' : 'Config',
'pages.user.UserMore' : 'More',
'pages.user.UserCreate' : 'Create',
'pages.user.UserManger' : 'User Management',
'pages.user.UserName' : 'User Name',//用户名
'pages.user.UserJobNumber' : 'Job Number',//工号
'pages.user.UserPhoneNumber' : 'Phone Number',//手机号
'pages.user.UserNickName' : 'Nick Name',//昵称
'pages.user.UserIsUse' : 'Is Use',//是否启用
'pages.user.UserUpdateTime' : 'Update Time',//最近更新时间
'pages.user.UserOperate' : 'Operate',//操作
'pages.user.UserInUse' : 'In Use',//已启用
'pages.user.UserNotUse' : 'Not Use',//已禁用
'pages.user.UserCreateTime' : 'Create Time',//创建时间
'pages.user.UserComplete' : 'Complete',
'pages.user.UserConfirm' : 'Confirm',
'pages.user.UserCancel' : 'Cancel',
'pages.user.UserDeleteUser' : 'Delete User',
'pages.user.UserCreateUser' : 'Create User',
'pages.user.UserUpdateUser' : 'Update User',
'pages.user.UserEnterUserName' : 'Please enter user name',
'pages.user.UserEnterUniqueUserName' : 'Please enter unique user name',
'pages.user.UserEnterJobNumber' : 'Please enter job number',
'pages.user.UserEnterNickName' : 'Please enter nickname',
'pages.user.UserEnterPhoneNumber' : 'Please enter phone number',
'pages.user.UserOldPassword' : 'Old Password',
'pages.user.UserNewPassword' : 'New Password',
'pages.user.UserRepeatNewPassword' : 'Repeat New Password',
'pages.user.UserEnterOldPassword' : 'Please enter old password',
'pages.user.UserEnterNewPassword' : 'Please enter new password',
'pages.user.UserEnterRepeatNewPassword' : 'Please enter repeat new password',
'pages.user.UserNewPasswordNotMatch' : 'The new passwords do not match',
'pages.user.UserUpdatePassword' : 'Update Password',
'pages.regist.openAPI' : 'openAPI Document',
'pages.regist.BusinessComponent' : 'Business Component Document',
'pages.matedata.NoDatabaseSelected' : 'No database selected',
'pages.matedata.Application' : 'Application',
'pages.matedata.TableInfo' : 'Table Info',
'pages.matedata.Description' : 'Description',
'pages.matedata.DataSerch' : 'Data Serch',
'pages.matedata.GenerateSQL' : 'Generate SQL',
'pages.matedata.FieldInformation' : 'Field information',
'pages.TableData.QueryConditions' : 'Query Conditions',
'pages.TableData.sorting' : 'Sorting',
'pages.TableData.data' : 'Data',
'pages.TableData.serch' : 'Serch',
'pages.datastadio.lable.info' : 'Info',
'pages.datastadio.lable.result' : 'Result',
'pages.datastadio.lable.bloodsource' : 'Blood Source',
'pages.datastadio.lable.process' : 'Process',
'pages.datastadio.lable.history' : 'History',
'pages.datastadio.lable.function' : 'Function',
'pages.datastadio.lable.directory' : 'Directory',
'pages.datastadio.lable.structure' : 'Structure',
'pages.datastadio.lable.session' : 'Session',
'pages.datastadio.lable.cluster' : 'Cluster',
'pages.datastadio.lable.datasource' : 'Data Source',
'pages.datastadio.lable.mate' : 'Mate Data',
'pages.datastadio.lable.globalvariable' : 'Global Variable',
'pages.datastadio.lable.guidepage' : 'Guide Page',
'pages.datastadio.lable.registcluster' : 'Regist Cluster',
'pages.datastadio.lable.registclusterconfig' : 'Regist Cluster Config',
'pages.datastadio.lable.registjar' : 'Regist Jar',
'pages.datastadio.lable.registdatasource' : 'Regist Datasource',
'pages.datastadio.lable.registdocument' : 'Regist Document',
'pages.datastadio.lable.configsystemconfig' : 'Config System Config',
'pages.datastadio.lable.officialdocumentation' : 'Official Documentation',
'pages.datastadio.lable.quickguide' : 'Quick Guide',
'pages.datastadio.lable.welcomeuse' : 'Welcome to Use Dinky v',
'pages.datastadio.lable.dinkydescribe' : 'Real Time is the Future,Dinky is the best partner of Flink, making Flink SQL easier to use, and is committed to the construction of stream batch integrated development platform',
'pages.datastadio.lable.maxrows' : 'Max Rows',
'pages.devops.result.success' : 'Successful',
'pages.devops.lable.online' : 'Online',
'pages.devops.lable.offline' : 'Offline',
'pages.devops.lable.onlinelist' : 'Online List',
'pages.devops.lable.offlinelist' : 'Offline List',
'pages.devops.lable.instance' : 'Instance',
};
......@@ -40,11 +40,15 @@ import {
import {showCluster, showSessionCluster} from "@/components/Studio/StudioEvent/DDL";
import {RUN_MODE} from "@/components/Studio/conf";
import ClusterForm from "@/pages/Cluster/components/ClusterForm";
import { useIntl } from 'umi';
const TextArea = Input.TextArea;
const url = '/api/cluster';
const ClusterTableList: React.FC<{}> = (props: any) => {
const intl = useIntl();
const {dispatch} = props;
const [modalVisible, handleModalVisible] = useState<boolean>(false);
const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false);
......@@ -97,20 +101,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
<Dropdown
overlay={
<Menu onClick={({key}) => editAndDelete(key, item)}>
<Menu.Item key="edit">编辑</Menu.Item>
<Menu.Item key="delete">删除</Menu.Item>
<Menu.Item key="edit">{intl.formatMessage({id: 'global.table.edit', defaultMessage: '编辑',})}</Menu.Item>
<Menu.Item key="delete">{intl.formatMessage({id: 'global.table.delete', defaultMessage: '删除',})}</Menu.Item>
</Menu>
}
>
<a>
更多 <DownOutlined/>
{intl.formatMessage({id: 'global.table.more', defaultMessage: '更多',})} <DownOutlined/>
</a>
</Dropdown>
);
const columns: ProColumns<ClusterTableListItem>[] = [
{
title: '名称',
title: intl.formatMessage({id: 'global.table.instanceName', defaultMessage: '名称',}),
dataIndex: 'name',
tip: '名称是唯一的',
sorter: true,
......@@ -127,20 +131,20 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
},
},
{
title: '集群ID',
title: intl.formatMessage({id: 'global.table.instanceId', defaultMessage: '集群ID',}),
dataIndex: 'id',
hideInTable: true,
hideInForm: true,
hideInSearch: true,
},
{
title: '别名',
title: intl.formatMessage({id: 'global.table.nickName', defaultMessage: '别名',}),
sorter: true,
dataIndex: 'alias',
hideInTable: false,
},
{
title: '类型',
title: intl.formatMessage({id: 'global.table.type', defaultMessage: '类型',}),
sorter: true,
dataIndex: 'type',
hideInForm: false,
......@@ -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,
dataIndex: 'hosts',
valueType: 'textarea',
......@@ -195,14 +199,14 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
},
},
{
title: '当前 JobManager 地址',
title: intl.formatMessage({id: 'global.table.jobManagerAddress', defaultMessage: 'JobManager地址',}),
sorter: true,
dataIndex: 'jobManagerHost',
hideInForm: true,
hideInSearch: true,
hideInTable: false,
},{
title: '版本',
title: intl.formatMessage({id: 'global.table.version', defaultMessage: '版本',}),
sorter: true,
dataIndex: 'version',
hideInForm: true,
......@@ -210,25 +214,25 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
hideInTable: false,
},
{
title: '状态',
title: intl.formatMessage({id: 'global.table.status', defaultMessage: '状态',}),
dataIndex: 'status',
hideInForm: true,
hideInSearch: true,
hideInTable: false,
filters: [
{
text: '正常',
text: intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',}),
value: 1,
},
{
text: '异常',
text: intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',}),
value: 0,
},
],
filterMultiple: false,
valueEnum: {
1: {text: '正常', status: 'Success'},
0: {text: '异常', status: 'Error'},
1: {text: intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',}), status: 'Success'},
0: {text: intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',}), status: 'Error'},
},
},
{
......@@ -241,51 +245,51 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
hideInTable: true,
},
{
title: '是否启用',
title: intl.formatMessage({id: 'global.table.isUse', defaultMessage: '是否启用',}),
dataIndex: 'enabled',
hideInForm: true,
hideInSearch: true,
hideInTable: false,
filters: [
{
text: '已启用',
text: intl.formatMessage({id: 'global.table.inUse', defaultMessage: '已启用',}),
value: 1,
},
{
text: '已禁用',
text: intl.formatMessage({id: 'global.table.notUse', defaultMessage: '已禁用',}),
value: 0,
},
],
filterMultiple: false,
valueEnum: {
true: {text: '已启用', status: 'Success'},
false: {text: '已禁用', status: 'Error'},
true: {text: intl.formatMessage({id: 'global.table.inUse', defaultMessage: '已启用',}), status: 'Success'},
false:{text: intl.formatMessage({id: 'global.table.notUse', defaultMessage: '已禁用',}), status: 'Error'},
},
},
{
title: '注册方式',
title: intl.formatMessage({id: 'global.table.registType', defaultMessage: '注册方式',}),
dataIndex: 'autoRegisters',
hideInForm: true,
hideInSearch: true,
hideInTable: false,
filters: [
{
text: '自动',
text: intl.formatMessage({id: 'global.table.registType.automatic', defaultMessage: '自动',}),
value: 1,
},
{
text: '手动',
text: intl.formatMessage({id: 'global.table.registType.manual', defaultMessage: '手动',}),
value: 0,
},
],
filterMultiple: false,
valueEnum: {
true: {text: '自动', status: 'Success'},
false: {text: '手动', status: 'Error'},
true: {text: intl.formatMessage({id: 'global.table.registType.automatic', defaultMessage: '自动',}), status: 'Success'},
false: {text: intl.formatMessage({id: 'global.table.registType.manual', defaultMessage: '手动',}), status: 'Error'},
},
},
{
title: '创建时间',
title: intl.formatMessage({id: 'global.table.createTime', defaultMessage: '创建时间',}),
dataIndex: 'createTime',
sorter: true,
valueType: 'dateTime',
......@@ -303,7 +307,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
},
},
{
title: '最近更新时间',
title: intl.formatMessage({id: 'global.table.updateTime', defaultMessage: '最近更新时间',}),
dataIndex: 'updateTime',
sorter: true,
valueType: 'dateTime',
......@@ -320,7 +324,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
},
},
{
title: '操作',
title: intl.formatMessage({id: 'global.table.operate', defaultMessage: '操作',}),
dataIndex: 'option',
tooltip: 'FLinkWebUI连接 当集群状态为`可用`时! 支持 KUBERNETES 之外的模式',
valueType: 'option',
......@@ -331,7 +335,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
setFormValues(record);
}}
>
配置
{intl.formatMessage({id: 'global.table.config', defaultMessage: '配置',})}
</a>,
<MoreBtn key="more" item={record}/>,
((record.status && (record.type === RUN_MODE.YARN_SESSION
......@@ -356,7 +360,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
return (
<PageContainer>
<ProTable<ClusterTableListItem>
headerTitle="集群管理"
headerTitle={intl.formatMessage({id: 'global.table.clusterManagement', defaultMessage: '集群管理',})}
actionRef={actionRef}
rowKey="id"
search={{
......@@ -364,13 +368,13 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
}}
toolBarRender={() => [
<Button type="primary" onClick={() => handleModalVisible(true)}>
<PlusOutlined/> 新建
<PlusOutlined/> {intl.formatMessage({id: 'global.table.create', defaultMessage: '新建',})}
</Button>,
<Button type="primary" onClick={() => checkHeartBeats()}>
<HeartOutlined/> 心跳
<HeartOutlined/> {intl.formatMessage({id: 'global.table.heartbeat', defaultMessage: '心跳',})}
</Button>,
<Button type="primary" onClick={() => clearCluster()}>
<ClearOutlined /> 回收
<ClearOutlined /> {intl.formatMessage({id: 'global.table.recycle', defaultMessage: '回收',})}
</Button>,
]}
request={(params, sorter, filter) => queryData(url, {...params, sorter, filter})}
......
......@@ -21,32 +21,34 @@
import React from "react";
import {CheckSquareOutlined, KeyOutlined} from '@ant-design/icons';
import DTable from "@/components/Common/DTable";
import { useIntl } from 'umi';
const Columns = (props: any) => {
const intl = useIntl();
const {dbId, table, schema, scroll} = props;
const cols = [{
title: '序号',
title: intl.formatMessage({id: 'global.table.no', defaultMessage: '序号',}),
dataIndex: 'position',
isString: false,
},
{
title: '列名',
title: intl.formatMessage({id: 'global.table.columnName', defaultMessage: '字段名称',}),
dataIndex: 'name',
copyable: true,
},
{
title: '注释',
title: intl.formatMessage({id: 'global.table.annotation', defaultMessage: '注释',}),
dataIndex: 'comment',
// ellipsis: true,
},
{
title: '类型',
title: intl.formatMessage({id: 'global.table.type', defaultMessage: '类型',}),
dataIndex: 'type',
},
{
title: '主键',
title: intl.formatMessage({id: 'global.table.primarykey', defaultMessage: '主键',}),
dataIndex: 'keyFlag',
render: (_, record) => (
<>
......@@ -65,7 +67,7 @@ const Columns = (props: any) => {
],
openSearch: 'dict',
}, {
title: '自增',
title: intl.formatMessage({id: 'global.table.automationAdd', defaultMessage: '自增',}),
dataIndex: 'autoIncrement',
render: (_, record) => (
<>
......@@ -84,7 +86,7 @@ const Columns = (props: any) => {
],
openSearch: 'dict',
}, {
title: '非空',
title: intl.formatMessage({id: 'global.table.isNull', defaultMessage: '非空',}),
dataIndex: 'nullable',
render: (_, record) => (
<>
......@@ -103,24 +105,24 @@ const Columns = (props: any) => {
],
openSearch: 'dict',
}, {
title: '默认值',
title: intl.formatMessage({id: 'global.table.default', defaultMessage: '默认值',}),
dataIndex: 'defaultValue',
}, {
title: '精度',
title: intl.formatMessage({id: 'global.table.precision', defaultMessage: '精度',}),
dataIndex: 'precision',
isString: false,
}, {
title: '小数范围',
title: intl.formatMessage({id: 'global.table.decimalDigits', defaultMessage: '小数范围',}),
dataIndex: 'scale',
isString: false,
}, {
title: '字符集',
title: intl.formatMessage({id: 'global.table.character', defaultMessage: '字符集',}),
dataIndex: 'characterSet',
}, {
title: '排序规则',
title: intl.formatMessage({id: 'global.table.collationRule', defaultMessage: '排序规则',}),
dataIndex: 'collation',
}, {
title: 'Java 类型',
title: intl.formatMessage({id: 'global.table.javaType', defaultMessage: 'Java 类型',}),
dataIndex: 'javaType',
},]
return (
......
......@@ -25,9 +25,12 @@ import styles from './index.less';
import {SearchOutlined} from "@ant-design/icons";
import Divider from "antd/es/divider";
import {ProTable} from "@ant-design/pro-table";
import { useIntl } from 'umi';
const TableData = (props: any) => {
const intl = useIntl();
// 数据库id,数据库名称,表名称
const {dbId, table, schema} = props;
// 表数据
......@@ -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) => {
setOptionInput({
whereInput: value.target.value,
......@@ -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({
whereInput: optionInput.whereInput,
orderInput: value.target.value
......@@ -196,7 +199,7 @@ const TableData = (props: any) => {
</AutoComplete>
</Col>
<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) => {
fetchData(optionInput.whereInput, optionInput.orderInput)
}}/>
......@@ -207,7 +210,7 @@ const TableData = (props: any) => {
</div>
<Divider orientation="left" plain>数据</Divider>
<Divider orientation="left" plain>{intl.formatMessage({id: 'pages.TableData.data', defaultMessage: '数据',})}</Divider>
<div>
<ProTable
......
......@@ -43,12 +43,14 @@ import Generation from '@/pages/DataBase/Generation';
import TableData from '@/pages/DataCenter/MetaData/TableData';
import {FALLBACK, getDBImage} from "@/pages/DataBase/DB";
import Meta from "antd/lib/card/Meta";
import { useIntl } from 'umi';
const {DirectoryTree} = Tree;
const {TabPane} = Tabs;
const MetaDataContainer: React.FC<{}> = (props: any) => {
const intl = useIntl();
let [database, setDatabase] = useState<[{
id: number,
......@@ -167,10 +169,10 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
</Tag>
{(item.status) ?
(<Tag icon={<CheckCircleOutlined/>} color="success">
正常
{intl.formatMessage({id: 'global.table.status.normal', defaultMessage: '正常',})}
</Tag>) :
<Tag icon={<ExclamationCircleOutlined/>} color="warning">
异常
{intl.formatMessage({id: 'global.table.status.abnormal', defaultMessage: '异常',})}
</Tag>}
</div>
</Col>
......@@ -195,14 +197,14 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
refeshDataBase(databaseId)
setTableChecked(true)
}}
>刷新</Button>
>{intl.formatMessage({id: 'global.table.refresh', defaultMessage: '刷新',})}</Button>
</div>
<div>{item.alias}</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) => {
>
<Meta title={buildListTitle()}
className={styles.tableListHead}
description={"上次更新:" + treeData.updateTime}
description={"Last Update:" + treeData.updateTime}
/>
{treeData.tables.length > 0 ? (
<Scrollbars style={{height: 800}}>
......@@ -256,13 +258,13 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={
<span>
<ReadOutlined/>
描述
{intl.formatMessage({id: 'pages.matedata.Description', defaultMessage: '描述',})}
</span>
}
key="describe"
>
<Divider orientation="left" plain>
表信息
{intl.formatMessage({id: 'pages.matedata.TableInfo', defaultMessage: '表信息',})}
</Divider>
{row ? (
<Tables table={row}/>
......@@ -270,7 +272,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>
)}
<Divider orientation="left" plain>
字段信息
{intl.formatMessage({id: 'pages.matedata.FieldInformation', defaultMessage: '字段信息',})}
</Divider>
{row ? (
<Columns dbId={databaseId} schema={row.schema} table={row.table}/>
......@@ -283,7 +285,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={
<span>
<BarsOutlined/>
数据查询
{intl.formatMessage({id: 'pages.matedata.DataSerch', defaultMessage: '数据查询',})}
</span>
}
key="exampleData"
......@@ -299,7 +301,7 @@ const MetaDataContainer: React.FC<{}> = (props: any) => {
tab={
<span>
<ConsoleSqlOutlined/>
SQL 生成
{intl.formatMessage({id: 'pages.matedata.GenerateSQL', defaultMessage: 'SQL 生成',})}
</span>
}
key="sqlGeneration"
......
......@@ -240,8 +240,8 @@ export type ModelType = {
renameTab: Reducer<StateType>;
};
};
const Model: ModelType = {
namespace: 'Studio',
state: {
isFullScreen: false,
......@@ -259,7 +259,7 @@ const Model: ModelType = {
current: undefined,
sql: '',
// monaco: {},
currentPath: ['引导页'],
currentPath: ['Guide Page'],
tabs: {
activeKey: 0,
panes: [],
......@@ -411,7 +411,7 @@ const Model: ModelType = {
...state,
current: undefined,
tabs: payload,
currentPath: ['引导页'],
currentPath: ['Guide Page'],
};
}
return {
......@@ -645,7 +645,7 @@ const Model: ModelType = {
...state,
current: undefined,
tabs: {...newTabs},
currentPath: ['引导页'],
currentPath: ['Guide Page'],
};
}
return {
......
......@@ -85,7 +85,7 @@ const JobInstanceTable = (props: any) => {
if (values) {
try {
await onClickOperatingTask(values)
message.success('操作成功')
message.success(intl.formatMessage({id: 'pages.devops.result.success', defaultMessage: '操作成功',}))
setOpsStatusVisible(false)
} catch (e) {
console.log(e)
......@@ -127,30 +127,30 @@ const JobInstanceTable = (props: any) => {
const getColumns = () => {
const columns: ProColumns<JobInstanceTableListItem>[] = [{
title: "作业名",
title: intl.formatMessage({id: 'global.table.jobname', defaultMessage: '作业名',}),
dataIndex: "name",
sorter: true,
}, {
title: "生命周期",
title: intl.formatMessage({id: 'global.table.lifecycle', defaultMessage: '生命周期',}),
dataIndex: "step",
sorter: true,
valueType: 'radio',
valueEnum: {
'': {text: '全部', status: 'ALL'},
'': {text: intl.formatMessage({id: 'global.table.lifecycle.all', defaultMessage: '全部',}), status: 'ALL'},
2: {
text: '开发中',
text: intl.formatMessage({id: 'global.table.lifecycle.dev', defaultMessage: '开发中',}),
status: JOB_LIFE_CYCLE.DEVELOP,
},
4: {
text: '已发布',
text: intl.formatMessage({id: 'global.table.lifecycle.publish', defaultMessage: '已发布',}),
status: JOB_LIFE_CYCLE.RELEASE,
},
5: {
text: '已上线',
text: intl.formatMessage({id: 'global.table.lifecycle.online', defaultMessage: '已上线',}),
status: JOB_LIFE_CYCLE.ONLINE,
},
0: {
text: '未知',
text: intl.formatMessage({id: 'global.table.lifecycle.unKnow', defaultMessage: '未知',}),
status: JOB_LIFE_CYCLE.UNKNOWN,
},
},
......@@ -158,12 +158,12 @@ const JobInstanceTable = (props: any) => {
return (<JobLifeCycle step={row.step}/>);
}
}, {
title: "运行模式",
title: intl.formatMessage({id: 'global.table.runmode', defaultMessage: '运行模式',}),
dataIndex: "type",
sorter: true,
valueType: 'radio',
valueEnum: {
'': {text: '全部', status: 'ALL'},
'': {text: intl.formatMessage({id: 'global.table.lifecycle.all', defaultMessage: '全部',}), status: 'ALL'},
'local': {
text: RUN_MODE.LOCAL,
status: RUN_MODE.LOCAL,
......@@ -194,15 +194,15 @@ const JobInstanceTable = (props: any) => {
},
},
}, {
title: "集群实例",
title: intl.formatMessage({id: 'global.table.instanceName', defaultMessage: '集群实例',}),
dataIndex: "clusterAlias",
sorter: true,
}, {
title: "作业ID",
title: intl.formatMessage({id: 'global.table.jobid', defaultMessage: '作业ID',}),
dataIndex: "jid",
key: "jid",
}, {
title: "状态",
title: intl.formatMessage({id: 'global.table.status', defaultMessage: '状态',}),
dataIndex: "status",
sorter: true,
hideInSearch: true,
......@@ -212,27 +212,27 @@ const JobInstanceTable = (props: any) => {
;
}
}, {
title: "开始时间",
title: intl.formatMessage({id: 'global.table.startTime', defaultMessage: '开始时间',}),
dataIndex: "createTime",
sorter: true,
valueType: 'dateTime',
hideInSearch: true,
}, {
title: "更新时间",
title: intl.formatMessage({id: 'global.table.updateTime', defaultMessage: '更新时间',}),
dataIndex: "updateTime",
sorter: true,
valueType: 'dateTime',
hideInTable: true,
hideInSearch: true,
}, {
title: "结束时间",
title: intl.formatMessage({id: 'global.table.endTime', defaultMessage: '结束时间',}),
dataIndex: "finishTime",
sorter: true,
valueType: 'dateTime',
hideInTable: true,
hideInSearch: true,
}, {
title: "耗时",
title: intl.formatMessage({id: 'global.table.useTime', defaultMessage: '耗时',}),
dataIndex: "duration",
sorter: true,
valueType: 'second',
......@@ -248,20 +248,20 @@ const JobInstanceTable = (props: any) => {
color={taskStatus?.onlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success} text={<a
onClick={() => {
onStatusChange('1')
}}>一键上线</a>}/>,
}}>{intl.formatMessage({id: 'pages.devops.lable.online', defaultMessage: '一键上线',})}</a>}/>,
<a
style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}}
onClick={() => {
onStatusDetailed('1')
}}>上线明细</a>,
}}>{intl.formatMessage({id: 'pages.devops.lable.onlinelist', defaultMessage: '上线明细',})}</a>,
<Badge color={taskStatus?.offlineStatus ? OPS_STATUS_COLOR.padding : OPS_STATUS_COLOR.success}
text={<a onClick={() => {
onStatusChange('2')
}}>一键下线</a>}/>, <a
}}>{intl.formatMessage({id: 'pages.devops.lable.offline', defaultMessage: '一键下线',})}</a>}/>, <a
style={{color: taskStatus?.onlineStatus ? '#FF0000' : '#1E90FF'}}
onClick={() => {
onStatusDetailed('2')
}}>下线明细</a>,]}
}}>{intl.formatMessage({id: 'pages.devops.lable.offlinelist', defaultMessage: '下线明细',})}</a>,]}
request={(params, sorter, filter) => {
setTime(Date.now());
return queryData(url, {...params, status, isHistory, sorter: {id: 'descend'}, filter});
......@@ -272,7 +272,7 @@ const JobInstanceTable = (props: any) => {
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}
pagination={{
pageSize: 10,
......
......@@ -41,7 +41,7 @@ const DevOps = () => {
};
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