Unverified Commit b26d02a4 authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[Feature][web] implement internationalization (#1226)

* [Feature][web] implement internationalization of service.ts * [Feature][web] implement internationalization of SettingCenter udf management * [Feature][web] implement internationalization of SettingCenter process list * fix button status * [Feature][web] implement internationalization of DevOps jobinfo alert list * [Feature][web] implement internationalization of DevOps jobinfo CHECKPOINT LIST * [Feature][web] implement internationalization of DevOps jobinfo SAVEPOINT LIST * [Feature][web] implement internationalization of DevOps jobinfo lineage * [Feature][web] implement internationalization of Empty component description * [Feature][web] implement internationalization of DEVOPS version list * [Feature][web] implement internationalization of DEVOPS index.tsx * [Feature][web] implement internationalization of DEVOPS index.tsx * [Feature][web] implement internationalization of DEVOPS config * [Feature][web] implement internationalization of DEVOPS config
parent 669eb135
...@@ -151,7 +151,7 @@ const StudioProcess = (props: any) => { ...@@ -151,7 +151,7 @@ const StudioProcess = (props: any) => {
render: (_, record) => { render: (_, record) => {
let option = [<a let option = [<a
onClick={() => { onClick={() => {
message.success('敬请期待'); message.success(l('global.stay.tuned'));
}} }}
> >
详情 详情
......
...@@ -147,7 +147,7 @@ const StudioConnector = (props: any) => { ...@@ -147,7 +147,7 @@ const StudioConnector = (props: any) => {
if (key == 'delete') { if (key == 'delete') {
removeTable(item.tablename, currentSession.session, dispatch); removeTable(item.tablename, currentSession.session, dispatch);
} else { } else {
message.warn("敬请期待"); message.warn(l('global.stay.tuned'));
} }
}; };
...@@ -159,7 +159,7 @@ const StudioConnector = (props: any) => { ...@@ -159,7 +159,7 @@ const StudioConnector = (props: any) => {
message.success('连接共享会话【' + item.session + '】成功!'); message.success('连接共享会话【' + item.session + '】成功!');
setModalVisit(false); setModalVisit(false);
} else { } else {
message.warn("敬请期待"); message.warn(l('global.stay.tuned'));
} }
}; };
...@@ -185,7 +185,7 @@ const StudioConnector = (props: any) => { ...@@ -185,7 +185,7 @@ const StudioConnector = (props: any) => {
render: (_, record) => [ render: (_, record) => [
<a <a
onClick={() => { onClick={() => {
message.warn('敬请期待'); message.warn(l('global.stay.tuned'));
}} }}
> >
描述 描述
......
...@@ -92,7 +92,7 @@ const StudioMenu = (props: any) => { ...@@ -92,7 +92,7 @@ const StudioMenu = (props: any) => {
const menu = ( const menu = (
<Menu> <Menu>
<Menu.Item>敬请期待</Menu.Item> <Menu.Item>{l('global.stay.tuned')}</Menu.Item>
</Menu> </Menu>
); );
......
...@@ -135,7 +135,7 @@ const StudioJarSetting = (props: any) => { ...@@ -135,7 +135,7 @@ const StudioJarSetting = (props: any) => {
message.warn(info.file.response.msg); message.warn(info.file.response.msg);
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`); message.error(`${info.file.name}` + l('app.request.upload.failed'));
} }
}, },
} }
...@@ -223,10 +223,10 @@ const StudioJarSetting = (props: any) => { ...@@ -223,10 +223,10 @@ const StudioJarSetting = (props: any) => {
tooltip='指定 SavePoint策略,默认为禁用' tooltip='指定 SavePoint策略,默认为禁用'
> >
<Select defaultValue={0}> <Select defaultValue={0}>
<Option value={0}>禁用</Option> <Option value={0}>{l('global.savepoint.strategy.disabled')}</Option>
<Option value={1}>最近一次</Option> <Option value={1}>{l('global.savepoint.strategy.latest')}</Option>
<Option value={2}>最早一次</Option> <Option value={2}>{l('global.savepoint.strategy.earliest')}</Option>
<Option value={3}>指定一次</Option> <Option value={3}>{l('global.savepoint.strategy.custom')}</Option>
</Select> </Select>
</Form.Item> </Form.Item>
{current.task.savePointStrategy === 3 ? {current.task.savePointStrategy === 3 ?
......
...@@ -40,8 +40,8 @@ const StudioKubernetesConfig = (props: any) => { ...@@ -40,8 +40,8 @@ const StudioKubernetesConfig = (props: any) => {
const getGroupOptions = () => { const getGroupOptions = () => {
const itemList = [<Option key={0} value={0} label='禁用'> const itemList = [<Option key={0} value={0} label={l('button.disable')}>
禁用 {l('button.disable')}
</Option>]; </Option>];
for (const item of group) { for (const item of group) {
itemList.push(<Option key={item.id} value={item.id} label={item.name}> itemList.push(<Option key={item.id} value={item.id} label={item.name}>
...@@ -100,10 +100,10 @@ const StudioKubernetesConfig = (props: any) => { ...@@ -100,10 +100,10 @@ const StudioKubernetesConfig = (props: any) => {
tooltip='指定 SavePoint策略,默认为禁用' tooltip='指定 SavePoint策略,默认为禁用'
> >
<Select defaultValue={0}> <Select defaultValue={0}>
<Option value={0}>禁用</Option> <Option value={0}>{l('global.savepoint.strategy.disabled')}</Option>
<Option value={1}>最近一次</Option> <Option value={1}>{l('global.savepoint.strategy.latest')}</Option>
<Option value={2}>最早一次</Option> <Option value={2}>{l('global.savepoint.strategy.earliest')}</Option>
<Option value={3}>指定一次</Option> <Option value={3}>{l('global.savepoint.strategy.custom')}</Option>
</Select> </Select>
</Form.Item> </Form.Item>
{current.task.savePointStrategy === 3 ? {current.task.savePointStrategy === 3 ?
......
...@@ -96,8 +96,8 @@ const StudioSetting = (props: any) => { ...@@ -96,8 +96,8 @@ const StudioSetting = (props: any) => {
}; };
const getGroupOptions = () => { const getGroupOptions = () => {
const itemList = [<Option key={0} value={0} label='禁用'> const itemList = [<Option key={0} value={0} label={l('button.disable')}>
禁用 {l('button.disable')}
</Option>]; </Option>];
for (const item of group) { for (const item of group) {
itemList.push(<Option key={item.id} value={item.id} label={item.name}> itemList.push(<Option key={item.id} value={item.id} label={item.name}>
...@@ -271,10 +271,10 @@ const StudioSetting = (props: any) => { ...@@ -271,10 +271,10 @@ const StudioSetting = (props: any) => {
tooltip='指定 SavePoint策略,默认为禁用' tooltip='指定 SavePoint策略,默认为禁用'
> >
<Select defaultValue={0}> <Select defaultValue={0}>
<Option value={0}>禁用</Option> <Option value={0}>{l('global.savepoint.strategy.disabled')}</Option>
<Option value={1}>最近一次</Option> <Option value={1}>{l('global.savepoint.strategy.latest')}</Option>
<Option value={2}>最早一次</Option> <Option value={2}>{l('global.savepoint.strategy.earliest')}</Option>
<Option value={3}>指定一次</Option> <Option value={3}>{l('global.savepoint.strategy.custom')}</Option>
</Select> </Select>
</Form.Item> </Form.Item>
{current.task.savePointStrategy === 3 ? {current.task.savePointStrategy === 3 ?
......
...@@ -56,7 +56,7 @@ const EditorTabs = (props: any) => { ...@@ -56,7 +56,7 @@ const EditorTabs = (props: any) => {
}; };
const add = () => { const add = () => {
message.warn('敬请期待'); message.warn(l('global.stay.tuned'));
}; };
const remove = (targetKey: any) => { const remove = (targetKey: any) => {
......
...@@ -52,10 +52,10 @@ const UploadModal: React.FC<UploadModalProps> = (props: any) => { ...@@ -52,10 +52,10 @@ const UploadModal: React.FC<UploadModalProps> = (props: any) => {
if (info.file.response.code === 1) { if (info.file.response.code === 1) {
message.error(`${info.file.response.msg} `); message.error(`${info.file.response.msg} `);
} else { } else {
message.success(`${info.file.name} file uploaded successfully`); message.success(`${info.file.name}` + l('app.request.upload.success'));
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} file upload failed.`); message.error(`${info.file.name} `+ l('app.request.upload.failed'));
} }
}, },
}; };
......
...@@ -614,7 +614,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => { ...@@ -614,7 +614,7 @@ const StudioTree: React.FC<StudioTreeProps> = (props) => {
} }
getTreeData(); getTreeData();
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`); message.error(`${info.file.name}`+ l('app.request.upload.failed'));
} }
}, },
}; };
......
...@@ -82,6 +82,8 @@ export default { ...@@ -82,6 +82,8 @@ export default {
'global.time.day': 'Day', 'global.time.day': 'Day',
'global.time.millisecond': 'millisecond', 'global.time.millisecond': 'millisecond',
'global.stay.tuned': 'Stay tuned',
'global.table.operate': 'Operation', 'global.table.operate': 'Operation',
'global.table.config': 'Config', 'global.table.config': 'Config',
'global.table.edit': 'Edit', 'global.table.edit': 'Edit',
...@@ -91,7 +93,9 @@ export default { ...@@ -91,7 +93,9 @@ export default {
'global.table.lastUpdateTime': 'Last Update Time', 'global.table.lastUpdateTime': 'Last Update Time',
'global.table.createTime': 'Create Time', 'global.table.createTime': 'Create Time',
'global.table.startTime': 'Start Time', 'global.table.startTime': 'Start Time',
'global.table.startUpTime': 'StartUp Time',
'global.table.endTime': 'End Time', 'global.table.endTime': 'End Time',
'global.table.finishTime': 'Finished Time',
'global.table.useTime': 'Duration', 'global.table.useTime': 'Duration',
'global.table.registType': 'Regist Type', 'global.table.registType': 'Regist Type',
...@@ -116,5 +120,10 @@ export default { ...@@ -116,5 +120,10 @@ export default {
'global.table.lifecycle.unknown': 'Unknown', 'global.table.lifecycle.unknown': 'Unknown',
'global.table.runmode': 'Run Mode', 'global.table.runmode': 'Run Mode',
'global.savepoint.strategy.disabled':'Disabled',
'global.savepoint.strategy.latest':'Latest',
'global.savepoint.strategy.earliest':'Earliest',
'global.savepoint.strategy.custom':'Custom',
}; };
...@@ -532,6 +532,119 @@ export default { ...@@ -532,6 +532,119 @@ export default {
'pages.registerCenter.fv.fragmentValuePlaceholder': 'Please enter the Global Variable value', 'pages.registerCenter.fv.fragmentValuePlaceholder': 'Please enter the Global Variable value',
'pages.registerCenter.fv.enabledPlaceholder': 'Please choose whether to enable!', 'pages.registerCenter.fv.enabledPlaceholder': 'Please choose whether to enable!',
'pages.task.api.job.async' : 'Asynchronous submit',
'pages.task.api.job.stop' : 'Stop job',
'pages.task.api.job.restart' : 'Restart job',
'pages.task.api.job.instance' : 'Job instance',
'pages.task.api.savepoint.trigger' : 'SavePoint trigger',
'pages.task.api.savepoint.stop' : 'SavePoint stop',
'pages.task.api.job.online' : 'Online job',
'pages.task.api.job.offline' : 'Offline job',
'pages.task.api.job.reonline' : 'Re-online job',
'pages.sys.udf.template.name' : 'Template Name',
'pages.sys.udf.template.namePlaceholder' : 'Please enter the template name! ',
'pages.sys.udf.template.codeType' : 'Code Type',
'pages.sys.udf.template.codeTypePlaceholder' : 'Please select code type! ',
'pages.sys.udf.template.functionType' : 'Function Type',
'pages.sys.udf.template.functionTypePlaceholder' : 'Please select function type! ',
'pages.sys.udf.template.templateCode' : 'Template Code',
'pages.sys.udf.template.templateCodePlaceholder' : 'Please edit the template code! ',
'pages.sys.udf.template.delete' : 'Delete Template! ',
'pages.sys.udf.template.deleteConfirm' : 'Are you sure you want to delete this template?',
'pages.sys.udf.template.create': 'Create UDF Template',
'pages.sys.udf.template.modify': 'Modify UDF Template',
'pages.sys.process.id':'Process ID',
'pages.sys.process.name': 'Process Name',
'pages.sys.process.jobid':'Job ID',
'pages.sys.process.type': 'Type',
'pages.sys.process.status': 'Status',
'pages.sys.process.starttime': 'Start Time',
'pages.sys.process.endtime': 'End Time',
'pages.sys.process.duration': 'Duration',
'pages.sys.process.operator': 'Operator',
'pages.devops.jobinfo.alert.title': 'Title',
'pages.devops.jobinfo.alert.content':'Body',
'pages.devops.jobinfo.alert.status': 'Status',
'pages.devops.jobinfo.alert.status.success': 'Success',
'pages.devops.jobinfo.alert.status.failed': 'Failed',
'pages.devops.jobinfo.alert.log': 'Log',
'pages.devops.jobinfo.alert.createTime':'Alarm Time',
'pages.devops.jobinfo.ck.id':'ID',
'pages.devops.jobinfo.ck.taskid':'Task ID',
'pages.devops.jobinfo.ck.status': 'Status',
'pages.devops.jobinfo.ck.name':'Name',
'pages.devops.jobinfo.ck.duration': 'Duration',
'pages.devops.jobinfo.ck.checkpoint_type': 'Type',
'pages.devops.jobinfo.ck.external_path':'Storage Location',
'pages.devops.jobinfo.ck.latest_ack_timestamp': 'Last Response Time',
'pages.devops.jobinfo.ck.state_size': 'State Size',
'pages.devops.jobinfo.ck.trigger_timestamp': 'Trigger Time',
'pages.devops.jobinfo.ck.recovery' : 'Recovering from Checkpoint! ',
'pages.devops.jobinfo.ck.recoveryConfirm' : 'Are you sure to Recover from Checkpoint [{path}]?',
'pages.devops.jobinfo.ck.recovery.success' : 'Recovery job succeeded',
'pages.devops.jobinfo.ck.recovery.failed' : 'Recovery job failed',
'pages.devops.jobinfo.lineage' :'Lineage Analysis',
'pages.devops.jobinfo.version.id' : 'Job ID',
'pages.devops.jobinfo.version.name' : 'Job Name',
'pages.devops.jobinfo.version.alias' : 'Job aAlias',
'pages.devops.jobinfo.version.dialect' : 'Job Dialect',
'pages.devops.jobinfo.version.type' : 'Job Type',
'pages.devops.jobinfo.version.versionId' : 'Version Number',
'pages.devops.jobinfo.version.sql' : 'Job Content',
'pages.devops.jobinfo.version.sql.showdetail' : 'View Job Details',
'pages.devops.jobinfo.version.sql.title' : 'Job Execute SQL',
'pages.devops.jobinfo.version.diff' : 'Version Comparison',
'pages.devops.jobinfo.overview': 'Job Overview',
'pages.devops.jobinfo.cluster':'Cluster Information',
'pages.devops.jobinfo.snapshot': 'Job Snapshot',
'pages.devops.jobinfo.exception': 'Exception Information',
'pages.devops.jobinfo.log':'Job Log',
'pages.devops.jobinfo.optimize':'Automatic Tuning',
'pages.devops.jobinfo.config':'Configuration Information',
'pages.devops.jobinfo.flinksql':'FlinkSQL',
'pages.devops.jobinfo.datamap': 'Data Map',
'pages.devops.jobinfo.olap': 'Adhoc Query',
'pages.devops.jobinfo.version': 'History Version',
'pages.devops.jobinfo.alert':'Alarm Record',
'pages.devops.jobinfo.savepoint.trigger':'SavePoint Triggers',
'pages.devops.jobinfo.savepoint.stop':'SavePoint Pause',
'pages.devops.jobinfo.savepoint.cancel': 'SavePoint Stop',
'pages.devops.jobinfo.savepoint.canceljob': 'Normal Stop',
'pages.devops.jobinfo.localenv': 'Local Environment',
'pages.devops.jobinfo.offline': 'Offline',
'pages.devops.jobinfo.smart_stop': 'Smart Stop',
'pages.devops.jobinfo.reonline': 'Re-Online',
'pages.devops.jobinfo.reonlineJob': 'Re-online Job',
'pages.devops.jobinfo.reonlineJobConfirm': 'Are you sure you want to re-launch this job? ',
'pages.devops.jobinfo.reonline.success': 'Re-online successfully',
'pages.devops.jobinfo.reonline.failed': 'Failed to re-online',
'pages.devops.jobinfo.restart': 'Restart',
'pages.devops.jobinfo.stopJob': 'Stop job',
'pages.devops.jobinfo.stopJobConfirm': 'Are you sure to just stop this job without SavePoint operation? ',
'pages.devops.jobinfo.canceljob.success': 'Normal stop succeeded',
'pages.devops.jobinfo.canceljob.failed': 'Normal stop failed',
'pages.devops.jobinfo.job.key':'{key} Job',
'pages.devops.jobinfo.job.key.success':'{key} Success',
'pages.devops.jobinfo.job.key.failed':'{key} Failed',
'pages.devops.jobinfo.job.keyConfirm': 'Are you sure {key} this job?',
'pages.devops.baseinfo.name': 'Name',
'pages.devops.baseinfo.status': 'Status',
'pages.devops.baseinfo.readbytes': 'Receive Bytes',
'pages.devops.baseinfo.readrecords': 'Receive Records',
'pages.devops.baseinfo.writebytes': 'Send Bytes',
'pages.devops.baseinfo.writerecords': 'Send Records',
'pages.devops.baseinfo.parallelism': 'Parallelism',
'pages.devops.baseinfo.tasks': 'Operator',
'pages.devops.baseinfo.restart_number': 'Number of Restarts',
}; };
......
...@@ -37,4 +37,12 @@ export default { ...@@ -37,4 +37,12 @@ export default {
'app.request.502': 'Gateway error. ', 'app.request.502': 'Gateway error. ',
'app.request.503': 'The service is unavailable. ', 'app.request.503': 'The service is unavailable. ',
'app.request.504': 'The gateway timed out. ', 'app.request.504': 'The gateway timed out. ',
'app.request.failed ':' The request failed, please try again ',
'app.request.test.connection ':' Testing connection ',
'app.request.heartbeat.connection ':' Detecting heartbeat ',
'app.request.heartbeat.connection.success': 'The heartbeat of the data source is normal, and the detection time is: {time}',
'app.request.heartbeat.connection.failed ':' The heartbeat of the data source is abnormal, and the detection time is: {time} ',
'app.request.upload.failed ':' Upload failed. ',
'app.request.update.setting.success': 'Modify the configuration successfully!',
}; };
...@@ -83,13 +83,16 @@ export default { ...@@ -83,13 +83,16 @@ export default {
'global.time.day': '天', 'global.time.day': '天',
'global.time.millisecond': '毫秒', 'global.time.millisecond': '毫秒',
'global.stay.tuned': '敬请期待',
'global.table.operate': '操作', 'global.table.operate': '操作',
'global.table.updateTime': '更新时间', 'global.table.updateTime': '更新时间',
'global.table.lastUpdateTime': '最近更新时间', 'global.table.lastUpdateTime': '最近更新时间',
'global.table.createTime': '创建时间', 'global.table.createTime': '创建时间',
'global.table.startTime': '开始时间', 'global.table.startTime': '开始时间',
'global.table.startUpTime': '启动时间',
'global.table.endTime': '结束时间', 'global.table.endTime': '结束时间',
'global.table.finishTime': '完成时间',
'global.table.useTime': '耗时', 'global.table.useTime': '耗时',
'global.table.registType': '注册方式', 'global.table.registType': '注册方式',
...@@ -113,4 +116,10 @@ export default { ...@@ -113,4 +116,10 @@ export default {
'global.table.lifecycle.unknown': '未知', 'global.table.lifecycle.unknown': '未知',
'global.table.runmode': '运行模式', 'global.table.runmode': '运行模式',
'global.savepoint.strategy.disabled':'禁用',
'global.savepoint.strategy.latest':'最近一次',
'global.savepoint.strategy.earliest':'最早一次',
'global.savepoint.strategy.custom':'指定一次',
}; };
...@@ -531,4 +531,119 @@ export default { ...@@ -531,4 +531,119 @@ export default {
'pages.registerCenter.fv.fragmentValuePlaceholder': '请输入全局变量值', 'pages.registerCenter.fv.fragmentValuePlaceholder': '请输入全局变量值',
'pages.registerCenter.fv.enabledPlaceholder': '请选择是否启用!', 'pages.registerCenter.fv.enabledPlaceholder': '请选择是否启用!',
'pages.task.api.job.async' : '异步提交',
'pages.task.api.job.stop' : '停止作业',
'pages.task.api.job.restart' : '重启作业',
'pages.task.api.job.instance' : '作业实例',
'pages.task.api.savepoint.trigger' : 'SavePoint 触发',
'pages.task.api.savepoint.stop' : 'SavePoint 停止',
'pages.task.api.job.online' : '上线作业',
'pages.task.api.job.offline' : '下线作业',
'pages.task.api.job.reonline' : '重新上线作业',
'pages.sys.udf.template.name' :'模板名',
'pages.sys.udf.template.namePlaceholder' :'请输入模板名!',
'pages.sys.udf.template.codeType' :'代码类型',
'pages.sys.udf.template.codeTypePlaceholder' :'请选择代码类型!',
'pages.sys.udf.template.functionType' :'函数类型',
'pages.sys.udf.template.functionTypePlaceholder' :'请选择函数类型!',
'pages.sys.udf.template.templateCode' :'模板代码',
'pages.sys.udf.template.templateCodePlaceholder' :'请编辑模板代码!',
'pages.sys.udf.template.delete' :'删除模板!',
'pages.sys.udf.template.deleteConfirm' :'确定删除该模板吗?',
'pages.sys.udf.template.create': '创建 UDF 模板',
'pages.sys.udf.template.modify': '修改 UDF 模板',
'pages.sys.process.id':'进程ID',
'pages.sys.process.name':'进程名',
'pages.sys.process.jobid':'任务ID',
'pages.sys.process.type':'类型',
'pages.sys.process.status':'状态',
'pages.sys.process.starttime':'开始时间',
'pages.sys.process.endtime':'结束时间',
'pages.sys.process.duration':'耗时',
'pages.sys.process.operator':'操作人',
'pages.devops.jobinfo.alert.title':'标题',
'pages.devops.jobinfo.alert.content':'正文',
'pages.devops.jobinfo.alert.status':'状态',
'pages.devops.jobinfo.alert.status.success':'成功',
'pages.devops.jobinfo.alert.status.failed':'失败',
'pages.devops.jobinfo.alert.log':'日志',
'pages.devops.jobinfo.alert.createTime':'报警时间',
'pages.devops.jobinfo.ck.id':'ID',
'pages.devops.jobinfo.ck.taskid':'任务ID',
'pages.devops.jobinfo.ck.status':'状态',
'pages.devops.jobinfo.ck.name':'名称',
'pages.devops.jobinfo.ck.duration':'耗时',
'pages.devops.jobinfo.ck.checkpoint_type':'类型',
'pages.devops.jobinfo.ck.external_path':'存储位置',
'pages.devops.jobinfo.ck.latest_ack_timestamp':'最后响应时间',
'pages.devops.jobinfo.ck.state_size':'状态大小',
'pages.devops.jobinfo.ck.trigger_timestamp':'触发时间',
'pages.devops.jobinfo.ck.recovery' :'从检查点恢复!',
'pages.devops.jobinfo.ck.recoveryConfirm' :'确定从检查点【{path}】恢复吗?',
'pages.devops.jobinfo.ck.recovery.success' :'恢复作业成功',
'pages.devops.jobinfo.ck.recovery.failed' :'恢复作业失败',
'pages.devops.jobinfo.lineage' :'血缘分析',
'pages.devops.jobinfo.version.id' :'作业ID',
'pages.devops.jobinfo.version.name' :'作业名称',
'pages.devops.jobinfo.version.alias' :'作业别名',
'pages.devops.jobinfo.version.dialect' :'作业方言',
'pages.devops.jobinfo.version.type' :'作业类型',
'pages.devops.jobinfo.version.versionId' :'版本号',
'pages.devops.jobinfo.version.sql' :'作业内容',
'pages.devops.jobinfo.version.sql.showdetail' :'查看作业详情',
'pages.devops.jobinfo.version.sql.title' :'作业执行 SQL',
'pages.devops.jobinfo.version.diff' :'版本对比',
'pages.devops.jobinfo.overview':'作业总览',
'pages.devops.jobinfo.cluster':'集群信息',
'pages.devops.jobinfo.snapshot':'作业快照',
'pages.devops.jobinfo.exception':'异常信息',
'pages.devops.jobinfo.log':'作业日志',
'pages.devops.jobinfo.optimize':'自动调优',
'pages.devops.jobinfo.config':'配置信息',
'pages.devops.jobinfo.flinksql':'FlinkSQL',
'pages.devops.jobinfo.datamap':'数据地图',
'pages.devops.jobinfo.olap':'即席查询',
'pages.devops.jobinfo.version':'历史版本',
'pages.devops.jobinfo.alert':'告警记录',
'pages.devops.jobinfo.savepoint.trigger':'SavePoint 触发',
'pages.devops.jobinfo.savepoint.stop':'SavePoint 暂停',
'pages.devops.jobinfo.savepoint.cancel':'SavePoint 停止',
'pages.devops.jobinfo.savepoint.canceljob':'普通停止',
'pages.devops.jobinfo.localenv':'本地环境',
'pages.devops.jobinfo.offline':'下线',
'pages.devops.jobinfo.smart_stop':'智能停止',
'pages.devops.jobinfo.reonline':'重新上线',
'pages.devops.jobinfo.reonlineJob':'重新上线任务',
'pages.devops.jobinfo.reonlineJobConfirm':'确定重新上线该作业吗?',
'pages.devops.jobinfo.reonline.success':'重新上线成功',
'pages.devops.jobinfo.reonline.failed':'重新上线失败',
'pages.devops.jobinfo.restart':'重新启动',
'pages.devops.jobinfo.stopJob':'停止任务',
'pages.devops.jobinfo.stopJobConfirm':'确定只停止该作业,不进行 SavePoint 操作吗?',
'pages.devops.jobinfo.canceljob.success':'普通停止成功',
'pages.devops.jobinfo.canceljob.failed':'普通停止失败',
'pages.devops.jobinfo.job.key':'{key} 任务',
'pages.devops.jobinfo.job.key.success':'{key} 成功',
'pages.devops.jobinfo.job.key.failed':'{key} 失败',
'pages.devops.jobinfo.job.keyConfirm':'确定{key} 该作业吗?',
'pages.devops.baseinfo.name': '名称',
'pages.devops.baseinfo.status': '状态',
'pages.devops.baseinfo.readbytes': '接收字节',
'pages.devops.baseinfo.readrecords': '接收记录',
'pages.devops.baseinfo.writebytes': '发送字节',
'pages.devops.baseinfo.writerecords': '发送记录',
'pages.devops.baseinfo.parallelism': '并行度',
'pages.devops.baseinfo.tasks': '算子',
'pages.devops.baseinfo.restart_number': '重启次数',
}; };
...@@ -35,4 +35,12 @@ export default { ...@@ -35,4 +35,12 @@ export default {
'app.request.502': '网关错误。', 'app.request.502': '网关错误。',
'app.request.503': '服务不可用,服务器暂时过载或维护。', 'app.request.503': '服务不可用,服务器暂时过载或维护。',
'app.request.504': '网关超时。', 'app.request.504': '网关超时。',
'app.request.failed': '请求失败,请重试',
'app.request.test.connection': '正在测试连接',
'app.request.heartbeat.connection': '正在检测心跳',
'app.request.heartbeat.connection.success': '数据源心跳正常,检测时间为: {time}',
'app.request.heartbeat.connection.failed': '数据源心跳异常,检测时间为: {time}',
'app.request.upload.failed': '上传失败。',
'app.request.update.setting.success': '修改配置成功!',
}; };
...@@ -56,7 +56,7 @@ const TaskAPI = (props: any) => { ...@@ -56,7 +56,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
异步提交 {l('pages.task.api.job.async')}
</span> </span>
} }
key="submitTask" key="submitTask"
...@@ -67,7 +67,7 @@ const TaskAPI = (props: any) => { ...@@ -67,7 +67,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
停止作业 {l('pages.task.api.job.stop')}
</span> </span>
} }
key="cancelJob" key="cancelJob"
...@@ -82,7 +82,7 @@ const TaskAPI = (props: any) => { ...@@ -82,7 +82,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
重启作业 {l('pages.task.api.job.restart')}
</span> </span>
} }
key="restartTask" key="restartTask"
...@@ -93,7 +93,7 @@ const TaskAPI = (props: any) => { ...@@ -93,7 +93,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
作业实例 {l('pages.task.api.job.instance')}
</span> </span>
} }
key="taskInstance" key="taskInstance"
...@@ -105,7 +105,7 @@ const TaskAPI = (props: any) => { ...@@ -105,7 +105,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
SavePoint 触发 {l('pages.task.api.savepoint.trigger')}
</span> </span>
} }
key="triggerSavePoint" key="triggerSavePoint"
...@@ -120,7 +120,7 @@ const TaskAPI = (props: any) => { ...@@ -120,7 +120,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
SavePoint 停止 {l('pages.task.api.savepoint.stop')}
</span> </span>
} }
key="cancelSavePoint" key="cancelSavePoint"
...@@ -135,7 +135,7 @@ const TaskAPI = (props: any) => { ...@@ -135,7 +135,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
上线作业 {l('pages.task.api.job.online')}
</span> </span>
} }
key="onLineTask" key="onLineTask"
...@@ -146,7 +146,7 @@ const TaskAPI = (props: any) => { ...@@ -146,7 +146,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
下线作业 {l('pages.task.api.job.offline')}
</span> </span>
} }
key="offLineTask" key="offLineTask"
...@@ -157,7 +157,7 @@ const TaskAPI = (props: any) => { ...@@ -157,7 +157,7 @@ const TaskAPI = (props: any) => {
<TabPane <TabPane
tab={ tab={
<span> <span>
重新上线作业 {l('pages.task.api.job.reonline')}
</span> </span>
} }
key="reOnLineTask" key="reOnLineTask"
......
...@@ -123,7 +123,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props ...@@ -123,7 +123,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
message.warn(info.file.response.msg); message.warn(info.file.response.msg);
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`); message.error(`${info.file.name}`+ l('app.request.upload.failed'));
} }
}, },
} }
...@@ -149,7 +149,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props ...@@ -149,7 +149,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
message.warn(info.file.response.msg); message.warn(info.file.response.msg);
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`); message.error(`${info.file.name}`+ l('app.request.upload.failed'));
} }
}, },
} }
......
...@@ -21,15 +21,16 @@ ...@@ -21,15 +21,16 @@
import {postAll} from "@/components/Common/crud"; import {postAll} from "@/components/Common/crud";
import {message} from "antd"; import {message} from "antd";
import {ClusterConfigurationTableListItem} from "@/pages/ClusterConfiguration/data"; import {ClusterConfigurationTableListItem} from "@/pages/ClusterConfiguration/data";
import {useIntl} from "umi";
export async function testClusterConfigurationConnect(clusterConfiguration: ClusterConfigurationTableListItem) { export async function testClusterConfigurationConnect(clusterConfiguration: ClusterConfigurationTableListItem) {
const hide = message.loading('正在测试连接'); const hide = message.loading(useIntl().formatMessage({id:'app.request.test.connection'}));
try { try {
const {code,msg} = await postAll('/api/clusterConfiguration/testConnect',clusterConfiguration); const {code,msg} = await postAll('/api/clusterConfiguration/testConnect',clusterConfiguration);
hide(); hide();
code==0?message.success(msg):message.error(msg); code==0?message.success(msg):message.error(msg);
} catch (error) { } catch (error) {7
hide(); hide();
message.error('请求失败,请重试'); message.error(useIntl().formatMessage({id:'app.request.failed'}));
} }
} }
...@@ -21,31 +21,35 @@ ...@@ -21,31 +21,35 @@
import {getInfoById, handleAddOrUpdate, postAll} from "@/components/Common/crud"; import {getInfoById, handleAddOrUpdate, postAll} from "@/components/Common/crud";
import {DataBaseItem} from "@/pages/DataBase/data"; import {DataBaseItem} from "@/pages/DataBase/data";
import {message} from "antd"; import {message} from "antd";
import {useIntl} from "umi";
export async function createOrModifyDatabase(databse: DataBaseItem) { export async function createOrModifyDatabase(databse: DataBaseItem) {
return handleAddOrUpdate('/api/database', databse); return handleAddOrUpdate('/api/database', databse);
} }
export async function testDatabaseConnect(databse: DataBaseItem) { export async function testDatabaseConnect(databse: DataBaseItem) {
const hide = message.loading('正在测试连接'); const hide = message.loading(useIntl().formatMessage({id:'app.request.test.connection'}));
try { try {
const {code,msg} = await postAll('/api/database/testConnect',databse); const {code,msg} = await postAll('/api/database/testConnect',databse);
hide(); hide();
code==0?message.success(msg):message.error(msg); code==0?message.success(msg):message.error(msg);
} catch (error) { } catch (error) {
hide(); hide();
message.error('请求失败,请重试'); message.error(useIntl().formatMessage({id:'app.request.failed'}));
} }
} }
export async function checkHeartBeat(id: number) { export async function checkHeartBeat(id: number) {
const hide = message.loading('正在检测心跳'); const hide = message.loading(useIntl().formatMessage({id:'app.request.heartbeat.connection'}));
try { try {
const {datas} = await getInfoById('/api/database/checkHeartBeatById',id); const {datas} = await getInfoById('/api/database/checkHeartBeatById',id);
hide(); hide();
datas.status==1?message.success("数据源心跳正常,检测时间为"+datas.heartbeatTime):message.error("数据源心跳异常,检测时间为"+datas.heartbeatTime); datas.status==1?message.success(
useIntl().formatMessage({id:'app.request.heartbeat.connection.success'},{time :datas.heartbeatTime }))
:
message.error(useIntl().formatMessage({id:'app.request.heartbeat.connection.failed'},{time :datas.heartbeatTime }));
} catch (error) { } catch (error) {
hide(); hide();
message.error('请求失败,请重试'); message.error(useIntl().formatMessage({id:'app.request.failed'}));
} }
} }
...@@ -44,36 +44,36 @@ const Alert = (props: any) => { ...@@ -44,36 +44,36 @@ const Alert = (props: any) => {
const columns: ProColumns<AlertHistoryTableListItem>[] = [ const columns: ProColumns<AlertHistoryTableListItem>[] = [
{ {
title: '标题', title: l('pages.devops.jobinfo.alert.title'),
dataIndex: 'title', dataIndex: 'title',
render: (dom, entity) => { render: (dom, entity) => {
return <Text style={{width: 200}} ellipsis={{tooltip: entity.title}}>{entity.title}</Text>; return <Text style={{width: 200}} ellipsis={{tooltip: entity.title}}>{entity.title}</Text>;
}, },
}, },
{ {
title: '正文', title: l('pages.devops.jobinfo.alert.content'),
dataIndex: 'content', dataIndex: 'content',
render: (dom, entity) => { render: (dom, entity) => {
return <Text style={{width: 500}} ellipsis={{tooltip: entity.content}}>{entity.content}</Text>; return <Text style={{width: 500}} ellipsis={{tooltip: entity.content}}>{entity.content}</Text>;
}, },
}, },
{ {
title: '状态', title: l('pages.devops.jobinfo.alert.status'),
dataIndex: 'status', dataIndex: 'status',
sorter: true, sorter: true,
render: (dom, entity) => { render: (dom, entity) => {
return entity.status === 1 ? <Text type="success">成功</Text> : <Text type="danger">失败</Text>; return entity.status === 1 ? <Text type="success">{l('pages.devops.jobinfo.alert.status.success')}</Text> : <Text type="danger">{l('pages.devops.jobinfo.alert.status.failed')}</Text>;
}, },
}, },
{ {
title: '日志', title: l('pages.devops.jobinfo.alert.log'),
dataIndex: 'log', dataIndex: 'log',
render: (dom, entity) => { render: (dom, entity) => {
return <Text style={{width: 500}} ellipsis={{tooltip: entity.log}}>{entity.log}</Text>; return <Text style={{width: 500}} ellipsis={{tooltip: entity.log}}>{entity.log}</Text>;
}, },
}, },
{ {
title: '报警时间', title: l('pages.devops.jobinfo.alert.createTime'),
dataIndex: 'createTime', dataIndex: 'createTime',
valueType: 'dateTime', valueType: 'dateTime',
}, },
......
...@@ -38,14 +38,14 @@ const BaseInfo = (props: any) => { ...@@ -38,14 +38,14 @@ const BaseInfo = (props: any) => {
const columns: ProColumns<VerticesTableListItem>[] = [ const columns: ProColumns<VerticesTableListItem>[] = [
{ {
title: '名称', title: l('pages.devops.baseinfo.name'),
dataIndex: 'name', dataIndex: 'name',
render: (dom, entity) => { render: (dom, entity) => {
return <Text style={{width: 500}} ellipsis={{tooltip: entity.name}}>{entity.name}</Text>; return <Text style={{width: 500}} ellipsis={{tooltip: entity.name}}>{entity.name}</Text>;
}, },
}, },
{ {
title: '状态', title: l('pages.devops.baseinfo.status'),
dataIndex: 'status', dataIndex: 'status',
sorter: true, sorter: true,
render: (dom, entity) => { render: (dom, entity) => {
...@@ -53,52 +53,52 @@ const BaseInfo = (props: any) => { ...@@ -53,52 +53,52 @@ const BaseInfo = (props: any) => {
}, },
}, },
{ {
title: '接收字节', title: l('pages.devops.baseinfo.readbytes'),
render: (dom, entity) => { render: (dom, entity) => {
return parseByteStr(entity.metrics['read-bytes']); return parseByteStr(entity.metrics['read-bytes']);
}, },
}, },
{ {
title: '接收记录', title: l('pages.devops.baseinfo.readrecords'),
render: (dom, entity) => { render: (dom, entity) => {
return parseNumStr(entity.metrics['read-records']); return parseNumStr(entity.metrics['read-records']);
}, },
}, },
{ {
title: '发送字节', title: l('pages.devops.baseinfo.writebytes'),
render: (dom, entity) => { render: (dom, entity) => {
return parseByteStr(entity.metrics['write-bytes']); return parseByteStr(entity.metrics['write-bytes']);
}, },
}, },
{ {
title: '发送记录', title: l('pages.devops.baseinfo.writerecords'),
render: (dom, entity) => { render: (dom, entity) => {
return parseNumStr(entity.metrics['write-records']); return parseNumStr(entity.metrics['write-records']);
}, },
}, },
{ {
title: '并行度', title: l('pages.devops.baseinfo.parallelism'),
sorter: true, sorter: true,
dataIndex: 'parallelism', dataIndex: 'parallelism',
}, },
{ {
title: '开始时间', title: l('global.table.startTime'),
dataIndex: 'start-time', dataIndex: 'start-time',
valueType: 'dateTime', valueType: 'dateTime',
}, },
{ {
title: '耗时', title: l('global.table.useTime'),
render: (dom, entity) => { render: (dom, entity) => {
return parseMilliSecondStr(entity.duration); return parseMilliSecondStr(entity.duration);
}, },
}, },
{ {
title: '结束时间', title: l('global.table.endTime'),
dataIndex: 'end-time', dataIndex: 'end-time',
valueType: 'dateTime', valueType: 'dateTime',
}, },
{ {
title: '算子', title: l('pages.devops.baseinfo.tasks'),
render: (dom, entity) => { render: (dom, entity) => {
return <StatusCounts statusCounts={entity.tasks}/>; return <StatusCounts statusCounts={entity.tasks}/>;
}, },
...@@ -107,15 +107,15 @@ const BaseInfo = (props: any) => { ...@@ -107,15 +107,15 @@ const BaseInfo = (props: any) => {
return (<> return (<>
<Descriptions bordered size="small"> <Descriptions bordered size="small">
<Descriptions.Item label="作业状态"> <Descriptions.Item label={l('pages.devops.jobinfo.overview')}>
{job?.jobHistory?.job ? <StatusCounts statusCounts={job?.jobHistory?.job['status-counts']}/> : undefined} {job?.jobHistory?.job ? <StatusCounts statusCounts={job?.jobHistory?.job['status-counts']}/> : undefined}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item <Descriptions.Item
label="重启次数">{job?.instance?.failedRestartCount ? job?.instance?.failedRestartCount : 0}</Descriptions.Item> label={l('pages.devops.baseinfo.restart_number')}>{job?.instance?.failedRestartCount ? job?.instance?.failedRestartCount : 0}</Descriptions.Item>
<Descriptions.Item label="耗时">{parseSecondStr(job?.instance?.duration)}</Descriptions.Item> <Descriptions.Item label={l('global.table.useTime')}>{parseSecondStr(job?.instance?.duration)}</Descriptions.Item>
<Descriptions.Item label="启动时间">{job?.instance?.createTime}</Descriptions.Item> <Descriptions.Item label={l('global.table.startUpTime')}>{job?.instance?.createTime}</Descriptions.Item>
<Descriptions.Item label="更新时间">{job?.instance?.updateTime}</Descriptions.Item> <Descriptions.Item label={l('global.table.updateTime')}>{job?.instance?.updateTime}</Descriptions.Item>
<Descriptions.Item label="完成时间">{job?.instance?.finishTime}</Descriptions.Item> <Descriptions.Item label={l('global.table.finishTime')}>{job?.instance?.finishTime}</Descriptions.Item>
</Descriptions> </Descriptions>
{job?.jobHistory?.job ? {job?.jobHistory?.job ?
<ProTable <ProTable
......
...@@ -211,18 +211,18 @@ const CheckPoints = (props: any) => { ...@@ -211,18 +211,18 @@ const CheckPoints = (props: any) => {
function recoveryCheckPoint(row: CheckPointsDetailInfo) { function recoveryCheckPoint(row: CheckPointsDetailInfo) {
Modal.confirm({ Modal.confirm({
title: 'Recovery Of CheckPoint', title: l('pages.devops.jobinfo.ck.recovery'),
content: `确定从 CheckPoint 【${row.external_path}】恢复吗?`, content: l('pages.devops.jobinfo.ck.recoveryConfirm','',{path :row.external_path}),
okText: l('button.confirm'), okText: l('button.confirm'),
cancelText: l('button.cancel'), cancelText: l('button.cancel'),
onOk: async () => { onOk: async () => {
const res = selectSavePointRestartTask(job?.instance?.taskId, job?.instance?.step == JOB_LIFE_CYCLE.ONLINE, row.external_path); const res = selectSavePointRestartTask(job?.instance?.taskId, job?.instance?.step == JOB_LIFE_CYCLE.ONLINE, row.external_path);
res.then((result) => { res.then((result) => {
if (result.code == CODE.SUCCESS) { if (result.code == CODE.SUCCESS) {
message.success("恢复作业成功"); message.success(l('pages.devops.jobinfo.ck.recovery.success'));
history.goBack(); history.goBack();
} else { } else {
message.error("恢复作业失败"); message.error(l('pages.devops.jobinfo.ck.recovery.failed'));
} }
}); });
} }
...@@ -250,12 +250,12 @@ const CheckPoints = (props: any) => { ...@@ -250,12 +250,12 @@ const CheckPoints = (props: any) => {
const columns: ProColumns<CheckPointsDetailInfo>[] = [ const columns: ProColumns<CheckPointsDetailInfo>[] = [
{ {
title: 'ID', title: l('pages.devops.jobinfo.ck.id'),
align: 'center', align: 'center',
dataIndex: 'id', dataIndex: 'id',
}, },
{ {
title: '状态', title: l('pages.devops.jobinfo.ck.status'),
align: 'center', align: 'center',
copyable: true, copyable: true,
render: (dom, entity) => { render: (dom, entity) => {
...@@ -272,7 +272,7 @@ const CheckPoints = (props: any) => { ...@@ -272,7 +272,7 @@ const CheckPoints = (props: any) => {
}, },
}, },
{ {
title: '耗时', title: l('pages.devops.jobinfo.ck.duration'),
align: 'center', align: 'center',
copyable: true, copyable: true,
render: (dom, entity) => { render: (dom, entity) => {
...@@ -280,31 +280,31 @@ const CheckPoints = (props: any) => { ...@@ -280,31 +280,31 @@ const CheckPoints = (props: any) => {
}, },
}, },
{ {
title: '类型', title: l('pages.devops.jobinfo.ck.checkpoint_type'),
align: 'center', align: 'center',
dataIndex: 'checkpoint_type', dataIndex: 'checkpoint_type',
}, },
{ {
title: '存储位置', title: l('pages.devops.jobinfo.ck.external_path'),
align: 'center', align: 'center',
copyable: true, copyable: true,
dataIndex: 'external_path', dataIndex: 'external_path',
}, },
{ {
title: '最后响应时间', title: l('pages.devops.jobinfo.ck.latest_ack_timestamp'),
align: 'center', align: 'center',
dataIndex: 'latest_ack_timestamp', dataIndex: 'latest_ack_timestamp',
valueType: 'dateTime', valueType: 'dateTime',
}, },
{ {
title: '状态大小', title: l('pages.devops.jobinfo.ck.state_size'),
align: 'center', align: 'center',
render: (dom, entity) => { render: (dom, entity) => {
return entity.state_size === null ? 'None' : parseByteStr(entity.state_size); return entity.state_size === null ? 'None' : parseByteStr(entity.state_size);
}, },
}, },
{ {
title: '触发时间', title: l('pages.devops.jobinfo.ck.trigger_timestamp'),
align: 'center', align: 'center',
valueType: 'dateTime', valueType: 'dateTime',
dataIndex: 'trigger_timestamp', dataIndex: 'trigger_timestamp',
...@@ -433,35 +433,35 @@ const CheckPoints = (props: any) => { ...@@ -433,35 +433,35 @@ const CheckPoints = (props: any) => {
const columns: ProColumns<SavePointTableListItem>[] = [ const columns: ProColumns<SavePointTableListItem>[] = [
{ {
title: 'ID', title: l('pages.devops.jobinfo.ck.id'),
align: 'center', align: 'center',
dataIndex: 'id', dataIndex: 'id',
hideInTable: true, hideInTable: true,
}, },
{ {
title: '任务ID', title: l('pages.devops.jobinfo.ck.taskid'),
align: 'center', align: 'center',
dataIndex: 'taskId', dataIndex: 'taskId',
hideInTable: true, hideInTable: true,
}, },
{ {
title: '名称', title: l('pages.devops.jobinfo.ck.name'),
align: 'center', align: 'center',
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '类型', title: l('pages.devops.jobinfo.ck.checkpoint_type'),
align: 'center', align: 'center',
dataIndex: 'type', dataIndex: 'type',
}, },
{ {
title: '存储位置', title: l('pages.devops.jobinfo.ck.external_path'),
align: 'center', align: 'center',
copyable: true, copyable: true,
dataIndex: 'path', dataIndex: 'path',
}, },
{ {
title: '触发时间', title: l('pages.devops.jobinfo.ck.trigger_timestamp'),
align: 'center', align: 'center',
valueType: 'dateTime', valueType: 'dateTime',
dataIndex: 'createTime', dataIndex: 'createTime',
......
...@@ -50,7 +50,7 @@ const Config = (props: any) => { ...@@ -50,7 +50,7 @@ const Config = (props: any) => {
{job?.clusterConfiguration?.alias ? <Link>{job?.clusterConfiguration?.alias}</Link> : '-'} {job?.clusterConfiguration?.alias ? <Link>{job?.clusterConfiguration?.alias}</Link> : '-'}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="共享会话"> <Descriptions.Item label="共享会话">
{job?.history?.session ? <Link>{job?.history?.session}</Link> : '禁用'} {job?.history?.session ? <Link>{job?.history?.session}</Link> : l('button.disable')}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="片段机制">{job?.history?.config.useSqlFragment ? l('button.enable') : l('button.disable')}</Descriptions.Item> <Descriptions.Item label="片段机制">{job?.history?.config.useSqlFragment ? l('button.enable') : l('button.disable')}</Descriptions.Item>
<Descriptions.Item label="语句集">{job?.history?.config.useStatementSet ? l('button.enable') : l('button.disable')}</Descriptions.Item> <Descriptions.Item label="语句集">{job?.history?.config.useStatementSet ? l('button.enable') : l('button.disable')}</Descriptions.Item>
...@@ -58,10 +58,10 @@ const Config = (props: any) => { ...@@ -58,10 +58,10 @@ const Config = (props: any) => {
<Descriptions.Item label="批模式">{job?.history?.config.useBatchModel ? l('button.enable') : l('button.disable')}</Descriptions.Item> <Descriptions.Item label="批模式">{job?.history?.config.useBatchModel ? l('button.enable') : l('button.disable')}</Descriptions.Item>
<Descriptions.Item label="CheckPoint">{job?.history?.config.checkpoint}</Descriptions.Item> <Descriptions.Item label="CheckPoint">{job?.history?.config.checkpoint}</Descriptions.Item>
<Descriptions.Item label="SavePoint机制"> <Descriptions.Item label="SavePoint机制">
{job?.history?.config.savePointStrategy == 'NONE' ? '禁用' : {job?.history?.config.savePointStrategy == 'NONE' ? l('global.savepoint.strategy.disabled') :
job?.history?.config.savePointStrategy == 'LATEST' ? '最近一次' : job?.history?.config.savePointStrategy == 'LATEST' ? l('global.savepoint.strategy.latest') :
job?.history?.config.savePointStrategy == 'EARLIEST' ? '最早一次' : job?.history?.config.savePointStrategy == 'EARLIEST' ? l('global.savepoint.strategy.earliest') :
job?.history?.config.savePointStrategy == 'CUSTOM' ? '指定一次' : '禁用'} job?.history?.config.savePointStrategy == 'CUSTOM' ? l('global.savepoint.strategy.custom') : l('global.savepoint.strategy.disabled')}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="SavePoint" span={2}>{job?.history?.config.savePointPath}</Descriptions.Item> <Descriptions.Item label="SavePoint" span={2}>{job?.history?.config.savePointPath}</Descriptions.Item>
{job?.jar ? <> {job?.jar ? <>
......
...@@ -56,7 +56,7 @@ const DataMap = (props: any) => { ...@@ -56,7 +56,7 @@ const DataMap = (props: any) => {
<Tabs defaultActiveKey="Lineage" size="small" tabPosition="top" style={{ <Tabs defaultActiveKey="Lineage" size="small" tabPosition="top" style={{
border: "1px solid #f0f0f0" border: "1px solid #f0f0f0"
}}> }}>
<TabPane tab={<span>血缘分析</span>} key="Lineage"> <TabPane tab={<span>{l('pages.devops.jobinfo.lineage')}</span>} key="Lineage">
{data ? <Lineage datas={data}/> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>} {data ? <Lineage datas={data}/> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>}
</TabPane> </TabPane>
</Tabs> </Tabs>
......
...@@ -41,7 +41,7 @@ const Exception = (props: any) => { ...@@ -41,7 +41,7 @@ const Exception = (props: any) => {
<CodeShow code={job.jobHistory?.exceptions['root-exception'] as string} language='java' height='500px'/> <CodeShow code={job.jobHistory?.exceptions['root-exception'] as string} language='java' height='500px'/>
</TabPane> </TabPane>
<TabPane tab={<span>Exception History</span>} key="ExceptionHistory"> <TabPane tab={<span>Exception History</span>} key="ExceptionHistory">
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={l('global.stay.tuned')}/>
</TabPane> </TabPane>
</Tabs>} </Tabs>}
</>) </>)
......
...@@ -49,7 +49,7 @@ const VersionList = (props: any) => { ...@@ -49,7 +49,7 @@ const VersionList = (props: any) => {
const handleShowStatement = (item: any) => { const handleShowStatement = (item: any) => {
return ( return (
<div style={{width: "1100px"}}> <div style={{width: "1100px"}}>
<Modal title="作业执行 SQL" visible={modalVisible} destroyOnClose={true} width={"60%"} <Modal title={l('pages.devops.jobinfo.version.sql.title')} visible={modalVisible} destroyOnClose={true} width={"60%"}
onCancel={() => { onCancel={() => {
cancelHandle(); cancelHandle();
}} }}
...@@ -70,25 +70,25 @@ const VersionList = (props: any) => { ...@@ -70,25 +70,25 @@ const VersionList = (props: any) => {
const columns: ProColumns<TaskVersion>[] = [ const columns: ProColumns<TaskVersion>[] = [
{ {
title: '作业ID', title: l('pages.devops.jobinfo.version.id'),
align: 'center', align: 'center',
dataIndex: 'taskId', dataIndex: 'taskId',
hideInSearch: true, hideInSearch: true,
}, },
{ {
title: '作业名称', title: l('pages.devops.jobinfo.version.name'),
align: 'center', align: 'center',
sorter: true, sorter: true,
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '作业别名', title: l('pages.devops.jobinfo.version.alias'),
align: 'center', align: 'center',
sorter: true, sorter: true,
dataIndex: 'alias', dataIndex: 'alias',
}, },
{ {
title: '作业方言', title: l('pages.devops.jobinfo.version.dialect'),
align: 'center', align: 'center',
render: (dom, entity) => { render: (dom, entity) => {
return <> return <>
...@@ -102,7 +102,7 @@ const VersionList = (props: any) => { ...@@ -102,7 +102,7 @@ const VersionList = (props: any) => {
}, },
}, },
{ {
title: '作业类型', title: l('pages.devops.jobinfo.version.type'),
align: 'center', align: 'center',
render: (dom, entity) => { render: (dom, entity) => {
return <> return <>
...@@ -115,13 +115,13 @@ const VersionList = (props: any) => { ...@@ -115,13 +115,13 @@ const VersionList = (props: any) => {
}, },
}, },
{ {
title: '版本号', title: l('pages.devops.jobinfo.version.versionId'),
align: 'center', align: 'center',
sorter: true, sorter: true,
dataIndex: 'versionId', dataIndex: 'versionId',
}, },
{ {
title: '作业内容', title: l('pages.devops.jobinfo.version.sql'),
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
hideInSearch: true, hideInSearch: true,
...@@ -133,8 +133,8 @@ const VersionList = (props: any) => { ...@@ -133,8 +133,8 @@ const VersionList = (props: any) => {
setModalVisible(true); setModalVisible(true);
}}> }}>
<Tag color="green"> <Tag color="green">
<FullscreenOutlined title={"查看作业详情"}/> <FullscreenOutlined title={l('pages.devops.jobinfo.version.sql.showdetail')}/>
</Tag> 查看作业详情 </Tag> {l('pages.devops.jobinfo.version.sql.showdetail')}
</a> </a>
</> </>
...@@ -160,7 +160,7 @@ const VersionList = (props: any) => { ...@@ -160,7 +160,7 @@ const VersionList = (props: any) => {
// setRow(entity) // setRow(entity)
// setModalVisible(true); // setModalVisible(true);
// }}> // }}>
// 版本对比 // {l('pages.devops.jobinfo.version.diff')}
// </Button> // </Button>
// </> // </>
// } // }
......
...@@ -88,8 +88,8 @@ const JobInfo = (props: any) => { ...@@ -88,8 +88,8 @@ const JobInfo = (props: any) => {
const handleSavepoint = (key: string) => { const handleSavepoint = (key: string) => {
if (key == 'canceljob') { if (key == 'canceljob') {
Modal.confirm({ Modal.confirm({
title: '停止任务', title: l('pages.devops.jobinfo.stopJob'),
content: `确定只停止该作业,不进行 SavePoint 操作吗?`, content: l('pages.devops.jobinfo.stopJobConfirm'),
okText: l('button.confirm'), okText: l('button.confirm'),
cancelText: l('button.cancel'), cancelText: l('button.cancel'),
onOk: async () => { onOk: async () => {
...@@ -97,10 +97,10 @@ const JobInfo = (props: any) => { ...@@ -97,10 +97,10 @@ const JobInfo = (props: any) => {
const res = cancelJob(job?.cluster?.id, job?.instance?.jid); const res = cancelJob(job?.cluster?.id, job?.instance?.jid);
res.then((result) => { res.then((result) => {
if (result.code == CODE.SUCCESS) { if (result.code == CODE.SUCCESS) {
message.success(key + "成功"); message.success(l('pages.devops.jobinfo.canceljob.success'));
handleGetJobInfoDetail(); handleGetJobInfoDetail();
} else { } else {
message.error(key + "失败"); message.error(l('pages.devops.jobinfo.canceljob.failed'));
} }
}); });
} }
...@@ -108,8 +108,8 @@ const JobInfo = (props: any) => { ...@@ -108,8 +108,8 @@ const JobInfo = (props: any) => {
return; return;
} }
Modal.confirm({ Modal.confirm({
title: key + '任务', title: l('pages.devops.jobinfo.job.key','',{key:key}),
content: `确定${key}该作业吗?`, content: l('pages.devops.jobinfo.job.keyConfirm','',{key:key}),
okText: l('button.confirm'), okText: l('button.confirm'),
cancelText: l('button.cancel'), cancelText: l('button.cancel'),
onOk: async () => { onOk: async () => {
...@@ -117,10 +117,10 @@ const JobInfo = (props: any) => { ...@@ -117,10 +117,10 @@ const JobInfo = (props: any) => {
const res = offLineTask(job?.instance?.taskId, key); const res = offLineTask(job?.instance?.taskId, key);
res.then((result) => { res.then((result) => {
if (result.code == CODE.SUCCESS) { if (result.code == CODE.SUCCESS) {
message.success(key + "成功"); message.success(l('pages.devops.jobinfo.job.key.success','',{key: key}));
handleGetJobInfoDetail(); handleGetJobInfoDetail();
} else { } else {
message.error(key + "失败"); message.error(l('pages.devops.jobinfo.job.key.failed','',{key: key}));
} }
}); });
} }
...@@ -129,8 +129,8 @@ const JobInfo = (props: any) => { ...@@ -129,8 +129,8 @@ const JobInfo = (props: any) => {
const handleRestart = () => { const handleRestart = () => {
Modal.confirm({ Modal.confirm({
title: '重新上线任务', title: l('pages.devops.jobinfo.reonlineJob'),
content: `确定重新上线该作业吗?`, content: l('pages.devops.jobinfo.reonlineJobConfirm'),
okText: l('button.confirm'), okText: l('button.confirm'),
cancelText: l('button.cancel'), cancelText: l('button.cancel'),
onOk: async () => { onOk: async () => {
...@@ -138,9 +138,9 @@ const JobInfo = (props: any) => { ...@@ -138,9 +138,9 @@ const JobInfo = (props: any) => {
const res = restartJob(job?.instance?.taskId, job?.instance?.step == JOB_LIFE_CYCLE.ONLINE); const res = restartJob(job?.instance?.taskId, job?.instance?.step == JOB_LIFE_CYCLE.ONLINE);
res.then((result) => { res.then((result) => {
if (result.code == CODE.SUCCESS) { if (result.code == CODE.SUCCESS) {
message.success("重新上线成功"); message.success(l('pages.devops.jobinfo.reonline.success'));
} else { } else {
message.error("重新上线失败"); message.error(l('pages.devops.jobinfo.reonline.failed'));
} }
}); });
} }
...@@ -157,20 +157,20 @@ const JobInfo = (props: any) => { ...@@ -157,20 +157,20 @@ const JobInfo = (props: any) => {
FlinkWebUI FlinkWebUI
</Link></Button>); </Link></Button>);
buttons.push(<Button key="autorestart" type="primary" buttons.push(<Button key="autorestart" type="primary"
onClick={handleRestart}>重新{job?.instance?.step == 5 ? '上线' : '启动'}</Button>); onClick={handleRestart}>{job?.instance?.step == 5 ? l('pages.devops.jobinfo.reonline') : l('pages.devops.jobinfo.restart')}</Button>);
if (!isStatusDone(job?.instance?.status as string)) { if (!isStatusDone(job?.instance?.status as string)) {
buttons.push(<Button key="autostop" type="primary" danger onClick={() => { buttons.push(<Button key="autostop" type="primary" danger onClick={() => {
handleSavepoint('cancel') handleSavepoint('cancel')
}}>{job?.instance?.step == 5 ? '下线' : '智能停止'}</Button>); }}>{job?.instance?.step == 5 ? l('pages.devops.jobinfo.offline') : l('pages.devops.jobinfo.smart_stop')}</Button>);
buttons.push(<Dropdown buttons.push(<Dropdown
key="dropdown" key="dropdown"
trigger={['click']} trigger={['click']}
overlay={ overlay={
<Menu onClick={({key}) => handleSavepoint(key)}> <Menu onClick={({key}) => handleSavepoint(key)}>
<Menu.Item key="trigger">SavePoint触发</Menu.Item> <Menu.Item key="trigger">{l('pages.devops.jobinfo.savepoint.trigger')}</Menu.Item>
<Menu.Item key="stop">SavePoint暂停</Menu.Item> <Menu.Item key="stop">{l('pages.devops.jobinfo.savepoint.stop')}</Menu.Item>
<Menu.Item key="cancel">SavePoint停止</Menu.Item> <Menu.Item key="cancel">{l('pages.devops.jobinfo.savepoint.cancel')}</Menu.Item>
<Menu.Item key="canceljob">普通停止</Menu.Item> <Menu.Item key="canceljob">{l('pages.devops.jobinfo.savepoint.canceljob')}</Menu.Item>
</Menu> </Menu>
} }
> >
...@@ -207,69 +207,69 @@ const JobInfo = (props: any) => { ...@@ -207,69 +207,69 @@ const JobInfo = (props: any) => {
<ClusterOutlined/> {job?.cluster?.alias} <ClusterOutlined/> {job?.cluster?.alias}
</Tag> </Tag>
) : (<Tag color="green" key='local'> ) : (<Tag color="green" key='local'>
<ClusterOutlined/> 本地环境 <ClusterOutlined/> {l('pages.devops.jobinfo.localenv')}
</Tag>)} </Tag>)}
</Space> </Space>
</>} </>}
tabBarExtraContent={`上次更新时间:${moment(time).format('HH:mm:ss')}`} tabBarExtraContent={l('pages.devops.LastUpdateTime') +`:${moment(time).format('HH:mm:ss')}`}
tabList={[ tabList={[
{ {
tab: '作业总览', tab: l('pages.devops.jobinfo.overview'),
key: 'base', key: 'base',
closable: false, closable: false,
}, },
{ {
tab: '集群信息', tab: l('pages.devops.jobinfo.cluster'),
key: 'cluster', key: 'cluster',
closable: false, closable: false,
}, },
{ {
tab: '作业快照', tab: l('pages.devops.jobinfo.snapshot'),
key: 'snapshot', key: 'snapshot',
closable: false, closable: false,
}, },
{ {
tab: '异常信息', tab: l('pages.devops.jobinfo.exception'),
key: 'exception', key: 'exception',
closable: false, closable: false,
}, },
{ {
tab: '作业日志', tab: l('pages.devops.jobinfo.log'),
key: 'log', key: 'log',
closable: false, closable: false,
}, },
{ {
tab: '自动调优', tab: l('pages.devops.jobinfo.optimize'),
key: 'optimize', key: 'optimize',
closable: false, closable: false,
}, },
{ {
tab: '配置信息', tab: l('pages.devops.jobinfo.config'),
key: 'config', key: 'config',
closable: false, closable: false,
}, },
{ {
tab: 'FlinkSQL', tab: l('pages.devops.jobinfo.flinksql'),
key: 'flinksql', key: 'flinksql',
closable: false, closable: false,
}, },
{ {
tab: '数据地图', tab: l('pages.devops.jobinfo.datamap'),
key: 'datamap', key: 'datamap',
closable: false, closable: false,
}, },
{ {
tab: '即席查询', tab: l('pages.devops.jobinfo.olap'),
key: 'olap', key: 'olap',
closable: false, closable: false,
}, },
{ {
tab: '历史版本', tab: l('pages.devops.jobinfo.version'),
key: 'version', key: 'version',
closable: false, closable: false,
}, },
{ {
tab: '告警记录', tab: l('pages.devops.jobinfo.alert'),
key: 'alert', key: 'alert',
closable: false, closable: false,
}, },
...@@ -285,11 +285,11 @@ const JobInfo = (props: any) => { ...@@ -285,11 +285,11 @@ const JobInfo = (props: any) => {
{tabKey === 'cluster' ? <FlinkClusterInfo job={job}/> : undefined} {tabKey === 'cluster' ? <FlinkClusterInfo job={job}/> : undefined}
{tabKey === 'snapshot' ? <CheckPoints job={job}/> : undefined} {tabKey === 'snapshot' ? <CheckPoints job={job}/> : undefined}
{tabKey === 'exception' ? <Exception job={job}/> : undefined} {tabKey === 'exception' ? <Exception job={job}/> : undefined}
{tabKey === 'log' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined} {tabKey === 'log' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={l('global.stay.tuned')}/> : undefined}
{tabKey === 'optimize' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined} {tabKey === 'optimize' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={l('global.stay.tuned')}/> : undefined}
{tabKey === 'flinksql' ? <FlinkSQL job={job}/> : undefined} {tabKey === 'flinksql' ? <FlinkSQL job={job}/> : undefined}
{tabKey === 'datamap' ? <DataMap job={job}/> : undefined} {tabKey === 'datamap' ? <DataMap job={job}/> : undefined}
{tabKey === 'olap' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={"敬请期待"}/> : undefined} {tabKey === 'olap' ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={l('global.stay.tuned')}/> : undefined}
{tabKey === 'version' ? <TaskVersionInfo job={job}/> : undefined} {tabKey === 'version' ? <TaskVersionInfo job={job}/> : undefined}
{tabKey === 'alert' ? <Alert job={job}/> : undefined} {tabKey === 'alert' ? <Alert job={job}/> : undefined}
</ProCard> </ProCard>
......
...@@ -52,17 +52,17 @@ const DevOps = () => { ...@@ -52,17 +52,17 @@ const DevOps = () => {
const statusCountDefault = [ const statusCountDefault = [
{key: '', title: renderSwitch(), value: 0, total: true}, {key: '', title: renderSwitch(), value: 0, total: true},
{key: JOB_STATUS.CREATED, status: 'default', title: '已创建', value: 0}, {key: JOB_STATUS.CREATED, status: 'default', title: l('pages.devops.jobstatus.CREATED'), value: 0},
{key: JOB_STATUS.INITIALIZING, status: 'default', title: '初始化', value: 0}, {key: JOB_STATUS.INITIALIZING, status: 'default', title: l('pages.devops.jobstatus.INITIALIZING'), value: 0},
{key: JOB_STATUS.RUNNING, status: 'success', title: '运行中', value: 0}, {key: JOB_STATUS.RUNNING, status: 'success', title: l('pages.devops.jobstatus.RUNNING'), value: 0},
{key: JOB_STATUS.FINISHED, status: 'processing', title: '已完成', value: 0}, {key: JOB_STATUS.FINISHED, status: 'processing', title: l('pages.devops.jobstatus.FINISHED'), value: 0},
{key: JOB_STATUS.FAILING, status: 'error', title: '异常中', value: 0}, {key: JOB_STATUS.FAILING, status: 'error', title: l('pages.devops.jobstatus.FAILING'), value: 0},
{key: JOB_STATUS.FAILED, status: 'error', title: '已异常', value: 0}, {key: JOB_STATUS.FAILED, status: 'error', title: l('pages.devops.jobstatus.FAILED'), value: 0},
{key: JOB_STATUS.SUSPENDED, status: 'warning', title: '已暂停', value: 0}, {key: JOB_STATUS.SUSPENDED, status: 'warning', title: l('pages.devops.jobstatus.SUSPENDED'), value: 0},
{key: JOB_STATUS.CANCELLING, status: 'warning', title: '停止中', value: 0}, {key: JOB_STATUS.CANCELLING, status: 'warning', title: l('pages.devops.jobstatus.CANCELLING'), value: 0},
{key: JOB_STATUS.CANCELED, status: 'warning', title: '已停止', value: 0}, {key: JOB_STATUS.CANCELED, status: 'warning', title: l('pages.devops.jobstatus.CANCELED'), value: 0},
{key: JOB_STATUS.RESTARTING, status: 'default', title: '重启中', value: 0}, {key: JOB_STATUS.RESTARTING, status: 'default', title: l('pages.devops.jobstatus.RESTARTING'), value: 0},
{key: JOB_STATUS.UNKNOWN, status: 'default', title: '未知', value: 0}, {key: JOB_STATUS.UNKNOWN, status: 'default', title: l('pages.devops.jobstatus.UNKNOWN'), value: 0},
]; ];
const [statusCount, setStatusCount] = useState<any[]>(statusCountDefault); const [statusCount, setStatusCount] = useState<any[]>(statusCountDefault);
const [statusHistoryCount, setStatusHistoryCount] = useState<any[]>(statusCountDefault); const [statusHistoryCount, setStatusHistoryCount] = useState<any[]>(statusCountDefault);
......
/*
*
* 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.
*
*/
import {FragmentVariableTableListItem} from "@/pages/FragmentVariable/data";
export const getFragmentVariableTableListItem = (values: FragmentVariableTableListItem) => {
return values;
}
...@@ -82,7 +82,7 @@ const JarTableList: React.FC<{}> = (props: any) => { ...@@ -82,7 +82,7 @@ const JarTableList: React.FC<{}> = (props: any) => {
message.warn(info.file.response.msg); message.warn(info.file.response.msg);
} }
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
message.error(`${info.file.name} 上传失败`); message.error(`${info.file.name}` + l('app.request.upload.failed'));
} }
}, },
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
import {getData, postAll} from "@/components/Common/crud"; import {getData, postAll} from "@/components/Common/crud";
import {message} from "antd"; import {message} from "antd";
import {useIntl} from "umi";
export function loadSettings(dispatch: any) { export function loadSettings(dispatch: any) {
const res = getData('api/sysConfig/getAll'); const res = getData('api/sysConfig/getAll');
...@@ -34,7 +35,7 @@ export function loadSettings(dispatch: any) { ...@@ -34,7 +35,7 @@ export function loadSettings(dispatch: any) {
export function saveSettings(values:{},dispatch: any) { export function saveSettings(values:{},dispatch: any) {
const res = postAll("api/sysConfig/updateSysConfigByJson",values); const res = postAll("api/sysConfig/updateSysConfigByJson",values);
res.then((result) => { res.then((result) => {
message.success(`修改配置成功!`); message.success(useIntl().formatMessage({id:'app.request.update.setting.success'}));
dispatch && dispatch({ dispatch && dispatch({
type: "Settings/saveSettings", type: "Settings/saveSettings",
payload: values, payload: values,
......
...@@ -37,7 +37,7 @@ const ProcessList: React.FC<{}> = (props: any) => { ...@@ -37,7 +37,7 @@ const ProcessList: React.FC<{}> = (props: any) => {
const columns: ProColumns<ProcessItem>[] = [ const columns: ProColumns<ProcessItem>[] = [
{ {
title: '进程ID', title: l('pages.sys.process.id'),
dataIndex: 'pid', dataIndex: 'pid',
sorter: true, sorter: true,
render: (dom, entity) => { render: (dom, entity) => {
...@@ -45,17 +45,17 @@ const ProcessList: React.FC<{}> = (props: any) => { ...@@ -45,17 +45,17 @@ const ProcessList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '进程名', title: l('pages.sys.process.name'),
sorter: true, sorter: true,
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '任务ID', title: l('pages.sys.process.jobid'),
sorter: true, sorter: true,
dataIndex: 'taskId', dataIndex: 'taskId',
}, },
{ {
title: '类型', title: l('pages.sys.process.type'),
sorter: true, sorter: true,
dataIndex: 'type', dataIndex: 'type',
filters: [ filters: [
...@@ -85,7 +85,7 @@ const ProcessList: React.FC<{}> = (props: any) => { ...@@ -85,7 +85,7 @@ const ProcessList: React.FC<{}> = (props: any) => {
'Unknown': {text: 'Unknown'}, 'Unknown': {text: 'Unknown'},
}, },
}, { }, {
title: '状态', title: l('pages.sys.process.status'),
sorter: true, sorter: true,
dataIndex: 'status', dataIndex: 'status',
filters: [ filters: [
...@@ -120,22 +120,22 @@ const ProcessList: React.FC<{}> = (props: any) => { ...@@ -120,22 +120,22 @@ const ProcessList: React.FC<{}> = (props: any) => {
}, },
}, },
{ {
title: '开始时间', title: l('pages.sys.process.starttime'),
dataIndex: 'startTime', dataIndex: 'startTime',
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
}, },
{ {
title: '结束时间', title: l('pages.sys.process.endtime'),
dataIndex: 'endTime', dataIndex: 'endTime',
sorter: true, sorter: true,
valueType: 'dateTime', valueType: 'dateTime',
}, { }, {
title: '耗时', title: l('pages.sys.process.duration'),
sorter: true, sorter: true,
dataIndex: 'time', dataIndex: 'time',
}, { }, {
title: '操作人ID', title: l('pages.sys.process.operator'),
sorter: true, sorter: true,
dataIndex: 'userId', dataIndex: 'userId',
} }
......
...@@ -87,7 +87,7 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -87,7 +87,7 @@ const UDFTemplate: React.FC<{}> = () => {
return <Drawer return <Drawer
visible={open} visible={open}
title={(tModel.id ? '修改' : '添加') + "UDF模板"} title={(tModel.id ? l('pages.sys.udf.template.modify') : l('pages.sys.udf.template.create'))}
width={720} width={720}
onClose={onClose} onClose={onClose}
extra={ extra={
...@@ -104,10 +104,10 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -104,10 +104,10 @@ const UDFTemplate: React.FC<{}> = () => {
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="name" name="name"
label="模板名" label={l('pages.sys.udf.template.name')}
rules={[{required: true, message: '模板名称'}]} rules={[{required: true, message: l('pages.sys.udf.template.namePlaceholder')}]}
> >
<Input placeholder="请输入模板名"/> <Input placeholder={l('pages.sys.udf.template.namePlaceholder')}/>
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
...@@ -115,10 +115,10 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -115,10 +115,10 @@ const UDFTemplate: React.FC<{}> = () => {
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="codeType" name="codeType"
label="代码类型" label={l('pages.sys.udf.template.codeType')}
rules={[{required: true, message: '请选择代码类型'}]} rules={[{required: true, message: l('pages.sys.udf.template.codeTypePlaceholder')}]}
> >
<Select placeholder="请选择代码类型"> <Select placeholder={l('pages.sys.udf.template.codeTypePlaceholder')}>
<Option value={DIALECT.JAVA}>{DIALECT.JAVA}</Option> <Option value={DIALECT.JAVA}>{DIALECT.JAVA}</Option>
<Option value={DIALECT.SCALA}>{DIALECT.SCALA}</Option> <Option value={DIALECT.SCALA}>{DIALECT.SCALA}</Option>
<Option value={DIALECT.PYTHON}>{DIALECT.PYTHON}</Option> <Option value={DIALECT.PYTHON}>{DIALECT.PYTHON}</Option>
...@@ -128,10 +128,10 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -128,10 +128,10 @@ const UDFTemplate: React.FC<{}> = () => {
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="functionType" name="functionType"
label="函数类型" label={l('pages.sys.udf.template.functionType')}
rules={[{required: true, message: '请选择函数类型'}]} rules={[{required: true, message: l('pages.sys.udf.template.functionTypePlaceholder')}]}
> >
<Select placeholder="Please choose the type"> <Select placeholder={l('pages.sys.udf.template.functionTypePlaceholder')}>
<Option value="UDF">UDF</Option> <Option value="UDF">UDF</Option>
<Option value="UDAF">UDAF</Option> <Option value="UDAF">UDAF</Option>
<Option value="UDTF">UDTF</Option> <Option value="UDTF">UDTF</Option>
...@@ -143,15 +143,14 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -143,15 +143,14 @@ const UDFTemplate: React.FC<{}> = () => {
<Col span={24}> <Col span={24}>
<Form.Item <Form.Item
name="templateCode" name="templateCode"
label="模板代码" label={l('pages.sys.udf.template.templateCode')}
rules={[ rules={[
{ {
required: true, required: true,
message: '请编辑模板代码', message: l('pages.sys.udf.template.templateCodePlaceholder'),
}, },
]} ]}
> >
{/*<Input.TextArea rows={20} placeholder="请编辑模板代码"/>*/}
<CodeEdit code={code} language='java' <CodeEdit code={code} language='java'
height='400px' onChange={async (val) => { height='400px' onChange={async (val) => {
// setTModel({...tModel,templateCode:val}); // setTModel({...tModel,templateCode:val});
...@@ -166,8 +165,8 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -166,8 +165,8 @@ const UDFTemplate: React.FC<{}> = () => {
const deleteUDFTemplate = (id: number) => { const deleteUDFTemplate = (id: number) => {
Modal.confirm({ Modal.confirm({
title: '删除模板', title: l('pages.sys.udf.template.delete'),
content: '确定删除该模板吗?', content: l('pages.sys.udf.template.deleteConfirm'),
okText: l('button.confirm'), okText: l('button.confirm'),
cancelText: l('button.cancel'), cancelText: l('button.cancel'),
onOk: async () => { onOk: async () => {
...@@ -179,12 +178,12 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -179,12 +178,12 @@ const UDFTemplate: React.FC<{}> = () => {
const columns: ProColumns<UDFTemplateItem>[] = [ const columns: ProColumns<UDFTemplateItem>[] = [
{ {
title: '模板名', title: l('pages.sys.udf.template.name'),
sorter: true, sorter: true,
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: '代码类型', title: l('pages.sys.udf.template.codeType'),
sorter: true, sorter: true,
dataIndex: 'codeType', dataIndex: 'codeType',
filters: [ filters: [
...@@ -206,7 +205,7 @@ const UDFTemplate: React.FC<{}> = () => { ...@@ -206,7 +205,7 @@ const UDFTemplate: React.FC<{}> = () => {
}, },
onFilter: true onFilter: true
}, { }, {
title: '函数类型', title: l('pages.sys.udf.template.functionType'),
sorter: true, sorter: true,
dataIndex: 'functionType', dataIndex: 'functionType',
filters: [ filters: [
......
...@@ -201,18 +201,18 @@ const TaskTableList: React.FC<{}> = () => { ...@@ -201,18 +201,18 @@ const TaskTableList: React.FC<{}> = () => {
hideInTable: false, hideInTable: false,
filters: [ filters: [
{ {
text: '正常', text: l('status.enabled'),
value: 1, value: 1,
}, },
{ {
text: '禁用', text: l('status.disabled'),
value: 0, value: 0,
}, },
], ],
filterMultiple: false, filterMultiple: false,
valueEnum: { valueEnum: {
true: {text: '正常', status: 'Success'}, true: {text: l('status.enabled'), status: 'Success'},
false: {text: '禁用', status: 'Error'}, false: {text: l('status.disabled'), status: 'Error'},
}, },
}, },
{ {
......
...@@ -83,7 +83,7 @@ export default (): React.ReactNode => { ...@@ -83,7 +83,7 @@ export default (): React.ReactNode => {
</Paragraph> </Paragraph>
<p></p> <p></p>
<Timeline pending={<><Text code>0.7.0</Text> <Timeline pending={<><Text code>0.7.0</Text>
<Text type="secondary">敬请期待</Text> <Text type="secondary">{l('global.stay.tuned')}</Text>
<p></p> <p></p>
<Paragraph> <Paragraph>
<ul> <ul>
......
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