rearport.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {% extends 'dcim/device_component.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-md-6">
  7. <div class="panel panel-default">
  8. <div class="panel-heading">
  9. <strong>Rear Port</strong>
  10. </div>
  11. <table class="table table-hover panel-body attr-table">
  12. <tr>
  13. <td>Device</td>
  14. <td>
  15. <a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
  16. </td>
  17. </tr>
  18. <tr>
  19. <td>Name</td>
  20. <td>{{ instance.name }}</td>
  21. </tr>
  22. <tr>
  23. <td>Label</td>
  24. <td>{{ instance.label|placeholder }}</td>
  25. </tr>
  26. <tr>
  27. <td>Type</td>
  28. <td>{{ instance.get_type_display }}</td>
  29. </tr>
  30. <tr>
  31. <td>Positions</td>
  32. <td>{{ instance.positions }}</td>
  33. </tr>
  34. <tr>
  35. <td>Description</td>
  36. <td>{{ instance.description|placeholder }}</td>
  37. </tr>
  38. </table>
  39. </div>
  40. {% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
  41. {% plugin_left_page instance %}
  42. </div>
  43. <div class="col-md-6">
  44. <div class="panel panel-default">
  45. <div class="panel-heading">
  46. <strong>Connection</strong>
  47. </div>
  48. {% if instance.cable %}
  49. <table class="table table-hover panel-body attr-table">
  50. <tr>
  51. <td>Cable</td>
  52. <td>
  53. <a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
  54. <a href="{% url 'dcim:rearport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
  55. <i class="fa fa-share-alt" aria-hidden="true"></i>
  56. </a>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>Connection Status</td>
  61. <td>
  62. {% if instance.cable.status %}
  63. <span class="label label-success">{{ instance.cable.get_status_display }}</span>
  64. {% else %}
  65. <span class="label label-info">{{ instance.cable.get_status_display }}</span>
  66. {% endif %}
  67. </td>
  68. </tr>
  69. </table>
  70. {% else %}
  71. <div class="panel-body text-muted">
  72. Not connected
  73. </div>
  74. {% endif %}
  75. </div>
  76. {% plugin_right_page instance %}
  77. </div>
  78. </div>
  79. <div class="row">
  80. <div class="col-md-12">
  81. {% plugin_full_width_page instance %}
  82. </div>
  83. </div>
  84. {% endblock %}