Skip to content

Conversation

@rickchengx
Copy link
Contributor

@rickchengx rickchengx commented Sep 9, 2022

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

@github-actions github-actions bot added the UI ui and front end related label Sep 9, 2022
@SbloodyS SbloodyS requested a review from EricGao888 September 9, 2022 08:58
@SbloodyS SbloodyS added the improvement make more easy to user or prompt friendly label Sep 9, 2022
@SbloodyS SbloodyS added this to the 3.1.0 milestone Sep 9, 2022
Copy link
Member

@EricGao888 EricGao888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@EricGao888
Copy link
Member

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
Copy link
Member

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

@rickchengx rickchengx force-pushed the Improvement-11880 branch 3 times, most recently from c010c4b to 9bce22b Compare September 13, 2022 03:50
@rickchengx
Copy link
Contributor Author

rickchengx commented Sep 13, 2022

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

@EricGao888
Copy link
Member

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
EricGao888 previously approved these changes Sep 13, 2022
Copy link
Member

@EricGao888 EricGao888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI passes.

@rickchengx
Copy link
Contributor Author

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

export function useResources(
span: number | Ref<number> = 24,
required = false,
limit: number | Ref<number> = -1
): IJsonItem {

@codecov-commenter
Copy link

Codecov Report

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

❗ 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%) ⬇️
...r/api/service/impl/ProcessInstanceServiceImpl.java 57.71% <ø> (-3.15%) ⬇️
...i/service/impl/ProcessTaskRelationServiceImpl.java 21.32% <ø> (-1.13%) ⬇️
... and 137 more

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

@caishunfeng caishunfeng modified the milestones: 3.1.0, 3.2.0 Sep 27, 2022
@Amy0104
Copy link
Member

Amy0104 commented Sep 28, 2022

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

export function useResources(
span: number | Ref<number> = 24,
required = false,
limit: number | Ref<number> = -1
): IJsonItem {

I'll check it.

@Amy0104
Copy link
Member

Amy0104 commented Sep 29, 2022

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

@rickchengx
Copy link
Contributor Author

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

@Amy0104
Copy link
Member

Amy0104 commented Sep 29, 2022

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

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

38.5% 38.5% Coverage
0.0% 0.0% Duplication

Copy link
Member

@Amy0104 Amy0104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Amy0104
Copy link
Member

Amy0104 commented Sep 30, 2022

I have already set the required to be reactive.

@rickchengx
Copy link
Contributor Author

I have already set the required to be reactive.

Thanks a lot, @Amy0104

xdu-chenrj pushed a commit to xdu-chenrj/dolphinscheduler that referenced this pull request Oct 13, 2022
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement make more easy to user or prompt friendly UI ui and front end related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Hivecli] Improve the UI of HiveCli

6 participants