Browse Source

fix the issue with failing to save the settings of timeout alarm (#13234)

3.2.0-release
calvin 2 years ago committed by GitHub
parent
commit
d795a7a0a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent-timeout.ts

16
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent-timeout.ts

@ -24,7 +24,7 @@ export function useDependentTimeout(model: {
}): IJsonItem[] { }): IJsonItem[] {
const { t } = useI18n() const { t } = useI18n()
const timeCompleteSpan = computed(() => (model.timeoutShowFlag ? 24 : 0)) const timeCompleteSpan = computed(() => (model.timeoutShowFlag ? 24 : 0))
const timeCompleteEnableSpan = computed(() => (model.timeoutFlag ? 12 : 0)) const timeCompleteEnableSpan = computed(() => (model.timeoutFlag && model.timeoutShowFlag ? 12 : 0))
const strategyOptions = [ const strategyOptions = [
{ {
@ -36,11 +36,11 @@ export function useDependentTimeout(model: {
value: 'FAILED' value: 'FAILED'
} }
] ]
watch( watch(
() => model.timeoutFlag, () => model.timeoutFlag,
(timeoutFlag) => { (timeoutFlag) => {
model.timeoutNotifyStrategy = timeoutFlag ? ['WARN'] : [] model.timeoutShowFlag = timeoutFlag
model.timeout = timeoutFlag ? 30 : null
} }
) )
@ -56,8 +56,14 @@ export function useDependentTimeout(model: {
name: t('project.node.waiting_dependent_complete'), name: t('project.node.waiting_dependent_complete'),
props: { props: {
'on-update:value': (value: boolean) => { 'on-update:value': (value: boolean) => {
model.timeoutNotifyStrategy = value ? ['WARN'] : null if (value) {
model.timeout = value ? 30 : null if (!model.timeoutNotifyStrategy.length) {
model.timeoutNotifyStrategy = ['WARN']
}
if (!model.timeout) {
model.timeout = 30
}
}
} }
}, },
span: timeCompleteSpan span: timeCompleteSpan

Loading…
Cancel
Save