2023-02-02 10:06:23 -05:00
|
|
|
from django.utils.translation import gettext as _
|
|
|
|
|
|
|
|
from utilities.choices import ChoiceSet
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Data sources
|
|
|
|
#
|
|
|
|
|
|
|
|
class DataSourceTypeChoices(ChoiceSet):
|
|
|
|
LOCAL = 'local'
|
|
|
|
GIT = 'git'
|
2023-03-15 12:11:52 -04:00
|
|
|
AMAZON_S3 = 'amazon-s3'
|
2023-02-02 10:06:23 -05:00
|
|
|
|
|
|
|
CHOICES = (
|
|
|
|
(LOCAL, _('Local'), 'gray'),
|
|
|
|
(GIT, _('Git'), 'blue'),
|
2023-03-15 12:11:52 -04:00
|
|
|
(AMAZON_S3, _('Amazon S3'), 'blue'),
|
2023-02-02 10:06:23 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class DataSourceStatusChoices(ChoiceSet):
|
|
|
|
NEW = 'new'
|
|
|
|
QUEUED = 'queued'
|
|
|
|
SYNCING = 'syncing'
|
|
|
|
COMPLETED = 'completed'
|
|
|
|
FAILED = 'failed'
|
|
|
|
|
|
|
|
CHOICES = (
|
|
|
|
(NEW, _('New'), 'blue'),
|
|
|
|
(QUEUED, _('Queued'), 'orange'),
|
|
|
|
(SYNCING, _('Syncing'), 'cyan'),
|
|
|
|
(COMPLETED, _('Completed'), 'green'),
|
|
|
|
(FAILED, _('Failed'), 'red'),
|
|
|
|
)
|
2023-03-24 21:00:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Managed files
|
|
|
|
#
|
|
|
|
|
|
|
|
class ManagedFileRootPathChoices(ChoiceSet):
|
|
|
|
SCRIPTS = 'scripts' # settings.SCRIPTS_ROOT
|
|
|
|
REPORTS = 'reports' # settings.REPORTS_ROOT
|
|
|
|
|
|
|
|
CHOICES = (
|
|
|
|
(SCRIPTS, _('Scripts')),
|
|
|
|
(REPORTS, _('Reports')),
|
|
|
|
)
|