mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Support CSS class definition directly in CHOICES iterable
This commit is contained in:
@@ -16,23 +16,14 @@ class CircuitStatusChoices(ChoiceSet):
|
||||
STATUS_DECOMMISSIONED = 'decommissioned'
|
||||
|
||||
CHOICES = [
|
||||
(STATUS_PLANNED, 'Planned'),
|
||||
(STATUS_PROVISIONING, 'Provisioning'),
|
||||
(STATUS_ACTIVE, 'Active'),
|
||||
(STATUS_OFFLINE, 'Offline'),
|
||||
(STATUS_DEPROVISIONING, 'Deprovisioning'),
|
||||
(STATUS_DECOMMISSIONED, 'Decommissioned'),
|
||||
(STATUS_PLANNED, 'Planned', 'info'),
|
||||
(STATUS_PROVISIONING, 'Provisioning', 'primary'),
|
||||
(STATUS_ACTIVE, 'Active', 'success'),
|
||||
(STATUS_OFFLINE, 'Offline', 'danger'),
|
||||
(STATUS_DEPROVISIONING, 'Deprovisioning', 'warning'),
|
||||
(STATUS_DECOMMISSIONED, 'Decommissioned', 'secondary'),
|
||||
]
|
||||
|
||||
CSS_CLASSES = {
|
||||
STATUS_DEPROVISIONING: 'warning',
|
||||
STATUS_ACTIVE: 'success',
|
||||
STATUS_PLANNED: 'info',
|
||||
STATUS_PROVISIONING: 'primary',
|
||||
STATUS_OFFLINE: 'danger',
|
||||
STATUS_DECOMMISSIONED: 'secondary',
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# CircuitTerminations
|
||||
|
||||
Reference in New Issue
Block a user