Browse Source

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

3.1.3-release
calvin 2 years ago committed by zhuangchong
parent
commit
6b7bcda380
  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[] {
const { t } = useI18n()
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 = [
{
@ -36,11 +36,11 @@ export function useDependentTimeout(model: {
value: 'FAILED'
}
]
watch(
() => model.timeoutFlag,
(timeoutFlag) => {
model.timeoutNotifyStrategy = timeoutFlag ? ['WARN'] : []
model.timeout = timeoutFlag ? 30 : null
model.timeoutShowFlag = timeoutFlag
}
)
@ -56,8 +56,14 @@ export function useDependentTimeout(model: {
name: t('project.node.waiting_dependent_complete'),
props: {
'on-update:value': (value: boolean) => {
model.timeoutNotifyStrategy = value ? ['WARN'] : null
model.timeout = value ? 30 : null
if (value) {
if (!model.timeoutNotifyStrategy.length) {
model.timeoutNotifyStrategy = ['WARN']
}
if (!model.timeout) {
model.timeout = 30
}
}
}
},
span: timeCompleteSpan

Loading…
Cancel
Save