Add color mapping to ChangeActionChoices
#12828
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
NetBox version
v3.5.3
Feature type
Change to existing functionality
Proposed functionality
The
ChangeActionChoices
inchoices.py
class does not have color mapping likeObjectChangeActionChoices
.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 withObjectChangeActionChoices
.The
StagedChange
model also needs theget_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
The text was updated successfully, but these errors were encountered: