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: consumer without plugins causes page crashes #2437

Merged
merged 1 commit into from
Apr 26, 2022
Merged

fix: consumer without plugins causes page crashes #2437

merged 1 commit into from
Apr 26, 2022

Conversation

qihaiyan
Copy link
Contributor

@qihaiyan qihaiyan commented Apr 21, 2022

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?

if a consoumer is created with admin api, and having no plugin param, the comsumer list page in dashbord would report error.
the reason is the 62 line in 'web/src/pages/Consumer/List.tsx' file doesn't check if record.plugins is null or undefined.

Related issues

fix/resolve #2436

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

@codecov-commenter
Copy link

Codecov Report

Merging #2437 (e3b41d9) into master (0e6411f) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2437   +/-   ##
=======================================
  Coverage   68.57%   68.57%           
=======================================
  Files         131      131           
  Lines        3427     3427           
  Branches      831      832    +1     
=======================================
  Hits         2350     2350           
  Misses       1077     1077           
Flag Coverage Δ
frontend-e2e-test 68.57% <100.00%> (ø)

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

Impacted Files Coverage Δ
web/src/pages/Consumer/List.tsx 88.88% <100.00%> (ø)

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 1fa5df3...e3b41d9. Read the comment docs.

@Baoyuantop Baoyuantop requested a review from guoqqqi April 25, 2022 06:49
@Baoyuantop Baoyuantop changed the title fix comsumer list page error when consoumer created with admin api fix: consumer without plugins causes page crashes Apr 26, 2022
@Baoyuantop Baoyuantop merged commit 470fc94 into apache:master Apr 26, 2022
@qihaiyan qihaiyan deleted the fix-2436 branch April 26, 2022 03:44
hongbinhsu pushed a commit to fitphp/apix-dashboard that referenced this pull request May 24, 2022
* upstream: (28 commits)
  docs: update some tips in develop.md (apache#2451)
  fix: create upstream error when pass host is node and nodes without port (apache#2421)
  fix: correct data  type of filed Active.checks.active.https_verify_certificate (apache#2422)
  feat: basic support Apache APISIX 2.13.0 (apache#2428)
  feat: add page reload judgment (apache#2370)
  docs: Update RPM install package link (apache#2439)
  docs: Remove hyperlinks from documents (apache#2431)
  chore(deps): bump actions/upload-artifact from 2 to 3 (apache#2423)
  fix: consumer without plugins causes page crashes (apache#2437)
  chore(deps): bump axios from 0.21.1 to 0.21.4 in /web (apache#2420)
  feat: Modify plugin preview page (apache#2359)
  chore(deps): bump moment from 2.29.1 to 2.29.2 in /web (apache#2418)
  chore: use json schema instead hard code (apache#2399)
  refactor: migrate route tests to e2enew (apache#2411)
  chore(deps): bump actions/setup-python from 2.3.2 to 3.1.1 (apache#2414)
  chore: update the year of copyright and fix typo (apache#2417)
  docs: update online playground url (apache#2416)
  chore: update README for online demo (apache#2404)
  refactor: migrate id compatible tests to e2enew (apache#2400)
  docs: fix invalid link (apache#2366)
  ...

# Conflicts:
#	api/internal/route.go
#	web/src/components/Footer/index.tsx
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.

Consumer List Page reports error when a consumer is created with admin api
5 participants