Device-Type 'slug' not visible in main view #2097

Closed
opened 2025-12-29 17:22:14 +01:00 by adam · 7 comments
Owner

Originally created by @bdlamprecht on GitHub (Nov 7, 2018).

Environment

  • Python version: 3.6
  • NetBox version: v2.4.6

Steps to Reproduce

When viewing an individual device-type at http://netbox.local/dcim/device-types/PK/, the slug` property is not visible:

image

Similarily, I know the list of device-types is full of other properties that are more important to see than slug:

image

The only place you can see what the slug is set to is by editing the object:

image

Expected Behavior

I'm not sure if this was ever visible before, but I think when viewing a single object, all of the properties tied to it should be seen.

Observed Behavior

The device-type property is only visible when editing an object

Originally created by @bdlamprecht on GitHub (Nov 7, 2018). ### Environment * Python version: 3.6 * NetBox version: v2.4.6 ### Steps to Reproduce When viewing an individual `device-type` at http://netbox.local/dcim/device-types/PK/`, the `slug` property is not visible: ![image](https://user-images.githubusercontent.com/7783306/48142883-e7502480-e26a-11e8-84e7-83f480a0e8bb.png) Similarily, I know the list of `device-types` is full of other properties that are more important to see than `slug`: ![image](https://user-images.githubusercontent.com/7783306/48143160-72311f00-e26b-11e8-9a09-c54fd90a7ada.png) The only place you can see what the `slug` is set to is by editing the object: ![image](https://user-images.githubusercontent.com/7783306/48143262-a60c4480-e26b-11e8-84ec-0f6a342bf4d3.png) ### Expected Behavior I'm not sure if this was ever visible before, but I think when viewing a single object, all of the properties tied to it should be seen. ### Observed Behavior The `device-type` property is only visible when editing an object
adam added the status: acceptedtype: feature labels 2025-12-29 17:22:14 +01:00
adam closed this issue 2025-12-29 17:22:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 7, 2018):

This is the case with all objects which have a slug. The slug's only purpose is to help form a "clean" but human-friendly URL (e.g. ?company=foo-corp-inc instead of ?company=Foo%20Corp%2C%20Inc.) and in most cases the automatically generated slug suffices. Can you elaborate on why you'd like to include it?

@jeremystretch commented on GitHub (Nov 7, 2018): This is the case with all objects which have a slug. The slug's only purpose is to help form a "clean" but human-friendly URL (e.g. `?company=foo-corp-inc` instead of `?company=Foo%20Corp%2C%20Inc.`) and in most cases the automatically generated slug suffices. Can you elaborate on why you'd like to include it?
Author
Owner

@bdlamprecht commented on GitHub (Nov 7, 2018):

Yes, I know what slugs are used for. I think it is a great feature.

As an explanation for this bug or FR, I tend to change the default auto-generated slug.
With that being said, I recently ran into an issue where I had mistakenly created a device_type with one slug and tried to update my development box using ninech/netbox:v2.4.7's docker image, and it failed.
I spent about 30 minutes trying to see why that happened and finally narrowed it down to a duplicate slug in one of the data seed or initializer's that I'm using.

In short, in my opinion, having all of the properties visible when viewing an individual primary object would be beneficial and don't see any negative aspects about it.

I'll leave it up to you to decide, but those are just my thoughts.

@bdlamprecht commented on GitHub (Nov 7, 2018): Yes, I know what `slugs` are used for. I think it is a great feature. As an explanation for this bug or FR, I tend to change the default auto-generated slug. With that being said, I recently ran into an issue where I had mistakenly created a `device_type` with one slug and tried to update my development box using `ninech/netbox:v2.4.7`'s docker image, and it failed. I spent about 30 minutes trying to see why that happened and finally narrowed it down to a duplicate slug in one of the data `seed` or [`initializer`](https://github.com/ninech/netbox-docker#initializers)'s that I'm using. In short, in my opinion, having all of the properties visible when viewing an individual primary object would be beneficial and don't see any negative aspects about it. I'll leave it up to you to decide, but those are just my thoughts.
Author
Owner

@mmahacek commented on GitHub (Nov 9, 2018):

Given that other object types will display the slug either in the table view (such as DeviceRole, Platform, and Manufacturer) or in the URL (sites/tenants), I don't think it would be unreasonable to put the slug on the Device Type page. A quick glace through the DCIM features, DeviceType seems to be the only one without easy access to view slugs.

We are using customized DeviceRole slugs to match category names in our monitoring system while keeping the display name in Netbox "pretty".

@mmahacek commented on GitHub (Nov 9, 2018): Given that other object types will display the slug either in the table view (such as DeviceRole, Platform, and Manufacturer) or in the URL (sites/tenants), I don't think it would be unreasonable to put the slug on the Device Type page. A quick glace through the DCIM features, DeviceType seems to be the only one without easy access to view slugs. We are using customized DeviceRole slugs to match category names in our monitoring system while keeping the display name in Netbox "pretty".
Author
Owner

@jeremystretch commented on GitHub (Nov 9, 2018):

This raises the question: Should DeviceType even have a slug? I'm not sure we actually use it for anything in the UI, but it's very possible I'm overlooking something.

@jeremystretch commented on GitHub (Nov 9, 2018): This raises the question: Should DeviceType even have a slug? I'm not sure we actually use it for anything in the UI, but it's very possible I'm overlooking something.
Author
Owner

@mmahacek commented on GitHub (Nov 9, 2018):

Good point. Though taking it away may cause problems for users that may be integrating it with other systems.

@mmahacek commented on GitHub (Nov 9, 2018): Good point. Though taking it away may cause problems for users that may be integrating it with other systems.
Author
Owner

@bdlamprecht commented on GitHub (Nov 9, 2018):

Taking away the slug for device-type would not cause issues with how I'm using it. As that wouldn't have caused the issue I described above to begin with (accidental duplicate slug)

However, removing the slug for device-role would cause HUGE problems for me, so please don't do that.

@bdlamprecht commented on GitHub (Nov 9, 2018): Taking away the `slug` for `device-type` would not cause issues with how I'm using it. As that wouldn't have caused the issue I described above to begin with (accidental duplicate `slug`) However, removing the `slug` for `device-role` would cause **HUGE** problems for me, so please don't do that.
Author
Owner

@cimnine commented on GitHub (Nov 9, 2018):

We use the slug usually via the API, as it's neater to refer to than the full names. (And id's are not verbose enough.)

@cimnine commented on GitHub (Nov 9, 2018): We use the slug usually via the API, as it's neater to refer to than the full names. (And id's are not verbose enough.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2097