-
Notifications
You must be signed in to change notification settings - Fork 498
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
feat: Merge path hostname input box #2347
Conversation
Hi, @Si-ege . Could you remove "()" from title ? I think it's a little strange. |
ping @Si-ege |
Codecov Report
@@ Coverage Diff @@
## master #2347 +/- ##
==========================================
+ Coverage 62.04% 68.60% +6.55%
==========================================
Files 57 131 +74
Lines 3905 3437 -468
Branches 0 830 +830
==========================================
- Hits 2423 2358 -65
+ Misses 1197 1079 -118
+ Partials 285 0 -285
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
also CC @Baoyuantop PTAL |
web/src/pages/Upstream/Create.tsx
Outdated
const { active: activeData } = newData.checks; | ||
delete activeData.host; | ||
delete activeData.http_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would prefer to use a deep clone before these operations.
I see that the operation in line 37 is not quite suitable, can you help me to change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is only a suggestion and not a necessity.
@@ -55,6 +55,7 @@ context('Create and Delete Upstream', () => { | |||
weight0: '2', | |||
port1: '7001', | |||
weight1: '2', | |||
url_input: 'www.baidu.com/test/asd', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to test for incorrect inputs?
web/src/pages/Upstream/Create.tsx
Outdated
const url = host + http_path; | ||
newData.checks.active.url = url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use template literals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the front-end CI is unstable and we can commit an empty commit to trigger the CI |
const url = `${host}${http_path}`; | ||
const { active: activeData } = newData.checks; | ||
activeData.url = url; | ||
newData.checks.active = omit(newData.checks.active, 'host'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @hanzhenfang PTAL
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Please update this section with detailed description.
Related issues
fix/resolve #733
1.Merge path hostname input box.
2.Splitting paths and hostnames before sending requests.
Checklist: