Punt on HTTP, FTP support for now

This commit is contained in:
jeremystretch 2023-01-27 14:40:35 -05:00
parent 7ae6d821fa
commit b97bf44ed5
2 changed files with 5 additions and 6 deletions

View File

@ -9,15 +9,11 @@ from utilities.choices import ChoiceSet
class DataSourceTypeChoices(ChoiceSet):
LOCAL = 'local'
HTTP = 'http'
FTP = 'ftp'
GIT = 'git'
CHOICES = (
(LOCAL, _('Local')),
(HTTP, _('HTTP(S)')),
(FTP, _('FTP(S)')),
(GIT, _('Git')),
(LOCAL, _('Local'), 'gray'),
(GIT, _('Git'), 'blue'),
)

View File

@ -91,6 +91,9 @@ class DataSource(ChangeLoggedModel):
def get_absolute_url(self):
return reverse('core:datasource', args=[self.pk])
def get_type_color(self):
return DataSourceTypeChoices.colors.get(self.type)
def get_status_color(self):
return DataSourceStatusChoices.colors.get(self.status)