Browse Source

add check interval

pull/3/MERGE
曹聚阳 4 years ago
parent
commit
4759d47ce1
  1. 14
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue
  2. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  3. 1
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

14
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue

@ -49,6 +49,12 @@
<x-input v-model="waitStartTimeout.interval" style="width: 100px;" :disabled="isDetails" maxlength="9"> <x-input v-model="waitStartTimeout.interval" style="width: 100px;" :disabled="isDetails" maxlength="9">
<span slot="append">{{$t('Minute')}}</span> <span slot="append">{{$t('Minute')}}</span>
</x-input> </x-input>
<span class="text-box">
<span>{{$t('Check interval')}}</span>
</span>
<x-input v-model="waitStartTimeout.checkInterval" style="width: 100px;" :disabled="isDetails" maxlength="9">
<span slot="append">{{$t('Minute')}}</span>
</x-input>
<span class="text-box"> <span class="text-box">
<span>{{$t('Timeout strategy')}}</span> <span>{{$t('Timeout strategy')}}</span>
</span> </span>
@ -110,7 +116,8 @@
// Timeout strategy // Timeout strategy
strategy: ['FAILED'], strategy: ['FAILED'],
// Timeout period // Timeout period
interval: null interval: null,
checkInterval: null
}, },
waitCompleteTimeout: { waitCompleteTimeout: {
enable: false, enable: false,
@ -131,6 +138,7 @@
// p = 0 for timeout switch; p = 1 for wait start timeout switch; p = 2 for wait complete timeout switch. // p = 0 for timeout switch; p = 1 for wait start timeout switch; p = 2 for wait complete timeout switch.
if (p === 1 || p === 0) { if (p === 1 || p === 0) {
this.waitStartTimeout.interval = is ? 30 : null this.waitStartTimeout.interval = is ? 30 : null
this.waitStartTimeout.checkInterval = is ? 1 : null
} }
if (p === 2 || p === 0) { if (p === 2 || p === 0) {
this.waitCompleteTimeout.strategy = is ? ['WARN'] : [] this.waitCompleteTimeout.strategy = is ? ['WARN'] : []
@ -149,7 +157,7 @@
const reg = /^[1-9]\d*$/ const reg = /^[1-9]\d*$/
if (this.enable if (this.enable
&& (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) && (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval))
|| (this.waitStartTimeout.enable && !reg.test(this.waitStartTimeout.interval))) { || (this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) {
this.$message.warning(`${this.$t('Timeout must be a positive integer')}`) this.$message.warning(`${this.$t('Timeout must be a positive integer')}`)
return false return false
} }
@ -157,6 +165,7 @@
waitStartTimeout: { waitStartTimeout: {
strategy: 'FAILED', strategy: 'FAILED',
interval: parseInt(this.waitStartTimeout.interval), interval: parseInt(this.waitStartTimeout.interval),
checkInterval: parseInt(this.waitStartTimeout.checkInterval),
enable: this.waitStartTimeout.enable enable: this.waitStartTimeout.enable
}, },
waitCompleteTimeout: { waitCompleteTimeout: {
@ -193,6 +202,7 @@
this.waitStartTimeout.enable = o.waitStartTimeout.enable || false this.waitStartTimeout.enable = o.waitStartTimeout.enable || false
this.waitStartTimeout.strategy = ['FAILED'] this.waitStartTimeout.strategy = ['FAILED']
this.waitStartTimeout.interval = o.waitStartTimeout.interval || null this.waitStartTimeout.interval = o.waitStartTimeout.interval || null
this.waitStartTimeout.checkInterval = o.waitStartTimeout.checkInterval || null
} }
} }
}, },

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

@ -428,6 +428,7 @@ export default {
'Timeout period': 'Timeout period', 'Timeout period': 'Timeout period',
'Waiting Dependent complete': 'Waiting Dependent complete', 'Waiting Dependent complete': 'Waiting Dependent complete',
'Waiting Dependent start': 'Waiting Dependent start', 'Waiting Dependent start': 'Waiting Dependent start',
'Check interval': 'Check interval',
'Timeout strategy must be selected': 'Timeout strategy must be selected', 'Timeout strategy must be selected': 'Timeout strategy must be selected',
'Timeout must be a positive integer': 'Timeout must be a positive integer', 'Timeout must be a positive integer': 'Timeout must be a positive integer',
'Add dependency': 'Add dependency', 'Add dependency': 'Add dependency',

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

@ -422,6 +422,7 @@ export default {
'Timeout period': '超时时长', 'Timeout period': '超时时长',
'Waiting Dependent complete': '等待依赖完成', 'Waiting Dependent complete': '等待依赖完成',
'Waiting Dependent start': '等待依赖启动', 'Waiting Dependent start': '等待依赖启动',
'Check interval': '检查间隔',
'Timeout strategy must be selected': '超时策略必须选一个', 'Timeout strategy must be selected': '超时策略必须选一个',
'Timeout must be a positive integer': '超时时长必须为正整数', 'Timeout must be a positive integer': '超时时长必须为正整数',
'Add dependency': '添加依赖', 'Add dependency': '添加依赖',

Loading…
Cancel
Save