[PR #12584] [MERGED] Adds copy content button #14011

Closed
opened 2025-12-29 23:22:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12584
Author: @abhi1693
Created: 5/12/2023
Status: Merged
Merged: 7/6/2023
Merged by: @jeremystretch

Base: developHead: feat/12499-copy-ip


📝 Commits (4)

📊 Changes

12 files changed (+71 additions, -25 deletions)

View changed files

📝 netbox/ipam/tables/ip.py (+28 -3)
📝 netbox/project-static/dist/netbox.js (+1 -1)
📝 netbox/project-static/dist/netbox.js.map (+1 -1)
📝 netbox/project-static/src/clipboard.ts (+1 -1)
📝 netbox/templates/core/datafile.html (+2 -6)
📝 netbox/templates/dcim/device.html (+4 -2)
📝 netbox/templates/dcim/virtualdevicecontext.html (+12 -2)
📝 netbox/templates/users/api_token.html (+2 -4)
📝 netbox/templates/virtualization/virtualmachine.html (+4 -2)
📝 netbox/users/tables.py (+1 -3)
netbox/utilities/templates/builtins/copy_content.html (+3 -0)
📝 netbox/utilities/templatetags/builtins/tags.py (+12 -0)

📄 Description

Fixes: #12499

I have created a new copy_content template that I have used in several places to provide the copy to clipboard functionality. I have also refactored copy-token code to utlize this new template.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/12584 **Author:** [@abhi1693](https://github.com/abhi1693) **Created:** 5/12/2023 **Status:** ✅ Merged **Merged:** 7/6/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `feat/12499-copy-ip` --- ### 📝 Commits (4) - [`83c3e1b`](https://github.com/netbox-community/netbox/commit/83c3e1b4da7504a8aa8f73bd1c2ddb818d888fa4) adds copy content button #12499 - [`24f5421`](https://github.com/netbox-community/netbox/commit/24f5421a3fc399e37d3357f7350ed3f655012ffc) adds newline - [`3be724f`](https://github.com/netbox-community/netbox/commit/3be724faf6ca25046e87874b4edc7807f31f37be) Omit hash mark from target string - [`3d362a8`](https://github.com/netbox-community/netbox/commit/3d362a864a40bc36ad6c5b2ef0ff830e69dd7c05) Clean up HTML element IDs ### 📊 Changes **12 files changed** (+71 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/tables/ip.py` (+28 -3) 📝 `netbox/project-static/dist/netbox.js` (+1 -1) 📝 `netbox/project-static/dist/netbox.js.map` (+1 -1) 📝 `netbox/project-static/src/clipboard.ts` (+1 -1) 📝 `netbox/templates/core/datafile.html` (+2 -6) 📝 `netbox/templates/dcim/device.html` (+4 -2) 📝 `netbox/templates/dcim/virtualdevicecontext.html` (+12 -2) 📝 `netbox/templates/users/api_token.html` (+2 -4) 📝 `netbox/templates/virtualization/virtualmachine.html` (+4 -2) 📝 `netbox/users/tables.py` (+1 -3) ➕ `netbox/utilities/templates/builtins/copy_content.html` (+3 -0) 📝 `netbox/utilities/templatetags/builtins/tags.py` (+12 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #12499 <!-- Please include a summary of the proposed changes below. --> I have created a new `copy_content` template that I have used in several places to provide the copy to clipboard functionality. I have also refactored `copy-token` code to utlize this new template. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:22:02 +01:00
adam closed this issue 2025-12-29 23:22:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14011