This is an automated email from the ASF dual-hosted git repository.

songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new c8a9004  [Fix][UI Next][V1.0.0-Alpha] Fix some fields not hidden when 
the custom job is true in SQOOP. (#9185)
c8a9004 is described below

commit c8a90043ee95ee5ee2a7b6ebe7630cab87e23cdf
Author: Amy0104 <[email protected]>
AuthorDate: Fri Mar 25 15:15:40 2022 +0800

    [Fix][UI Next][V1.0.0-Alpha] Fix some fields not hidden when the custom job 
is true in SQOOP. (#9185)
---
 .../node/fields/use-sqoop-source-type.ts           | 36 +++++++++++++++++-----
 .../node/fields/use-sqoop-target-type.ts           | 22 +++++++++----
 2 files changed, 44 insertions(+), 14 deletions(-)

diff --git 
a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts
 
b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts
index 3783379..5ac413a 100644
--- 
a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts
+++ 
b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-source-type.ts
@@ -26,18 +26,38 @@ export function useSourceType(model: { [field: string]: any 
}): IJsonItem[] {
   const { t } = useI18n()
   const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24))
   const tableSpan = computed(() =>
-    model.sourceType === 'MYSQL' && model.srcQueryType === '0' ? 24 : 0
+    !model.isCustomTask &&
+    model.sourceType === 'MYSQL' &&
+    model.srcQueryType === '0'
+      ? 24
+      : 0
   )
   const editorSpan = computed(() =>
-    model.sourceType === 'MYSQL' && model.srcQueryType === '1' ? 24 : 0
+    !model.isCustomTask &&
+    model.sourceType === 'MYSQL' &&
+    model.srcQueryType === '1'
+      ? 24
+      : 0
   )
   const columnSpan = computed(() =>
-    model.sourceType === 'MYSQL' && model.srcColumnType === '1' ? 24 : 0
+    !model.isCustomTask &&
+    model.sourceType === 'MYSQL' &&
+    model.srcColumnType === '1'
+      ? 24
+      : 0
+  )
+  const mysqlSpan = computed(() =>
+    !model.isCustomTask && model.sourceType === 'MYSQL' ? 24 : 0
+  )
+  const hiveSpan = computed(() =>
+    !model.isCustomTask && model.sourceType === 'HIVE' ? 24 : 0
+  )
+  const hdfsSpan = computed(() =>
+    !model.isCustomTask && model.sourceType === 'HDFS' ? 24 : 0
+  )
+  const datasourceSpan = computed(() =>
+    !model.isCustomTask && model.sourceType === 'MYSQL' ? 12 : 0
   )
-  const mysqlSpan = computed(() => (model.sourceType === 'MYSQL' ? 24 : 0))
-  const hiveSpan = computed(() => (model.sourceType === 'HIVE' ? 24 : 0))
-  const hdfsSpan = computed(() => (model.sourceType === 'HDFS' ? 24 : 0))
-  const datasourceSpan = computed(() => (model.sourceType === 'MYSQL' ? 12 : 
0))
 
   const sourceTypes = ref([
     {
@@ -95,7 +115,7 @@ export function useSourceType(model: { [field: string]: any 
}): IJsonItem[] {
   return [
     {
       type: 'custom',
-      field: 'custom-title',
+      field: 'custom-title-source',
       span: unCustomSpan,
       widget: h(
         'div',
diff --git 
a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts
 
b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts
index 606dfdf..a995d8f 100644
--- 
a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts
+++ 
b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-sqoop-target-type.ts
@@ -24,12 +24,22 @@ import type { IJsonItem, IOption, SourceType } from 
'../types'
 export function useTargetType(model: { [field: string]: any }): IJsonItem[] {
   const { t } = useI18n()
   const unCustomSpan = computed(() => (model.isCustomTask ? 0 : 24))
-  const hiveSpan = computed(() => (model.targetType === 'HIVE' ? 24 : 0))
-  const hdfsSpan = computed(() => (model.targetType === 'HDFS' ? 24 : 0))
-  const mysqlSpan = computed(() => (model.targetType === 'MYSQL' ? 24 : 0))
-  const dataSourceSpan = computed(() => (model.targetType === 'MYSQL' ? 12 : 
0))
+  const hiveSpan = computed(() =>
+    !model.isCustomTask && model.targetType === 'HIVE' ? 24 : 0
+  )
+  const hdfsSpan = computed(() =>
+    !model.isCustomTask && model.targetType === 'HDFS' ? 24 : 0
+  )
+  const mysqlSpan = computed(() =>
+    !model.isCustomTask && model.targetType === 'MYSQL' ? 24 : 0
+  )
+  const dataSourceSpan = computed(() =>
+    !model.isCustomTask && model.targetType === 'MYSQL' ? 12 : 0
+  )
   const updateSpan = computed(() =>
-    model.targetType === 'MYSQL' && model.isUpdate ? 24 : 0
+    !model.isCustomTask && model.targetType === 'MYSQL' && model.isUpdate
+      ? 24
+      : 0
   )
 
   const targetTypes = ref([
@@ -100,7 +110,7 @@ export function useTargetType(model: { [field: string]: any 
}): IJsonItem[] {
   return [
     {
       type: 'custom',
-      field: 'custom-title',
+      field: 'custom-title-target',
       span: unCustomSpan,
       widget: h(
         'div',

Reply via email to