Browse Source

[Improvement-15725][UI] The default option of project preferences can be clearable. (#15727)

* adjust the project preferences
dev_wenjun_refactorMaster
calvin 8 months ago committed by GitHub
parent
commit
d49dbbaac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      dolphinscheduler-ui/src/views/projects/preference/use-form.ts
  2. 6
      dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx
  3. 10
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx

8
dolphinscheduler-ui/src/views/projects/preference/use-form.ts

@ -125,7 +125,13 @@ export function useForm() {
item.validate.required = false
item.span = 12
}
Object.assign(item, { props: { style: 'width: 250px' } })
if (item.type === 'select') {
Object.assign(item, {
props: { style: 'width: 250px', clearable: true }
})
} else {
Object.assign(item, { props: { style: 'width: 250px' } })
}
}
return preferencesItems
}

6
dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx

@ -130,7 +130,11 @@ const NodeDetailModal = defineComponent({
const restructureNodeData = (data: INodeData) => {
if (!data?.id) {
Object.assign(data, projectPreferences.value)
for (let item in projectPreferences.value) {
if (projectPreferences.value[item] !== null && item in data) {
Object.assign(data, { item: projectPreferences.value[item] })
}
}
}
}

10
dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx

@ -240,6 +240,16 @@ export default defineComponent({
form.environmentCode = projectPreferences.value.environmentCode
}
}
if (projectPreferences.value?.alertGroups && variables?.alertGroups) {
if (
containValueInOptions(
variables.alertGroups,
projectPreferences.value.alertGroups
)
) {
form.warningGroupId = projectPreferences.value.alertGroups
}
}
}
const updateWorkerGroup = () => {

Loading…
Cancel
Save