Browse Source

[Fix][UI Next][V1.0.0-Beta] Add the 'startNodeList' field to the 'start-process-instance' interface. (#9769)

3.0.0/version-upgrade
Amy0104 2 years ago committed by GitHub
parent
commit
84cad13782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-ui-next/src/store/project/task-node.ts
  2. 7
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx
  3. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
  4. 6
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts
  5. 5
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx

2
dolphinscheduler-ui-next/src/store/project/task-node.ts

@ -131,7 +131,7 @@ export const useTaskNodeStore = defineStore({
}, },
updateDependentResult(dependentResult: BDependentResultType) { updateDependentResult(dependentResult: BDependentResultType) {
const result = {} as DependentResultType const result = {} as DependentResultType
for (let [key, value] of Object.entries(dependentResult)) { for (const [key, value] of Object.entries(dependentResult)) {
result[key] = value === 'FAILED' ? 'FAILURE' : value result[key] = value === 'FAILED' ? 'FAILURE' : value
} }
this.dependentResult = result this.dependentResult = result

7
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx

@ -70,7 +70,7 @@ export default defineComponent({
} }
const startRunning = () => { const startRunning = () => {
ctx.emit('start') ctx.emit('start', Number(props.cell?.id))
} }
const handleEdit = () => { const handleEdit = () => {
@ -156,7 +156,10 @@ export default defineComponent({
{t('project.node.delete')} {t('project.node.delete')}
</NButton> </NButton>
{this.taskInstance && ( {this.taskInstance && (
<NButton class={`${styles['menu-item']}`} onClick={this.handleViewLog}> <NButton
class={`${styles['menu-item']}`}
onClick={this.handleViewLog}
>
{t('project.node.view_log')} {t('project.node.view_log')}
</NButton> </NButton>
)} )}

1
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx

@ -357,6 +357,7 @@ export default defineComponent({
<StartModal <StartModal
v-model:row={props.definition.processDefinition} v-model:row={props.definition.processDefinition}
v-model:show={nodeVariables.startModalShow} v-model:show={nodeVariables.startModalShow}
taskCode={nodeVariables.taskCode}
/> />
)} )}
{!!props.instance && ( {!!props.instance && (

6
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts

@ -42,7 +42,8 @@ export function useNodeMenu(options: Options) {
logRef: '', logRef: '',
logLoadingRef: ref(true), logLoadingRef: ref(true),
skipLineNum: ref(0), skipLineNum: ref(0),
limit: ref(1000) limit: ref(1000),
taskCode: ''
}) })
const menuHide = () => { const menuHide = () => {
@ -52,8 +53,9 @@ export function useNodeMenu(options: Options) {
graph.value?.unlockScroller() graph.value?.unlockScroller()
} }
const menuStart = () => { const menuStart = (code: number) => {
nodeVariables.startModalShow = true nodeVariables.startModalShow = true
nodeVariables.taskCode = String(code)
} }
const viewLog = (taskId: number, taskType: string) => { const viewLog = (taskId: number, taskType: string) => {

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

@ -59,6 +59,9 @@ const props = {
show: { show: {
type: Boolean as PropType<boolean>, type: Boolean as PropType<boolean>,
default: false default: false
},
taskCode: {
type: String
} }
} }
@ -190,6 +193,8 @@ export default defineComponent({
() => { () => {
if (props.show) { if (props.show) {
getStartParamsList(props.row.code) getStartParamsList(props.row.code)
if (props.taskCode)
startState.startForm.startNodeList = props.taskCode
} }
} }
) )

Loading…
Cancel
Save