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

feat: add response header in debug view #1691

Merged
merged 9 commits into from
Apr 9, 2021
Merged

feat: add response header in debug view #1691

merged 9 commits into from
Apr 9, 2021

Conversation

stu01509
Copy link
Contributor

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?
Add response header tab in debug view.

image

image

Related issues

fix/resolve #1680

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

@stu01509
Copy link
Contributor Author

Hi @nic-chen

Could you guide me how to solve Backend E2E test error when you have time?

@nic-chen
Copy link
Member

nic-chen commented Apr 1, 2021

Hi @nic-chen

Could you guide me how to solve Backend E2E test error when you have time?

hi @stu01509

Just add header content to the assertion.

@stu01509
Copy link
Contributor Author

stu01509 commented Apr 4, 2021

Just add header content to the assertion.

OK, I will do add it :)

@liuxiran
Copy link
Contributor

liuxiran commented Apr 4, 2021

Hi @stu01509 , thanks for your nice work.
since you added a new tab for the response results area, you have to modify the fe e2e test cases at the same time to fix the fe e2e test failure

image

Try to add cy.get('#rc-tabs-1-tab-response').should('be.visible').click(); after each cy.wait('@DebugAPI'); in the https://github.com/apache/apisix-dashboard/blob/master/web/cypress/integration/route/online-debug.spec.js

Or just put the Response(Response Body would be better) before Response Header is also a better choice, for most users will pay attention to the response body first.

@codecov-io
Copy link

codecov-io commented Apr 5, 2021

Codecov Report

Merging #1691 (00ddb7f) into master (17186a0) will decrease coverage by 1.12%.
The diff coverage is 100.00%.

❗ Current head 00ddb7f differs from pull request most recent head b664569. Consider uploading reports for the commit b664569 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1691      +/-   ##
==========================================
- Coverage   72.70%   71.57%   -1.13%     
==========================================
  Files         133       47      -86     
  Lines        5738     3128    -2610     
  Branches      666        0     -666     
==========================================
- Hits         4172     2239    -1933     
+ Misses       1323      646     -677     
  Partials      243      243              
Flag Coverage Δ
backend-e2e-test 62.37% <100.00%> (+0.02%) ⬆️
backend-e2e-test-ginkgo 48.65% <100.00%> (+0.03%) ⬆️
backend-unit-test 52.25% <ø> (-0.04%) ⬇️
frontend-e2e-test ?

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

Impacted Files Coverage Δ
...l/handler/route_online_debug/route_online_debug.go 76.78% <100.00%> (+0.85%) ⬆️
api/internal/core/store/store.go 88.55% <0.00%> (-0.61%) ⬇️
web/src/pages/Route/components/Step1/index.tsx
web/src/pages/Route/Create.tsx
web/src/components/Plugin/PluginDetail.tsx
web/src/components/Plugin/service.ts
...c/pages/Route/components/ResultView/ResultView.tsx
web/src/pages/SSL/List.tsx
web/src/components/Upstream/UpstreamForm.tsx
web/src/services/tool.ts
... and 77 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 17186a0...b664569. Read the comment docs.

@juzhiyuan
Copy link
Member

good good

@liuxiran liuxiran requested a review from Jaycean April 6, 2021 00:22
@stu01509 stu01509 requested a review from juzhiyuan April 6, 2021 00:51
@juzhiyuan juzhiyuan requested a review from Yiyiyimu April 6, 2021 03:09
Copy link
Member

@Jaycean Jaycean left a comment

Choose a reason for hiding this comment

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

Great changes.

@liuxiran liuxiran merged commit 79fd15a into apache:master Apr 9, 2021
@liuxiran
Copy link
Contributor

liuxiran commented Apr 9, 2021

merged, thanks for your contribution~!

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.

feat: show http response header in debug view
7 participants