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

15148 add copy button to config context #15954

Merged
merged 2 commits into from
May 9, 2024

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented May 3, 2024

Fixes: #15148

Adds a copy button to the config context area - Added it to the panel title area next to the json/yaml format buttons (see screenshot)

Monosnap Dist-Switch-1 | NetBox 2024-05-06 07-36-09

@arthanson arthanson marked this pull request as ready for review May 6, 2024 14:38
@arthanson arthanson requested a review from jeremystretch May 6, 2024 14:38
@arthanson arthanson changed the title DRAFT: 15148 add copy button to config context 15148 add copy button to config context May 6, 2024
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we refactor the inclusion templates into one? It seems very fragile to have the logic split apart like this. We should be able to move the content from configcontext_format.html into configcontext_data.html and wrap it in a conditional that looks for include_header or similar.

@jeremystretch jeremystretch force-pushed the 15148-copy-config-context branch from f13c61a to 5b7c392 Compare May 8, 2024 19:59
@jeremystretch
Copy link
Member

@arthanson I merged the content of configcontext_format.html into configcontext_data.html and introduced a separate inclusion template for the JSON/YAML toggle. Let me know what you think.

@arthanson
Copy link
Collaborator Author

@jeremystretch looks good.

@jeremystretch jeremystretch merged commit 1a56e8e into develop May 9, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 15148-copy-config-context branch May 9, 2024 12:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX enhencement: Copy Button on context
2 participants