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 Upstream/CodeMirror #1707

Merged
merged 17 commits into from
Apr 7, 2021
Merged

chore: improve Upstream/CodeMirror #1707

merged 17 commits into from
Apr 7, 2021

Conversation

juzhiyuan
Copy link
Member

@juzhiyuan juzhiyuan commented Apr 4, 2021

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

Please update this section with a detailed description.

  • use UpperCase for JSON/YAML selector in CodeMirror
  • added more description for Upstream List
  • added more proper fields description for Upstream Form (Chinese: Done; English: TODO)
  • added retries field for health check
  • added default values for health check

Related issues

None

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@juzhiyuan juzhiyuan marked this pull request as draft April 4, 2021 09:21
@codecov-io
Copy link

codecov-io commented Apr 4, 2021

Codecov Report

Merging #1707 (3fb0ea6) into master (8494e45) will increase coverage by 0.17%.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1707      +/-   ##
==========================================
+ Coverage   71.87%   72.04%   +0.17%     
==========================================
  Files         130      130              
  Lines        5660     5649      -11     
  Branches      661      648      -13     
==========================================
+ Hits         4068     4070       +2     
+ Misses       1352     1335      -17     
- Partials      240      244       +4     
Flag Coverage Δ
backend-e2e-test 62.28% <ø> (+0.19%) ⬆️
backend-e2e-test-ginkgo 48.43% <ø> (+0.06%) ⬆️
backend-unit-test 52.29% <ø> (ø)
frontend-e2e-test 72.69% <45.45%> (+0.15%) ⬆️

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

Impacted Files Coverage Δ
web/src/pages/Consumer/List.tsx 90.00% <ø> (ø)
web/src/pages/Route/List.tsx 84.61% <ø> (ø)
web/src/pages/Service/List.tsx 97.43% <ø> (ø)
web/src/pages/Upstream/components/Step1.tsx 100.00% <ø> (ø)
web/src/components/Plugin/PluginDetail.tsx 52.72% <16.66%> (ø)
web/src/components/Upstream/UpstreamForm.tsx 63.24% <42.85%> (+1.70%) ⬆️
web/src/components/RawDataEditor/RawDataEditor.tsx 37.73% <50.00%> (ø)
web/src/pages/Upstream/Create.tsx 79.41% <50.00%> (ø)
web/src/components/Upstream/constant.ts 100.00% <100.00%> (ø)
web/src/pages/Upstream/List.tsx 90.00% <100.00%> (ø)
... and 4 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 8494e45...3fb0ea6. Read the comment docs.

@juzhiyuan
Copy link
Member Author

as for default values, we need to refer to https://github.com/api7/lua-resty-healthcheck/tree/master/docs , I will file a new PR to do that.

@juzhiyuan juzhiyuan marked this pull request as ready for review April 5, 2021 15:43
@juzhiyuan
Copy link
Member Author

@LiteSun

image

I have some doubts:

  1. Why FE doesn't have coverage 😳
  2. I don't change backend files, but this PR reduces some coverage.

@juzhiyuan
Copy link
Member Author

@iamayushdas @KishaniKandasamy @stu01509 You could also review this PR :)

@stu01509
Copy link
Contributor

stu01509 commented Apr 5, 2021

@iamayushdas @KishaniKandasamy @stu01509 You could also review this PR :)

Sure 😃

Copy link
Contributor

@iamayushdas iamayushdas left a comment

Choose a reason for hiding this comment

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

👍🏻

@KishaniKandasamy
Copy link
Contributor

@iamayushdas @KishaniKandasamy @stu01509 You could also review this PR :)

👍🏻

@juzhiyuan
Copy link
Member Author

Hi, I noticed we have comments all about CodeMirror, how about adding some descriptions for this component? I don't have a better name yet, I would still prefer keeping using CodeMirror than Create with Editor. What's your opinion?

BTW, how about other changes in this PR? Do they make sense to you?

@juzhiyuan
Copy link
Member Author

Oops! When I want to select more reviewers on GitHub app, it unselect some of reviewers.

web/src/components/Upstream/UpstreamForm.tsx Outdated Show resolved Hide resolved
@@ -136,12 +136,11 @@ const Page: React.FC = () => {
<PlusOutlined />
{formatMessage({ id: 'component.global.create' })}
</Button>,
<Button type="primary" onClick={() => {
<Button type="default" onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original way looks better.
At the same time, If really need to do this, also need to modify the style of other pages.

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if we really need the primary button here 🤔

@juzhiyuan
Copy link
Member Author

Hi all, except those comments, any comments about those changes?

@juzhiyuan juzhiyuan merged commit 2c158a1 into master Apr 7, 2021
@juzhiyuan juzhiyuan deleted the feat-upstream branch April 7, 2021 04:30
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 45.45455% with 12 lines in your changes missing coverage. Please review.

Project coverage is 72.04%. Comparing base (8494e45) to head (3fb0ea6).
Report is 419 commits behind head on master.

Files with missing lines Patch % Lines
web/src/components/Plugin/PluginDetail.tsx 16.66% 5 Missing ⚠️
web/src/components/Upstream/UpstreamForm.tsx 42.85% 4 Missing ⚠️
web/src/components/RawDataEditor/RawDataEditor.tsx 50.00% 2 Missing ⚠️
web/src/pages/Upstream/Create.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1707      +/-   ##
==========================================
+ Coverage   71.87%   72.04%   +0.17%     
==========================================
  Files         130      130              
  Lines        5660     5649      -11     
  Branches      661      648      -13     
==========================================
+ Hits         4068     4070       +2     
+ Misses       1352     1335      -17     
- Partials      240      244       +4     
Flag Coverage Δ
backend-e2e-test 47.79% <ø> (+0.25%) ⬆️
backend-e2e-test-ginkgo 48.43% <ø> (+0.06%) ⬆️
backend-unit-test 52.29% <ø> (ø)
frontend-e2e-test 72.69% <45.45%> (+0.15%) ⬆️

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

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

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.