-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement-15603][API] When removing or modifying a workflow the system can check if there any tasks depend on it. #15681
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
21d0840
modify the function of queryTaskSubProcessDepOnProcess
calvinjiang 9d130d6
add a function to query downstream dependent tasks
calvinjiang 983ee28
confirm to make the workflow offline
calvinjiang f912652
query dependent tasks
calvinjiang 1e718f3
check dependencies
calvinjiang b080681
done
calvinjiang 2dd06e1
done
calvinjiang 399df33
done
calvinjiang b8fa4d1
done
calvinjiang 93fee9d
done
calvinjiang f67f8f6
improve the test case
calvinjiang 5091109
improve the test case
calvinjiang 450e38e
improve codes
calvinjiang 3045138
fix conflicts
calvinjiang 924f994
Merge branch 'dev' into f-validate-dependences
calvinjiang 8af5634
prettier the codes
calvinjiang 80394dc
Merge branch 'dev' into f-validate-dependences
calvinjiang 33b7d2f
Merge branch 'f-validate-dependences' of github.com:calvinjiang/dolph…
calvinjiang 5a7c99c
prettier the codes
calvinjiang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
dolphinscheduler-ui/src/views/projects/components/dependencies/dependencies-modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { | ||
defineComponent, | ||
PropType, | ||
h, | ||
ref, watch | ||
} from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import {NEllipsis, NModal, NSpace} from 'naive-ui' | ||
import {IDefinitionData} from "@/views/projects/workflow/definition/types"; | ||
import ButtonLink from "@/components/button-link"; | ||
|
||
const props = { | ||
row: { | ||
type: Object as PropType<IDefinitionData>, | ||
default: {}, | ||
required: false | ||
}, | ||
show: { | ||
type: Boolean as PropType<boolean>, | ||
default: false | ||
}, | ||
required: { | ||
type: Boolean as PropType<boolean>, | ||
default: true | ||
}, | ||
taskLinks: { | ||
type: Array, | ||
default: [] | ||
}, | ||
content: { | ||
type: String, | ||
default: '' | ||
} | ||
} | ||
|
||
export default defineComponent({ | ||
name: 'dependenciesConfirm', | ||
props, | ||
emits: ['update:show', 'update:row', 'confirm'], | ||
setup(props, ctx) { | ||
const { t } = useI18n() | ||
|
||
const showRef = ref(props.show) | ||
|
||
const confirmToHandle = () => { | ||
ctx.emit('confirm') | ||
} | ||
|
||
const cancelToHandle = () => { | ||
ctx.emit('update:show', showRef) | ||
} | ||
|
||
const renderDownstreamDependencies = () => { | ||
return h( | ||
<NSpace vertical> | ||
<div>{props.content}</div> | ||
<div>{t('project.workflow.warning_dependencies')}</div> | ||
{props.taskLinks.map((item: any) => { | ||
return ( | ||
<ButtonLink | ||
onClick={item.action} | ||
disabled={false} | ||
> | ||
{{ | ||
default: () => | ||
h(NEllipsis, | ||
{ | ||
style: 'max-width: 350px;line-height: 1.5' | ||
}, | ||
() => item.text | ||
) | ||
}} | ||
</ButtonLink> | ||
) | ||
})} | ||
</NSpace> | ||
) | ||
} | ||
|
||
watch(()=> props.show, | ||
() => { | ||
showRef.value = props.show | ||
}) | ||
|
||
return {renderDownstreamDependencies, confirmToHandle, cancelToHandle, showRef} | ||
}, | ||
|
||
render() { | ||
const { t } = useI18n() | ||
|
||
return ( | ||
<NModal | ||
v-model:show={this.showRef} | ||
preset={'dialog'} | ||
type={this.$props.required? 'error':'warning'} | ||
title={t('project.workflow.warning_dependent_tasks_title')} | ||
positiveText={this.$props.required? '':t('project.workflow.confirm')} | ||
negativeText={t('project.workflow.cancel')} | ||
maskClosable={false} | ||
onNegativeClick={this.cancelToHandle} | ||
onPositiveClick={this.confirmToHandle} | ||
onClose={this.cancelToHandle} | ||
> | ||
{{ | ||
default: () => ( | ||
this.renderDownstreamDependencies() | ||
) | ||
}} | ||
</NModal> | ||
) | ||
} | ||
}) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Useless parameter Note