mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-18 19:32:24 -06:00
#8054: Support configurable status choices
This commit is contained in:
@@ -6,6 +6,7 @@ from utilities.choices import ChoiceSet
|
||||
#
|
||||
|
||||
class VirtualMachineStatusChoices(ChoiceSet):
|
||||
key = 'virtualization.VirtualMachine.status'
|
||||
|
||||
STATUS_OFFLINE = 'offline'
|
||||
STATUS_ACTIVE = 'active'
|
||||
@@ -14,14 +15,14 @@ class VirtualMachineStatusChoices(ChoiceSet):
|
||||
STATUS_FAILED = 'failed'
|
||||
STATUS_DECOMMISSIONING = 'decommissioning'
|
||||
|
||||
CHOICES = (
|
||||
CHOICES = [
|
||||
(STATUS_OFFLINE, 'Offline'),
|
||||
(STATUS_ACTIVE, 'Active'),
|
||||
(STATUS_PLANNED, 'Planned'),
|
||||
(STATUS_STAGED, 'Staged'),
|
||||
(STATUS_FAILED, 'Failed'),
|
||||
(STATUS_DECOMMISSIONING, 'Decommissioning'),
|
||||
)
|
||||
]
|
||||
|
||||
CSS_CLASSES = {
|
||||
STATUS_OFFLINE: 'warning',
|
||||
|
||||
Reference in New Issue
Block a user