devicebay.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {% extends 'dcim/device_component.html' %}
  2. {% load helpers %}
  3. {% block content %}
  4. <div class="row">
  5. <div class="col-md-6">
  6. <div class="panel panel-default">
  7. <div class="panel-heading">
  8. <strong>Device Bay</strong>
  9. </div>
  10. <table class="table table-hover panel-body attr-table">
  11. <tr>
  12. <td>Device</td>
  13. <td>
  14. <a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
  15. </td>
  16. </tr>
  17. <tr>
  18. <td>Name</td>
  19. <td>{{ instance.name }}</td>
  20. </tr>
  21. <tr>
  22. <td>Label</td>
  23. <td>{{ instance.label|placeholder }}</td>
  24. </tr>
  25. <tr>
  26. <td>Description</td>
  27. <td>{{ instance.description|placeholder }}</td>
  28. </tr>
  29. </table>
  30. </div>
  31. {% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
  32. </div>
  33. <div class="col-md-6">
  34. <div class="panel panel-default">
  35. <div class="panel-heading">
  36. <strong>Installed Device</strong>
  37. </div>
  38. {% if instance.installed_device %}
  39. {% with device=instance.installed_device %}
  40. <table class="table table-hover panel-body attr-table">
  41. <tr>
  42. <td>Device</td>
  43. <td>
  44. <a href="{{ device.get_absolute_url }}">{{ device }}</a>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td>Device Type</td>
  49. <td>{{ device.device_type }}</td>
  50. </tr>
  51. </table>
  52. {% endwith %}
  53. {% else %}
  54. <div class="panel-body text-muted">
  55. None
  56. </div>
  57. {% endif %}
  58. </div>
  59. </div>
  60. </div>
  61. {% endblock %}