mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Support CSS class definition directly in CHOICES iterable
This commit is contained in:
@@ -174,7 +174,7 @@ class PowerFeed(PrimaryModel, PathEndpoint, LinkTermination):
|
||||
return self.power_panel
|
||||
|
||||
def get_type_class(self):
|
||||
return PowerFeedTypeChoices.CSS_CLASSES.get(self.type)
|
||||
return PowerFeedTypeChoices.colors.get(self.type)
|
||||
|
||||
def get_status_class(self):
|
||||
return PowerFeedStatusChoices.CSS_CLASSES.get(self.status)
|
||||
return PowerFeedStatusChoices.colors.get(self.status, 'secondary')
|
||||
|
||||
Reference in New Issue
Block a user