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

Profile: Fix issue with user profile not showing more than sessions sessions in some cases #19578

Merged
merged 2 commits into from
Oct 3, 2019

Conversation

huynhsamha
Copy link
Contributor

What this PR does / why we need it:
Bug reproducing: In profile page (tab Preference in menu bar), when we navigate from dashboard to Preference, sometime we get only Sessions section, other sections such as Edit Profile, Teams and Org. not found (crashing by <UserOrganizations/>).

Which issue(s) this PR fixes:

Fixes #

Nothing

Special notes for your reviewer:

I see profile page use <react-profile-wrapper>, which is a component converted from React to Angular. In <react-profile-wrapper>, component <UserOrganizations/> will be crashed if prop user is null (because inside <UserOrganizations/>, we accesses user.orgId).

I've fixed this bug by checking whether user was loaded.

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2019

CLA assistant check
All committers have signed the CLA.

@torkelo
Copy link
Member

torkelo commented Oct 3, 2019

strange, unable to replicate this problem

@marefr
Copy link
Contributor

marefr commented Oct 3, 2019

@torkelo was able to reproduce on play.grafana.org. Login, then open https://play.grafana.org/d/000000012/grafana-play-home?orgId=1 abd then navigate to your profile page via sidenav.

image

@torkelo torkelo merged commit 4b042c8 into grafana:master Oct 3, 2019
@torkelo torkelo changed the title Fix <react-profile-wrapper> crashing Profile: Fix issue with user profile not showing more than sessions sessions in some cases Oct 3, 2019
ryantxu added a commit to ryantxu/grafana that referenced this pull request Oct 4, 2019
…uery

* grafana/master: (28 commits)
  Revert "Feature: Adds connectWithCleanup HOC (grafana#19392)" (grafana#19628)
  Feature: Adds connectWithCleanup HOC (grafana#19392)
  Panels: Progress on new singlestat / BigValue (grafana#19374)
  Units: fixed wrong id for Terabits/sec (grafana#19611)
  Docs: General improvements to docs, and a fix in oauth (grafana#19587)
  Docs: Replace ampersands with and (grafana#19609)
  Profile: Fix issue with user profile not showing more than sessions some times (grafana#19578)
  Azure Monitor : Query more than 10 dimensions ( Fixes grafana#17230 ) (grafana#18693)
  Login: Show SAML login button if SAML is enabled (grafana#19591)
  UI: Adds Modal component (grafana#19369)
  Prometheus: Fixes so results in Panel always are sorted by query order (grafana#19597)
  Docs: Improve guides for contributing (grafana#19575)
  Migration: Migrates Admin settings from angular to react (grafana#19594)
  Chore: Converts HelpModal from angular to react (grafana#19474)
  Fix typo (grafana#19571)
  Chore: Upgrade to Go 1.13 (grafana#19502)
  Explore: Move data source loader into the select (grafana#19465)
  Theme: fixed issue with theme always beeing modified (grafana#19517)
  Release: Fix issue with tag script on osx (grafana#19557)
  Release: Update latest (grafana#19559)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Oct 4, 2019
* grafana/master: (54 commits)
  Revert "Feature: Adds connectWithCleanup HOC (grafana#19392)" (grafana#19628)
  Feature: Adds connectWithCleanup HOC (grafana#19392)
  Panels: Progress on new singlestat / BigValue (grafana#19374)
  Units: fixed wrong id for Terabits/sec (grafana#19611)
  Docs: General improvements to docs, and a fix in oauth (grafana#19587)
  Docs: Replace ampersands with and (grafana#19609)
  Profile: Fix issue with user profile not showing more than sessions some times (grafana#19578)
  Azure Monitor : Query more than 10 dimensions ( Fixes grafana#17230 ) (grafana#18693)
  Login: Show SAML login button if SAML is enabled (grafana#19591)
  UI: Adds Modal component (grafana#19369)
  Prometheus: Fixes so results in Panel always are sorted by query order (grafana#19597)
  Docs: Improve guides for contributing (grafana#19575)
  Migration: Migrates Admin settings from angular to react (grafana#19594)
  Chore: Converts HelpModal from angular to react (grafana#19474)
  Fix typo (grafana#19571)
  Chore: Upgrade to Go 1.13 (grafana#19502)
  Explore: Move data source loader into the select (grafana#19465)
  Theme: fixed issue with theme always beeing modified (grafana#19517)
  Release: Fix issue with tag script on osx (grafana#19557)
  Release: Update latest (grafana#19559)
  ...
hugohaggmark pushed a commit that referenced this pull request Oct 8, 2019
…ome times (#19578)

* fix <react-profile-wrapper> crashing

* refix crashing profile page

(cherry picked from commit 4b042c8)
hugohaggmark pushed a commit that referenced this pull request Oct 8, 2019
…ome times (#19578)

* fix <react-profile-wrapper> crashing

* refix crashing profile page

(cherry picked from commit 4b042c8)
@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog pr/external This PR is from external contributor type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants