rack.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. {% extends 'dcim/rack/base.html' %}
  2. {% load buttons %}
  3. {% load helpers %}
  4. {% load static %}
  5. {% load plugins %}
  6. {% load i18n %}
  7. {% load mptt %}
  8. {% block content %}
  9. <div class="row">
  10. <div class="col col-12 col-xl-5">
  11. <div class="card">
  12. <h5 class="card-header">{% trans "Rack" %}</h5>
  13. <table class="table table-hover attr-table">
  14. <tr>
  15. <th scope="row">{% trans "Region" %}</th>
  16. <td>{% nested_tree object.site.region %}</td>
  17. </tr>
  18. <tr>
  19. <th scope="row">{% trans "Site" %}</th>
  20. <td>{{ object.site|linkify }}</td>
  21. </tr>
  22. <tr>
  23. <th scope="row">{% trans "Location" %}</th>
  24. <td>{% nested_tree object.location %}</td>
  25. </tr>
  26. <tr>
  27. <th scope="row">{% trans "Facility ID" %}</th>
  28. <td>{{ object.facility_id|placeholder }}</td>
  29. </tr>
  30. <tr>
  31. <th scope="row">{% trans "Tenant" %}</th>
  32. <td>
  33. {% if object.tenant.group %}
  34. {{ object.tenant.group|linkify }} /
  35. {% endif %}
  36. {{ object.tenant|linkify|placeholder }}
  37. </td>
  38. </tr>
  39. <tr>
  40. <th scope="row">{% trans "Status" %}</th>
  41. <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
  42. </tr>
  43. <tr>
  44. <th scope="row">{% trans "Rack Type" %}</th>
  45. <td>{{ object.rack_type|linkify|placeholder }}</td>
  46. </tr>
  47. <tr>
  48. <th scope="row">{% trans "Role" %}</th>
  49. <td>{{ object.role|linkify|placeholder }}</td>
  50. </tr>
  51. <tr>
  52. <th scope="row">{% trans "Description" %}</th>
  53. <td>{{ object.description|placeholder }}</td>
  54. </tr>
  55. <tr>
  56. <th scope="row">{% trans "Serial Number" %}</th>
  57. <td class="font-monospace">{{ object.serial|placeholder }}</td>
  58. </tr>
  59. <tr>
  60. <th scope="row">{% trans "Asset Tag" %}</th>
  61. <td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
  62. </tr>
  63. <tr>
  64. <th scope="row">{% trans "Space Utilization" %}</th>
  65. <td>{% utilization_graph object.get_utilization %}</td>
  66. </tr>
  67. <tr>
  68. <th scope="row">{% trans "Power Utilization" %}</th>
  69. <td>{% utilization_graph object.get_power_utilization %}</td>
  70. </tr>
  71. </table>
  72. </div>
  73. {% include 'dcim/inc/panels/racktype_dimensions.html' %}
  74. {% include 'dcim/inc/panels/racktype_numbering.html' %}
  75. <div class="card">
  76. <h5 class="card-header">{% trans "Weight" %}</h5>
  77. <table class="table table-hover attr-table">
  78. <tr>
  79. <th scope="row">{% trans "Rack Weight" %}</th>
  80. <td>
  81. {% if object.weight %}
  82. {{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
  83. {% else %}
  84. {{ ''|placeholder }}
  85. {% endif %}
  86. </td>
  87. </tr>
  88. <tr>
  89. <th scope="row">{% trans "Maximum Weight" %}</th>
  90. <td>
  91. {% if object.max_weight %}
  92. {{ object.max_weight }} {{ object.get_weight_unit_display }}
  93. {% else %}
  94. {{ ''|placeholder }}
  95. {% endif %}
  96. </td>
  97. </tr>
  98. <tr>
  99. <th scope="row">{% trans "Total Weight" %}</th>
  100. <td>
  101. {{ object.total_weight|floatformat }} {% trans "Kilograms" %}
  102. ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %})
  103. </td>
  104. </tr>
  105. </table>
  106. </div>
  107. {% include 'inc/panels/custom_fields.html' %}
  108. {% include 'inc/panels/tags.html' %}
  109. {% include 'inc/panels/comments.html' %}
  110. {% include 'inc/panels/image_attachments.html' %}
  111. {% plugin_left_page object %}
  112. </div>
  113. <div class="col col-12 col-xl-7">
  114. <div class="text-end mb-4">
  115. <select class="btn btn-outline-secondary no-ts rack-view">
  116. <option value="images-and-labels" selected="selected">{% trans "Images and Labels" %}</option>
  117. <option value="images-only">{% trans "Images only" %}</option>
  118. <option value="labels-only">{% trans "Labels only" %}</option>
  119. </select>
  120. </div>
  121. <div class="row" style="margin-bottom: 20px">
  122. <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
  123. <div style="margin-left: 30px">
  124. <h4>{% trans "Front" %}</h4>
  125. {% include 'dcim/inc/rack_elevation.html' with face='front' extra_params=svg_extra %}
  126. </div>
  127. </div>
  128. <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
  129. <div style="margin-left: 30px">
  130. <h4>{% trans "Rear" %}</h4>
  131. {% include 'dcim/inc/rack_elevation.html' with face='rear' extra_params=svg_extra %}
  132. </div>
  133. </div>
  134. </div>
  135. {% include 'inc/panels/related_objects.html' %}
  136. {% plugin_right_page object %}
  137. </div>
  138. </div>
  139. <div class="row">
  140. <div class="col col-md-12">
  141. {% plugin_full_width_page object %}
  142. </div>
  143. </div>
  144. {% endblock %}