2
0

rack.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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 "Airflow" %}</th>
  65. <td>{{ object.get_airflow_display|placeholder }}</td>
  66. </tr>
  67. <tr>
  68. <th scope="row">{% trans "Space Utilization" %}</th>
  69. <td>{% utilization_graph object.get_utilization %}</td>
  70. </tr>
  71. <tr>
  72. <th scope="row">{% trans "Power Utilization" %}</th>
  73. <td>{% utilization_graph object.get_power_utilization %}</td>
  74. </tr>
  75. </table>
  76. </div>
  77. {% include 'dcim/inc/panels/racktype_dimensions.html' %}
  78. {% include 'dcim/inc/panels/racktype_numbering.html' %}
  79. <div class="card">
  80. <h5 class="card-header">{% trans "Weight" %}</h5>
  81. <table class="table table-hover attr-table">
  82. <tr>
  83. <th scope="row">{% trans "Rack Weight" %}</th>
  84. <td>
  85. {% if object.weight %}
  86. {{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
  87. {% else %}
  88. {{ ''|placeholder }}
  89. {% endif %}
  90. </td>
  91. </tr>
  92. <tr>
  93. <th scope="row">{% trans "Maximum Weight" %}</th>
  94. <td>
  95. {% if object.max_weight %}
  96. {{ object.max_weight }} {{ object.get_weight_unit_display }}
  97. {% else %}
  98. {{ ''|placeholder }}
  99. {% endif %}
  100. </td>
  101. </tr>
  102. <tr>
  103. <th scope="row">{% trans "Total Weight" %}</th>
  104. <td>
  105. {{ object.total_weight|floatformat }} {% trans "Kilograms" %}
  106. ({{ object.total_weight|kg_to_pounds|floatformat }} {% trans "Pounds" %})
  107. </td>
  108. </tr>
  109. </table>
  110. </div>
  111. {% include 'inc/panels/custom_fields.html' %}
  112. {% include 'inc/panels/tags.html' %}
  113. {% include 'inc/panels/comments.html' %}
  114. {% include 'inc/panels/image_attachments.html' %}
  115. {% plugin_left_page object %}
  116. </div>
  117. <div class="col col-12 col-xl-7">
  118. <div class="text-end mb-4">
  119. <select class="btn btn-outline-secondary no-ts rack-view">
  120. <option value="images-and-labels" selected="selected">{% trans "Images and Labels" %}</option>
  121. <option value="images-only">{% trans "Images only" %}</option>
  122. <option value="labels-only">{% trans "Labels only" %}</option>
  123. </select>
  124. </div>
  125. <div class="row" style="margin-bottom: 20px">
  126. <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
  127. <div style="margin-left: 30px">
  128. <h4>{% trans "Front" %}</h4>
  129. {% include 'dcim/inc/rack_elevation.html' with face='front' extra_params=svg_extra %}
  130. </div>
  131. </div>
  132. <div class="col col-md-6 col-sm-6 col-xs-12 text-center">
  133. <div style="margin-left: 30px">
  134. <h4>{% trans "Rear" %}</h4>
  135. {% include 'dcim/inc/rack_elevation.html' with face='rear' extra_params=svg_extra %}
  136. </div>
  137. </div>
  138. </div>
  139. {% include 'inc/panels/related_objects.html' %}
  140. {% plugin_right_page object %}
  141. </div>
  142. </div>
  143. <div class="row">
  144. <div class="col col-md-12">
  145. {% plugin_full_width_page object %}
  146. </div>
  147. </div>
  148. {% endblock %}