You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/29 03:17:09 UTC

[GitHub] [dolphinscheduler] devosend commented on a diff in pull request #9840: [Feature- 9837][plugin/ui] support FlinkSQL Task

devosend commented on code in PR #9840:
URL: https://github.com/apache/dolphinscheduler/pull/9840#discussion_r861427086


##########
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-flink.ts:
##########
@@ -14,15 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { computed, ref } from 'vue'
+import { computed, ref , watchEffect} from 'vue'

Review Comment:
   Prettier format code should be used here.
   



##########
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-flink.ts:
##########
@@ -14,15 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { computed, ref } from 'vue'
+import { computed, ref , watchEffect} from 'vue'
 import { useI18n } from 'vue-i18n'
 import { useCustomParams, useDeployMode, useMainJar, useResources } from '.'
 import type { IJsonItem } from '../types'
 
 export function useFlink(model: { [field: string]: any }): IJsonItem[] {
   const { t } = useI18n()
   const mainClassSpan = computed(() =>
-    model.programType === 'PYTHON' ? 0 : 24
+    (model.programType === 'PYTHON' || model.programType === 'SQL') ? 0 : 24
+  )
+
+  const mainArgsSpan = computed(() =>
+    model.programType === 'SQL' ? 0 : 24
+  )
+
+  const rawScriptSpan = computed(() =>
+    model.programType === 'SQL' ? 24 : 0
+  )
+
+  const flinkVersionOptions = computed(() =>

Review Comment:
   above



##########
dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-flink.ts:
##########
@@ -59,21 +75,32 @@ export function useFlink(model: { [field: string]: any }): IJsonItem[] {
       },
       validate: {
         trigger: ['input', 'blur'],
-        required: model.programType !== 'PYTHON',
+        required: model.programType !== 'PYTHON' && model.programType !== 'SQL',
         validator(validate: any, value: string) {
-          if (model.programType !== 'PYTHON' && !value) {
+          if (model.programType !== 'PYTHON' && !value && model.programType !== 'SQL') {
             return new Error(t('project.node.main_class_tips'))
           }
         }
       }
     },
     useMainJar(model),

Review Comment:
   You should judge programType in `useMainJar `.  It should not request `queryResourceByProgramType` when programType is SQL



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org