1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Rename JobResult to Job and move to core

This commit is contained in:
jeremystretch
2023-03-27 11:43:12 -04:00
committed by Jeremy Stretch
parent 669cfe8952
commit 40572b543f
41 changed files with 650 additions and 361 deletions

View File

@@ -47,3 +47,32 @@ class ManagedFileRootPathChoices(ChoiceSet):
(SCRIPTS, _('Scripts')),
(REPORTS, _('Reports')),
)
#
# Jobs
#
class JobStatusChoices(ChoiceSet):
STATUS_PENDING = 'pending'
STATUS_SCHEDULED = 'scheduled'
STATUS_RUNNING = 'running'
STATUS_COMPLETED = 'completed'
STATUS_ERRORED = 'errored'
STATUS_FAILED = 'failed'
CHOICES = (
(STATUS_PENDING, 'Pending', 'cyan'),
(STATUS_SCHEDULED, 'Scheduled', 'gray'),
(STATUS_RUNNING, 'Running', 'blue'),
(STATUS_COMPLETED, 'Completed', 'green'),
(STATUS_ERRORED, 'Errored', 'red'),
(STATUS_FAILED, 'Failed', 'red'),
)
TERMINAL_STATE_CHOICES = (
STATUS_COMPLETED,
STATUS_ERRORED,
STATUS_FAILED,
)