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

Allow customizable hostname setting to be configured #18528

Open
markh0338 opened this issue Jan 29, 2025 · 0 comments
Open

Allow customizable hostname setting to be configured #18528

markh0338 opened this issue Jan 29, 2025 · 0 comments
Labels
status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application

Comments

@markh0338
Copy link

NetBox version

4.1.11

Feature type

Change to existing functionality

Proposed functionality

Currently, the HOSTNAME variable is set to use only platform.node() as its value. While this is sufficient in most cases, providing an option for customization would be beneficial. To avoid conflicts with #18518, it may be best to introduce a DISPLAY_NAME variable that can accept a custom value or default to HOSTNAME. This ensures that the meta tags from #18518 reflect the actual server name while allowing the DISPLAY_NAME to be customized.

Addition to settings.py:
DISPLAY_NAME = getattr(configuration, 'DISPLAY_NAME', HOSTNAME)
or
DISPLAY_NAME = getattr(configuration, 'DISPLAY_NAME', platform.node())

Modification in the footer section of base/layout.html:
<li class="list-inline-item">{{ settings.HOSTNAME }}</li>
would be come:
<li class="list-inline-item">{{ settings.DISPLAY_NAME }}</li>

Use case

In certain use cases, the server's hostname is not customizable and is displayed in the footer section of all NetBox pages, which may be unclear or confusing to end users. Making this setting customizable would allow administrators to define a value that better suits their environment or leave it unset to use the default value.

Database changes

N/A

External dependencies

N/A

@markh0338 markh0338 added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant