add placeholder details in detail of device
This commit is contained in:
parent
03fbfcb73b
commit
2b5ff4cb2f
|
@ -143,6 +143,7 @@ class DeviceDetailView(GenericMixin):
|
||||||
self.context.update(
|
self.context.update(
|
||||||
{
|
{
|
||||||
'device': device,
|
'device': device,
|
||||||
|
'placeholder': device.binding or device.placeholder,
|
||||||
'page_title': 'Device {}'.format(device.devicehub_id),
|
'page_title': 'Device {}'.format(device.devicehub_id),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,9 +23,15 @@
|
||||||
<ul class="nav nav-tabs nav-tabs-bordered">
|
<ul class="nav nav-tabs nav-tabs-bordered">
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#type">Type</button>
|
<a class="nav-link" href="{{ url_for('inventory.device_details', id=placeholder.device.devicehub_id) }}">Placeholder device</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
{% if placeholder.binding %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ url_for('inventory.device_details', id=placeholder.binding.devicehub_id) }}">Workbench device</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ device.public_link }}" target="_blank">Web</a>
|
<a class="nav-link" href="{{ device.public_link }}" target="_blank">Web</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Reference in New Issue