1
0
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:
jeremystretch
2022-04-29 15:16:35 -04:00
parent 1f4ad444ae
commit 5d37f9f975
18 changed files with 185 additions and 212 deletions

View File

@@ -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):
"""