module.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load tz %}
  5. {% block breadcrumbs %}
  6. {{ block.super }}
  7. <li class="breadcrumb-item">
  8. <a href="{% url 'dcim:module_list' %}?module_type_id={{ object.module_type.pk }}">{{ object.module_type }}</a>
  9. </li>
  10. {% endblock %}
  11. {% block content %}
  12. <div class="row">
  13. <div class="col col-md-6">
  14. <div class="card">
  15. <h5 class="card-header">Module</h5>
  16. <div class="card-body">
  17. <table class="table table-hover attr-table">
  18. <tr>
  19. <th scope="row">Device</th>
  20. <td>
  21. <a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a>
  22. </td>
  23. </tr>
  24. <tr>
  25. <th scope="row">Device Type</th>
  26. <td>
  27. <a href="{{ object.device.device_type.get_absolute_url }}">{{ object.device.device_type }}</a>
  28. </td>
  29. </tr>
  30. <tr>
  31. <th scope="row">Module Type</th>
  32. <td>
  33. <a href="{{ object.module_type.get_absolute_url }}">{{ object.module_type }}</a>
  34. </td>
  35. </tr>
  36. <tr>
  37. <th scope="row">Serial Number</th>
  38. <td class="font-monospace">{{ object.serial|placeholder }}</td>
  39. </tr>
  40. <tr>
  41. <th scope="row">Asset Tag</th>
  42. <td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
  43. </tr>
  44. </table>
  45. </div>
  46. </div>
  47. {% include 'inc/panels/custom_fields.html' %}
  48. {% include 'inc/panels/tags.html' %}
  49. {% include 'inc/panels/comments.html' %}
  50. {% plugin_left_page object %}
  51. </div>
  52. <div class="col col-md-6">
  53. <div class="card">
  54. <h5 class="card-header">Components</h5>
  55. <div class="card-body">
  56. <table class="table table-hover attr-table">
  57. <tr>
  58. <th scope="row">Interfaces</th>
  59. <td>
  60. {% with component_count=object.interfaces.count %}
  61. {% if component_count %}
  62. <a href="{% url 'dcim:interface_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  63. {% else %}
  64. None
  65. {% endif %}
  66. {% endwith %}
  67. </td>
  68. </tr>
  69. <tr>
  70. <th scope="row">Console Ports</th>
  71. <td>
  72. {% with component_count=object.consoleports.count %}
  73. {% if component_count %}
  74. <a href="{% url 'dcim:consoleport_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  75. {% else %}
  76. None
  77. {% endif %}
  78. {% endwith %}
  79. </td>
  80. </tr>
  81. <tr>
  82. <th scope="row">Console Server Ports</th>
  83. <td>
  84. {% with component_count=object.consoleserverports.count %}
  85. {% if component_count %}
  86. <a href="{% url 'dcim:consoleserverport_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  87. {% else %}
  88. None
  89. {% endif %}
  90. {% endwith %}
  91. </td>
  92. </tr>
  93. <tr>
  94. <th scope="row">Power Ports</th>
  95. <td>
  96. {% with component_count=object.powerports.count %}
  97. {% if component_count %}
  98. <a href="{% url 'dcim:powerport_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  99. {% else %}
  100. None
  101. {% endif %}
  102. {% endwith %}
  103. </td>
  104. </tr>
  105. <tr>
  106. <th scope="row">Power Outlets</th>
  107. <td>
  108. {% with component_count=object.poweroutlets.count %}
  109. {% if component_count %}
  110. <a href="{% url 'dcim:poweroutlet_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  111. {% else %}
  112. None
  113. {% endif %}
  114. {% endwith %}
  115. </td>
  116. </tr>
  117. <tr>
  118. <th scope="row">Front Ports</th>
  119. <td>
  120. {% with component_count=object.frontports.count %}
  121. {% if component_count %}
  122. <a href="{% url 'dcim:frontport_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  123. {% else %}
  124. None
  125. {% endif %}
  126. {% endwith %}
  127. </td>
  128. </tr>
  129. <tr>
  130. <th scope="row">Rear Ports</th>
  131. <td>
  132. {% with component_count=object.rearports.count %}
  133. {% if component_count %}
  134. <a href="{% url 'dcim:rearport_list' %}?module={{ object.pk }}">{{ component_count }}</a>
  135. {% else %}
  136. None
  137. {% endif %}
  138. {% endwith %}
  139. </td>
  140. </tr>
  141. </table>
  142. </div>
  143. </div>
  144. {% plugin_right_page object %}
  145. </div>
  146. </div>
  147. <div class="row">
  148. <div class="col col-md-12">
  149. {% plugin_full_width_page object %}
  150. </div>
  151. </div>
  152. {% endblock %}