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

Primary nav fails to render with trailing space in cluster badge color #12272

Open
rak-phillip opened this issue Oct 15, 2024 · 1 comment
Open
Assignees
Labels
JIRA kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/backport-candidate
Milestone

Comments

@rak-phillip
Copy link
Member

The primary navigation bar in Rancher Dashboard fails to render if a space is entered for a custom badge color for a cluster.

Steps to reproduce

  1. Navigate to Cluster Management
  2. Click on Create and select an RKE2 cluster
  3. Fill out the required fields for creating an RKE2 cluster
  4. Click on Cluster Appearance => Customize
  5. Enable Badge background color and select a background color for the cluster
  6. Create the cluster
  7. Click on "Edit YAML" for the newly created cluster
  8. Modify ui.rancher/badge-color so that it contains trailing whitespace (e.g ui.rancher/badge-color: '#1a5fb4 '
  9. Save the changes

Expected behavior

No errors in the console and primary navigation renders

Actual behavior

Error is printed to the console

Error: Unable to parse color from string: #1a5fb4 
    Color index.js:49
    Color index.js:24
    parseColor color.js:85
    get badge management.cattle.io.cluster.js:315
    get reactivity.esm-bundler.js:492
    clusters TopLevelMenu.vue:107
    clusters TopLevelMenu.vue:98

Primary navigation fails to render

Screenshots

primary-nav

@rak-phillip rak-phillip added this to the v2.10.0 milestone Oct 15, 2024
@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Oct 15, 2024
@gaktive gaktive added the JIRA label Oct 16, 2024
@gaktive
Copy link
Member

gaktive commented Oct 16, 2024

Internal reference: SURE-9153

@codyrancher codyrancher self-assigned this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JIRA kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/backport-candidate
Projects
None yet
Development

No branches or pull requests

3 participants