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):
|
||||
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'),
|
||||
)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user