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

SSO icon is not resized since Netbox 4.1.2 #17644

Closed
Fredouye opened this issue Sep 30, 2024 · 2 comments · Fixed by #17730
Closed

SSO icon is not resized since Netbox 4.1.2 #17644

Fredouye opened this issue Sep 30, 2024 · 2 comments · Fixed by #17730
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@Fredouye
Copy link

Fredouye commented Sep 30, 2024

Deployment Type

Self-hosted

NetBox Version

v4.1.2

Python Version

3.12

Steps to Reproduce

Hi

Netbox Docker is installed using this command :

# git clone -b release https://github.com/netbox-community/netbox-docker.git .

docker-compose.override.yml :

services:
  netbox:
    image: netboxcommunity/netbox:v4.1.1
    volumes:
      - ./my-conf.py:/etc/netbox/config/extra.py:z,ro
    ports:
      - 18000:8080

  netbox-worker:
    image: netboxcommunity/netbox:v4.1.1

  netbox-housekeeping:
    image: netboxcommunity/netbox:v4.1.1

my-conf.py :

# Keycloak
REMOTE_AUTH_ENABLED=True
REMOTE_AUTH_BACKEND="social_core.backends.open_id_connect.OpenIdConnectAuth"
SOCIAL_AUTH_OIDC_ENDPOINT="https://auth.home.lab/realms/home.lab"
SOCIAL_AUTH_OIDC_KEY="Netbox"
SOCIAL_AUTH_OIDC_SECRET="xxxxxxxxxxxxxxxxxxxxxxxx"
SOCIAL_AUTH_OIDC_SCOPE = ["openid", "profile", "email", "roles"]
SOCIAL_AUTH_VERIFY_SSL=True
SOCIAL_AUTH_OIDC_USERNAME_KEY="preferred_username"

SOCIAL_AUTH_BACKEND_ATTRS = {
    'oidc': ("SSO", "https://raw.githubusercontent.com/keycloak/keycloak-misc/refs/heads/main/logo/icon.svg"),
}

The https://raw.githubusercontent.com/keycloak/keycloak-misc/refs/heads/main/logo/icon.svg icon is 167x151 pixels.

With Netbox 4.1.1, the SSO icon is properly rendered, whereas with Netbox 4.1.2, the SSO icon is not resized.

Expected Behavior

SSO icon should be resized (which is the case with Netbox 4.1.1) :

Netbox 4.1.1

Observed Behavior

SSO icon is not resized with Netbox 4.1.2 :

Netbox 4.1.2

All tests were made with Chrome 129 / macOS, in incognito mode.

@Fredouye Fredouye added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Sep 30, 2024
@arthanson arthanson added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Sep 30, 2024
@marsteel
Copy link
Contributor

marsteel commented Oct 8, 2024

seems it is caused by that height: auto is introduced. Not sure the root cause.

img, svg {
    max-width: 100%;
    /* height: auto; */
}

@marsteel
Copy link
Contributor

marsteel commented Oct 9, 2024

@Fredouye you can delete img,svg{max-width:100%;height:auto} from netbox/project-static/dist/netbox.css to fix the issue

This bug is caused by #17480 fa1e89d

@arthanson arthanson self-assigned this Oct 10, 2024
@arthanson arthanson added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 10, 2024
jeremystretch added a commit that referenced this issue Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants