Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-11195][UI] Add re-upload feature for resource files #11203

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

sketchmind
Copy link
Contributor

@sketchmind sketchmind commented Jul 29, 2022

Purpose of the pull request

Add re-upload feature for resource files
close #11195

Brief change log

[Feature-11195][UI] Add re-upload feature for resource files and udf files

  • fix resource file incorrect button link
  • add re-upload feature for resource files
  • add re-upload feature for udf files
  • modify udf edit button to rename button
  • fix file resource page button-link constraint
  • encapsulate file and udf resource code
  • place the breadcrumbs in the upper left corner
  • optimized some code
  • modify relative e2e test
  • fix the problcem of UDF page breadcrumbs when using the browser to go back or forward
  • the create folder button on the file page uses the primary type to make the button more user-friendly

Verify this pull request

Existing tests already cover part of this pull request, such as (please describe tests).

  • org.apache.dolphinscheduler.e2e.pages.resource
    • FileManagePage.java
    • UdfManagePage.java

but reuploading resource feature should add more tests.

@github-actions github-actions bot added the UI ui and front end related label Jul 29, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #11203 (9cde6da) into dev (4f73fe1) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev   #11203      +/-   ##
============================================
- Coverage     39.46%   39.44%   -0.02%     
+ Complexity     4313     4308       -5     
============================================
  Files          1083     1083              
  Lines         40756    40756              
  Branches       4670     4673       +3     
============================================
- Hits          16083    16075       -8     
- Misses        22886    22895       +9     
+ Partials       1787     1786       -1     
Impacted Files Coverage Δ
...er/master/dispatch/host/assign/RandomSelector.java 77.77% <0.00%> (-5.56%) ⬇️
...erver/master/processor/queue/TaskEventService.java 75.00% <0.00%> (-5.36%) ⬇️
...org/apache/dolphinscheduler/remote/utils/Host.java 42.55% <0.00%> (-2.13%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 51.38% <0.00%> (-1.39%) ⬇️
...r/plugin/task/sqoop/parameter/SqoopParameters.java 51.19% <0.00%> (-1.20%) ⬇️

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

@sketchmind sketchmind force-pushed the Feature-11195 branch 4 times, most recently from 8999dec to 31d08c4 Compare August 1, 2022 03:15
@sketchmind
Copy link
Contributor Author

The code smell reported by SonarCloud is prevalent in the front-end code of the resource, do I need to resolve this?

@sketchmind sketchmind force-pushed the Feature-11195 branch 3 times, most recently from 802744f to 4eeb156 Compare August 8, 2022 01:42
@github-actions github-actions bot added the e2e e2e test label Aug 8, 2022
@sketchmind sketchmind closed this Aug 8, 2022
@sketchmind sketchmind reopened this Aug 8, 2022
@sketchmind sketchmind closed this Aug 8, 2022
@sketchmind sketchmind reopened this Aug 8, 2022
@ruanwenjun
Copy link
Member

This PR only include front-end code, can it close #11195? I will remove the close action.

@sketchmind
Copy link
Contributor Author

This PR only include front-end code, can it close #11195? I will remove the close action.

Yes, it can, the backend has been implemented

@Amy0104 Amy0104 added the feature new feature label Aug 12, 2022
@Amy0104
Copy link
Member

Amy0104 commented Aug 12, 2022

It’s better to reuse the upload logic instead of creating a new reupload. Because if the upload logic has changed, the reupload need to be changed too. There will be a bug in the feature.BTW, you can format your code by eslint.

@sketchmind
Copy link
Contributor Author

sketchmind commented Aug 12, 2022

It’s better to reuse the upload logic instead of creating a new reupload. Because if the upload logic has changed, the reupload need to be changed too. There will be a bug in the feature.BTW, you can format your code by eslint.

I thought about it again, let's imagine a very possible change, if uploading files later supports batch uploading or uploading folders, it may lead to bugs in re-uploading, and if processed separately, the function of re-uploading files uses different front-end code and different interface, it will not affect.
Of course, this can also use only one logic, and then patch the logic according to the parameters. If do this, does UDF resource upload also need to use this logic?

@Amy0104
Copy link
Member

Amy0104 commented Aug 12, 2022

It’s better to reuse the upload logic instead of creating a new reupload. Because if the upload logic has changed, the reupload need to be changed too. There will be a bug in the feature.BTW, you can format your code by eslint.

I thought about it again, let's imagine a very possible change, if uploading files later supports batch uploading or uploading folders, it may lead to bugs in re-uploading, and if processed separately, the function of re-uploading files uses different front-end code and different interface, it will not affect. Of course, this can also use only one logic, and then patch the logic according to the parameters. If do this, does UDF resource upload also need to use this logic?

The similarity reaches nearly eighty percent. I think it's better to reuse and handle the differences by parameters.

@sketchmind
Copy link
Contributor Author

It’s better to reuse the upload logic instead of creating a new reupload. Because if the upload logic has changed, the reupload need to be changed too. There will be a bug in the feature.BTW, you can format your code by eslint.

I thought about it again, let's imagine a very possible change, if uploading files later supports batch uploading or uploading folders, it may lead to bugs in re-uploading, and if processed separately, the function of re-uploading files uses different front-end code and different interface, it will not affect. Of course, this can also use only one logic, and then patch the logic according to the parameters. If do this, does UDF resource upload also need to use this logic?

The similarity reaches nearly eighty percent. I think it's better to reuse and handle the differences by parameters.

ok~

@sketchmind sketchmind force-pushed the Feature-11195 branch 2 times, most recently from cdd70d9 to 0c09827 Compare August 24, 2022 07:50
@sketchmind sketchmind closed this Nov 8, 2022
@sketchmind sketchmind reopened this Nov 8, 2022
@sketchmind sketchmind closed this Nov 8, 2022
@sketchmind sketchmind reopened this Nov 8, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sketchmind sketchmind requested review from Amy0104, SbloodyS and labbomb and removed request for Amy0104, SbloodyS and labbomb November 8, 2022 04:04
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 17 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@LiJie20190102
Copy link

LiJie20190102 commented Feb 8, 2023

@sketchmind @SbloodyS
Excuse me, when will this PR be closed? We found that many scenes need resources to be uploaded again.

@Amy0104
Copy link
Member

Amy0104 commented Feb 8, 2023

Excuse me, when will this PR be closed? We found that many scenes need resources to be uploaded again.

Pls resolve the conflicts.

@sketchmind
Copy link
Contributor Author

sketchmind commented Feb 8, 2023

I'd like to know too, I've resolved conflicts so many times

Sorry for that, I've already checked the front end side. it can be merged from the front end side. @SbloodyS pls check the back end side.

…files

* fix resource file incorrect button link
* add re-upload feature for resource files
* add re-upload feature for udf files
* modify udf edit button to rename button
* fix file resource page button-link constraint
* encapsulate file and udf resource code
* place the breadcrumbs in the upper left corner
* optimized some code
* modify relative e2e test
* Fix the problem of UDF page breadcrumbs when using the browser to go back or forward
* adapt to the latest resource center
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 10 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

+1

@710961349
Copy link

When will the version with the added feature of a 're-upload' button be updated? This feature is very practical

@linxd23496
Copy link

This is a very creative feature request。When will the version with the added feature of a 're-upload' button be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version e2e e2e test feature new feature UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][UI] Add re-upload feature for resource files
10 participants