From 69bfebfec051e532c37c8af7989a59d95e8659ab Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Wed, 20 Apr 2022 16:30:38 +0800 Subject: [PATCH] [Fix][UI][V1.0.0-Beta] Remove the sql comment in the procedure task and add the instructions link to the procedure task. (#9619) --- .../src/views/projects/task/components/node/detail-modal.tsx | 4 +++- .../projects/task/components/node/fields/use-procedure.ts | 5 +---- .../src/views/projects/task/constants/task-type.ts | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx index c1bb821f3c..5146e5845c 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/detail-modal.tsx @@ -119,11 +119,13 @@ const NodeDetailModal = defineComponent({ text: t('project.node.instructions'), show: !!(taskType && !TASK_TYPES_MAP[taskType]?.helperLinkDisable), action: () => { + let linkedTaskType = taskType?.toLowerCase().replace('_', '-') + if (taskType === 'PROCEDURE') linkedTaskType = 'stored-procedure' const helpUrl = 'https://dolphinscheduler.apache.org/' + locale.value.toLowerCase().replace('_', '-') + '/docs/latest/user_doc/guide/task/' + - taskType?.toLowerCase().replace('_', '-') + + linkedTaskType + '.html' window.open(helpUrl) }, diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts index 65ca5b3903..1c0b4f99a3 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-procedure.ts @@ -28,10 +28,7 @@ export function useProcedure(model: { [field: string]: any }): IJsonItem[] { name: t('project.node.procedure_method'), props: { language: 'sql', - placeholder: t('project.node.procedure_method_tips'), - defaultValue: model.method - ? model.method - : t('project.node.procedure_method_snippet') + placeholder: t('project.node.procedure_method_tips') }, validate: { trigger: ['input', 'trigger'], diff --git a/dolphinscheduler-ui-next/src/views/projects/task/constants/task-type.ts b/dolphinscheduler-ui-next/src/views/projects/task/constants/task-type.ts index c9a76e8c81..fe899a5daf 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/constants/task-type.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/constants/task-type.ts @@ -42,8 +42,7 @@ export const TASK_TYPES_MAP = { alias: 'SUB_PROCESS' }, PROCEDURE: { - alias: 'PROCEDURE', - helperLinkDisable: true + alias: 'PROCEDURE' }, SQL: { alias: 'SQL'