dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Improvement-11880][Hivecli] Improve the UI of HiveCli

Open rickchengx opened this issue 2 years ago • 5 comments

Purpose of the pull request

close: #11880

if the user selects the type "FROM_FILE", he doesn't need to write sql statements in the HIVE SQL SCRIPT

Brief change log

Verify this pull request

manually tested

截屏2022-09-09 15 49 36 截屏2022-09-09 15 49 27

rickchengx avatar Sep 09 '22 08:09 rickchengx

May I ask whether it is possible to make Resources mandatory if users choose FROM_FILE?

BTW, we could also make HIVE SQL SCRIPT mandatory, I mean add a red star on UI for notice, if users choose FROM_SCRIPT.

EricGao888 avatar Sep 09 '22 09:09 EricGao888

Overall, this is a good feature. It improves the interactions and I like it : )

EricGao888 avatar Sep 09 '22 09:09 EricGao888

May I ask whether it is possible to make Resources mandatory if users choose FROM_FILE?

BTW, we could also make HIVE SQL SCRIPT mandatory, I mean add a red star on UI for notice, if users choose FROM_SCRIPT.

Hi, @EricGao888 , thanks for your suggestions.

I have made HIVE SQL SCRIPT mandatary if users choose FROM_SCRIPT.

截屏2022-09-13 11 25 31 image

rickchengx avatar Sep 13 '22 03:09 rickchengx

May I ask whether it is possible to make Resources mandatory if users choose FROM_FILE?

BTW, we could also make HIVE SQL SCRIPT mandatory, I mean add a red star on UI for notice, if users choose FROM_SCRIPT.

Hi, @EricGao888 , thanks for your suggestions.

I have made HIVE SQL SCRIPT mandatary if users choose FROM_SCRIPT.

截屏2022-09-13 11 25 31

and made Resources mandatary if users choose FROM_FILE (also limit the number of resource file to 1).

截屏2022-09-13 11 25 38

Great job!

EricGao888 avatar Sep 13 '22 03:09 EricGao888

Hi, @songjianet , @Amy0104, could you please help me this front-end problem?

It seems that resourcesRequired.value will lose the reactivity. 截屏2022-09-23 10 53 03

which means the user's click on the front end does not affect the required attribute in use-resources.ts

https://github.com/apache/dolphinscheduler/blob/6eb1eb722af06b94027994b2ef8955e84fd97d7f/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts#L25-L29

https://github.com/apache/dolphinscheduler/blob/6eb1eb722af06b94027994b2ef8955e84fd97d7f/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts#L74

rickchengx avatar Sep 23 '22 03:09 rickchengx

Codecov Report

Merging #11882 (6eb1eb7) into dev (8a47785) will increase coverage by 0.11%. The diff coverage is 49.36%.

:exclamation: Current head 6eb1eb7 differs from pull request most recent head 40439f1. Consider uploading reports for the commit 40439f1 to get more accurate results

@@             Coverage Diff              @@
##                dev   #11882      +/-   ##
============================================
+ Coverage     38.57%   38.69%   +0.11%     
+ Complexity     4046     4010      -36     
============================================
  Files           995     1001       +6     
  Lines         36736    37422     +686     
  Branches       4280     4262      -18     
============================================
+ Hits          14171    14480     +309     
- Misses        20943    21295     +352     
- Partials       1622     1647      +25     
Impacted Files Coverage Δ
...olphinscheduler/api/audit/AuditPublishService.java 34.61% <0.00%> (ø)
...phinscheduler/api/controller/TenantController.java 62.50% <ø> (ø)
...heduler/api/dto/queue/QueueListPagingResponse.java 0.00% <0.00%> (ø)
...rg/apache/dolphinscheduler/api/k8s/K8sManager.java 58.53% <0.00%> (ø)
...lphinscheduler/api/permission/PermissionCheck.java 0.00% <0.00%> (ø)
...che/dolphinscheduler/api/python/PythonGateway.java 17.22% <0.00%> (ø)
...nscheduler/api/service/impl/DqRuleServiceImpl.java 59.18% <0.00%> (ø)
...api/service/impl/ProcessDefinitionServiceImpl.java 31.38% <ø> (-0.65%) :arrow_down:
...r/api/service/impl/ProcessInstanceServiceImpl.java 57.71% <ø> (-3.15%) :arrow_down:
...i/service/impl/ProcessTaskRelationServiceImpl.java 21.32% <ø> (-1.13%) :arrow_down:
... and 137 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Sep 23 '22 05:09 codecov-commenter

Hi, @songjianet , @Amy0104, could you please help me this front-end problem?

It seems that resourcesRequired.value will lose the reactivity. 截屏2022-09-23 10 53 03

which means the user's click on the front end does not affect the required attribute in use-resources.ts

https://github.com/apache/dolphinscheduler/blob/6eb1eb722af06b94027994b2ef8955e84fd97d7f/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts#L25-L29

https://github.com/apache/dolphinscheduler/blob/6eb1eb722af06b94027994b2ef8955e84fd97d7f/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts#L74

I'll check it.

Amy0104 avatar Sep 28 '22 10:09 Amy0104

Maybe you can try to switch the useResource firstly, and then I try to support this by reactive required later. Is that ok? @rickchengx

Amy0104 avatar Sep 29 '22 02:09 Amy0104

Maybe you can try to switch the useResource firstly, and then I try to support this by reactive required later. Is that ok? @rickchengx

@Amy0104 Thanks a lot for the help. I have switched to the useResources(). image

rickchengx avatar Sep 29 '22 02:09 rickchengx

After this pr merged, I will fix this by #12202 .

Amy0104 avatar Sep 29 '22 03:09 Amy0104

I have already set the required to be reactive.

Amy0104 avatar Sep 30 '22 06:09 Amy0104

I have already set the required to be reactive.

Thanks a lot, @Amy0104

  • I have made resources of hivecli task to be reactive in #12336

rickchengx avatar Oct 12 '22 08:10 rickchengx