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

Fix upload file into search page unnecessary POST #2200

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

tico88612
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Remove uploading files into the search page unnecessary POST

How was this change tested?

Manually tested.

Checklist

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
@tico88612 tico88612 requested a review from a team as a code owner March 5, 2024 12:45
@tico88612 tico88612 requested review from albertteoh and removed request for a team March 5, 2024 12:45
}
beforeUpload={(file, fileList) => {
fileList.forEach(fileFromList => props.loadJsonTraces({ file: fileFromList }));
return false;
Copy link
Member

Choose a reason for hiding this comment

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

this is the change, right? Could you point to documentation that explains it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://ant.design/components/upload

beforeUpload: Hook function which will be executed before uploading. Uploading will be stopped with false or a rejected Promise returned.

Set it to always return false, and it won't POST.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks!

@yurishkuro yurishkuro enabled auto-merge (squash) March 5, 2024 17:32
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (f704b56) to head (db806ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2200   +/-   ##
=======================================
  Coverage   96.59%   96.59%           
=======================================
  Files         254      254           
  Lines        7639     7641    +2     
  Branches     1927     1992   +65     
=======================================
+ Hits         7379     7381    +2     
  Misses        260      260           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Mar 5, 2024
@yurishkuro yurishkuro merged commit 8fe552a into jaegertracing:main Mar 5, 2024
8 of 9 checks passed
@tico88612 tico88612 deleted the fix/unnecessary-post branch March 6, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uploading files into Search page performs unnecessary POST
2 participants