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

Extend BooleanColumn to allow rendering a placeholder for false values #16933

Closed
jeremystretch opened this issue Jul 17, 2024 · 0 comments · Fixed by #16942
Closed

Extend BooleanColumn to allow rendering a placeholder for false values #16933

jeremystretch opened this issue Jul 17, 2024 · 0 comments · Fixed by #16942
Assignees
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@jeremystretch
Copy link
Member

NetBox version

v4.0.7

Feature type

New functionality

Proposed functionality

Currently, NetBox's custom BooleanColumn will render a checkmark for true values, an X for false values, and a placeholder for null values.

This FR proposes new keyword arguments which enable overriding the default HTML content for true and false values. Setting either of these to None will render an empty placeholder, as with null values.

foo = columns.BooleanColumn(
    true_content='Yup',
    false_content=None
)

Use case

Sometimes a negative condition is not inherently problematic, and is not appropriate to flag as "wrong" using a red X. For example, consider the "management only" field on the interface model. We care to indicate when an interface has been so designated, but otherwise this attribute needs no further attention. (Contrast this to the "enabled" field, wherein a false value is likely more worthy of consideration.)

Database changes

None

External dependencies

None

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation complexity: low Requires minimal effort to implement labels Jul 17, 2024
@jeremystretch jeremystretch self-assigned this Jul 18, 2024
@jeremystretch jeremystretch 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 Jul 18, 2024
jeremystretch added a commit that referenced this issue Jul 26, 2024
jeremystretch added a commit that referenced this issue Jul 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
complexity: low Requires minimal effort to implement 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.

1 participant