This is an automated email from the ASF dual-hosted git repository.
kriszu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 327bc2a13 Add i18n support for flink app menu (#2001)
327bc2a13 is described below
commit 327bc2a1327b4755deb4980f46241703d0ddd111
Author: lvlin241 <[email protected]>
AuthorDate: Fri Nov 11 07:22:34 2022 +0800
Add i18n support for flink app menu (#2001)
---
.../src/locales/lang/en/flink/app.ts | 65 ++++++++++++++++++++++
.../src/locales/lang/zh-CN/flink/app.ts | 65 ++++++++++++++++++++++
.../flink/app/components/AppView/AppDashboard.vue | 22 ++++----
.../src/views/flink/app/data/index.ts | 38 +++++++------
.../src/views/flink/app/hooks/useAppTableAction.ts | 16 +++---
.../flink/app/hooks/useCreateAndEditSchema.ts | 56 ++++++++++---------
.../src/views/flink/app/hooks/useCreateSchema.ts | 19 ++++---
.../src/views/flink/app/hooks/useEditStreamPark.ts | 6 +-
8 files changed, 214 insertions(+), 73 deletions(-)
diff --git
a/streampark-console/streampark-console-newui/src/locales/lang/en/flink/app.ts
b/streampark-console/streampark-console-newui/src/locales/lang/en/flink/app.ts
index 09f66abe4..d96345847 100644
---
a/streampark-console/streampark-console-newui/src/locales/lang/en/flink/app.ts
+++
b/streampark-console/streampark-console-newui/src/locales/lang/en/flink/app.ts
@@ -108,4 +108,69 @@ export default {
flameGraph: 'View FlameGraph',
deleteTip: 'Are you sure delete this job ?',
},
+ dashboard: {
+ availableTaskSlots: 'Available Task Slots',
+ taskSlots: 'Task Slots',
+ taskManagers: 'Task Managers',
+ runningJobs: 'Running Jobs',
+ totalTask: 'Total Task',
+ runningTask: 'Running Task',
+ jobManagerMemory: 'JobManager Memory',
+ totalJobManagerMemory: 'Total JobManager Mem',
+ taskManagerMemory: 'TaskManager Memory',
+ totalTaskManagerMemory: 'Total TaskManager Mem',
+ },
+ table: {
+ applicationName: 'Application Name',
+ searchName: 'Name',
+ tags: 'Tags',
+ owner: 'Owner',
+ flinkVersion: 'Flink Version',
+ duration: 'Duration',
+ modifiedTime: 'Modified Time',
+ runStatus: 'Run Status',
+ launchBuild: 'Launch | Build',
+ jobType: 'Type',
+ developmentMode: 'Development Mode',
+ executionMode: 'Execution Mode',
+ dependency: 'Dependency',
+ applicationConf: 'Application Conf',
+ resolveOrder: 'resolveOrder',
+ parallelism: 'Parallelism',
+ restartSize: 'Fault Restart Size',
+ faultAlertTemplate: 'Fault Alert Template',
+ checkPointFailureOptions: 'CheckPoint Failure Options',
+ totalMemoryOptions: 'Total Memory Options',
+ jmMemoryOptions: 'JM Memory Options',
+ tmMemoryOptions: 'TM Memory Options',
+ properties: 'Flink application dynamic configuration',
+ flinkCluster: 'Flink Cluster',
+ yarnQueue: 'Yarn Queue',
+ yarnSessionClusterId: 'Yarn Session ClusterId',
+ mavenPom: 'Maven pom',
+ uploadJar: 'Upload Jar',
+ kubernetesNamespace: 'Kubernetes Namespace',
+ kubernetesClusterId: 'Kubernetes ClusterId',
+ flinkBaseDockerImage: 'Flink Base Docker Image',
+ restServiceExposedType: 'Rest-Service Exposed Type',
+ resourceFrom: 'Resource From',
+ uploadJobJar: 'Upload Job Jar',
+ mainClass: 'Program Main',
+ project: 'Project',
+ module: 'Module',
+ appType: 'Application Type',
+ programArgs: 'Program Args',
+ },
+ runStatusOptions: {
+ added : 'ADDED',
+ starting: 'STARTING',
+ running: 'RUNNING',
+ failed: 'FAILED',
+ canceled: 'CANCELED',
+ finished: 'FINISHED',
+ suspended: 'SUSPENDED',
+ lost: 'LOST',
+ silent: 'SILENT',
+ terminated: 'TERMINATED'
+ }
};
diff --git
a/streampark-console/streampark-console-newui/src/locales/lang/zh-CN/flink/app.ts
b/streampark-console/streampark-console-newui/src/locales/lang/zh-CN/flink/app.ts
index 0e5037824..9afe0e04f 100644
---
a/streampark-console/streampark-console-newui/src/locales/lang/zh-CN/flink/app.ts
+++
b/streampark-console/streampark-console-newui/src/locales/lang/zh-CN/flink/app.ts
@@ -105,4 +105,69 @@ export default {
flameGraph: '查看 FlameGraph',
deleteTip: '你确定要删除这个job ?',
},
+ dashboard: {
+ availableTaskSlots: '可用的任务槽数',
+ taskSlots: '任务槽数',
+ taskManagers: 'Task Managers',
+ runningJobs: '运行的作业',
+ totalTask: '总任务',
+ runningTask: '运行的任务',
+ jobManagerMemory: 'JobManager内存',
+ totalJobManagerMemory: 'JobManager总内存',
+ taskManagerMemory: 'TaskManager内存',
+ totalTaskManagerMemory: 'TaskManager总内存',
+ },
+ table: {
+ applicationName: 'Application名称',
+ searchName: '名称',
+ tags: '标签',
+ owner: '创建者',
+ flinkVersion: 'Flink版本',
+ duration: '运行时长',
+ modifiedTime: '修改时间',
+ runStatus: '运行状态',
+ launchBuild: '启动构建',
+ jobType: '作业类型',
+ developmentMode: '开发模式',
+ executionMode: '执行模式',
+ dependency: '依赖项',
+ applicationConf: 'Application配置',
+ resolveOrder: '解析顺序',
+ parallelism: '并行度',
+ restartSize: '(失败后)重启次数',
+ faultAlertTemplate: '告警模板',
+ checkPointFailureOptions: '检查点配置',
+ totalMemoryOptions: '总内存配置',
+ jmMemoryOptions: 'JM内存配置',
+ tmMemoryOptions: 'TM内存配置',
+ properties: '动态参数配置',
+ flinkCluster: 'Flink集群',
+ yarnQueue: 'Yarn队列',
+ yarnSessionClusterId: 'Yarn session模式集群',
+ mavenPom: 'pom文件配置',
+ uploadJar: '上传依赖Jar文件',
+ kubernetesNamespace: 'k8s命名空间',
+ kubernetesClusterId: 'K8s集群',
+ flinkBaseDockerImage: 'Flink基础docker镜像',
+ restServiceExposedType: 'k8s服务对外类型',
+ resourceFrom: '资源来源',
+ uploadJobJar: '上传jar文件',
+ mainClass: '程序入口类',
+ project: '项目',
+ module: '模块',
+ appType: 'Application类型',
+ programArgs: '程序参数',
+ },
+ runStatusOptions: {
+ added : '新增',
+ starting: '启动中',
+ running: '运行中',
+ failed: '失败',
+ canceled: '已取消',
+ finished: '已完成',
+ suspended: '暂停',
+ lost: '丢失',
+ silent: '静默',
+ terminated: '终止'
+ },
};
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/components/AppView/AppDashboard.vue
b/streampark-console/streampark-console-newui/src/views/flink/app/components/AppView/AppDashboard.vue
index d3a4b4d79..6a9b43430 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/components/AppView/AppDashboard.vue
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/components/AppView/AppDashboard.vue
@@ -20,8 +20,10 @@
import { fetchDashboard } from '/@/api/flink/app/app';
import StatisticCard from './StatisticCard.vue';
import { Row, Col } from 'ant-design-vue';
+ import { useI18n } from '/@/hooks/web/useI18n';
const dashBigScreenMap = reactive<Recordable>({});
const dashboardLoading = ref(true);
+ const { t } = useI18n();
// Get Dashboard Metrics Data
async function handleDashboard(showLoading: boolean) {
@@ -31,26 +33,26 @@
if (res) {
Object.assign(dashBigScreenMap, {
availiableTask: {
- staticstics: { title: 'Available Task Slots', value:
res.availableSlot },
+ staticstics: { title: t('flink.app.dashboard.availableTaskSlots'),
value: res.availableSlot },
footer: [
- { title: 'Task Slots', value: res.totalSlot },
- { title: 'Task Managers', value: res.totalTM },
+ { title: t('flink.app.dashboard.taskSlots'), value:
res.totalSlot },
+ { title: t('flink.app.dashboard.taskManagers'), value:
res.totalTM },
],
},
runningJob: {
- staticstics: { title: 'Running Jobs', value: res.runningJob },
+ staticstics: { title: t('flink.app.dashboard.runningJobs'), value:
res.runningJob },
footer: [
- { title: 'Total Task', value: res.task.total },
- { title: 'Running Task', value: res.task.running },
+ { title: t('flink.app.dashboard.totalTask'), value:
res.task.total },
+ { title: t('flink.app.dashboard.runningTask'), value:
res.task.running },
],
},
jobManager: {
- staticstics: { title: 'JobManager Memory', value: res.jmMemory },
- footer: [{ title: 'Total JobManager Mem', value: `${res.jmMemory}
MB` }],
+ staticstics: { title: t('flink.app.dashboard.jobManagerMemory'),
value: res.jmMemory },
+ footer: [{ title: t('flink.app.dashboard.totalJobManagerMemory'),
value: `${res.jmMemory} MB` }],
},
taskManager: {
- staticstics: { title: 'TaskManager Memory', value: res.tmMemory },
- footer: [{ title: 'Total TaskManager Mem', value: `${res.tmMemory}
MB` }],
+ staticstics: { title: t('flink.app.dashboard.taskManagerMemory'),
value: res.tmMemory },
+ footer: [{ title: t('flink.app.dashboard.totalTaskManagerMemory'),
value: `${res.tmMemory} MB` }],
},
});
}
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/data/index.ts
b/streampark-console/streampark-console-newui/src/views/flink/app/data/index.ts
index b01c19694..7c018bf3a 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/data/index.ts
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/data/index.ts
@@ -17,45 +17,47 @@
import { dateToDuration } from '/@/utils/dateUtil';
import { BasicColumn } from '/@/components/Table';
import { ExecModeEnum } from '/@/enums/flinkEnum';
+import {useI18n} from "/@/hooks/web/useI18n";
+const { t } = useI18n();
/* app */
export const getAppColumns = (): BasicColumn[] => [
{
- title: 'Application Name',
+ title: t('flink.app.table.applicationName'),
dataIndex: 'jobName',
align: 'left',
fixed: 'left',
width: 300,
},
- { title: 'Tags', ellipsis: true, dataIndex: 'tags', width: 150 },
- { title: 'Owner', dataIndex: 'nickName', width: 100 },
- { title: 'Flink Version', dataIndex: 'flinkVersion', width: 130 },
+ { title: t('flink.app.table.tags'), ellipsis: true, dataIndex: 'tags',
width: 150 },
+ { title: t('flink.app.table.owner'), dataIndex: 'nickName', width: 100 },
+ { title: t('flink.app.table.flinkVersion'), dataIndex: 'flinkVersion',
width: 130 },
{
- title: 'Duration',
+ title: t('flink.app.table.duration'),
dataIndex: 'duration',
sorter: true,
width: 150,
customRender: ({ value }) => dateToDuration(value),
},
- { title: 'Modified Time', dataIndex: 'modifyTime', sorter: true, width: 170
},
+ { title: t('flink.app.table.modifiedTime'), dataIndex: 'modifyTime', sorter:
true, width: 170 },
{
- title: 'Run Status',
+ title: t('flink.app.table.runStatus'),
dataIndex: 'state',
width: 120,
filters: [
- { text: 'ADDED', value: '0' },
- { text: 'STARTING', value: '3' },
- { text: 'RUNNING', value: '5' },
- { text: 'FAILED', value: '7' },
- { text: 'CANCELED', value: '9' },
- { text: 'FINISHED', value: '10' },
- { text: 'SUSPENDED', value: '11' },
- { text: 'LOST', value: '13' },
- { text: 'SILENT', value: '17' },
- { text: 'TERMINATED', value: '18' },
+ { text: t('flink.app.runStatusOptions.added'), value: '0' },
+ { text: t('flink.app.runStatusOptions.starting'), value: '3' },
+ { text: t('flink.app.runStatusOptions.running'), value: '5' },
+ { text: t('flink.app.runStatusOptions.failed'), value: '7' },
+ { text: t('flink.app.runStatusOptions.canceled'), value: '9' },
+ { text: t('flink.app.runStatusOptions.finished'), value: '10' },
+ { text: t('flink.app.runStatusOptions.suspended'), value: '11' },
+ { text: t('flink.app.runStatusOptions.lost'), value: '13' },
+ { text: t('flink.app.runStatusOptions.silent'), value: '17' },
+ { text: t('flink.app.runStatusOptions.terminated'), value: '18' },
],
},
- { title: 'Launch | Build', dataIndex: 'launch', width: 220 },
+ { title: t('flink.app.table.launchBuild'), dataIndex: 'launch', width: 220 },
];
/* Get diff editor configuration */
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useAppTableAction.ts
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useAppTableAction.ts
index d1811e2f6..7c45d8ab4 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useAppTableAction.ts
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useAppTableAction.ts
@@ -224,22 +224,22 @@ export const useAppTableAction = (
},
schemas: [
{
- label: 'Tags',
+ label: t('flink.app.table.tags'),
field: 'tags',
component: 'Select',
componentProps: {
- placeholder: 'Tags',
+ placeholder: t('flink.app.table.tags'),
showSearch: true,
options: tagsOptions.value.map((t: Recordable) => ({ label: t,
value: t })),
onChange: handlePageDataReload.bind(null, false),
},
},
{
- label: 'Owner',
+ label: t('flink.app.table.owner'),
field: 'userId',
component: 'Select',
componentProps: {
- placeholder: 'Owner',
+ placeholder: t('flink.app.table.owner'),
showSearch: true,
options: users.value.map((u: Recordable) => {
return { label: u.nickName || u.username, value: u.userId };
@@ -248,11 +248,11 @@ export const useAppTableAction = (
},
},
{
- label: 'Type',
+ label: t('flink.app.table.jobType'),
field: 'jobType',
component: 'Select',
componentProps: {
- placeholder: 'Type',
+ placeholder: t('flink.app.table.jobType'),
showSearch: true,
options: [
{ label: 'JAR', value: JobTypeEnum.JAR },
@@ -262,11 +262,11 @@ export const useAppTableAction = (
},
},
{
- label: 'Name',
+ label: t('flink.app.table.searchName'),
field: 'jobName',
component: 'InputSearch',
componentProps: {
- placeholder: 'Search',
+ placeholder: t('flink.app.table.searchName'),
onChange: handlePageDataReload.bind(null, false),
onSearch: handlePageDataReload.bind(null, false),
},
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateAndEditSchema.ts
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateAndEditSchema.ts
index 5032e0977..57282ea07 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateAndEditSchema.ts
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateAndEditSchema.ts
@@ -50,6 +50,8 @@ import { AlertSetting } from
'/@/api/flink/setting/types/alert.type';
import { FlinkCluster } from '/@/api/flink/setting/types/flinkCluster.type';
import { ExecModeEnum } from '/@/enums/flinkEnum';
import { isK8sExecMode } from '../utils';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
export interface HistoryRecord {
k8sNamespace: Array<string>;
k8sSessionClusterId: Array<string>;
@@ -117,7 +119,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'dependency',
- label: 'Dependency',
+ label: t('flink.app.table.dependency'),
component: 'Input',
slot: 'dependency',
ifShow: ({ values }) => {
@@ -131,7 +133,7 @@ export const useCreateAndEditSchema = (
{ field: 'configOverride', label: '', component: 'Input', show: false },
{
field: 'isSetConfig',
- label: 'Application Conf',
+ label: t('flink.app.table.applicationConf'),
component: 'Switch',
ifShow: ({ values }) => {
if (edit?.appId) {
@@ -195,7 +197,7 @@ export const useCreateAndEditSchema = (
return [
{
field: 'versionId',
- label: 'Flink Version',
+ label: t('flink.app.table.flinkVersion'),
component: 'Select',
componentProps: {
placeholder: 'Flink Version',
@@ -207,7 +209,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'flinkClusterId',
- label: 'Flink Cluster',
+ label: t('flink.app.table.flinkCluster'),
component: 'Select',
componentProps: {
placeholder: 'Flink Cluster',
@@ -218,7 +220,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'yarnSessionClusterId',
- label: 'Yarn Session ClusterId',
+ label: t('flink.app.table.yarnSessionClusterId'),
component: 'Select',
componentProps: () => {
return {
@@ -231,7 +233,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'k8sNamespace',
- label: 'Kubernetes Namespace',
+ label: t('flink.app.table.kubernetesNamespace'),
component: 'Input',
ifShow: ({ values }) => isK8sExecMode(values.executionMode),
render: ({ model, field }) =>
@@ -242,7 +244,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'clusterId',
- label: 'Kubernetes ClusterId',
+ label: t('flink.app.table.kubernetesClusterId'),
component: 'Input',
componentProps: ({ formModel }) => {
return {
@@ -255,7 +257,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'clusterId',
- label: 'Kubernetes ClusterId',
+ label: t('flink.app.table.kubernetesClusterId'),
component: 'Select',
ifShow: ({ values }) => values.executionMode ==
ExecModeEnum.KUBERNETES_SESSION,
componentProps: {
@@ -266,7 +268,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'flinkImage',
- label: 'Flink Base Docker Image',
+ label: t('flink.app.table.flinkBaseDockerImage'),
component: 'Input',
ifShow: ({ values }) => values.executionMode ==
ExecModeEnum.KUBERNETES_APPLICATION,
render: ({ model, field }) =>
@@ -279,7 +281,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'k8sRestExposedType',
- label: 'Rest-Service Exposed Type',
+ label: t('flink.app.table.restServiceExposedType'),
ifShow: ({ values }) => values.executionMode ==
ExecModeEnum.KUBERNETES_APPLICATION,
component: 'Select',
componentProps: {
@@ -330,7 +332,7 @@ export const useCreateAndEditSchema = (
return [
{
field: 'jobName',
- label: 'Application Name',
+ label: t('flink.app.table.applicationName'),
component: 'Input',
componentProps: { placeholder: 'Please enter jobName' },
dynamicRules: () => {
@@ -339,7 +341,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'tags',
- label: 'Tags',
+ label: t('flink.app.table.tags'),
component: 'Input',
componentProps: {
placeholder: 'Please enter tags,if more than one, separate them with
commas(,)',
@@ -347,14 +349,14 @@ export const useCreateAndEditSchema = (
},
{
field: 'resolveOrder',
- label: 'Resolve Order',
+ label: t('flink.app.table.resolveOrder'),
component: 'Select',
componentProps: { placeholder: 'classloader.resolve-order', options:
resolveOrder },
rules: [{ required: true, message: 'Resolve Order is required', type:
'number' }],
},
{
field: 'parallelism',
- label: 'Parallelism',
+ label: t('flink.app.table.parallelism'),
component: 'InputNumber',
componentProps: {
placeholder: 'The parallelism with which to run the program',
@@ -363,13 +365,13 @@ export const useCreateAndEditSchema = (
},
{
field: 'slot',
- label: 'Task Slots',
+ label: t('flink.app.dashboard.taskSlots'),
component: 'InputNumber',
componentProps: { placeholder: 'Number of slots per TaskManager',
...commonInputNum },
},
{
field: 'restartSize',
- label: 'Fault Restart Size',
+ label: t('flink.app.table.restartSize'),
ifShow: ({ values }) =>
edit?.mode == 'flink' ? true : !isK8sExecMode(values.executionMode),
component: 'InputNumber',
@@ -377,7 +379,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'alertId',
- label: 'Fault Alert Template',
+ label: t('flink.app.table.faultAlertTemplate'),
component: 'Select',
componentProps: {
placeholder: 'Alert Template',
@@ -387,7 +389,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'checkPointFailure',
- label: 'CheckPoint Failure Options',
+ label: t('flink.app.table.checkPointFailureOptions'),
component: 'InputNumber',
renderColContent: renderInputGroup,
show: ({ values }) => (edit?.mode == 'flink' ? true :
!isK8sExecMode(values.executionMode)),
@@ -395,7 +397,7 @@ export const useCreateAndEditSchema = (
...getConfigSchemas(),
{
field: 'totalOptions',
- label: 'Total Memory Options',
+ label: t('flink.app.table.totalMemoryOptions'),
component: 'Select',
render: renderTotalMemory,
},
@@ -408,7 +410,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'jmOptions',
- label: 'JM Memory Options',
+ label: t('flink.app.table.jmMemoryOptions'),
component: 'Select',
componentProps: {
showSearch: true,
@@ -429,7 +431,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'tmOptions',
- label: 'TM Memory Options',
+ label: t('flink.app.table.tmMemoryOptions'),
component: 'Select',
componentProps: {
showSearch: true,
@@ -450,7 +452,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'yarnQueue',
- label: 'Yarn Queue',
+ label: t('flink.app.table.yarnQueue'),
component: 'Input',
componentProps: { placeholder: 'Please enter yarn queue' },
ifShow: ({ values }) => values.executionMode ==
ExecModeEnum.YARN_APPLICATION,
@@ -464,13 +466,13 @@ export const useCreateAndEditSchema = (
},
{
field: 'properties',
- label: 'Properties',
+ label: t('flink.app.table.properties'),
component: 'Input',
render: (renderCallbackParams) =>
renderProperties(renderCallbackParams),
},
{
field: 'args',
- label: 'Program Args',
+ label: t('flink.app.table.programArgs'),
component: 'InputTextArea',
defaultValue: '',
slot: 'args',
@@ -478,7 +480,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'description',
- label: 'Description',
+ label: t('common.description'),
component: 'InputTextArea',
componentProps: { rows: 4, placeholder: 'Please enter description for
this application' },
},
@@ -489,7 +491,7 @@ export const useCreateAndEditSchema = (
return [
{
field: 'jobType',
- label: 'Development Mode',
+ label: t('flink.app.table.developmentMode'),
component: 'Input',
render: ({ model }) => {
if (model.jobType == 1) {
@@ -513,7 +515,7 @@ export const useCreateAndEditSchema = (
},
{
field: 'appType',
- label: 'Application Type',
+ label: t('flink.app.table.appType'),
component: 'Input',
render: () => getAlertSvgIcon('flink', 'StreamPark Flink'),
},
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateSchema.ts
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateSchema.ts
index eb2b44dfa..353381bb8 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateSchema.ts
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useCreateSchema.ts
@@ -28,6 +28,9 @@ import { RuleObject } from 'ant-design-vue/lib/form';
import { StoreValue } from 'ant-design-vue/lib/form/interface';
import { renderResourceFrom } from './useFlinkRender';
import { filterOption } from '../utils';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
+
const getJobTypeOptions = () => {
return [
{
@@ -86,7 +89,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
return [
{
field: 'jobType',
- label: 'Development Mode',
+ label: t('flink.app.table.developmentMode'),
component: 'Select',
componentProps: ({ formModel }) => {
return {
@@ -106,7 +109,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
},
{
field: 'executionMode',
- label: 'Execution Mode',
+ label: t('flink.app.table.executionMode'),
component: 'Select',
componentProps: {
placeholder: 'Please select Execution Mode',
@@ -141,7 +144,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
...getFlinkSqlSchema.value,
{
field: 'resourceFrom',
- label: 'Resource From',
+ label: t('flink.app.table.resourceFrom'),
component: 'Select',
render: ({ model }) => renderResourceFrom(model),
rules: [{ required: true, message: 'resource from is required' }],
@@ -149,14 +152,14 @@ export const useCreateSchema = (dependencyRef: Ref) => {
},
{
field: 'uploadJobJar',
- label: 'Upload Job Jar',
+ label: t('flink.app.table.uploadJobJar'),
component: 'Select',
slot: 'uploadJobJar',
ifShow: ({ values }) => values?.jobType !== 'sql' &&
values?.resourceFrom == 'upload',
},
{
field: 'mainClass',
- label: 'Program Main',
+ label: t('flink.app.table.mainClass'),
component: 'Input',
componentProps: { placeholder: 'Please enter Main class' },
ifShow: ({ values }) => values?.jobType !== 'sql' &&
values?.resourceFrom == 'upload',
@@ -164,7 +167,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
},
{
field: 'project',
- label: 'Project',
+ label: t('flink.app.table.project'),
component: 'Select',
componentProps: {
showSearch: true,
@@ -186,7 +189,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
},
{
field: 'module',
- label: 'Module',
+ label: t('flink.app.table.module'),
component: 'Select',
componentProps: ({ formModel }) => {
return {
@@ -209,7 +212,7 @@ export const useCreateSchema = (dependencyRef: Ref) => {
},
{
field: 'appType',
- label: 'Application Type',
+ label: t('flink.app.table.appType'),
component: 'Select',
componentProps: ({ formModel }) => {
return {
diff --git
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useEditStreamPark.ts
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useEditStreamPark.ts
index 389d46d30..310cfe0b1 100644
---
a/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useEditStreamPark.ts
+++
b/streampark-console/streampark-console-newui/src/views/flink/app/hooks/useEditStreamPark.ts
@@ -29,6 +29,8 @@ import { handleDependencyJsonToPom } from '../utils';
import { useDrawer } from '/@/components/Drawer';
import { useRoute } from 'vue-router';
import { useMessage } from '/@/hooks/web/useMessage';
+import { useI18n } from '/@/hooks/web/useI18n';
+const { t } = useI18n();
export const useEditStreamParkSchema = (
configVersions: Ref,
@@ -117,10 +119,10 @@ export const useEditStreamParkSchema = (
...getFlinkTypeSchema.value,
{
field: 'executionMode',
- label: 'Execution Mode',
+ label: t('flink.app.table.executionMode'),
component: 'Select',
componentProps: {
- placeholder: 'Execution Mode',
+ placeholder: t('flink.app.table.executionMode'),
options: executionModes,
},
},