Skip to content

[Fix-10890] fix some bugs in the Resource page#10907

Merged
devosend merged 3 commits intoapache:devfrom
rockfang:fix-res
Jul 14, 2022
Merged

[Fix-10890] fix some bugs in the Resource page#10907
devosend merged 3 commits intoapache:devfrom
rockfang:fix-res

Conversation

@rockfang
Copy link
Copy Markdown
Contributor

Purpose of the pull request

close #10890
fix some bugs in the Resource page

Brief change log

  1. EditModal in UDF Manage - Resouce Manage. Fixed the title and label
  2. Limit upload UDF Resouce to 1 and add validate at the proper time.
  3. Fixed the bug about button loading in UploadUDFModal
  4. In the CreateUDFFunctionModal. set a default value for type

Verify this pull request

This pull request is code cleanup without any test coverage.

@rockfang
Copy link
Copy Markdown
Contributor Author

Here are some screenshots

  1. Edit UDF dir
    edit-udf-dir
  2. Edit UDF file
    edit-udf-file
  3. UDF function type default checked
    udf-function-default-check
  4. Limit to 1 in UDFUploadModal
    udf-upload-limit1-and-validate-remove

@github-actions github-actions bot added the UI ui and front end related label Jul 12, 2022
@devosend devosend added the bug Something isn't working label Jul 13, 2022
const removeFile = () => {
state.uploadForm.name = ''
state.uploadForm.file = ''
state.uploadFormRef.validate()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No verification is required here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree. I'll add a commit to cancel the verification.

const removeFile = () => {
state.uploadForm.name = ''
state.uploadForm.file = ''
state.uploadFormRef.validate()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No verification is required here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree. I'll add a commit to cancel the verification.

@rockfang
Copy link
Copy Markdown
Contributor Author

I add the reset form code to solve the problem in this situation:
Firstly, come in Resouces - File Manage page
Secondly, click Upload File to choose a file. Then cancel the modal without submitting it.
Thirdly, try to Upload File again. the form will show the last messages.
image
@devosend

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 14, 2022

Codecov Report

Merging #10907 (ee65440) into dev (499e5b1) will increase coverage by 0.11%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev   #10907      +/-   ##
============================================
+ Coverage     40.20%   40.31%   +0.11%     
- Complexity     4840     4860      +20     
============================================
  Files           944      943       -1     
  Lines         36965    37015      +50     
  Branches       4045     4060      +15     
============================================
+ Hits          14861    14922      +61     
+ Misses        20608    20593      -15     
- Partials       1496     1500       +4     
Impacted Files Coverage Δ
...uler/api/controller/WorkFlowLineageController.java 29.16% <0.00%> (-9.73%) ⬇️
...erver/master/processor/queue/TaskEventService.java 75.00% <0.00%> (-5.36%) ⬇️
...r/api/service/impl/WorkFlowLineageServiceImpl.java 29.66% <0.00%> (-3.36%) ⬇️
.../master/processor/TaskExecuteRunningProcessor.java 22.22% <0.00%> (-2.78%) ⬇️
...duler/api/service/impl/EnvironmentServiceImpl.java 78.78% <0.00%> (-1.74%) ⬇️
...r/server/master/service/MasterFailoverService.java 60.55% <0.00%> (-1.36%) ⬇️
...permission/ResourcePermissionCheckServiceImpl.java 67.44% <0.00%> (-0.82%) ⬇️
...nscheduler/service/process/ProcessServiceImpl.java 29.29% <0.00%> (-0.60%) ⬇️
...r/server/master/service/WorkerFailoverService.java 50.00% <0.00%> (-0.46%) ⬇️
.../server/master/runner/WorkflowExecuteRunnable.java 7.79% <0.00%> (-0.03%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 499e5b1...ee65440. Read the comment docs.

const { handleUploadFile } = useUpload(state)

const hideModal = () => {
state.uploadForm.name = ''
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The resetForm function above can reset the form. line 37

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

😥 got it!

@rockfang rockfang requested a review from devosend July 14, 2022 07:07
@sonarqubecloud
Copy link
Copy Markdown

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@devosend devosend left a comment

Choose a reason for hiding this comment

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

LGTM

@devosend devosend added this to the 3.0.0-release milestone Jul 14, 2022
@devosend devosend merged commit 895dca3 into apache:dev Jul 14, 2022
caishunfeng pushed a commit to caishunfeng/dolphinscheduler that referenced this pull request Jul 18, 2022
* [Fix-10890] fix some bugs in the Resource page

* fix: cancel the unnecessary verifications and reset the form when canceling FileUploadModal

* fix: use se `resetForm` method to reset the form
caishunfeng pushed a commit to caishunfeng/dolphinscheduler that referenced this pull request Jul 18, 2022
* [Fix-10890] fix some bugs in the Resource page

* fix: cancel the unnecessary verifications and reset the form when canceling FileUploadModal

* fix: use se `resetForm` method to reset the form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working UI ui and front end related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [UI] some bugs in the Resource page

3 participants