diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx b/dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx index d8cb54df946a..8bb031e5a5ab 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx @@ -130,9 +130,21 @@ const NodeDetailModal = defineComponent({ const restructureNodeData = (data: INodeData) => { if (!data?.id) { + const allowedFields = [ + 'taskPriority', + 'workerGroup', + 'environmentCode', + 'failRetryTimes', + 'failRetryInterval', + 'cpuQuota', + 'memoryMax', + 'timeoutFlag', + 'timeoutNotifyStrategy', + 'timeout' + ] for (const item in projectPreferences.value) { - if (projectPreferences.value[item] !== null && item in data) { - Object.assign(data, { item: projectPreferences.value[item] }) + if (projectPreferences.value[item] !== null && allowedFields.includes(item)) { + Object.assign(data, { [item]: projectPreferences.value[item] }) } } } diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/timing-modal.tsx b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/timing-modal.tsx index 08325a071b16..c30230581a65 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/timing-modal.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/timing-modal.tsx @@ -259,14 +259,14 @@ export default defineComponent({ timingForm.environmentCode = projectPreferences.value.environmentCode } } - if (projectPreferences.value?.alertGroup && variables?.alertGroups) { + if (projectPreferences.value?.alertGroups && variables?.alertGroups) { if ( containValueInOptions( variables.alertGroups, - projectPreferences.value.alertGroup + projectPreferences.value.alertGroups ) ) { - timingForm.warningGroupId = projectPreferences.value.alertGroup + timingForm.warningGroupId = projectPreferences.value.alertGroups } } }