Add individual views for device components
This commit is contained in:
@@ -1165,6 +1165,10 @@ class ConsolePortListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class ConsolePortView(ObjectView):
|
||||
queryset = ConsolePort.objects.all()
|
||||
|
||||
|
||||
class ConsolePortCreateView(ComponentCreateView):
|
||||
queryset = ConsolePort.objects.all()
|
||||
form = forms.ConsolePortCreateForm
|
||||
@@ -1214,6 +1218,10 @@ class ConsoleServerPortListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class ConsoleServerPortView(ObjectView):
|
||||
queryset = ConsoleServerPort.objects.all()
|
||||
|
||||
|
||||
class ConsoleServerPortCreateView(ComponentCreateView):
|
||||
queryset = ConsoleServerPort.objects.all()
|
||||
form = forms.ConsoleServerPortCreateForm
|
||||
@@ -1273,6 +1281,10 @@ class PowerPortListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class PowerPortView(ObjectView):
|
||||
queryset = PowerPort.objects.all()
|
||||
|
||||
|
||||
class PowerPortCreateView(ComponentCreateView):
|
||||
queryset = PowerPort.objects.all()
|
||||
form = forms.PowerPortCreateForm
|
||||
@@ -1322,6 +1334,10 @@ class PowerOutletListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class PowerOutletView(ObjectView):
|
||||
queryset = PowerOutlet.objects.all()
|
||||
|
||||
|
||||
class PowerOutletCreateView(ComponentCreateView):
|
||||
queryset = PowerOutlet.objects.all()
|
||||
form = forms.PowerOutletCreateForm
|
||||
@@ -1409,7 +1425,7 @@ class InterfaceView(ObjectView):
|
||||
)
|
||||
|
||||
return render(request, 'dcim/interface.html', {
|
||||
'interface': interface,
|
||||
'instance': interface,
|
||||
'connected_interface': interface._connected_interface,
|
||||
'connected_circuittermination': interface._connected_circuittermination,
|
||||
'ipaddress_table': ipaddress_table,
|
||||
@@ -1477,6 +1493,10 @@ class FrontPortListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class FrontPortView(ObjectView):
|
||||
queryset = FrontPort.objects.all()
|
||||
|
||||
|
||||
class FrontPortCreateView(ComponentCreateView):
|
||||
queryset = FrontPort.objects.all()
|
||||
form = forms.FrontPortCreateForm
|
||||
@@ -1536,6 +1556,10 @@ class RearPortListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class RearPortView(ObjectView):
|
||||
queryset = RearPort.objects.all()
|
||||
|
||||
|
||||
class RearPortCreateView(ComponentCreateView):
|
||||
queryset = RearPort.objects.all()
|
||||
form = forms.RearPortCreateForm
|
||||
@@ -1597,6 +1621,10 @@ class DeviceBayListView(ObjectListView):
|
||||
action_buttons = ('import', 'export')
|
||||
|
||||
|
||||
class DeviceBayView(ObjectView):
|
||||
queryset = DeviceBay.objects.all()
|
||||
|
||||
|
||||
class DeviceBayCreateView(ComponentCreateView):
|
||||
queryset = DeviceBay.objects.all()
|
||||
form = forms.DeviceBayCreateForm
|
||||
|
Reference in New Issue
Block a user