mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
additional status choices for vms
This commit is contained in:
@ -5,11 +5,11 @@
|
|||||||
* [#3766](https://github.com/netbox-community/netbox/issues/3766) - Allow custom script authors to specify the form widget for each variable
|
* [#3766](https://github.com/netbox-community/netbox/issues/3766) - Allow custom script authors to specify the form widget for each variable
|
||||||
* [#3799](https://github.com/netbox-community/netbox/issues/3799) - Greatly improve performance when ordering device components
|
* [#3799](https://github.com/netbox-community/netbox/issues/3799) - Greatly improve performance when ordering device components
|
||||||
* [#3986](https://github.com/netbox-community/netbox/issues/3986) - Include position numbers in SVG image when rendering rack elevation
|
* [#3986](https://github.com/netbox-community/netbox/issues/3986) - Include position numbers in SVG image when rendering rack elevation
|
||||||
|
* [#4093](https://github.com/netbox-community/netbox/issues/4093) - Add multiple status choices for VMs
|
||||||
* [#4100](https://github.com/netbox-community/netbox/issues/4100) - Add device filter to component list views
|
* [#4100](https://github.com/netbox-community/netbox/issues/4100) - Add device filter to component list views
|
||||||
* [#4113](https://github.com/netbox-community/netbox/issues/4113) - Add bulk edit functionality for device type components
|
* [#4113](https://github.com/netbox-community/netbox/issues/4113) - Add bulk edit functionality for device type components
|
||||||
* [#4116](https://github.com/netbox-community/netbox/issues/4116) - Enable bulk edit and delete functions for device component list views
|
* [#4116](https://github.com/netbox-community/netbox/issues/4116) - Enable bulk edit and delete functions for device component list views
|
||||||
* [#4129](https://github.com/netbox-community/netbox/issues/4129) - Add buttons to delete individual device type components
|
* [#4129](https://github.com/netbox-community/netbox/issues/4129) - Add buttons to delete individual device type components
|
||||||
* [#4093](https://github.com/netbox-community/netbox/issues/4093) - Add decommissioning status for VMs
|
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
|
@ -8,15 +8,19 @@ from utilities.choices import ChoiceSet
|
|||||||
|
|
||||||
class VirtualMachineStatusChoices(ChoiceSet):
|
class VirtualMachineStatusChoices(ChoiceSet):
|
||||||
|
|
||||||
STATUS_ACTIVE = 'active'
|
|
||||||
STATUS_OFFLINE = 'offline'
|
STATUS_OFFLINE = 'offline'
|
||||||
|
STATUS_ACTIVE = 'active'
|
||||||
|
STATUS_PLANNED = 'planned'
|
||||||
STATUS_STAGED = 'staged'
|
STATUS_STAGED = 'staged'
|
||||||
|
STATUS_FAILED = 'failed'
|
||||||
STATUS_DECOMMISSIONING = 'decommissioning'
|
STATUS_DECOMMISSIONING = 'decommissioning'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
(STATUS_ACTIVE, 'Active'),
|
|
||||||
(STATUS_OFFLINE, 'Offline'),
|
(STATUS_OFFLINE, 'Offline'),
|
||||||
|
(STATUS_ACTIVE, 'Active'),
|
||||||
|
(STATUS_PLANNED, 'Planned'),
|
||||||
(STATUS_STAGED, 'Staged'),
|
(STATUS_STAGED, 'Staged'),
|
||||||
|
(STATUS_FAILED, 'Failed'),
|
||||||
(STATUS_DECOMMISSIONING, 'Decommissioning'),
|
(STATUS_DECOMMISSIONING, 'Decommissioning'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -267,9 +267,11 @@ class VirtualMachine(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
|
|||||||
]
|
]
|
||||||
|
|
||||||
STATUS_CLASS_MAP = {
|
STATUS_CLASS_MAP = {
|
||||||
|
VirtualMachineStatusChoices.STATUS_OFFLINE: 'warning',
|
||||||
VirtualMachineStatusChoices.STATUS_ACTIVE: 'success',
|
VirtualMachineStatusChoices.STATUS_ACTIVE: 'success',
|
||||||
VirtualMachineStatusChoices.STATUS_OFFLINE: 'danger',
|
VirtualMachineStatusChoices.STATUS_PLANNED: 'info',
|
||||||
VirtualMachineStatusChoices.STATUS_STAGED: 'primary',
|
VirtualMachineStatusChoices.STATUS_STAGED: 'primary',
|
||||||
|
VirtualMachineStatusChoices.STATUS_FAILED: 'danger',
|
||||||
VirtualMachineStatusChoices.STATUS_DECOMMISSIONING: 'warning',
|
VirtualMachineStatusChoices.STATUS_DECOMMISSIONING: 'warning',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user