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

chore: improve user friendly on Upstream #1603

Merged
merged 4 commits into from
Mar 22, 2021
Merged

chore: improve user friendly on Upstream #1603

merged 4 commits into from
Mar 22, 2021

Conversation

juzhiyuan
Copy link
Member

@juzhiyuan juzhiyuan commented Mar 16, 2021

Please answer these questions before submitting a pull request

Why submit this pull request?

  • Improve user friendly

New feature or improvement

Improve i18n for Upstream's pass_host field & selector.

image

image

@codecov-io
Copy link

codecov-io commented Mar 16, 2021

Codecov Report

Merging #1603 (f2aae04) into master (01c9528) will decrease coverage by 5.28%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1603      +/-   ##
==========================================
- Coverage   71.46%   66.17%   -5.29%     
==========================================
  Files         132      132              
  Lines        5375     5375              
  Branches      592      592              
==========================================
- Hits         3841     3557     -284     
- Misses       1290     1506     +216     
- Partials      244      312      +68     
Flag Coverage Δ
backend-e2e-test 61.24% <ø> (ø)
backend-e2e-test-ginkgo 46.83% <ø> (+0.06%) ⬆️
backend-unit-test ?
frontend-e2e-test 72.49% <50.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
web/src/components/Upstream/UpstreamForm.tsx 62.01% <ø> (ø)
web/src/pages/Upstream/components/Step1.tsx 100.00% <ø> (ø)
web/src/pages/Upstream/Create.tsx 81.25% <50.00%> (ø)
api/internal/utils/runtime/runtime.go 0.00% <0.00%> (-64.29%) ⬇️
api/internal/core/store/validate_mock.go 0.00% <0.00%> (-50.00%) ⬇️
api/internal/handler/service/service.go 57.44% <0.00%> (-34.05%) ⬇️
api/internal/filter/authentication.go 47.22% <0.00%> (-30.56%) ⬇️
api/internal/core/store/store.go 60.24% <0.00%> (-27.72%) ⬇️
api/internal/filter/ip_filter.go 48.71% <0.00%> (-23.08%) ⬇️
api/internal/handler/global_rule/global_rule.go 64.51% <0.00%> (-19.36%) ⬇️
... and 16 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 01c9528...f2aae04. Read the comment docs.

rules={[
{
required: true,
message: "",
Copy link
Member

Choose a reason for hiding this comment

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

why the message is an empty string? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

because when users leave this field empty, the input box will have a red border to alert them 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

it seems that when the required field is empty, the required message will appear behind the input box, so if we leave the message an empty string, there will be an empty line appear. anyway, since the host rewrite become a disable option, this input box will never show in the page.

Copy link
Member Author

Choose a reason for hiding this comment

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

ya

Copy link
Member

@imjoey imjoey left a comment

Choose a reason for hiding this comment

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

/lgtm

The new messages are much better. Thanks.

@juzhiyuan
Copy link
Member Author

ping ~

Copy link
Contributor

@liuxiran liuxiran left a comment

Choose a reason for hiding this comment

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

LGTM

@juzhiyuan juzhiyuan requested a review from Jaycean March 20, 2021 16:42
@LiteSun
Copy link
Member

LiteSun commented Mar 21, 2021

LGTM

@moonming
Copy link
Member

The result of the discussion in the mailing list is that only one switch option

@juzhiyuan juzhiyuan requested a review from nic-chen March 22, 2021 08:45
@juzhiyuan
Copy link
Member Author

`[DISCUSS] about the upstream request’s Host header

It seems that the discussion is still in progress 🤔 why not review & take action on this improvement PR first?

@juzhiyuan juzhiyuan merged commit 11f29a1 into master Mar 22, 2021
@juzhiyuan juzhiyuan deleted the i18n-upstream branch March 22, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants