mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Punt on HTTP, FTP support for now
This commit is contained in:
parent
7ae6d821fa
commit
b97bf44ed5
@ -9,15 +9,11 @@ from utilities.choices import ChoiceSet
|
|||||||
|
|
||||||
class DataSourceTypeChoices(ChoiceSet):
|
class DataSourceTypeChoices(ChoiceSet):
|
||||||
LOCAL = 'local'
|
LOCAL = 'local'
|
||||||
HTTP = 'http'
|
|
||||||
FTP = 'ftp'
|
|
||||||
GIT = 'git'
|
GIT = 'git'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
(LOCAL, _('Local')),
|
(LOCAL, _('Local'), 'gray'),
|
||||||
(HTTP, _('HTTP(S)')),
|
(GIT, _('Git'), 'blue'),
|
||||||
(FTP, _('FTP(S)')),
|
|
||||||
(GIT, _('Git')),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,6 +91,9 @@ class DataSource(ChangeLoggedModel):
|
|||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse('core:datasource', args=[self.pk])
|
return reverse('core:datasource', args=[self.pk])
|
||||||
|
|
||||||
|
def get_type_color(self):
|
||||||
|
return DataSourceTypeChoices.colors.get(self.type)
|
||||||
|
|
||||||
def get_status_color(self):
|
def get_status_color(self):
|
||||||
return DataSourceStatusChoices.colors.get(self.status)
|
return DataSourceStatusChoices.colors.get(self.status)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user