mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Standardize on "object" for ObjectView template context
This commit is contained in:
parent
11fa348575
commit
e2d2ff8586
@ -100,9 +100,9 @@ CONSOLEPORT_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='console-server-port' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}">Console Server Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='console-server-port' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}">Console Server Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}">Front Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}">Rear Port</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -120,9 +120,9 @@ CONSOLESERVERPORT_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='console-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}">Console Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='console-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}">Console Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}">Front Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}">Rear Port</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -140,8 +140,8 @@ POWERPORT_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=record.pk termination_b_type='power-outlet' %}?return_url={% url 'dcim:device_powerports' pk=device.pk %}">Power Outlet</a></li>
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=record.pk termination_b_type='power-outlet' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}">Power Outlet</a></li>
|
||||||
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=record.pk termination_b_type='power-feed' %}?return_url={% url 'dcim:device_powerports' pk=device.pk %}">Power Feed</a></li>
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=record.pk termination_b_type='power-feed' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}">Power Feed</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -154,7 +154,7 @@ POWEROUTLET_BUTTONS = """
|
|||||||
{% elif perms.dcim.add_cable %}
|
{% elif perms.dcim.add_cable %}
|
||||||
<a href="#" class="btn btn-default btn-xs disabled"><i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i></a>
|
<a href="#" class="btn btn-default btn-xs disabled"><i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i></a>
|
||||||
<a href="#" class="btn btn-default btn-xs disabled"><i class="mdi mdi-lan-connect" aria-hidden="true"></i></a>
|
<a href="#" class="btn btn-default btn-xs disabled"><i class="mdi mdi-lan-connect" aria-hidden="true"></i></a>
|
||||||
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=record.pk termination_b_type='power-port' %}?return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" title="Connect" class="btn btn-success btn-xs">
|
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=record.pk termination_b_type='power-port' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" title="Connect" class="btn btn-success btn-xs">
|
||||||
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i>
|
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -162,7 +162,7 @@ POWEROUTLET_BUTTONS = """
|
|||||||
|
|
||||||
INTERFACE_BUTTONS = """
|
INTERFACE_BUTTONS = """
|
||||||
{% if perms.ipam.add_ipaddress %}
|
{% if perms.ipam.add_ipaddress %}
|
||||||
<a href="{% url 'ipam:ipaddress_add' %}?interface={{ record.pk }}&return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-xs btn-success" title="Add IP address">
|
<a href="{% url 'ipam:ipaddress_add' %}?interface={{ record.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-xs btn-success" title="Add IP address">
|
||||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -177,10 +177,10 @@ INTERFACE_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}">Interface</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}">Front Port</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -198,12 +198,12 @@ FRONTPORT_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Interface</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='console-server-port' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Console Server Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='console-server-port' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Console Server Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='console-port' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Console Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='console-port' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Console Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Front Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -221,10 +221,10 @@ REARPORT_BUTTONS = """
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}">Interface</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='interface' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}">Front Port</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='front-port' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='rear-port' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=record.pk termination_b_type='circuit-termination' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -233,11 +233,11 @@ REARPORT_BUTTONS = """
|
|||||||
DEVICEBAY_BUTTONS = """
|
DEVICEBAY_BUTTONS = """
|
||||||
{% if perms.dcim.change_devicebay %}
|
{% if perms.dcim.change_devicebay %}
|
||||||
{% if record.installed_device %}
|
{% if record.installed_device %}
|
||||||
<a href="{% url 'dcim:devicebay_depopulate' pk=record.pk %}?return_url={% url 'dcim:device_devicebays' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<a href="{% url 'dcim:devicebay_depopulate' pk=record.pk %}?return_url={% url 'dcim:device_devicebays' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<i class="mdi mdi-minus-thick" aria-hidden="true" title="Remove device"></i>
|
<i class="mdi mdi-minus-thick" aria-hidden="true" title="Remove device"></i>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'dcim:devicebay_populate' pk=record.pk %}?return_url={% url 'dcim:device_devicebays' pk=device.pk %}" class="btn btn-success btn-xs">
|
<a href="{% url 'dcim:devicebay_populate' pk=record.pk %}?return_url={% url 'dcim:device_devicebays' pk=object.pk %}" class="btn btn-success btn-xs">
|
||||||
<i class="mdi mdi-plus-thick" aria-hidden="true" title="Install device"></i>
|
<i class="mdi mdi-plus-thick" aria-hidden="true" title="Install device"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -413,14 +413,6 @@ class RackReservationListView(generic.ObjectListView):
|
|||||||
class RackReservationView(generic.ObjectView):
|
class RackReservationView(generic.ObjectView):
|
||||||
queryset = RackReservation.objects.prefetch_related('rack')
|
queryset = RackReservation.objects.prefetch_related('rack')
|
||||||
|
|
||||||
def get(self, request, pk):
|
|
||||||
|
|
||||||
rackreservation = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'dcim/rackreservation.html', {
|
|
||||||
'rackreservation': rackreservation,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class RackReservationEditView(generic.ObjectEditView):
|
class RackReservationEditView(generic.ObjectEditView):
|
||||||
queryset = RackReservation.objects.all()
|
queryset = RackReservation.objects.all()
|
||||||
@ -568,7 +560,7 @@ class DeviceTypeView(generic.ObjectView):
|
|||||||
devicebay_table.columns.show('pk')
|
devicebay_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/devicetype.html', {
|
return render(request, 'dcim/devicetype.html', {
|
||||||
'devicetype': devicetype,
|
'object': devicetype,
|
||||||
'instance_count': instance_count,
|
'instance_count': instance_count,
|
||||||
'consoleport_table': consoleport_table,
|
'consoleport_table': consoleport_table,
|
||||||
'consoleserverport_table': consoleserverport_table,
|
'consoleserverport_table': consoleserverport_table,
|
||||||
@ -1023,7 +1015,7 @@ class DeviceView(generic.ObjectView):
|
|||||||
)[:10]
|
)[:10]
|
||||||
|
|
||||||
return render(request, 'dcim/device/device.html', {
|
return render(request, 'dcim/device/device.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'services': services,
|
'services': services,
|
||||||
'secrets': secrets,
|
'secrets': secrets,
|
||||||
'vc_members': vc_members,
|
'vc_members': vc_members,
|
||||||
@ -1050,7 +1042,7 @@ class DeviceConsolePortsView(generic.ObjectView):
|
|||||||
consoleport_table.columns.show('pk')
|
consoleport_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/consoleports.html', {
|
return render(request, 'dcim/device/consoleports.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'consoleport_table': consoleport_table,
|
'consoleport_table': consoleport_table,
|
||||||
'active_tab': 'console-ports',
|
'active_tab': 'console-ports',
|
||||||
})
|
})
|
||||||
@ -1077,7 +1069,7 @@ class DeviceConsoleServerPortsView(generic.ObjectView):
|
|||||||
consoleserverport_table.columns.show('pk')
|
consoleserverport_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/consoleserverports.html', {
|
return render(request, 'dcim/device/consoleserverports.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'consoleserverport_table': consoleserverport_table,
|
'consoleserverport_table': consoleserverport_table,
|
||||||
'active_tab': 'console-server-ports',
|
'active_tab': 'console-server-ports',
|
||||||
})
|
})
|
||||||
@ -1101,7 +1093,7 @@ class DevicePowerPortsView(generic.ObjectView):
|
|||||||
powerport_table.columns.show('pk')
|
powerport_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/powerports.html', {
|
return render(request, 'dcim/device/powerports.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'powerport_table': powerport_table,
|
'powerport_table': powerport_table,
|
||||||
'active_tab': 'power-ports',
|
'active_tab': 'power-ports',
|
||||||
})
|
})
|
||||||
@ -1125,7 +1117,7 @@ class DevicePowerOutletsView(generic.ObjectView):
|
|||||||
poweroutlet_table.columns.show('pk')
|
poweroutlet_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/poweroutlets.html', {
|
return render(request, 'dcim/device/poweroutlets.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'poweroutlet_table': poweroutlet_table,
|
'poweroutlet_table': poweroutlet_table,
|
||||||
'active_tab': 'power-outlets',
|
'active_tab': 'power-outlets',
|
||||||
})
|
})
|
||||||
@ -1151,7 +1143,7 @@ class DeviceInterfacesView(generic.ObjectView):
|
|||||||
interface_table.columns.show('pk')
|
interface_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/interfaces.html', {
|
return render(request, 'dcim/device/interfaces.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'interface_table': interface_table,
|
'interface_table': interface_table,
|
||||||
'active_tab': 'interfaces',
|
'active_tab': 'interfaces',
|
||||||
})
|
})
|
||||||
@ -1175,7 +1167,7 @@ class DeviceFrontPortsView(generic.ObjectView):
|
|||||||
frontport_table.columns.show('pk')
|
frontport_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/frontports.html', {
|
return render(request, 'dcim/device/frontports.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'frontport_table': frontport_table,
|
'frontport_table': frontport_table,
|
||||||
'active_tab': 'front-ports',
|
'active_tab': 'front-ports',
|
||||||
})
|
})
|
||||||
@ -1197,7 +1189,7 @@ class DeviceRearPortsView(generic.ObjectView):
|
|||||||
rearport_table.columns.show('pk')
|
rearport_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/rearports.html', {
|
return render(request, 'dcim/device/rearports.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'rearport_table': rearport_table,
|
'rearport_table': rearport_table,
|
||||||
'active_tab': 'rear-ports',
|
'active_tab': 'rear-ports',
|
||||||
})
|
})
|
||||||
@ -1221,7 +1213,7 @@ class DeviceDeviceBaysView(generic.ObjectView):
|
|||||||
devicebay_table.columns.show('pk')
|
devicebay_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/devicebays.html', {
|
return render(request, 'dcim/device/devicebays.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'devicebay_table': devicebay_table,
|
'devicebay_table': devicebay_table,
|
||||||
'active_tab': 'device-bays',
|
'active_tab': 'device-bays',
|
||||||
})
|
})
|
||||||
@ -1245,7 +1237,7 @@ class DeviceInventoryView(generic.ObjectView):
|
|||||||
inventoryitem_table.columns.show('pk')
|
inventoryitem_table.columns.show('pk')
|
||||||
|
|
||||||
return render(request, 'dcim/device/inventory.html', {
|
return render(request, 'dcim/device/inventory.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'inventoryitem_table': inventoryitem_table,
|
'inventoryitem_table': inventoryitem_table,
|
||||||
'active_tab': 'inventory',
|
'active_tab': 'inventory',
|
||||||
})
|
})
|
||||||
@ -1254,14 +1246,12 @@ class DeviceInventoryView(generic.ObjectView):
|
|||||||
class DeviceStatusView(generic.ObjectView):
|
class DeviceStatusView(generic.ObjectView):
|
||||||
additional_permissions = ['dcim.napalm_read_device']
|
additional_permissions = ['dcim.napalm_read_device']
|
||||||
queryset = Device.objects.all()
|
queryset = Device.objects.all()
|
||||||
|
template_name = 'dcim/device/status.html'
|
||||||
|
|
||||||
def get(self, request, pk):
|
def get_extra_context(self):
|
||||||
device = get_object_or_404(self.queryset, pk=pk)
|
return {
|
||||||
|
|
||||||
return render(request, 'dcim/device/status.html', {
|
|
||||||
'device': device,
|
|
||||||
'active_tab': 'status',
|
'active_tab': 'status',
|
||||||
})
|
}
|
||||||
|
|
||||||
|
|
||||||
class DeviceLLDPNeighborsView(generic.ObjectView):
|
class DeviceLLDPNeighborsView(generic.ObjectView):
|
||||||
@ -1276,7 +1266,7 @@ class DeviceLLDPNeighborsView(generic.ObjectView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return render(request, 'dcim/device/lldp_neighbors.html', {
|
return render(request, 'dcim/device/lldp_neighbors.html', {
|
||||||
'device': device,
|
'object': device,
|
||||||
'interfaces': interfaces,
|
'interfaces': interfaces,
|
||||||
'active_tab': 'lldp-neighbors',
|
'active_tab': 'lldp-neighbors',
|
||||||
})
|
})
|
||||||
@ -1285,15 +1275,12 @@ class DeviceLLDPNeighborsView(generic.ObjectView):
|
|||||||
class DeviceConfigView(generic.ObjectView):
|
class DeviceConfigView(generic.ObjectView):
|
||||||
additional_permissions = ['dcim.napalm_read_device']
|
additional_permissions = ['dcim.napalm_read_device']
|
||||||
queryset = Device.objects.all()
|
queryset = Device.objects.all()
|
||||||
|
template_name = 'dcim/device/config.html'
|
||||||
|
|
||||||
def get(self, request, pk):
|
def get_extra_context(self):
|
||||||
|
return {
|
||||||
device = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'dcim/device/config.html', {
|
|
||||||
'device': device,
|
|
||||||
'active_tab': 'config',
|
'active_tab': 'config',
|
||||||
})
|
}
|
||||||
|
|
||||||
|
|
||||||
class DeviceConfigContextView(ObjectConfigContextView):
|
class DeviceConfigContextView(ObjectConfigContextView):
|
||||||
@ -1629,7 +1616,7 @@ class InterfaceView(generic.ObjectView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return render(request, 'dcim/interface.html', {
|
return render(request, 'dcim/interface.html', {
|
||||||
'instance': interface,
|
'object': interface,
|
||||||
'ipaddress_table': ipaddress_table,
|
'ipaddress_table': ipaddress_table,
|
||||||
'vlan_table': vlan_table,
|
'vlan_table': vlan_table,
|
||||||
})
|
})
|
||||||
@ -2093,14 +2080,6 @@ class CableListView(generic.ObjectListView):
|
|||||||
class CableView(generic.ObjectView):
|
class CableView(generic.ObjectView):
|
||||||
queryset = Cable.objects.all()
|
queryset = Cable.objects.all()
|
||||||
|
|
||||||
def get(self, request, pk):
|
|
||||||
|
|
||||||
cable = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'dcim/cable.html', {
|
|
||||||
'cable': cable,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class PathTraceView(generic.ObjectView):
|
class PathTraceView(generic.ObjectView):
|
||||||
"""
|
"""
|
||||||
@ -2136,7 +2115,7 @@ class PathTraceView(generic.ObjectView):
|
|||||||
path = related_paths.first()
|
path = related_paths.first()
|
||||||
|
|
||||||
return render(request, 'dcim/cable_trace.html', {
|
return render(request, 'dcim/cable_trace.html', {
|
||||||
'obj': obj,
|
'object': obj,
|
||||||
'path': path,
|
'path': path,
|
||||||
'related_paths': related_paths,
|
'related_paths': related_paths,
|
||||||
'total_length': path.get_total_length() if path else None,
|
'total_length': path.get_total_length() if path else None,
|
||||||
@ -2588,7 +2567,7 @@ class PowerPanelView(generic.ObjectView):
|
|||||||
powerfeed_table.exclude = ['power_panel']
|
powerfeed_table.exclude = ['power_panel']
|
||||||
|
|
||||||
return render(request, 'dcim/powerpanel.html', {
|
return render(request, 'dcim/powerpanel.html', {
|
||||||
'powerpanel': powerpanel,
|
'object': powerpanel,
|
||||||
'powerfeed_table': powerfeed_table,
|
'powerfeed_table': powerfeed_table,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -2640,14 +2619,6 @@ class PowerFeedListView(generic.ObjectListView):
|
|||||||
class PowerFeedView(generic.ObjectView):
|
class PowerFeedView(generic.ObjectView):
|
||||||
queryset = PowerFeed.objects.prefetch_related('power_panel', 'rack')
|
queryset = PowerFeed.objects.prefetch_related('power_panel', 'rack')
|
||||||
|
|
||||||
def get(self, request, pk):
|
|
||||||
|
|
||||||
powerfeed = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'dcim/powerfeed.html', {
|
|
||||||
'powerfeed': powerfeed,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class PowerFeedEditView(generic.ObjectEditView):
|
class PowerFeedEditView(generic.ObjectEditView):
|
||||||
queryset = PowerFeed.objects.all()
|
queryset = PowerFeed.objects.all()
|
||||||
|
@ -156,8 +156,7 @@ class ObjectConfigContextView(generic.ObjectView):
|
|||||||
format = 'json'
|
format = 'json'
|
||||||
|
|
||||||
return render(request, 'extras/object_configcontext.html', {
|
return render(request, 'extras/object_configcontext.html', {
|
||||||
model_name: obj,
|
'object': obj,
|
||||||
'obj': obj,
|
|
||||||
'rendered_context': obj.get_config_context(),
|
'rendered_context': obj.get_config_context(),
|
||||||
'source_contexts': source_contexts,
|
'source_contexts': source_contexts,
|
||||||
'format': format,
|
'format': format,
|
||||||
|
@ -830,14 +830,6 @@ class ServiceListView(generic.ObjectListView):
|
|||||||
class ServiceView(generic.ObjectView):
|
class ServiceView(generic.ObjectView):
|
||||||
queryset = Service.objects.prefetch_related('ipaddresses')
|
queryset = Service.objects.prefetch_related('ipaddresses')
|
||||||
|
|
||||||
def get(self, request, pk):
|
|
||||||
|
|
||||||
service = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'ipam/service.html', {
|
|
||||||
'service': service,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class ServiceEditView(generic.ObjectEditView):
|
class ServiceEditView(generic.ObjectEditView):
|
||||||
queryset = Service.objects.prefetch_related('ipaddresses')
|
queryset = Service.objects.prefetch_related('ipaddresses')
|
||||||
|
@ -48,14 +48,21 @@ class ObjectView(ObjectPermissionRequiredMixin, View):
|
|||||||
model_opts = self.queryset.model._meta
|
model_opts = self.queryset.model._meta
|
||||||
return f'{model_opts.app_label}/{model_opts.model_name}.html'
|
return f'{model_opts.app_label}/{model_opts.model_name}.html'
|
||||||
|
|
||||||
def get(self, request, pk):
|
def get_extra_context(self):
|
||||||
"""
|
"""
|
||||||
Generic GET handler for accessing an object by PK
|
Return any additional context data for the template.
|
||||||
"""
|
"""
|
||||||
instance = get_object_or_404(self.queryset, pk=pk)
|
return {}
|
||||||
|
|
||||||
|
def get(self, request, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
Generic GET handler for accessing an object by PK or slug
|
||||||
|
"""
|
||||||
|
obj = get_object_or_404(self.queryset, **kwargs)
|
||||||
|
|
||||||
return render(request, self.get_template_name(), {
|
return render(request, self.get_template_name(), {
|
||||||
'instance': instance,
|
'object': obj,
|
||||||
|
**self.get_extra_context(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,14 +66,6 @@ class SecretListView(generic.ObjectListView):
|
|||||||
class SecretView(generic.ObjectView):
|
class SecretView(generic.ObjectView):
|
||||||
queryset = Secret.objects.all()
|
queryset = Secret.objects.all()
|
||||||
|
|
||||||
def get(self, request, pk):
|
|
||||||
|
|
||||||
secret = get_object_or_404(self.queryset, pk=pk)
|
|
||||||
|
|
||||||
return render(request, 'secrets/secret.html', {
|
|
||||||
'secret': secret,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
class SecretEditView(generic.ObjectEditView):
|
class SecretEditView(generic.ObjectEditView):
|
||||||
queryset = Secret.objects.all()
|
queryset = Secret.objects.all()
|
||||||
|
@ -9,31 +9,31 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:cable_list' %}">Cables</a></li>
|
<li><a href="{% url 'dcim:cable_list' %}">Cables</a></li>
|
||||||
<li>{{ cable }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons cable %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.change_cable %}
|
{% if perms.dcim.change_cable %}
|
||||||
{% edit_button cable %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_cable %}
|
{% if perms.dcim.delete_cable %}
|
||||||
{% delete_button cable %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}Cable {{ cable }}{% endblock %}</h1>
|
<h1>{% block title %}Cable {{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=cable %}
|
{% include 'inc/created_updated.html' with obj=object %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links cable %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ cable.get_absolute_url }}">Cable</a>
|
<a href="{{ object.get_absolute_url }}">Cable</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:cable_changelog' pk=cable.pk %}">Change Log</a>
|
<a href="{% url 'dcim:cable_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -49,23 +49,23 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ cable.get_type_display|placeholder }}</td>
|
<td>{{ object.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Status</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="label label-{{ cable.get_status_class }}">{{ cable.get_status_display }}</span>
|
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ cable.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Color</td>
|
<td>Color</td>
|
||||||
<td>
|
<td>
|
||||||
{% if cable.color %}
|
{% if object.color %}
|
||||||
<span class="label color-block" style="background-color: #{{ cable.color }}"> </span>
|
<span class="label color-block" style="background-color: #{{ object.color }}"> </span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -74,8 +74,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Length</td>
|
<td>Length</td>
|
||||||
<td>
|
<td>
|
||||||
{% if cable.length %}
|
{% if object.length %}
|
||||||
{{ cable.length }} {{ cable.get_length_unit_display }}
|
{{ object.length }} {{ object.get_length_unit_display }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -83,29 +83,29 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=cable %}
|
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=cable.tags.all url='dcim:cable_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:cable_list' %}
|
||||||
{% plugin_left_page cable %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Termination A</strong>
|
<strong>Termination A</strong>
|
||||||
</div>
|
</div>
|
||||||
{% include 'dcim/inc/cable_termination.html' with termination=cable.termination_a %}
|
{% include 'dcim/inc/cable_termination.html' with termination=object.termination_a %}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Termination B</strong>
|
<strong>Termination B</strong>
|
||||||
</div>
|
</div>
|
||||||
{% include 'dcim/inc/cable_termination.html' with termination=cable.termination_b %}
|
{% include 'dcim/inc/cable_termination.html' with termination=object.termination_b %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page cable %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page cable %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<h1>{% block title %}Cable Trace for {{ obj|meta:"verbose_name"|bettertitle }} {{ obj }}{% endblock %}</h1>
|
<h1>{% block title %}Cable Trace for {{ object|meta:"verbose_name"|bettertitle }} {{ object }}{% endblock %}</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -13,71 +13,71 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:consoleport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if instance.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
|
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
|
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.connected_endpoint.description|placeholder }}</td>
|
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -95,21 +95,21 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='console-server-port' %}?return_url={{ instance.get_absolute_url }}">Console Server Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=object.pk termination_b_type='console-server-port' %}?return_url={{ object.get_absolute_url }}">Console Server Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=object.pk termination_b_type='front-port' %}?return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:consoleport_connect' termination_a_id=object.pk termination_b_type='rear-port' %}?return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,71 +13,71 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:consoleserverport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:consoleserverport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if instance.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
|
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
|
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.connected_endpoint.description|placeholder }}</td>
|
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -95,21 +95,21 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=instance.pk termination_b_type='console-port' %}?return_url={{ instance.get_absolute_url }}">Console Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=object.pk termination_b_type='console-port' %}?return_url={{ object.get_absolute_url }}">Console Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=object.pk termination_b_type='front-port' %}?return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_connect' termination_a_id=object.pk termination_b_type='rear-port' %}?return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -5,19 +5,19 @@
|
|||||||
{% load custom_links %}
|
{% load custom_links %}
|
||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
{% block title %}{{ device }}{% endblock %}
|
{% block title %}{{ object }}{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="row noprint">
|
<div class="row noprint">
|
||||||
<div class="col-sm-8 col-md-9">
|
<div class="col-sm-8 col-md-9">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
|
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
|
||||||
<li><a href="{% url 'dcim:device_list' %}?site={{ device.site.slug }}">{{ device.site }}</a></li>
|
<li><a href="{% url 'dcim:device_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
|
||||||
{% if device.parent_bay %}
|
{% if object.parent_bay %}
|
||||||
<li><a href="{% url 'dcim:device' pk=device.parent_bay.device.pk %}">{{ device.parent_bay.device }}</a></li>
|
<li><a href="{% url 'dcim:device' pk=object.parent_bay.object.pk %}">{{ object.parent_bay.device }}</a></li>
|
||||||
<li>{{ device.parent_bay }}</li>
|
<li>{{ object.parent_bay }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>{{ device }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-md-3">
|
<div class="col-sm-4 col-md-3">
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons device %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.change_device %}
|
{% if perms.dcim.change_device %}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
@ -42,123 +42,123 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% if perms.dcim.add_consoleport %}
|
{% if perms.dcim.add_consoleport %}
|
||||||
<li><a href="{% url 'dcim:consoleport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleports' pk=device.pk %}">Console Ports</a></li>
|
<li><a href="{% url 'dcim:consoleport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}">Console Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_consoleserverport %}
|
{% if perms.dcim.add_consoleserverport %}
|
||||||
<li><a href="{% url 'dcim:consoleserverport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}">Console Server Ports</a></li>
|
<li><a href="{% url 'dcim:consoleserverport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}">Console Server Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_powerport %}
|
{% if perms.dcim.add_powerport %}
|
||||||
<li><a href="{% url 'dcim:powerport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_powerports' pk=device.pk %}">Power Ports</a></li>
|
<li><a href="{% url 'dcim:powerport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.pk %}">Power Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_poweroutlet %}
|
{% if perms.dcim.add_poweroutlet %}
|
||||||
<li><a href="{% url 'dcim:poweroutlet_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}">Power Outlets</a></li>
|
<li><a href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}">Power Outlets</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_interface %}
|
{% if perms.dcim.add_interface %}
|
||||||
<li><a href="{% url 'dcim:interface_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_interfaces' pk=device.pk %}">Interfaces</a></li>
|
<li><a href="{% url 'dcim:interface_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}">Interfaces</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_frontport %}
|
{% if perms.dcim.add_frontport %}
|
||||||
<li><a href="{% url 'dcim:frontport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_frontports' pk=device.pk %}">Front Ports</a></li>
|
<li><a href="{% url 'dcim:frontport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}">Front Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_rearport %}
|
{% if perms.dcim.add_rearport %}
|
||||||
<li><a href="{% url 'dcim:rearport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_rearports' pk=device.pk %}">Rear Ports</a></li>
|
<li><a href="{% url 'dcim:rearport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.pk %}">Rear Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_devicebay %}
|
{% if perms.dcim.add_devicebay %}
|
||||||
<li><a href="{% url 'dcim:devicebay_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_devicebays' pk=device.pk %}">Device Bays</a></li>
|
<li><a href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_devicebays' pk=object.pk %}">Device Bays</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_inventoryitem %}
|
{% if perms.dcim.add_inventoryitem %}
|
||||||
<li><a href="{% url 'dcim:inventoryitem_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}">Inventory Items</a></li>
|
<li><a href="{% url 'dcim:inventoryitem_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_inventory' pk=object.pk %}">Inventory Items</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_device %}
|
{% if perms.dcim.add_device %}
|
||||||
{% clone_button device %}
|
{% clone_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.change_device %}
|
{% if perms.dcim.change_device %}
|
||||||
{% edit_button device %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_device %}
|
{% if perms.dcim.delete_device %}
|
||||||
{% delete_button device %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ device }}</h1>
|
<h1>{{ object }}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=device %}
|
{% include 'inc/created_updated.html' with obj=object %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links device %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation" {% if active_tab == 'device' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'device' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device' pk=device.pk %}">Device</a>
|
<a href="{% url 'dcim:device' pk=object.pk %}">Device</a>
|
||||||
</li>
|
</li>
|
||||||
{% with interface_count=device.interfaces.count %}
|
{% with interface_count=object.interfaces.count %}
|
||||||
{% if interface_count %}
|
{% if interface_count %}
|
||||||
<li role="presentation" {% if active_tab == 'interfaces' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'interfaces' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_interfaces' pk=device.pk %}">Interfaces {% badge interface_count %}</a>
|
<a href="{% url 'dcim:device_interfaces' pk=object.pk %}">Interfaces {% badge interface_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with frontport_count=device.frontports.count %}
|
{% with frontport_count=object.frontports.count %}
|
||||||
{% if frontport_count %}
|
{% if frontport_count %}
|
||||||
<li role="presentation" {% if active_tab == 'front-ports' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'front-ports' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_frontports' pk=device.pk %}">Front Ports {% badge frontport_count %}</a>
|
<a href="{% url 'dcim:device_frontports' pk=object.pk %}">Front Ports {% badge frontport_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with rearport_count=device.rearports.count %}
|
{% with rearport_count=object.rearports.count %}
|
||||||
{% if rearport_count %}
|
{% if rearport_count %}
|
||||||
<li role="presentation" {% if active_tab == 'rear-ports' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'rear-ports' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_rearports' pk=device.pk %}">Rear Ports {% badge rearport_count %}</a>
|
<a href="{% url 'dcim:device_rearports' pk=object.pk %}">Rear Ports {% badge rearport_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with consoleport_count=device.consoleports.count %}
|
{% with consoleport_count=object.consoleports.count %}
|
||||||
{% if consoleport_count %}
|
{% if consoleport_count %}
|
||||||
<li role="presentation" {% if active_tab == 'console-ports' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'console-ports' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_consoleports' pk=device.pk %}">Console Ports {% badge consoleport_count %}</a>
|
<a href="{% url 'dcim:device_consoleports' pk=object.pk %}">Console Ports {% badge consoleport_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with consoleserverport_count=device.consoleserverports.count %}
|
{% with consoleserverport_count=object.consoleserverports.count %}
|
||||||
{% if consoleserverport_count %}
|
{% if consoleserverport_count %}
|
||||||
<li role="presentation" {% if active_tab == 'console-server-ports' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'console-server-ports' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_consoleserverports' pk=device.pk %}">Console Server Ports {% badge consoleserverport_count %}</a>
|
<a href="{% url 'dcim:device_consoleserverports' pk=object.pk %}">Console Server Ports {% badge consoleserverport_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with powerport_count=device.powerports.count %}
|
{% with powerport_count=object.powerports.count %}
|
||||||
{% if powerport_count %}
|
{% if powerport_count %}
|
||||||
<li role="presentation" {% if active_tab == 'power-ports' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'power-ports' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_powerports' pk=device.pk %}">Power Ports {% badge powerport_count %}</a>
|
<a href="{% url 'dcim:device_powerports' pk=object.pk %}">Power Ports {% badge powerport_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with poweroutlet_count=device.poweroutlets.count %}
|
{% with poweroutlet_count=object.poweroutlets.count %}
|
||||||
{% if poweroutlet_count %}
|
{% if poweroutlet_count %}
|
||||||
<li role="presentation" {% if active_tab == 'power-outlets' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'power-outlets' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_poweroutlets' pk=device.pk %}">Power Outlets {% badge poweroutlet_count %}</a>
|
<a href="{% url 'dcim:device_poweroutlets' pk=object.pk %}">Power Outlets {% badge poweroutlet_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with devicebay_count=device.devicebays.count %}
|
{% with devicebay_count=object.devicebays.count %}
|
||||||
{% if devicebay_count %}
|
{% if devicebay_count %}
|
||||||
<li role="presentation" {% if active_tab == 'device-bays' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'device-bays' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_devicebays' pk=device.pk %}">Device Bays {% badge devicebay_count %}</a>
|
<a href="{% url 'dcim:device_devicebays' pk=object.pk %}">Device Bays {% badge devicebay_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with inventoryitem_count=device.inventoryitems.count %}
|
{% with inventoryitem_count=object.inventoryitems.count %}
|
||||||
{% if inventoryitem_count %}
|
{% if inventoryitem_count %}
|
||||||
<li role="presentation" {% if active_tab == 'inventory' %} class="active"{% endif %}>
|
<li role="presentation" {% if active_tab == 'inventory' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_inventory' pk=device.pk %}">Inventory {% badge inventoryitem_count %}</a>
|
<a href="{% url 'dcim:device_inventory' pk=object.pk %}">Inventory {% badge inventoryitem_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% if perms.dcim.napalm_read_device %}
|
{% if perms.dcim.napalm_read_device %}
|
||||||
{% if device.status != 'active' %}
|
{% if object.status != 'active' %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %}
|
||||||
{% elif not device.platform %}
|
{% elif not object.platform %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %}
|
||||||
{% elif not device.platform.napalm_driver %}
|
{% elif not object.platform.napalm_driver %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include 'dcim/inc/device_napalm_tabs.html' %}
|
{% include 'dcim/inc/device_napalm_tabs.html' %}
|
||||||
@ -166,12 +166,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.extras.view_configcontext %}
|
{% if perms.extras.view_configcontext %}
|
||||||
<li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_configcontext' pk=device.pk %}">Config Context</a>
|
<a href="{% url 'dcim:device_configcontext' pk=object.pk %}">Config Context</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_changelog' pk=device.pk %}">Change Log</a>
|
<a href="{% url 'dcim:device_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% extends 'dcim/device/base.html' %}
|
{% extends 'dcim/device/base.html' %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block title %}{{ device }} - Config{% endblock %}
|
{% block title %}{{ object }} - Config{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'inc/ajax_loader.html' %}
|
{% include 'inc/ajax_loader.html' %}
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{% url 'dcim-api:device-napalm' pk=device.pk %}?method=get_config",
|
url: "{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_config",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
$('#running_config').html($.trim(json['get_config']['running']));
|
$('#running_config').html($.trim(json['get_config']['running']));
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table consoleport_table 'inc/table.html' %}
|
{% render_table consoleport_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_consoleport %}
|
{% if perms.dcim.change_consoleport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleport_bulk_rename' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleport_bulk_rename' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleport_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_consoleport %}
|
{% if perms.dcim.delete_consoleport %}
|
||||||
<button type="submit" name="_delete" formaction="{% url 'dcim:consoleport_bulk_delete' %}?return_url={% url 'dcim:device_consoleports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_delete" formaction="{% url 'dcim:consoleport_bulk_delete' %}?return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_consoleport %}
|
{% if perms.dcim.add_consoleport %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:consoleport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleports' pk=device.pk %}" class="btn btn-xs btn-primary">
|
<a href="{% url 'dcim:consoleport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleports' pk=object.pk %}" class="btn btn-xs btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add console port
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add console port
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table consoleserverport_table 'inc/table.html' %}
|
{% render_table consoleserverport_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_consoleserverport %}
|
{% if perms.dcim.change_consoleserverport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:consoleserverport_bulk_rename' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleserverport_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:consoleserverport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:consoleserverport_bulk_disconnect' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_consoleserverport %}
|
{% if perms.dcim.delete_consoleserverport %}
|
||||||
<button type="submit" formaction="{% url 'dcim:consoleserverport_bulk_delete' %}?return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" formaction="{% url 'dcim:consoleserverport_bulk_delete' %}?return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_consoleserverport %}
|
{% if perms.dcim.add_consoleserverport %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:consoleserverport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:consoleserverport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_consoleserverports' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add console server ports
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add console server ports
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,20 +20,20 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Site</td>
|
<td>Site</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.site.region %}
|
{% if object.site.region %}
|
||||||
<a href="{{ device.site.region.get_absolute_url }}">{{ device.site.region }}</a> /
|
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'dcim:site' slug=device.site.slug %}">{{ device.site }}</a>
|
<a href="{% url 'dcim:site' slug=object.site.slug %}">{{ object.site }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rack</td>
|
<td>Rack</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.rack %}
|
{% if object.rack %}
|
||||||
{% if device.rack.group %}
|
{% if object.rack.group %}
|
||||||
<a href="{{ device.rack.group.get_absolute_url }}">{{ device.rack.group }}</a> /
|
<a href="{{ object.rack.group.get_absolute_url }}">{{ object.rack.group }}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'dcim:rack' pk=device.rack.pk %}">{{ device.rack }}</a>
|
<a href="{% url 'dcim:rack' pk=object.rack.pk %}">{{ object.rack }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -42,16 +42,16 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Position</td>
|
<td>Position</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.parent_bay %}
|
{% if object.parent_bay %}
|
||||||
{% with device.parent_bay.device as parent %}
|
{% with object.parent_bay.device as parent %}
|
||||||
<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> / {{ device.parent_bay }}
|
<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> / {{ object.parent_bay }}
|
||||||
{% if parent.position %}
|
{% if parent.position %}
|
||||||
(U{{ parent.position }} / {{ parent.get_face_display }})
|
(U{{ parent.position }} / {{ parent.get_face_display }})
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% elif device.rack and device.position %}
|
{% elif object.rack and object.position %}
|
||||||
<span>U{{ device.position }} / {{ device.get_face_display }}</span>
|
<span>U{{ object.position }} / {{ object.get_face_display }}</span>
|
||||||
{% elif device.rack and device.device_type.u_height %}
|
{% elif object.rack and object.device_type.u_height %}
|
||||||
<span class="label label-warning">Not racked</span>
|
<span class="label label-warning">Not racked</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -61,11 +61,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Tenant</td>
|
<td>Tenant</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.tenant %}
|
{% if object.tenant %}
|
||||||
{% if device.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ device.tenant.group.get_absolute_url }}">{{ device.tenant.group }}</a> /
|
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ device.tenant.get_absolute_url }}">{{ device.tenant }}</a>
|
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -74,16 +74,16 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device Type</td>
|
<td>Device Type</td>
|
||||||
<td>
|
<td>
|
||||||
<span><a href="{% url 'dcim:devicetype' pk=device.device_type.pk %}">{{ device.device_type.display_name }}</a> ({{ device.device_type.u_height }}U)</span>
|
<span><a href="{% url 'dcim:devicetype' pk=object.device_type.pk %}">{{ object.device_type.display_name }}</a> ({{ object.device_type.u_height }}U)</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Serial Number</td>
|
<td>Serial Number</td>
|
||||||
<td><span>{{ device.serial|placeholder }}</span></td>
|
<td><span>{{ object.serial|placeholder }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Asset Tag</td>
|
<td>Asset Tag</td>
|
||||||
<td><span>{{ device.asset_tag|placeholder }}</span></td>
|
<td><span>{{ object.asset_tag|placeholder }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -100,18 +100,18 @@
|
|||||||
<th>Priority</th>
|
<th>Priority</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for vc_member in vc_members %}
|
{% for vc_member in vc_members %}
|
||||||
<tr{% if vc_member == device %} class="info"{% endif %}>
|
<tr{% if vc_member == object %} class="info"{% endif %}>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
|
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td>
|
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td>
|
||||||
<td>{% if device.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %}</td>
|
<td>{% if object.virtual_chassis.master == vc_member %}<i class="mdi mdi-check-bold"></i>{% endif %}</td>
|
||||||
<td>{{ vc_member.vc_priority|default:"" }}</td>
|
<td>{{ vc_member.vc_priority|default:"" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="panel-footer text-right noprint">
|
||||||
<a href="{{ device.virtual_chassis.get_absolute_url }}" class="btn btn-primary btn-xs">
|
<a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> View Virtual Chassis
|
<span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> View Virtual Chassis
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -125,14 +125,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Role</td>
|
<td>Role</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'dcim:device_list' %}?role={{ device.device_role.slug }}">{{ device.device_role }}</a>
|
<a href="{% url 'dcim:device_list' %}?role={{ object.device_role.slug }}">{{ object.device_role }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Platform</td>
|
<td>Platform</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.platform %}
|
{% if object.platform %}
|
||||||
<a href="{{ device.platform.get_absolute_url }}">{{ device.platform }}</a>
|
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -141,18 +141,18 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Status</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="label label-{{ device.get_status_class }}">{{ device.get_status_display }}</span>
|
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Primary IPv4</td>
|
<td>Primary IPv4</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.primary_ip4 %}
|
{% if object.primary_ip4 %}
|
||||||
<a href="{% url 'ipam:ipaddress' pk=device.primary_ip4.pk %}">{{ device.primary_ip4.address.ip }}</a>
|
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
|
||||||
{% if device.primary_ip4.nat_inside %}
|
{% if object.primary_ip4.nat_inside %}
|
||||||
<span>(NAT for {{ device.primary_ip4.nat_inside.address.ip }})</span>
|
<span>(NAT for {{ object.primary_ip4.nat_inside.address.ip }})</span>
|
||||||
{% elif device.primary_ip4.nat_outside %}
|
{% elif object.primary_ip4.nat_outside %}
|
||||||
<span>(NAT: {{ device.primary_ip4.nat_outside.address.ip }})</span>
|
<span>(NAT: {{ object.primary_ip4.nat_outside.address.ip }})</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -162,46 +162,46 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Primary IPv6</td>
|
<td>Primary IPv6</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.primary_ip6 %}
|
{% if object.primary_ip6 %}
|
||||||
<a href="{% url 'ipam:ipaddress' pk=device.primary_ip6.pk %}">{{ device.primary_ip6.address.ip }}</a>
|
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
|
||||||
{% if device.primary_ip6.nat_inside %}
|
{% if object.primary_ip6.nat_inside %}
|
||||||
<span>(NAT for {{ device.primary_ip6.nat_inside.address.ip }})</span>
|
<span>(NAT for {{ object.primary_ip6.nat_inside.address.ip }})</span>
|
||||||
{% elif device.primary_ip6.nat_outside %}
|
{% elif object.primary_ip6.nat_outside %}
|
||||||
<span>(NAT: {{ device.primary_ip6.nat_outside.address.ip }})</span>
|
<span>(NAT: {{ object.primary_ip6.nat_outside.address.ip }})</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if device.cluster %}
|
{% if object.cluster %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cluster</td>
|
<td>Cluster</td>
|
||||||
<td>
|
<td>
|
||||||
{% if device.cluster.group %}
|
{% if object.cluster.group %}
|
||||||
<a href="{{ device.cluster.group.get_absolute_url }}">{{ device.cluster.group }}</a> /
|
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ device.cluster.get_absolute_url }}">{{ device.cluster }}</a>
|
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=device %}
|
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=device.tags.all url='dcim:device_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:device_list' %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Comments</strong>
|
<strong>Comments</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if device.comments %}
|
{% if object.comments %}
|
||||||
{{ device.comments|render_markdown }}
|
{{ object.comments|render_markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% plugin_left_page device %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% if power_ports and poweroutlets %}
|
{% if power_ports and poweroutlets %}
|
||||||
@ -255,7 +255,7 @@
|
|||||||
{% include 'secrets/inc/assigned_secrets.html' %}
|
{% include 'secrets/inc/assigned_secrets.html' %}
|
||||||
{% if perms.secrets.add_secret %}
|
{% if perms.secrets.add_secret %}
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="panel-footer text-right noprint">
|
||||||
<a href="{% url 'secrets:secret_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}" class="btn btn-xs btn-primary">
|
<a href="{% url 'secrets:secret_add' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-xs btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add secret
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add secret
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -279,7 +279,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.ipam.add_service %}
|
{% if perms.ipam.add_service %}
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="panel-footer text-right noprint">
|
||||||
<a href="{% url 'dcim:device_service_assign' device=device.pk %}" class="btn btn-xs btn-primary">
|
<a href="{% url 'dcim:device_service_assign' device=object.pk %}" class="btn btn-xs btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign service
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign service
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -289,10 +289,10 @@
|
|||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Images</strong>
|
<strong>Images</strong>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/image_attachments.html' with images=device.images.all %}
|
{% include 'inc/image_attachments.html' with images=object.images.all %}
|
||||||
{% if perms.extras.add_imageattachment %}
|
{% if perms.extras.add_imageattachment %}
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="panel-footer text-right noprint">
|
||||||
<a href="{% url 'dcim:device_add_image' object_id=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:device_add_image' object_id=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||||
Attach an image
|
Attach an image
|
||||||
</a>
|
</a>
|
||||||
@ -325,12 +325,12 @@
|
|||||||
<div class="panel-body text-muted">None found</div>
|
<div class="panel-body text-muted">None found</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page device %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page device %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,21 +18,21 @@
|
|||||||
{% render_table devicebay_table 'inc/table.html' %}
|
{% render_table devicebay_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_devicebay %}
|
{% if perms.dcim.change_devicebay %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ device.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:devicebay_bulk_edit' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:devicebay_bulk_edit' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_devicebay %}
|
{% if perms.dcim.delete_devicebay %}
|
||||||
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ device.get_absolute_url }}%23tab_devicebays" class="btn btn-danger btn-xs">
|
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete selected
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete selected
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_devicebay %}
|
{% if perms.dcim.add_devicebay %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:devicebay_add' %}?device={{ device.pk }}&return_url={{ device.get_absolute_url }}%23tab_devicebays" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add device bays
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add device bays
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table frontport_table 'inc/table.html' %}
|
{% render_table frontport_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_frontport %}
|
{% if perms.dcim.change_frontport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:frontport_bulk_rename' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:frontport_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_frontports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:frontport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:frontport_bulk_disconnect' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_frontport %}
|
{% if perms.dcim.delete_frontport %}
|
||||||
<button type="submit" formaction="{% url 'dcim:frontport_bulk_delete' %}?return_url={% url 'dcim:device_frontports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" formaction="{% url 'dcim:frontport_bulk_delete' %}?return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_frontport %}
|
{% if perms.dcim.add_frontport %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:frontport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_frontports' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:frontport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_frontports' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add front ports
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add front ports
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,24 +21,24 @@
|
|||||||
{% render_table interface_table 'inc/table.html' %}
|
{% render_table interface_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_interface %}
|
{% if perms.dcim.change_interface %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:interface_bulk_rename' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:interface_bulk_rename' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:interface_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:interface_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:interface_bulk_disconnect' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_interface %}
|
{% if perms.dcim.delete_interface %}
|
||||||
<button type="submit" name="_delete" formaction="{% url 'dcim:interface_bulk_delete' %}?return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_delete" formaction="{% url 'dcim:interface_bulk_delete' %}?return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_interface %}
|
{% if perms.dcim.add_interface %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:interface_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_interfaces' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:interface_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_interfaces' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add interfaces
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add interfaces
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,21 +18,21 @@
|
|||||||
{% render_table inventoryitem_table 'inc/table.html' %}
|
{% render_table inventoryitem_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_inventoryitem %}
|
{% if perms.dcim.change_inventoryitem %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:inventoryitem_bulk_rename' %}?return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:inventoryitem_bulk_rename' %}?return_url={% url 'dcim:device_inventory' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:inventoryitem_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:inventoryitem_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_inventory' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_inventoryitem %}
|
{% if perms.dcim.delete_inventoryitem %}
|
||||||
<button type="submit" name="_delete" formaction="{% url 'dcim:inventoryitem_bulk_delete' %}?return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_delete" formaction="{% url 'dcim:inventoryitem_bulk_delete' %}?return_url={% url 'dcim:device_inventory' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_inventoryitem %}
|
{% if perms.dcim.add_inventoryitem %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:inventoryitem_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:inventoryitem_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_inventory' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Inventory Item
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Inventory Item
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% extends 'dcim/device/base.html' %}
|
{% extends 'dcim/device/base.html' %}
|
||||||
|
|
||||||
{% block title %}{{ device }} - LLDP Neighbors{% endblock %}
|
{% block title %}{{ object }} - LLDP Neighbors{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'inc/ajax_loader.html' %}
|
{% include 'inc/ajax_loader.html' %}
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{% url 'dcim-api:device-napalm' pk=device.pk %}?method=get_lldp_neighbors_detail",
|
url: "{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_lldp_neighbors_detail",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
$.each(json['get_lldp_neighbors_detail'], function(iface, neighbors) {
|
$.each(json['get_lldp_neighbors_detail'], function(iface, neighbors) {
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table poweroutlet_table 'inc/table.html' %}
|
{% render_table poweroutlet_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_powerport %}
|
{% if perms.dcim.change_powerport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:poweroutlet_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:poweroutlet_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_poweroutlet %}
|
{% if perms.dcim.delete_poweroutlet %}
|
||||||
<button type="submit" formaction="{% url 'dcim:poweroutlet_bulk_delete' %}?return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" formaction="{% url 'dcim:poweroutlet_bulk_delete' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_poweroutlet %}
|
{% if perms.dcim.add_poweroutlet %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:poweroutlet_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add power outlets
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add power outlets
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table powerport_table 'inc/table.html' %}
|
{% render_table powerport_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_powerport %}
|
{% if perms.dcim.change_powerport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:powerport_bulk_rename' %}?return_url={% url 'dcim:device_powerports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:powerport_bulk_rename' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:powerport_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_powerports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:powerport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:powerport_bulk_disconnect' %}?return_url={% url 'dcim:device_powerports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:powerport_bulk_disconnect' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_powerport %}
|
{% if perms.dcim.delete_powerport %}
|
||||||
<button type="submit" name="_delete" formaction="{% url 'dcim:powerport_bulk_delete' %}?return_url={% url 'dcim:device_powerports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_delete" formaction="{% url 'dcim:powerport_bulk_delete' %}?return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_powerport %}
|
{% if perms.dcim.add_powerport %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:powerport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_powerports' pk=device.pk %}" class="btn btn-xs btn-primary">
|
<a href="{% url 'dcim:powerport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_powerports' pk=object.pk %}" class="btn btn-xs btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add power port
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add power port
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
{% render_table rearport_table 'inc/table.html' %}
|
{% render_table rearport_table 'inc/table.html' %}
|
||||||
<div class="panel-footer noprint">
|
<div class="panel-footer noprint">
|
||||||
{% if perms.dcim.change_rearport %}
|
{% if perms.dcim.change_rearport %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'dcim:rearport_bulk_rename' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'dcim:rearport_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_rearports' pk=device.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'dcim:rearport_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-warning btn-xs">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:rearport_bulk_disconnect' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_rearport %}
|
{% if perms.dcim.delete_rearport %}
|
||||||
<button type="submit" formaction="{% url 'dcim:rearport_bulk_delete' %}?return_url={% url 'dcim:device_rearports' pk=device.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" formaction="{% url 'dcim:rearport_bulk_delete' %}?return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-danger btn-xs">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_rearport %}
|
{% if perms.dcim.add_rearport %}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="{% url 'dcim:rearport_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_rearports' pk=device.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'dcim:rearport_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_rearports' pk=object.pk %}" class="btn btn-primary btn-xs">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add rear ports
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add rear ports
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{% url 'dcim-api:device-napalm' pk=device.pk %}?method=get_facts&method=get_environment",
|
url: "{% url 'dcim-api:device-napalm' pk=object.pk %}?method=get_facts&method=get_environment",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
if (!json['get_facts']['error']) {
|
if (!json['get_facts']['error']) {
|
||||||
|
@ -8,33 +8,33 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
|
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
|
||||||
<li><a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a></li>
|
<li><a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a></li>
|
||||||
<li><a href="{% url instance|viewname:"list" %}?device_id={{ instance.device.pk }}">{{ instance|meta:"verbose_name_plural"|bettertitle }}</a></li>
|
<li><a href="{% url object|viewname:"list" %}?device_id={{ object.device.pk }}">{{ object|meta:"verbose_name_plural"|bettertitle }}</a></li>
|
||||||
<li>{{ instance }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons instance %}
|
{% plugin_buttons object %}
|
||||||
{% if request.user|can_change:instance %}
|
{% if request.user|can_change:object %}
|
||||||
<a href="{% url instance|viewname:"edit" pk=instance.pk %}" class="btn btn-warning">
|
<a href="{% url object|viewname:"edit" pk=object.pk %}" class="btn btn-warning">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if request.user|can_delete:instance %}
|
{% if request.user|can_delete:object %}
|
||||||
<a href="{% url instance|viewname:"delete" pk=instance.pk %}" class="btn btn-danger">
|
<a href="{% url object|viewname:"delete" pk=object.pk %}" class="btn btn-danger">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ instance.device }} / {{ instance }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object.device }} / {{ object }}{% endblock %}</h1>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ instance.get_absolute_url }}">{{ instance|meta:"verbose_name"|bettertitle }}</a>
|
<a href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url instance|viewname:"changelog" pk=instance.pk %}">Change Log</a>
|
<a href="{% url object|viewname:"changelog" pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -13,33 +13,33 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Installed Device</strong>
|
<strong>Installed Device</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.installed_device %}
|
{% if object.installed_device %}
|
||||||
{% with device=instance.installed_device %}
|
{% with device=object.installed_device %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
@ -59,12 +59,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
{% block title %}{{ devicetype.manufacturer }} {{ devicetype.model }}{% endblock %}
|
{% block title %}{{ object.manufacturer }} {{ object.model }}{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<div class="row noprint">
|
<div class="row noprint">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:devicetype_list' %}">Device Types</a></li>
|
<li><a href="{% url 'dcim:devicetype_list' %}">Device Types</a></li>
|
||||||
<li><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ devicetype.manufacturer.slug }}">{{ devicetype.manufacturer }}</a></li>
|
<li><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ object.manufacturer.slug }}">{{ object.manufacturer }}</a></li>
|
||||||
<li>{{ devicetype.model }}</li>
|
<li>{{ object.model }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,28 +25,28 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% if perms.dcim.add_consoleporttemplate %}
|
{% if perms.dcim.add_consoleporttemplate %}
|
||||||
<li><a href="{% url 'dcim:consoleporttemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_consoleports">Console Ports</a></li>
|
<li><a href="{% url 'dcim:consoleporttemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_consoleports">Console Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_consoleserverporttemplate %}
|
{% if perms.dcim.add_consoleserverporttemplate %}
|
||||||
<li><a href="{% url 'dcim:consoleserverporttemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_consoleserverports">Console Server Ports</a></li>
|
<li><a href="{% url 'dcim:consoleserverporttemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_consoleserverports">Console Server Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_powerporttemplate %}
|
{% if perms.dcim.add_powerporttemplate %}
|
||||||
<li><a href="{% url 'dcim:powerporttemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_powerports">Power Ports</a></li>
|
<li><a href="{% url 'dcim:powerporttemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_powerports">Power Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_poweroutlettemplate %}
|
{% if perms.dcim.add_poweroutlettemplate %}
|
||||||
<li><a href="{% url 'dcim:poweroutlettemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_poweroutlets">Power Outlets</a></li>
|
<li><a href="{% url 'dcim:poweroutlettemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_poweroutlets">Power Outlets</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_interfacetemplate %}
|
{% if perms.dcim.add_interfacetemplate %}
|
||||||
<li><a href="{% url 'dcim:interfacetemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_interfaces">Interfaces</a></li>
|
<li><a href="{% url 'dcim:interfacetemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_interfaces">Interfaces</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_frontporttemplate %}
|
{% if perms.dcim.add_frontporttemplate %}
|
||||||
<li><a href="{% url 'dcim:frontporttemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_frontports">Front Ports</a></li>
|
<li><a href="{% url 'dcim:frontporttemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_frontports">Front Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_rearporttemplate %}
|
{% if perms.dcim.add_rearporttemplate %}
|
||||||
<li><a href="{% url 'dcim:rearporttemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_rearports">Rear Ports</a></li>
|
<li><a href="{% url 'dcim:rearporttemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_rearports">Rear Ports</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.add_devicebaytemplate %}
|
{% if perms.dcim.add_devicebaytemplate %}
|
||||||
<li><a href="{% url 'dcim:devicebaytemplate_add' %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}%23tab_devicebays">Device Bays</a></li>
|
<li><a href="{% url 'dcim:devicebaytemplate_add' %}?device_type={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays">Device Bays</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -61,18 +61,18 @@
|
|||||||
{% delete_button devicetype use_pk=True %}
|
{% delete_button devicetype use_pk=True %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ devicetype.manufacturer }} {{ devicetype.model }}</h1>
|
<h1>{{ object.manufacturer }} {{ object.model }}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=devicetype %}
|
{% include 'inc/created_updated.html' with obj=devicetype %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links devicetype %}
|
{% custom_links devicetype %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ devicetype.get_absolute_url }}">Device Type</a>
|
<a href="{{ object.get_absolute_url }}">Device Type</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:devicetype_changelog' pk=devicetype.pk %}">Change Log</a>
|
<a href="{% url 'dcim:devicetype_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -88,27 +88,27 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manufacturer</td>
|
<td>Manufacturer</td>
|
||||||
<td><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ devicetype.manufacturer.slug }}">{{ devicetype.manufacturer }}</a></td>
|
<td><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ object.manufacturer.slug }}">{{ object.manufacturer }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Model Name</td>
|
<td>Model Name</td>
|
||||||
<td>
|
<td>
|
||||||
{{ devicetype.model }}<br/>
|
{{ object.model }}<br/>
|
||||||
<small class="text-muted">{{ devicetype.slug }}</small>
|
<small class="text-muted">{{ object.slug }}</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Part Number</td>
|
<td>Part Number</td>
|
||||||
<td>{{ devicetype.part_number|placeholder }}</td>
|
<td>{{ object.part_number|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Height (U)</td>
|
<td>Height (U)</td>
|
||||||
<td>{{ devicetype.u_height }}</td>
|
<td>{{ object.u_height }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Full Depth</td>
|
<td>Full Depth</td>
|
||||||
<td>
|
<td>
|
||||||
{% if devicetype.is_full_depth %}
|
{% if object.is_full_depth %}
|
||||||
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
|
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="mdi mdi-close-thick text-danger" title="No"></i>
|
<i class="mdi mdi-close-thick text-danger" title="No"></i>
|
||||||
@ -118,15 +118,15 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Parent/Child</td>
|
<td>Parent/Child</td>
|
||||||
<td>
|
<td>
|
||||||
{{ devicetype.get_subdevice_role_display|placeholder }}
|
{{ object.get_subdevice_role_display|placeholder }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Front Image</td>
|
<td>Front Image</td>
|
||||||
<td>
|
<td>
|
||||||
{% if devicetype.front_image %}
|
{% if object.front_image %}
|
||||||
<a href="{{ devicetype.front_image.url }}">
|
<a href="{{ object.front_image.url }}">
|
||||||
<img src="{{ devicetype.front_image.url }}" alt="{{ devicetype.front_image.name }}" class="img-responsive" />
|
<img src="{{ object.front_image.url }}" alt="{{ object.front_image.name }}" class="img-responsive" />
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -136,9 +136,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Rear Image</td>
|
<td>Rear Image</td>
|
||||||
<td>
|
<td>
|
||||||
{% if devicetype.rear_image %}
|
{% if object.rear_image %}
|
||||||
<a href="{{ devicetype.rear_image.url }}">
|
<a href="{{ object.rear_image.url }}">
|
||||||
<img src="{{ devicetype.rear_image.url }}" alt="{{ devicetype.rear_image.name }}" class="img-responsive" />
|
<img src="{{ object.rear_image.url }}" alt="{{ object.rear_image.name }}" class="img-responsive" />
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
@ -147,7 +147,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Instances</td>
|
<td>Instances</td>
|
||||||
<td><a href="{% url 'dcim:device_list' %}?device_type_id={{ devicetype.pk }}">{{ instance_count }}</a></td>
|
<td><a href="{% url 'dcim:device_list' %}?device_type_id={{ object.pk }}">{{ instance_count }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -155,14 +155,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=devicetype %}
|
{% include 'inc/custom_fields_panel.html' with obj=devicetype %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=devicetype.tags.all url='dcim:devicetype_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:devicetype_list' %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Comments</strong>
|
<strong>Comments</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if devicetype.comments %}
|
{% if object.comments %}
|
||||||
{{ devicetype.comments|render_markdown }}
|
{{ object.comments|render_markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -13,52 +13,52 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rear Port</td>
|
<td>Rear Port</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.rear_port.get_absolute_url }}">{{ instance.rear_port }}</a>
|
<a href="{{ object.rear_port.get_absolute_url }}">{{ object.rear_port }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rear Port Position</td>
|
<td>Rear Port Position</td>
|
||||||
<td>{{ instance.rear_port_position }}</td>
|
<td>{{ object.rear_port_position }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:frontport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:frontport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
@ -66,10 +66,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Connection Status</td>
|
<td>Connection Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.cable.status %}
|
{% if object.cable.status %}
|
||||||
<span class="label label-success">{{ instance.cable.get_status_display }}</span>
|
<span class="label label-success">{{ object.cable.get_status_display }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-info">{{ instance.cable.get_status_display }}</span>
|
<span class="label label-info">{{ object.cable.get_status_display }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -83,24 +83,24 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='interface' %}?return_url={{ instance.get_absolute_url }}">Interface</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='interface' %}?return_url={{ object.get_absolute_url }}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='console-server-port' %}?return_url={{ instance.get_absolute_url }}">Console Server Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='console-server-port' %}?return_url={{ object.get_absolute_url }}">Console Server Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='console-port' %}?return_url={{ instance.get_absolute_url }}">Console Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='console-port' %}?return_url={{ object.get_absolute_url }}">Console Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='front-port' %}?return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='rear-port' %}?return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=instance.pk termination_b_type='circuit-termination' %}?return_url={{ instance.get_absolute_url }}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:frontport_connect' termination_a_id=object.pk termination_b_type='circuit-termination' %}?return_url={{ object.get_absolute_url }}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{% if not disabled_message %}
|
{% if not disabled_message %}
|
||||||
<li role="presentation"{% if active_tab == 'status' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'status' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_status' pk=device.pk %}">Status</a>
|
<a href="{% url 'dcim:device_status' pk=object.pk %}">Status</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation"{% if active_tab == 'lldp-neighbors' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'lldp-neighbors' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_lldp_neighbors' pk=device.pk %}">LLDP Neighbors</a>
|
<a href="{% url 'dcim:device_lldp_neighbors' pk=object.pk %}">LLDP Neighbors</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation"{% if active_tab == 'config' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'config' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_config' pk=device.pk %}">Configuration</a>
|
<a href="{% url 'dcim:device_config' pk=object.pk %}">Configuration</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li role="presentation" class="disabled"><a href="#" title="{{ disabled_message }}">Status</a></li>
|
<li role="presentation" class="disabled"><a href="#" title="{{ disabled_message }}">Status</a></li>
|
||||||
|
@ -13,25 +13,25 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Enabled</td>
|
<td>Enabled</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.enabled %}
|
{% if object.enabled %}
|
||||||
<span class="text-success"><i class="mdi mdi-check-bold"></i></span>
|
<span class="text-success"><i class="mdi mdi-check-bold"></i></span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-danger"><i class="mdi mdi-close"></i></span>
|
<span class="text-danger"><i class="mdi mdi-close"></i></span>
|
||||||
@ -41,8 +41,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>LAG</td>
|
<td>LAG</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.lag%}
|
{% if object.lag%}
|
||||||
<a href="{{ instance.lag.get_absolute_url }}">{{ instance.lag }}</a>
|
<a href="{{ object.lag.get_absolute_url }}">{{ object.lag }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -50,44 +50,44 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }} </td>
|
<td>{{ object.description|placeholder }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>MTU</td>
|
<td>MTU</td>
|
||||||
<td>{{ instance.mtu|placeholder }}</td>
|
<td>{{ object.mtu|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>MAC Address</td>
|
<td>MAC Address</td>
|
||||||
<td><span class="text-monospace">{{ instance.mac_address|placeholder }}</span></td>
|
<td><span class="text-monospace">{{ object.mac_address|placeholder }}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>802.1Q Mode</td>
|
<td>802.1Q Mode</td>
|
||||||
<td>{{ instance.get_mode_display }}</td>
|
<td>{{ object.get_mode_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% if instance.is_connectable %}
|
{% if object.is_connectable %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:interface_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if instance.connected_endpoint.device %}
|
{% if object.connected_endpoint.device %}
|
||||||
{% with iface=instance.connected_endpoint %}
|
{% with iface=object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
@ -141,8 +141,8 @@
|
|||||||
<td>{{ iface.get_mode_display }}</td>
|
<td>{{ iface.get_mode_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% elif instance.connected_endpoint.circuit %}
|
{% elif object.connected_endpoint.circuit %}
|
||||||
{% with ct=instance.connected_endpoint %}
|
{% with ct=object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Provider</td>
|
<td>Provider</td>
|
||||||
<td><a href="{{ ct.circuit.provider.get_absolute_url }}">{{ ct.circuit.provider }}</a></td>
|
<td><a href="{{ ct.circuit.provider.get_absolute_url }}">{{ ct.circuit.provider }}</a></td>
|
||||||
@ -160,7 +160,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -177,10 +177,10 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=instance.pk termination_b_type='interface' %}?return_url={{ instance.get_absolute_url }}">Interface</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=object.pk termination_b_type='interface' %}?return_url={{ object.get_absolute_url }}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=object.pk termination_b_type='front-port' %}?return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=object.pk termination_b_type='rear-port' %}?return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:interface_connect' termination_a_id=instance.pk termination_b_type='circuit-termination' %}?return_url={{ instance.get_absolute_url }}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:interface_connect' termination_a_id=object.pk termination_b_type='circuit-termination' %}?return_url={{ object.get_absolute_url }}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -188,7 +188,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if instance.is_lag %}
|
{% if object.is_lag %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><strong>LAG Members</strong></div>
|
<div class="panel-heading"><strong>LAG Members</strong></div>
|
||||||
<table class="table table-hover table-headings panel-body">
|
<table class="table table-hover table-headings panel-body">
|
||||||
@ -200,7 +200,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for member in instance.member_interfaces.all %}
|
{% for member in object.member_interfaces.all %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ member.device.get_absolute_url }}">{{ member.device }}</a>
|
<a href="{{ member.device.get_absolute_url }}">{{ member.device }}</a>
|
||||||
@ -221,7 +221,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -236,7 +236,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Parent Item</td>
|
<td>Parent Item</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.parent %}
|
{% if object.parent %}
|
||||||
<a href="{{ instance.parent.get_absolute_url }}">{{ instance.parent }}</a>
|
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -28,17 +28,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Manufacturer</td>
|
<td>Manufacturer</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.manufacturer %}
|
{% if object.manufacturer %}
|
||||||
<a href="{{ instance.manufacturer.get_absolute_url }}">{{ instance.manufacturer }}</a>
|
<a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">—</span>
|
<span class="text-muted">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -46,32 +46,32 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Part ID</td>
|
<td>Part ID</td>
|
||||||
<td>{{ instance.part_id|placeholder }}</td>
|
<td>{{ object.part_id|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Serial</td>
|
<td>Serial</td>
|
||||||
<td>{{ instance.serial|placeholder }}</td>
|
<td>{{ object.serial|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Asset Tag</td>
|
<td>Asset Tag</td>
|
||||||
<td>{{ instance.asset_tag|placeholder }}</td>
|
<td>{{ object.asset_tag|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
<div class="col-sm-8 col-md-9">
|
<div class="col-sm-8 col-md-9">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li>
|
<li><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li>
|
||||||
<li><a href="{{ powerfeed.power_panel.site.get_absolute_url }}">{{ powerfeed.power_panel.site }}</a></li>
|
<li><a href="{{ object.power_panel.site.get_absolute_url }}">{{ object.power_panel.site }}</a></li>
|
||||||
<li><a href="{{ powerfeed.power_panel.get_absolute_url }}">{{ powerfeed.power_panel }}</a></li>
|
<li><a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a></li>
|
||||||
{% if powerfeed.rack %}
|
{% if object.rack %}
|
||||||
<li><a href="{{ powerfeed.rack.get_absolute_url }}">{{ powerfeed.rack }}</a></li>
|
<li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>{{ powerfeed }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-md-3">
|
<div class="col-sm-4 col-md-3">
|
||||||
@ -32,29 +32,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons powerfeed %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.add_powerfeed %}
|
{% if perms.dcim.add_powerfeed %}
|
||||||
{% clone_button powerfeed %}
|
{% clone_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.change_powerfeed %}
|
{% if perms.dcim.change_powerfeed %}
|
||||||
{% edit_button powerfeed %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_powerfeed %}
|
{% if perms.dcim.delete_powerfeed %}
|
||||||
{% delete_button powerfeed %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ powerfeed }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=powerfeed %}
|
{% include 'inc/created_updated.html' with obj=object %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links powerfeed %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ powerfeed.get_absolute_url }}">Cable</a>
|
<a href="{{ object.get_absolute_url }}">Cable</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:powerfeed_changelog' pk=powerfeed.pk %}">Change Log</a>
|
<a href="{% url 'dcim:powerfeed_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -71,14 +71,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Power Panel</td>
|
<td>Power Panel</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ powerfeed.power_panel.get_absolute_url }}">{{ powerfeed.power_panel }}</a>
|
<a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rack</td>
|
<td>Rack</td>
|
||||||
<td>
|
<td>
|
||||||
{% if powerfeed.rack %}
|
{% if object.rack %}
|
||||||
<a href="{{ powerfeed.rack.get_absolute_url }}">{{ powerfeed.rack }}</a>
|
<a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -87,20 +87,20 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="label label-{{ powerfeed.get_type_class }}">{{ powerfeed.get_type_display }}</span>
|
<span class="label label-{{ object.get_type_class }}">{{ object.get_type_display }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Status</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="label label-{{ powerfeed.get_status_class }}">{{ powerfeed.get_status_display }}</span>
|
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Connected Device</td>
|
<td>Connected Device</td>
|
||||||
<td>
|
<td>
|
||||||
{% if powerfeed.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<a href="{{ powerfeed.connected_endpoint.device.get_absolute_url }}">{{ powerfeed.connected_endpoint.device }}</a> ({{ powerfeed.connected_endpoint }})
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a> ({{ object.connected_endpoint }})
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -108,12 +108,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Utilization (Allocated)</td>
|
<td>Utilization (Allocated)</td>
|
||||||
{% with utilization=powerfeed.connected_endpoint.get_power_draw %}
|
{% with utilization=object.connected_endpoint.get_power_draw %}
|
||||||
{% if utilization %}
|
{% if utilization %}
|
||||||
<td>
|
<td>
|
||||||
{{ utilization.allocated }}VA / {{ powerfeed.available_power }}VA
|
{{ utilization.allocated }}VA / {{ object.available_power }}VA
|
||||||
{% if powerfeed.available_power > 0 %}
|
{% if object.available_power > 0 %}
|
||||||
{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}
|
{% utilization_graph utilization.allocated|percentage:object.available_power %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -130,71 +130,71 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Supply</td>
|
<td>Supply</td>
|
||||||
<td>{{ powerfeed.get_supply_display }}</td>
|
<td>{{ object.get_supply_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Voltage</td>
|
<td>Voltage</td>
|
||||||
<td>{{ powerfeed.voltage }}V</td>
|
<td>{{ object.voltage }}V</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Amperage</td>
|
<td>Amperage</td>
|
||||||
<td>{{ powerfeed.amperage }}A</td>
|
<td>{{ object.amperage }}A</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Phase</td>
|
<td>Phase</td>
|
||||||
<td>{{ powerfeed.get_phase_display }}</td>
|
<td>{{ object.get_phase_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Max Utilization</td>
|
<td>Max Utilization</td>
|
||||||
<td>{{ powerfeed.max_utilization }}%</td>
|
<td>{{ object.max_utilization }}%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=powerfeed %}
|
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=powerfeed.tags.all url='dcim:powerfeed_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:powerfeed_list' %}
|
||||||
{% plugin_left_page powerfeed %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if powerfeed.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ powerfeed.cable.get_absolute_url }}">{{ powerfeed.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:consoleport_trace' pk=powerfeed.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if powerfeed.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ powerfeed.connected_endpoint.device.get_absolute_url }}">{{ powerfeed.connected_endpoint.device }}</a>
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ powerfeed.connected_endpoint.get_absolute_url }}">{{ powerfeed.connected_endpoint.name }}</a>
|
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ powerfeed.connected_endpoint.get_type_display|placeholder }}</td>
|
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ powerfeed.connected_endpoint.description|placeholder }}</td>
|
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if powerfeed.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -206,7 +206,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="panel-body text-muted">
|
<div class="panel-body text-muted">
|
||||||
{% if perms.dcim.add_cable %}
|
{% if perms.dcim.add_cable %}
|
||||||
<a href="{% url 'dcim:powerfeed_connect' termination_a_id=powerfeed.pk termination_b_type='power-port' %}?return_url={{ powerfeed.get_absolute_url }}" class="btn btn-primary btn-sm pull-right">
|
<a href="{% url 'dcim:powerfeed_connect' termination_a_id=object.pk termination_b_type='power-port' %}?return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm pull-right">
|
||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -219,19 +219,19 @@
|
|||||||
<strong>Comments</strong>
|
<strong>Comments</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="panel-body rendered-markdown">
|
||||||
{% if powerfeed.comments %}
|
{% if object.comments %}
|
||||||
{{ powerfeed.comments|render_markdown }}
|
{{ object.comments|render_markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page powerfeed %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page powerfeed %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,79 +13,79 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Power Port</td>
|
<td>Power Port</td>
|
||||||
<td>{{ instance.power_port }}</td>
|
<td>{{ object.power_port }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Feed Leg</td>
|
<td>Feed Leg</td>
|
||||||
<td>{{ instance.get_feed_leg_display }}</td>
|
<td>{{ object.get_feed_leg_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:poweroutlet_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:poweroutlet_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if instance.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
|
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
|
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.connected_endpoint.description|placeholder }}</td>
|
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -98,19 +98,19 @@
|
|||||||
<div class="panel-body text-muted">
|
<div class="panel-body text-muted">
|
||||||
Not connected
|
Not connected
|
||||||
{% if perms.dcim.add_cable %}
|
{% if perms.dcim.add_cable %}
|
||||||
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=instance.pk termination_b_type='power-port' %}?return_url={{ instance.get_absolute_url }}" title="Connect" class="btn btn-primary btn-sm pull-right">
|
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=object.pk termination_b_type='power-port' %}?return_url={{ object.get_absolute_url }}" title="Connect" class="btn btn-primary btn-sm pull-right">
|
||||||
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> Connect
|
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> Connect
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<div class="col-sm-8 col-md-9">
|
<div class="col-sm-8 col-md-9">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:powerpanel_list' %}">Power Panels</a></li>
|
<li><a href="{% url 'dcim:powerpanel_list' %}">Power Panels</a></li>
|
||||||
<li><a href="{{ powerpanel.site.get_absolute_url }}">{{ powerpanel.site }}</a></li>
|
<li><a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a></li>
|
||||||
{% if powerpanel.rack_group %}
|
{% if object.rack_group %}
|
||||||
<li><a href="{{ powerpanel.rack_group.get_absolute_url }}">{{ powerpanel.rack_group }}</a></li>
|
<li><a href="{{ object.rack_group.get_absolute_url }}">{{ object.rack_group }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>{{ powerpanel }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-md-3">
|
<div class="col-sm-4 col-md-3">
|
||||||
@ -31,26 +31,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons powerpanel %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.change_powerpanel %}
|
{% if perms.dcim.change_powerpanel %}
|
||||||
{% edit_button powerpanel %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_powerpanel %}
|
{% if perms.dcim.delete_powerpanel %}
|
||||||
{% delete_button powerpanel %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ powerpanel }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=powerpanel %}
|
{% include 'inc/created_updated.html' with obj=powerpanel %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links powerpanel %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ powerpanel.get_absolute_url }}">Cable</a>
|
<a href="{{ object.get_absolute_url }}">Cable</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:powerpanel_changelog' pk=powerpanel.pk %}">Change Log</a>
|
<a href="{% url 'dcim:powerpanel_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -67,14 +67,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Site</td>
|
<td>Site</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ powerpanel.site.get_absolute_url }}">{{ powerpanel.site }}</a>
|
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rack Group</td>
|
<td>Rack Group</td>
|
||||||
<td>
|
<td>
|
||||||
{% if powerpanel.rack_group %}
|
{% if object.rack_group %}
|
||||||
<a href="{{ powerpanel.rack_group.get_absolute_url }}">{{ powerpanel.rack_group }}</a>
|
<a href="{{ object.rack_group.get_absolute_url }}">{{ object.rack_group }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -82,18 +82,18 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% plugin_left_page powerpanel %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=powerpanel %}
|
{% include 'inc/custom_fields_panel.html' with obj=powerpanel %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=powerpanel.tags.all url='dcim:powerpanel_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:powerpanel_list' %}
|
||||||
{% plugin_right_page powerpanel %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% include 'panel_table.html' with table=powerfeed_table heading='Connected Feeds' %}
|
{% include 'panel_table.html' with table=powerfeed_table heading='Connected Feeds' %}
|
||||||
{% plugin_full_width_page powerpanel %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,79 +13,79 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Maximum Draw</td>
|
<td>Maximum Draw</td>
|
||||||
<td>{{ instance.maximum_draw|placeholder }}</td>
|
<td>{{ object.maximum_draw|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Allocated Draw</td>
|
<td>Allocated Draw</td>
|
||||||
<td>{{ instance.allocated_draw|placeholder }}</td>
|
<td>{{ object.allocated_draw|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:powerport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:powerport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% if instance.connected_endpoint %}
|
{% if object.connected_endpoint %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
|
<a href="{{ object.connected_endpoint.device.get_absolute_url }}">{{ object.connected_endpoint.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
|
<a href="{{ object.connected_endpoint.get_absolute_url }}">{{ object.connected_endpoint.name }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
|
<td>{{ object.connected_endpoint.get_type_display|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.connected_endpoint.description|placeholder }}</td>
|
<td>{{ object.connected_endpoint.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Path Status</td>
|
<td>Path Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.path.is_active %}
|
{% if object.path.is_active %}
|
||||||
<span class="label label-success">Reachable</span>
|
<span class="label label-success">Reachable</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-danger">Not Reachable</span>
|
<span class="label label-danger">Not Reachable</span>
|
||||||
@ -103,20 +103,20 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=instance.pk termination_b_type='power-outlet' %}?return_url={{ instance.get_absolute_url }}">Power Outlet</a></li>
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=object.pk termination_b_type='power-outlet' %}?return_url={{ object.get_absolute_url }}">Power Outlet</a></li>
|
||||||
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=instance.pk termination_b_type='power-feed' %}?return_url={{ instance.get_absolute_url }}">Power Feed</a></li>
|
<li><a href="{% url 'dcim:powerport_connect' termination_a_id=object.pk termination_b_type='power-feed' %}?return_url={{ object.get_absolute_url }}">Power Feed</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<div class="col-sm-8 col-md-9">
|
<div class="col-sm-8 col-md-9">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li>
|
<li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li>
|
||||||
<li><a href="{{ rackreservation.rack.get_absolute_url }}">{{ rackreservation.rack }}</a></li>
|
<li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
|
||||||
<li>Units {{ rackreservation.unit_list }}</li>
|
<li>Units {{ object.unit_list }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-md-3">
|
<div class="col-sm-4 col-md-3">
|
||||||
@ -28,26 +28,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons rackreservation %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.change_rackreservation %}
|
{% if perms.dcim.change_rackreservation %}
|
||||||
{% edit_button rackreservation %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_rackreservation %}
|
{% if perms.dcim.delete_rackreservation %}
|
||||||
{% delete_button rackreservation %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ rackreservation }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=rackreservation %}
|
{% include 'inc/created_updated.html' with obj=rackreservation %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links rackreservation %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ rackreservation.get_absolute_url }}">Rack</a>
|
<a href="{{ object.get_absolute_url }}">Rack</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:rackreservation_changelog' pk=rackreservation.pk %}">Change Log</a>
|
<a href="{% url 'dcim:rackreservation_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<strong>Rack</strong>
|
<strong>Rack</strong>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
{% with rack=rackreservation.rack %}
|
{% with rack=object.rack %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Site</td>
|
<td>Site</td>
|
||||||
<td>
|
<td>
|
||||||
@ -97,16 +97,16 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Units</td>
|
<td>Units</td>
|
||||||
<td>{{ rackreservation.unit_list }}</td>
|
<td>{{ object.unit_list }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tenant</td>
|
<td>Tenant</td>
|
||||||
<td>
|
<td>
|
||||||
{% if rackreservation.tenant %}
|
{% if object.tenant %}
|
||||||
{% if rackreservation.tenant.group %}
|
{% if object.tenant.group %}
|
||||||
<a href="{{ rackreservation.tenant.group.get_absolute_url }}">{{ rackreservation.tenant.group }}</a> /
|
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ rackreservation.tenant.get_absolute_url }}">{{ rackreservation.tenant }}</a>
|
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -114,20 +114,20 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>User</td>
|
<td>User</td>
|
||||||
<td>{{ rackreservation.user }}</td>
|
<td>{{ object.user }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ rackreservation.description }}</td>
|
<td>{{ object.description }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=rackreservation %}
|
{% include 'inc/custom_fields_panel.html' with obj=rackreservation %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=rackreservation.tags.all url='dcim:rackreservation_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:rackreservation_list' %}
|
||||||
{% plugin_left_page rackreservation %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% with rack=rackreservation.rack %}
|
{% with rack=object.rack %}
|
||||||
<div class="row" style="margin-bottom: 20px">
|
<div class="row" style="margin-bottom: 20px">
|
||||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||||
<div class="rack_header">
|
<div class="rack_header">
|
||||||
@ -143,12 +143,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% plugin_right_page rackreservation %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page rackreservation %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,46 +13,46 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Device</td>
|
<td>Device</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
|
<a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ instance.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Label</td>
|
<td>Label</td>
|
||||||
<td>{{ instance.label|placeholder }}</td>
|
<td>{{ object.label|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Type</td>
|
<td>Type</td>
|
||||||
<td>{{ instance.get_type_display }}</td>
|
<td>{{ object.get_type_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Positions</td>
|
<td>Positions</td>
|
||||||
<td>{{ instance.positions }}</td>
|
<td>{{ object.positions }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ instance.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||||
{% plugin_left_page instance %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Connection</strong>
|
<strong>Connection</strong>
|
||||||
</div>
|
</div>
|
||||||
{% if instance.cable %}
|
{% if object.cable %}
|
||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Cable</td>
|
<td>Cable</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
|
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||||
<a href="{% url 'dcim:rearport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
@ -60,10 +60,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Connection Status</td>
|
<td>Connection Status</td>
|
||||||
<td>
|
<td>
|
||||||
{% if instance.cable.status %}
|
{% if object.cable.status %}
|
||||||
<span class="label label-success">{{ instance.cable.get_status_display }}</span>
|
<span class="label label-success">{{ object.cable.get_status_display }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="label label-info">{{ instance.cable.get_status_display }}</span>
|
<span class="label label-info">{{ object.cable.get_status_display }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -77,22 +77,22 @@
|
|||||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=instance.pk termination_b_type='interface' %}?return_url={{ instance.get_absolute_url }}">Interface</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=object.pk termination_b_type='interface' %}?return_url={{ object.get_absolute_url }}">Interface</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=object.pk termination_b_type='front-port' %}?return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=object.pk termination_b_type='rear-port' %}?return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||||
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=instance.pk termination_b_type='circuit-termination' %}?return_url={{ instance.get_absolute_url }}">Circuit Termination</a></li>
|
<li><a href="{% url 'dcim:rearport_connect' termination_a_id=object.pk termination_b_type='circuit-termination' %}?return_url={{ object.get_absolute_url }}">Circuit Termination</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page instance %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page instance %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
<strong>Local Context</strong>
|
<strong>Local Context</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% if obj.local_context_data %}
|
{% if object.local_context_data %}
|
||||||
{% include 'extras/inc/configcontext_data.html' with data=obj.local_context_data format=format %}
|
{% include 'extras/inc/configcontext_data.html' with data=object.local_context_data format=format %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="col-sm-8 col-md-9">
|
<div class="col-sm-8 col-md-9">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'ipam:service_list' %}">Services</a></li>
|
<li><a href="{% url 'ipam:service_list' %}">Services</a></li>
|
||||||
<li><a href="{{ service.parent.get_absolute_url }}">{{ service.parent }}</a></li>
|
<li><a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a></li>
|
||||||
<li>{{ service }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-md-3">
|
<div class="col-sm-4 col-md-3">
|
||||||
@ -27,18 +27,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{% plugin_buttons service %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.dcim.change_service %}
|
{% if perms.dcim.change_service %}
|
||||||
{% edit_button service %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_service %}
|
{% if perms.dcim.delete_service %}
|
||||||
{% delete_button service %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ service }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=service %}
|
{% include 'inc/created_updated.html' with obj=service %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links service %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -49,26 +49,26 @@
|
|||||||
<table class="table table-hover panel-body attr-table">
|
<table class="table table-hover panel-body attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ service.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Parent</td>
|
<td>Parent</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ service.parent.get_absolute_url }}">{{ service.parent }}</a>
|
<a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Protocol</td>
|
<td>Protocol</td>
|
||||||
<td>{{ service.get_protocol_display }}</td>
|
<td>{{ object.get_protocol_display }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ports</td>
|
<td>Ports</td>
|
||||||
<td>{{ service.port_list }}</td>
|
<td>{{ object.port_list }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>IP Addresses</td>
|
<td>IP Addresses</td>
|
||||||
<td>
|
<td>
|
||||||
{% for ipaddress in service.ipaddresses.all %}
|
{% for ipaddress in object.ipaddresses.all %}
|
||||||
<a href="{{ ipaddress.get_absolute_url }}">{{ ipaddress }}</a><br />
|
<a href="{{ ipaddress.get_absolute_url }}">{{ ipaddress }}</a><br />
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">None</span>
|
||||||
@ -77,21 +77,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
<td>{{ service.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=service %}
|
{% include 'inc/custom_fields_panel.html' with obj=service %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=service.tags.all url='ipam:service_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:service_list' %}
|
||||||
{% plugin_left_page service %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% plugin_right_page service %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page service %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -10,33 +10,33 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li>
|
<li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li>
|
||||||
<li><a href="{% url 'secrets:secret_list' %}?role={{ secret.role.slug }}">{{ secret.role }}</a></li>
|
<li><a href="{% url 'secrets:secret_list' %}?role={{ object.role.slug }}">{{ object.role }}</a></li>
|
||||||
<li><a href="{{ secret.assigned_object.get_absolute_url }}">{{ secret.assigned_object }}</a></li>
|
<li><a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a></li>
|
||||||
<li>{{ secret }}</li>
|
<li>{{ object }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% plugin_buttons secret %}
|
{% plugin_buttons object %}
|
||||||
{% if perms.secrets.change_secret %}
|
{% if perms.secrets.change_secret %}
|
||||||
{% edit_button secret %}
|
{% edit_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.secrets.delete_secret %}
|
{% if perms.secrets.delete_secret %}
|
||||||
{% delete_button secret %}
|
{% delete_button object %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ secret }}{% endblock %}</h1>
|
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=secret %}
|
{% include 'inc/created_updated.html' with obj=secret %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links secret %}
|
{% custom_links object %}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||||
<a href="{{ secret.get_absolute_url }}">Secret</a>
|
<a href="{{ object.get_absolute_url }}">Secret</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'secrets:secret_changelog' pk=secret.pk %}">Change Log</a>
|
<a href="{% url 'secrets:secret_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -53,21 +53,21 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Assigned object</td>
|
<td>Assigned object</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ secret.assigned_object.get_absolute_url }}">{{ secret.assigned_object }}</a>
|
<a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Role</td>
|
<td>Role</td>
|
||||||
<td>{{ secret.role }}</td>
|
<td>{{ object.role }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ secret.name|placeholder }}</td>
|
<td>{{ object.name|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' with obj=secret %}
|
{% include 'inc/custom_fields_panel.html' with obj=secret %}
|
||||||
{% plugin_left_page secret %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -80,28 +80,28 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">Secret</div>
|
<div class="col-md-2">Secret</div>
|
||||||
<div class="col-md-6" id="secret_{{ secret.pk }}">********</div>
|
<div class="col-md-6" id="secret_{{ object.pk }}">********</div>
|
||||||
<div class="col-md-4 text-right noprint">
|
<div class="col-md-4 text-right noprint">
|
||||||
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ secret.pk }}">
|
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ object.pk }}">
|
||||||
<i class="mdi mdi-lock"></i> Unlock
|
<i class="mdi mdi-lock"></i> Unlock
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-xs btn-default copy-secret collapse" secret-id="{{ secret.pk }}" data-clipboard-target="#secret_{{ secret.pk }}">
|
<button class="btn btn-xs btn-default copy-secret collapse" secret-id="{{ object.pk }}" data-clipboard-target="#secret_{{ object.pk }}">
|
||||||
<i class="mdi mdi-content-copy"></i> Copy
|
<i class="mdi mdi-content-copy"></i> Copy
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ secret.pk }}">
|
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ object.pk }}">
|
||||||
<i class="mdi mdi-lock-open"></i> Lock
|
<i class="mdi mdi-lock-open"></i> Lock
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=secret.tags.all url='secrets:secret_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='secrets:secret_list' %}
|
||||||
{% plugin_right_page secret %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% plugin_full_width_page secret %}
|
{% plugin_full_width_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user