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

Add color mapping to ChangeActionChoices #12828

Closed
ingvaldlorentzen opened this issue Jun 7, 2023 · 0 comments · Fixed by #12892
Closed

Add color mapping to ChangeActionChoices #12828

ingvaldlorentzen opened this issue Jun 7, 2023 · 0 comments · Fixed by #12892
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@ingvaldlorentzen
Copy link

ingvaldlorentzen commented Jun 7, 2023

NetBox version

v3.5.3

Feature type

Change to existing functionality

Proposed functionality

The ChangeActionChoices in choices.py class does not have color mapping like ObjectChangeActionChoices.

ChangeActionChoices is used by the StagedChanges feature. It makes some sense that it doesn't have the color mapping, since there is no frontend, or even API for this feature yet, but adding it shouldn't break anything and would make it more consistent with ObjectChangeActionChoices.

The StagedChange model also needs the get_action_color function defined, if this is to work. I'll gladly submit a PR with these changes, I've basically got one ready just waiting to submit until getting approval in this issue, per the contributor guidelines.

Use case

I am currently working on a plugin that will visualize Staged Changes, and adding the color mapping would be handy. Obviously I can override the rendering of a table for this field and do it manually, but I think adding the colors would be nice for my use case and others wanting to utilize and visualize the Staged Changes feature for plugins.

Database changes

None

External dependencies

None

@ingvaldlorentzen ingvaldlorentzen added the type: feature Introduction of new functionality to the application label Jun 7, 2023
ingvaldlorentzen added a commit to ingvaldlorentzen/netbox that referenced this issue Jun 7, 2023
@DanSheps DanSheps added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jun 7, 2023
@abhi1693 abhi1693 self-assigned this Jun 14, 2023
@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jun 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants