Copy-to-clipboard functionality for IPs #8012

Closed
opened 2025-12-29 20:31:07 +01:00 by adam · 8 comments
Owner

Originally created by @giezi on GitHub (May 5, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.5.0

Feature type

New functionality

Proposed functionality

It would be great if there would be a function that when you hover over the IP addresses with the mouse a copy button appears which copies the IP without subnet mask.

Copy button like:

Screenshot 2023-05-05 at 11 27 40

Use case

I think it would be a relief for most users, at the moment you always have to tediously mark the IP and then copy it to connect to a system e.g. via SSH.

Database changes

External dependencies

Originally created by @giezi on GitHub (May 5, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.5.0 ### Feature type New functionality ### Proposed functionality It would be great if there would be a function that when you hover over the IP addresses with the mouse a copy button appears which copies the IP without subnet mask. Copy button like: <img width="35" alt="Screenshot 2023-05-05 at 11 27 40" src="https://user-images.githubusercontent.com/1326203/236423092-9142148a-4605-4c91-a485-0ee2debb25d4.png"> ### Use case I think it would be a relief for most users, at the moment you always have to tediously mark the IP and then copy it to connect to a system e.g. via SSH. ### Database changes - ### External dependencies -
adam added the status: acceptedtype: feature labels 2025-12-29 20:31:07 +01:00
adam closed this issue 2025-12-29 20:31:07 +01:00
Author
Owner

@v0tti commented on GitHub (May 5, 2023):

Copying the IP without the subnet mask seems a bit counter intuitive because it is displayed with a mask in most places of the UI.

But I agree that copying should be improved. I always mark the IP to copy it but sometimes I accidentally select a leading tabulator which makes pasting it a pain.

@v0tti commented on GitHub (May 5, 2023): Copying the IP without the subnet mask seems a bit counter intuitive because it is displayed with a mask in most places of the UI. But I agree that copying should be improved. I always mark the IP to copy it but sometimes I accidentally select a leading tabulator which makes pasting it a pain.
Author
Owner

@jeremystretch commented on GitHub (May 5, 2023):

We have a copy-to-clipboard button in place elsewhere around the UI (the API tokens list, for instance) that should be suitable for this.

@jeremystretch commented on GitHub (May 5, 2023): We have a copy-to-clipboard button in place elsewhere around the UI (the API tokens list, for instance) that should be suitable for this.
Author
Owner

@abhi1693 commented on GitHub (May 8, 2023):

I can take this up, but which places in the UI is this being intended to be applied?

@abhi1693 commented on GitHub (May 8, 2023): I can take this up, but which places in the UI is this being intended to be applied?
Author
Owner

@PieterL75 commented on GitHub (May 10, 2023):

I have a plugin that creates a small hamburger to all the links, being able to copy the text out of it (and do much more)
image
image
It opens a lot of flexibility and quick navigations.
The burger is there on all 'links' and not only ip addresses. Would be great if this can become part of the core netbox

@PieterL75 commented on GitHub (May 10, 2023): I have a plugin that creates a small hamburger to all the links, being able to copy the text out of it (and do much more) ![image](https://github.com/netbox-community/netbox/assets/74899468/9b989c51-3d23-4bb8-be62-dfc53dc99196) ![image](https://github.com/netbox-community/netbox/assets/74899468/fd3efef3-0a59-4c5f-982d-2f261cc656fa) It opens a lot of flexibility and quick navigations. The burger is there on all 'links' and not only ip addresses. Would be great if this can become part of the core netbox
Author
Owner

@jeremystretch commented on GitHub (May 10, 2023):

@abhi1693 I think the intent here is just to display a copy-to-clipboard button wherever an IP address is displayed within the UI, maybe excluding object tables.

@jeremystretch commented on GitHub (May 10, 2023): @abhi1693 I think the intent here is just to display a copy-to-clipboard button wherever an IP address is displayed within the UI, maybe excluding object tables.
Author
Owner

@abhi1693 commented on GitHub (May 10, 2023):

@jeremystretch The OP has requested to copy the IP without the mask. If I'm to generalize the copy button, that may complicate things because I have a feeling this code will have to be some sort of hack in the TS script to drop the mask. I would rather leave this on the user to remove the mask after they paste, but just wanted to confirm with you as well.

@abhi1693 commented on GitHub (May 10, 2023): @jeremystretch The OP has requested to copy the IP without the mask. If I'm to generalize the copy button, that may complicate things because I have a feeling this code will have to be some sort of hack in the TS script to drop the mask. I would rather leave this on the user to remove the mask after they paste, but just wanted to confirm with you as well.
Author
Owner

@jeremystretch commented on GitHub (May 10, 2023):

IMO it makes sense to copy the mask as well. I don't see any reason to exclude it.

@jeremystretch commented on GitHub (May 10, 2023): IMO it makes sense to copy the mask as well. I don't see any reason to exclude it.
Author
Owner

@giezi commented on GitHub (May 11, 2023):

I think the plugin of @PieterL75 should be included as standard in the Netbox - it solves all our problems :)
https://github.com/PieterL75/netbox_contextmenus

@giezi commented on GitHub (May 11, 2023): I think the plugin of @PieterL75 should be included as standard in the Netbox - it solves all our problems :) https://github.com/PieterL75/netbox_contextmenus
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8012