This is an automated email from the ASF dual-hosted git repository. kerwin pushed a commit to branch 3.1.3-prepare in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit 6b7bcda380924a78847543a72738b0900cf3c560 Author: calvin <[email protected]> AuthorDate: Wed Dec 21 16:18:10 2022 +0800 fix the issue with failing to save the settings of timeout alarm (#13234) --- .../task/components/node/fields/use-dependent-timeout.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent-timeout.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent-timeout.ts index 09df391009..a7b9468fde 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent-timeout.ts +++ b/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
