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

Persist dismissing the OTLP unsecured message bar #5465

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Aug 28, 2024

Description

Running the dashboard without OTLP auth will display a warning message bar. The message bar can be dismissed, but it reappears if the browser is refreshed.

It is annoying to repeatedly show the message to a user who has already seen the warning. They either have to close the message every time, or accept it is always visible.

This PR:

  • Persists a flag to local storage when the message bar is dismissed
  • Doesn't display message bar if previously dismissed
  • Centralizes browser storage keys
  • Adds tests

Note that the warning displayed in console logs on startup isn't impacted. It's always displayed.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No

<Authorized>
@if (_showUserProfileMenu)
{
@if (_showUserProfileMenu)
Copy link
Member Author

@JamesNK JamesNK Aug 28, 2024

Choose a reason for hiding this comment

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

Only include AuthorizeView on the page if the user profile should be displayed (which means the auth mode needs to be a certain value).

This avoids the need to include various authz services in tests.

@JamesNK
Copy link
Member Author

JamesNK commented Aug 28, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK
Copy link
Member Author

JamesNK commented Aug 28, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK JamesNK force-pushed the jamesnk/otlp-unsecured-messagebar-dismiss branch from 729a469 to 8cb94d0 Compare August 29, 2024 02:38
@JamesNK
Copy link
Member Author

JamesNK commented Aug 29, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK JamesNK merged commit 0587e48 into main Aug 29, 2024
11 checks passed
@JamesNK JamesNK deleted the jamesnk/otlp-unsecured-messagebar-dismiss branch August 29, 2024 05:07
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants