Make API/Code/Help links open in a new tab #1875

Closed
opened 2025-12-29 17:19:58 +01:00 by adam · 4 comments
Owner

Originally created by @mmahacek on GitHub (Jul 28, 2018).

Environment

  • Python version: 3.4
  • NetBox version: 2.3.7

Proposed Functionality

In the page footer, there are links for Docs, API, Code, and Help. Docs opens in a new tab/window, but the rest open in the same browser window. Since these are taking the user out of the Netbox system, it would be beneficial to updating the links with target="_blank"

Use Case

See above

Database Changes

None

External Dependencies

None

Originally created by @mmahacek on GitHub (Jul 28, 2018). ### Environment * Python version: 3.4 * NetBox version: 2.3.7 ### Proposed Functionality In the page footer, there are links for Docs, API, Code, and Help. Docs opens in a new tab/window, but the rest open in the same browser window. Since these are taking the user out of the Netbox system, it would be beneficial to updating the links with `target="_blank"` ### Use Case See above ### Database Changes None ### External Dependencies None
adam closed this issue 2025-12-29 17:19:58 +01:00
Author
Owner

@mmahacek commented on GitHub (Jul 28, 2018):

Submitted PR https://github.com/digitalocean/netbox/pull/2280

@mmahacek commented on GitHub (Jul 28, 2018): Submitted PR https://github.com/digitalocean/netbox/pull/2280
Author
Owner

@jeremystretch commented on GitHub (Jul 30, 2018):

There's no need to force the user to open a new tab for these pages. As with every other hyperlink, they can ctrl/shift-click if they want to open a new tab/window.

@jeremystretch commented on GitHub (Jul 30, 2018): There's no need to force the user to open a new tab for these pages. As with every other hyperlink, they can ctrl/shift-click if they want to open a new tab/window.
Author
Owner

@mmahacek commented on GitHub (Jul 30, 2018):

They why does the Docs link in the footer open a new window? Shouldn't the behavior of these links that take a user out of their Netbox instance have the same target attribute on the link?

@mmahacek commented on GitHub (Jul 30, 2018): They why does the Docs link in the footer open a new window? Shouldn't the behavior of these links that take a user out of their Netbox instance have the same `target` attribute on the link?
Author
Owner

@bdlamprecht commented on GitHub (Aug 1, 2018):

I agree and think that all of the links at the bottom should be standardized to all have either no target= and let the user device or all of them have target=_blank (which can be overridden by the user with ctrl/shift-click).

Viewing the page source shows the following HTML code:

<div class="col-xs-4 text-right">
  <p class="text-muted">
    <i class="fa fa-fw fa-book text-primary"></i>
    <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> &middot;
    <i class="fa fa-fw fa-cloud text-primary"></i>
    <a href="/api/docs/">API</a> &middot;
    <i class="fa fa-fw fa-code text-primary"></i>
    <a href="https://github.com/digitalocean/netbox">Code</a> &middot;
    <i class="fa fa-fw fa-support text-primary"></i>
    <a href="https://github.com/digitalocean/netbox/wiki">Help</a>
  </p>
</div>

Personally, I'd like to have them all use target=_blank because several times I've been in a hurry and accidentally clicked the link to the API only to have the main WebUI page go away only to have to click the back button in my browser to restore it.

However, if not everyone is of the same mind, I'm okay with removing the existing target=_blank from the link to "Docs".

@bdlamprecht commented on GitHub (Aug 1, 2018): I agree and think that all of the links at the bottom should be standardized to all have either no `target=` and let the user device **_or_** all of them have `target=_blank` (which can be overridden by the user with ctrl/shift-click). Viewing the page source shows the following HTML code: ``` <div class="col-xs-4 text-right"> <p class="text-muted"> <i class="fa fa-fw fa-book text-primary"></i> <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> &middot; <i class="fa fa-fw fa-cloud text-primary"></i> <a href="/api/docs/">API</a> &middot; <i class="fa fa-fw fa-code text-primary"></i> <a href="https://github.com/digitalocean/netbox">Code</a> &middot; <i class="fa fa-fw fa-support text-primary"></i> <a href="https://github.com/digitalocean/netbox/wiki">Help</a> </p> </div> ``` Personally, I'd like to have them **all** use `target=_blank` because several times I've been in a hurry and accidentally clicked the link to the API only to have the main WebUI page go away only to have to click the back button in my browser to restore it. However, if not everyone is of the same mind, I'm okay with removing the existing `target=_blank` from the link to "Docs".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1875