Browse Source

[Feature-10117][UI] Hide node execution when start from the workflow definition list page (#11372)

Co-authored-by: sheldonliu <sheldonliu>
3.1.0-release
Sheldon 2 years ago committed by GitHub
parent
commit
b81574ecf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 35
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx

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

@ -23,9 +23,11 @@ import {
onMounted, onMounted,
ref, ref,
watch, watch,
getCurrentInstance getCurrentInstance,
computed
} from 'vue' } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useRoute } from "vue-router"
import Modal from '@/components/modal' import Modal from '@/components/modal'
import { useForm } from './use-form' import { useForm } from './use-form'
import { useModal } from './use-modal' import { useModal } from './use-modal'
@ -74,6 +76,7 @@ export default defineComponent({
setup(props, ctx) { setup(props, ctx) {
const parallelismRef = ref(false) const parallelismRef = ref(false)
const { t } = useI18n() const { t } = useI18n()
const route = useRoute()
const { startState } = useForm() const { startState } = useForm()
const { const {
variables, variables,
@ -144,6 +147,8 @@ export default defineComponent({
} }
] ]
const showTaskDependType = computed(() => route.name === 'workflow-definition-detail')
const renderLabel = (option: any) => { const renderLabel = (option: any) => {
return [ return [
h( h(
@ -205,6 +210,7 @@ export default defineComponent({
return { return {
t, t,
showTaskDependType,
parallelismRef, parallelismRef,
hideModal, hideModal,
handleStart, handleStart,
@ -224,7 +230,6 @@ export default defineComponent({
render() { render() {
const { t } = this const { t } = this
return ( return (
<Modal <Modal
show={this.show} show={this.show}
@ -255,18 +260,20 @@ export default defineComponent({
</NSpace> </NSpace>
</NRadioGroup> </NRadioGroup>
</NFormItem> </NFormItem>
<NFormItem {this.showTaskDependType && (
label={t('project.workflow.node_execution')} <NFormItem
path='taskDependType' label={t('project.workflow.node_execution')}
> path='taskDependType'
<NRadioGroup v-model:value={this.startForm.taskDependType}> >
<NSpace> <NRadioGroup v-model:value={this.startForm.taskDependType}>
<NRadio value='TASK_POST'>{t('project.workflow.backward_execution')}</NRadio> <NSpace>
<NRadio value='TASK_PRE'>{t('project.workflow.forward_execution')}</NRadio> <NRadio value='TASK_POST'>{t('project.workflow.backward_execution')}</NRadio>
<NRadio value='TASK_ONLY'>{t('project.workflow.current_node_execution')}</NRadio> <NRadio value='TASK_PRE'>{t('project.workflow.forward_execution')}</NRadio>
</NSpace> <NRadio value='TASK_ONLY'>{t('project.workflow.current_node_execution')}</NRadio>
</NRadioGroup> </NSpace>
</NFormItem> </NRadioGroup>
</NFormItem>)
}
<NFormItem <NFormItem
label={t('project.workflow.notification_strategy')} label={t('project.workflow.notification_strategy')}
path='warningType' path='warningType'

Loading…
Cancel
Save