Browse Source

[1.3.5-prepare][Improvement][UI] Improve parameter name

chengshiwen 4 years ago
parent
commit
ccc81eeb9a
  1. 66
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
  2. 16
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
  3. 100
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
  4. 55
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  5. 57
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

66
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue

@ -35,7 +35,7 @@
</m-list-box>
<m-list-box v-if="programType !== 'PYTHON'">
<div slot="text">{{$t('Main class')}}</div>
<div slot="text">{{$t('Main Class')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
@ -47,7 +47,7 @@
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Main package')}}</div>
<div slot="text">{{$t('Main Package')}}</div>
<div slot="content">
<treeselect v-model="mainJar" :options="mainJarLists" :disable-branch-nodes="true" :normalizer="normalizer" :disabled="isDetails" :placeholder="$t('Please enter main package')">
<div slot="value-label" slot-scope="{ node }">{{ node.raw.fullName }}</div>
@ -81,48 +81,48 @@
</m-list-box>
<div class="list-box-4p" v-if="deployMode === 'cluster'">
<div class="clearfix list">
<span class="sp1" style="word-break:break-all">{{$t('jobManagerMemory')}}</span>
<span class="sp1" style="word-break:break-all">{{$t('JobManager Memory')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="jobManagerMemory"
:placeholder="$t('Please enter jobManager memory')"
:placeholder="$t('Please enter JobManager memory')"
style="width: 200px;"
autocomplete="off">
</x-input>
</span>
<span class="sp1 sp3">{{$t('taskManagerMemory')}}</span>
<span class="sp1 sp3">{{$t('TaskManager Memory')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="taskManagerMemory"
:placeholder="$t('Please enter the taskManager memory')"
:placeholder="$t('Please enter TaskManager memory')"
style="width: 186px;"
autocomplete="off">
</x-input>
</span>
</div>
<div class="clearfix list">
<span class="sp1">{{$t('slot')}}</span>
<span class="sp1">{{$t('Slot Number')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="slot"
:placeholder="$t('Please enter slot number')"
:placeholder="$t('Please enter Slot number')"
style="width: 200px;"
autocomplete="off">
</x-input>
</span>
<span class="sp1 sp3" v-if="flinkVersion === '<1.10'">{{$t('taskManager')}}</span>
<span class="sp1 sp3" v-if="flinkVersion === '<1.10'">{{$t('TaskManager Number')}}</span>
<span class="sp2" v-if="flinkVersion === '<1.10'">
<x-input
:disabled="isDetails"
type="input"
v-model="taskManager"
:placeholder="$t('Please enter taskManager number')"
:placeholder="$t('Please enter TaskManager number')"
style="width: 186px;"
autocomplete="off">
</x-input>
@ -130,27 +130,27 @@
</div>
</div>
<m-list-box>
<div slot="text">{{$t('Command-line parameters')}}</div>
<div slot="text">{{$t('Main Arguments')}}</div>
<div slot="content">
<x-input
:autosize="{minRows:2}"
:disabled="isDetails"
type="textarea"
v-model="mainArgs"
:placeholder="$t('Please enter Command-line parameters')"
:placeholder="$t('Please enter main arguments')"
autocomplete="off">
</x-input>
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Other parameters')}}</div>
<div slot="text">{{$t('Option Parameters')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
:autosize="{minRows:2}"
type="textarea"
v-model="others"
:placeholder="$t('Please enter other parameters')">
:placeholder="$t('Please enter option parameters')">
</x-input>
</div>
</m-list-box>
@ -207,19 +207,17 @@
cacheResourceList: [],
// Custom function
localParams: [],
// Driver Number of cores
// Slot number
slot: 1,
// Driver Number of memory
// TaskManager mumber
taskManager: '2',
// Executor Number
// JobManager memory
jobManagerMemory: '1G',
// Executor Number of memory
// TaskManager memory
taskManagerMemory: '2G',
// Executor Number of cores
executorCores: 2,
// Command line argument
// Main arguments
mainArgs: '',
// Other parameters
// Option parameters
others: '',
// Program type
programType: 'SCALA',
@ -294,44 +292,38 @@
return false
}
if (!this.mainJar) {
this.$message.warning(`${i18n.$t('Please enter main package')}`)
return false
}
if (!this.jobManagerMemory) {
this.$message.warning(`${i18n.$t('Please enter the number of Executor')}`)
this.$message.warning(`${i18n.$t('Please enter JobManager memory')}`)
return false
}
if (!Number.isInteger(parseInt(this.jobManagerMemory))) {
this.$message.warning(`${i18n.$t('The number of Executors should be a positive integer')}`)
return false
}
if (!this.taskManagerMemory) {
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
this.$message.warning(`${i18n.$t('Memory should be a positive integer')}`)
return false
}
if (!this.taskManagerMemory) {
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
this.$message.warning(`${i18n.$t('Please enter TaskManager memory')}`)
return false
}
if (!_.isNumber(parseInt(this.taskManagerMemory))) {
if (!Number.isInteger(parseInt(this.taskManagerMemory))) {
this.$message.warning(`${i18n.$t('Memory should be a positive integer')}`)
return false
}
if (!this.executorCores) {
this.$message.warning(`${i18n.$t('Please enter ExecutorPlease enter Executor core number')}`)
if (!Number.isInteger(parseInt(this.slot))) {
this.$message.warning(`${i18n.$t('Please enter Slot number')}`)
return false
}
if (!Number.isInteger(parseInt(this.executorCores))) {
this.$message.warning(`${i18n.$t('Core number should be positive integer')}`)
if (this.flinkVersion === '<1.10' && !Number.isInteger(parseInt(this.taskManager))) {
this.$message.warning(`${i18n.$t('Please enter TaskManager number')}`)
return false
}
@ -362,7 +354,6 @@
taskManager: this.taskManager,
jobManagerMemory: this.jobManagerMemory,
taskManagerMemory: this.taskManagerMemory,
executorCores: this.executorCores,
mainArgs: this.mainArgs,
others: this.others,
programType: this.programType
@ -493,7 +484,6 @@
taskManager: this.taskManager,
jobManagerMemory: this.jobManagerMemory,
taskManagerMemory: this.taskManagerMemory,
executorCores: this.executorCores,
mainArgs: this.mainArgs,
others: this.others,
programType: this.programType

16
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue

@ -30,7 +30,7 @@
</div>
</m-list-box>
<m-list-box v-if="programType !== 'PYTHON'">
<div slot="text">{{$t('Main class')}}</div>
<div slot="text">{{$t('Main Class')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
@ -42,7 +42,7 @@
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Main package')}}</div>
<div slot="text">{{$t('Main Package')}}</div>
<div slot="content">
<treeselect v-model="mainJar" :options="mainJarLists" :disable-branch-nodes="true" :normalizer="normalizer" :value-consists-of="valueConsistsOf" :disabled="isDetails" :placeholder="$t('Please enter main package')">
<div slot="value-label" slot-scope="{ node }">{{ node.raw.fullName }}</div>
@ -50,27 +50,27 @@
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Command-line parameters')}}</div>
<div slot="text">{{$t('Main Arguments')}}</div>
<div slot="content">
<x-input
:autosize="{minRows:2}"
:disabled="isDetails"
type="textarea"
v-model="mainArgs"
:placeholder="$t('Please enter Command-line parameters')"
:placeholder="$t('Please enter main arguments')"
autocomplete="off">
</x-input>
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Other parameters')}}</div>
<div slot="text">{{$t('Option Parameters')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
:autosize="{minRows:2}"
type="textarea"
v-model="others"
:placeholder="$t('Please enter other parameters')"
:placeholder="$t('Please enter option parameters')"
autocomplete="off">
</x-input>
</div>
@ -125,9 +125,9 @@
cacheResourceList: [],
// Custom parameter
localParams: [],
// Command line argument
// Main arguments
mainArgs: '',
// Other parameters
// Option parameters
others: '',
// Program type
programType: 'JAVA',

100
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue

@ -50,7 +50,7 @@
</div>
</m-list-box>
<m-list-box v-if="programType !== 'PYTHON'">
<div slot="text">{{$t('Main class')}}</div>
<div slot="text">{{$t('Main Class')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
@ -62,7 +62,7 @@
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Main package')}}</div>
<div slot="text">{{$t('Main Package')}}</div>
<div slot="content">
<treeselect v-model="mainJar" :options="mainJarLists" :disable-branch-nodes="true" :normalizer="normalizer" :disabled="isDetails" :placeholder="$t('Please enter main package')">
<div slot="value-label" slot-scope="{ node }">{{ node.raw.fullName }}</div>
@ -81,89 +81,89 @@
</m-list-box>
<div class="list-box-4p">
<div class="clearfix list">
<span class="sp1">{{$t('Driver core number')}}</span>
<span class="sp1">{{$t('Driver Cores')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="driverCores"
:placeholder="$t('Please enter driver core number')"
:placeholder="$t('Please enter Driver cores')"
style="width: 200px;"
autocomplete="off">
</x-input>
</span>
<span class="sp1 sp3">{{$t('Driver memory use')}}</span>
<span class="sp1 sp3">{{$t('Driver Memory')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="driverMemory"
:placeholder="$t('Please enter driver memory use')"
:placeholder="$t('Please enter Driver memory')"
style="width: 186px;"
autocomplete="off">
</x-input>
</span>
</div>
<div class="clearfix list">
<span class="sp1">{{$t('Number of Executors')}}</span>
<span class="sp1">{{$t('Executor Cores')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="numExecutors"
:placeholder="$t('Please enter the number of Executor')"
v-model="executorCores"
:placeholder="$t('Please enter Executor cores')"
style="width: 200px;"
autocomplete="off">
</x-input>
</x-input>
</span>
<span class="sp1 sp3">{{$t('Executor memory')}}</span>
<span class="sp1 sp3">{{$t('Executor Memory')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="executorMemory"
:placeholder="$t('Please enter the Executor memory')"
:placeholder="$t('Please enter Executor memory')"
style="width: 186px;"
autocomplete="off">
</x-input>
</span>
</div>
<div class="clearfix list">
<span class="sp1">{{$t('Executor core number')}}</span>
<span class="sp1">{{$t('Executor Number')}}</span>
<span class="sp2">
<x-input
:disabled="isDetails"
type="input"
v-model="executorCores"
:placeholder="$t('Please enter Executor core number')"
v-model="numExecutors"
:placeholder="$t('Please enter Executor number')"
style="width: 200px;"
autocomplete="off">
</x-input>
</x-input>
</span>
</div>
</div>
<m-list-box>
<div slot="text">{{$t('Command-line parameters')}}</div>
<div slot="text">{{$t('Main Arguments')}}</div>
<div slot="content">
<x-input
:autosize="{minRows:2}"
:disabled="isDetails"
type="textarea"
v-model="mainArgs"
:placeholder="$t('Please enter Command-line parameters')"
:placeholder="$t('Please enter main arguments')"
autocomplete="off">
</x-input>
</div>
</m-list-box>
<m-list-box>
<div slot="text">{{$t('Other parameters')}}</div>
<div slot="text">{{$t('Option Parameters')}}</div>
<div slot="content">
<x-input
:disabled="isDetails"
:autosize="{minRows:2}"
type="textarea"
v-model="others"
:placeholder="$t('Please enter other parameters')">
:placeholder="$t('Please enter option parameters')">
</x-input>
</div>
</m-list-box>
@ -231,19 +231,19 @@
cacheResourceList: [],
// Custom function
localParams: [],
// Driver Number of cores
// Driver cores
driverCores: 1,
// Driver Number of memory
// Driver memory
driverMemory: '512M',
// Executor Number
// Executor number
numExecutors: 2,
// Executor Number of memory
// Executor memory
executorMemory: '2G',
// Executor Number of cores
// Executor cores
executorCores: 2,
// Command line argument
// Main arguments
mainArgs: '',
// Other parameters
// Option parameters
others: '',
// Program type
programType: 'SCALA',
@ -394,46 +394,62 @@
return false
}
if (!this.numExecutors) {
this.$message.warning(`${i18n.$t('Please enter the number of Executor')}`)
if (!this.driverCores) {
this.$message.warning(`${i18n.$t('Please enter Driver cores')}`)
return false
}
// noRes
if (this.noRes.length>0) {
this.$message.warning(`${i18n.$t('Please delete all non-existing resources')}`)
if (!Number.isInteger(parseInt(this.driverCores))) {
this.$message.warning(`${i18n.$t('Core number should be positive integer')}`)
return false
}
if (!Number.isInteger(parseInt(this.numExecutors))) {
this.$message.warning(`${i18n.$t('The number of Executors should be a positive integer')}`)
if (!this.driverMemory) {
this.$message.warning(`${i18n.$t('Please enter Driver memory')}`)
return false
}
if (!this.executorMemory) {
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
if (!Number.isInteger(parseInt(this.driverMemory))) {
this.$message.warning(`${i18n.$t('Memory should be a positive integer')}`)
return false
}
if (!this.executorCores) {
this.$message.warning(`${i18n.$t('Please enter Executor cores')}`)
return false
}
if (!Number.isInteger(parseInt(this.executorCores))) {
this.$message.warning(`${i18n.$t('Core number should be positive integer')}`)
return false
}
if (!this.executorMemory) {
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
this.$message.warning(`${i18n.$t('Please enter Executor memory')}`)
return false
}
if (!_.isNumber(parseInt(this.executorMemory))) {
if (!Number.isInteger(parseInt(this.executorMemory))) {
this.$message.warning(`${i18n.$t('Memory should be a positive integer')}`)
return false
}
if (!this.executorCores) {
this.$message.warning(`${i18n.$t('Please enter ExecutorPlease enter Executor core number')}`)
if (!this.numExecutors) {
this.$message.warning(`${i18n.$t('Please enter Executor number')}`)
return false
}
if (!Number.isInteger(parseInt(this.executorCores))) {
this.$message.warning(`${i18n.$t('Core number should be positive integer')}`)
if (!Number.isInteger(parseInt(this.numExecutors))) {
this.$message.warning(`${i18n.$t('The Executor number should be a positive integer')}`)
return false
}
// noRes
if (this.noRes.length>0) {
this.$message.warning(`${i18n.$t('Please delete all non-existing resources')}`)
return false
}
// localParams Subcomponent verification
if (!this.$refs.refLocalParams._verifProp()) {
return false

55
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -81,13 +81,14 @@ export default {
'Please choose': 'Please choose',
'Please enter a positive integer': 'Please enter a positive integer',
'Program Type': 'Program Type',
'Main class': 'Main class',
'Main package': 'Main package',
'Main Class': 'Main Class',
'Please enter main class': 'Please enter main class',
'Main Package': 'Main Package',
'Please enter main package': 'Please enter main package',
'Command-line parameters': 'Command-line parameters',
'Please enter Command-line parameters': 'Please enter Command-line parameters',
'Other parameters': 'Other parameters',
'Please enter other parameters': 'Please enter other parameters',
'Main Arguments': 'Main Arguments',
'Please enter main arguments': 'Please enter main arguments',
'Option Parameters': 'Option Parameters',
'Please enter option parameters': 'Please enter option parameters',
Resources: 'Resources',
'Custom Parameters': 'Custom Parameters',
'Custom template': 'Custom template',
@ -97,25 +98,28 @@ export default {
Script: 'Script',
'Please enter script(required)': 'Please enter script(required)',
'Deploy Mode': 'Deploy Mode',
'Flink Version': 'Flink Version',
'Driver core number': 'Driver core number',
'Please enter driver core number': 'Please enter driver core number',
'Driver memory use': 'Driver memory use',
'Please enter driver memory use': 'Please enter driver memory use',
'Number of Executors': 'Number of Executors',
'Please enter the number of Executor': 'Please enter the number of Executor',
'Executor memory': 'Executor memory',
'Please enter the Executor memory': 'Please enter the Executor memory',
'Executor core number': 'Executor core number',
'Please enter Executor core number': 'Please enter Executor core number',
'The number of Executors should be a positive integer': 'The number of Executors should be a positive integer',
'Driver Cores': 'Driver Cores',
'Please enter Driver cores': 'Please enter Driver cores',
'Driver Memory': 'Driver Memory',
'Please enter Driver memory': 'Please enter Driver memory',
'Executor Number': 'Executor Number',
'Please enter Executor number': 'Please enter Executor number',
'The Executor number should be a positive integer': 'The Executor number should be a positive integer',
'Executor Memory': 'Executor Memory',
'Please enter Executor memory': 'Please enter Executor memory',
'Executor Cores': 'Executor Cores',
'Please enter Executor cores': 'Please enter Executor cores',
'Memory should be a positive integer': 'Memory should be a positive integer',
'Please enter ExecutorPlease enter Executor core number': 'Please enter ExecutorPlease enter Executor core number',
'Core number should be positive integer': 'Core number should be positive integer',
'Please enter jobManager memory': 'Please enter jobManager memory',
'Please enter the taskManager memory': 'Please enter the taskManager memory',
'Please enter slot number': 'Please enter slot number',
'Please enter taskManager number': 'Please enter taskManager number',
'Flink Version': 'Flink Version',
'JobManager Memory': 'JobManager Memory',
'Please enter JobManager memory': 'Please enter JobManager memory',
'TaskManager Memory': 'TaskManager Memory',
'Please enter TaskManager memory': 'Please enter TaskManager memory',
'Slot Number': 'Slot Number',
'Please enter Slot number': 'Please enter Slot number',
'TaskManager Number': 'TaskManager Number',
'Please enter TaskManager number': 'Please enter TaskManager number',
'SQL Type': 'SQL Type',
Title: 'Title',
'Please enter the title of email': 'Please enter the title of email',
@ -189,7 +193,6 @@ export default {
Email: 'Email',
Phone: 'Phone',
'Please enter phone number': 'Please enter phone number',
'Please enter main class': 'Please enter main class',
'Please enter email': 'Please enter email',
'Please enter the correct email format': 'Please enter the correct email format',
'Please enter the correct mobile phone format': 'Please enter the correct mobile phone format',
@ -324,10 +327,6 @@ export default {
'Resume the suspension process': 'Resume the suspension process',
'Execute from the failed nodes': 'Execute from the failed nodes',
'Complement Data': 'Complement Data',
slot: 'slot',
taskManager: 'taskManager',
jobManagerMemory: 'jobManagerMemory',
taskManagerMemory: 'taskManagerMemory',
'Scheduling execution': 'Scheduling execution',
'Recovery waiting thread': 'Recovery waiting thread',
'Submitted successfully': 'Submitted successfully',

57
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -81,42 +81,45 @@ export default {
'Please choose': '请选择',
'Please enter a positive integer': '请输入正整数',
'Program Type': '程序类型',
'Main class': '主函数的class',
'Main package': '主程序包',
'Main Class': '主函数的Class',
'Please enter main class': '请填写主函数的Class',
'Main Package': '主程序包',
'Please enter main package': '请选择主程序包',
'Command-line parameters': '命令行参数',
'Please enter Command-line parameters': '请输入命令行参数',
'Other parameters': '其他参数',
'Please enter other parameters': '请输入其他参数',
'Main Arguments': '主程序参数',
'Please enter main arguments': '请输入主程序参数',
'Option Parameters': '选项参数',
'Please enter option parameters': '请输入选项参数',
Resources: '资源',
'Custom Parameters': '自定义参数',
'Custom template': '自定义模版',
'Please enter main class': '请填写主函数的class',
Datasource: '数据源',
methods: '方法',
'Please enter method(optional)': '请输入方法(选填)',
Script: '脚本',
'Please enter script(required)': '请输入脚本(必填)',
'Deploy Mode': '部署方式',
'Flink Version': 'Flink版本',
'Driver core number': 'Driver内核数',
'Please enter driver core number': '请输入Driver内核数',
'Driver memory use': 'Driver内存数',
'Please enter driver memory use': '请输入Driver内存数',
'Number of Executors': 'Executor数量',
'Please enter the number of Executor': '请输入Executor数量',
'Executor memory': 'Executor内存数',
'Please enter the Executor memory': '请输入Executor内存数',
'Executor core number': 'Executor内核数',
'Please enter Executor core number': '请输入Executor内核数',
'The number of Executors should be a positive integer': 'Executor数量为正整数',
'Driver Cores': 'Driver核心数',
'Please enter Driver cores': '请输入Driver核心数',
'Driver Memory': 'Driver内存数',
'Please enter Driver memory': '请输入Driver内存数',
'Executor Number': 'Executor数量',
'Please enter Executor number': '请输入Executor数量',
'The Executor number should be a positive integer': 'Executor数量为正整数',
'Executor Memory': 'Executor内存数',
'Please enter Executor memory': '请输入Executor内存数',
'Executor Cores': 'Executor核心数',
'Please enter Executor cores': '请输入Executor核心数',
'Memory should be a positive integer': '内存数为数字',
'Please enter ExecutorPlease enter Executor core number': '请填写Executor内核数',
'Core number should be positive integer': '内核数为正整数',
'Please enter jobManager memory': '请输入JobManager内存数',
'Please enter the taskManager memory': '请输入TaskManager内存数',
'Please enter slot number': '请输入slot数量',
'Please enter taskManager number': '请输入taskManager数量',
'Core number should be positive integer': '核心数为正整数',
'Flink Version': 'Flink版本',
'JobManager Memory': 'JobManager内存数',
'Please enter JobManager memory': '请输入JobManager内存数',
'TaskManager Memory': 'TaskManager内存数',
'Please enter TaskManager memory': '请输入TaskManager内存数',
'Slot Number': 'Slot数量',
'Please enter Slot number': '请输入Slot数量',
'TaskManager Number': 'TaskManager数量',
'Please enter TaskManager number': '请输入TaskManager数量',
'SQL Type': 'sql类型',
Title: '主题',
'Please enter the title of email': '请输入邮件主题',
@ -519,10 +522,6 @@ export default {
'Next five execution times': '接下来五次执行时间',
'Execute time': '执行时间',
'Complement range': '补数范围',
slot: 'slot数量',
taskManager: 'taskManager数量',
jobManagerMemory: 'jobManager内存数',
taskManagerMemory: 'taskManager内存数',
'Http Url': '请求地址',
'Http Method': '请求类型',
'Http Parameters': '请求参数',

Loading…
Cancel
Save