mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Update cable connection forms
This commit is contained in:
@@ -168,6 +168,16 @@ class Cable(NetBoxModel):
|
||||
def get_status_color(self):
|
||||
return LinkStatusChoices.colors.get(self.status)
|
||||
|
||||
def get_a_terminations(self):
|
||||
return [
|
||||
term.termination for term in CableTermination.objects.filter(cable=self, cable_end='A')
|
||||
]
|
||||
|
||||
def get_b_terminations(self):
|
||||
return [
|
||||
term.termination for term in CableTermination.objects.filter(cable=self, cable_end='B')
|
||||
]
|
||||
|
||||
|
||||
class CableTermination(models.Model):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user