powerport.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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>Power Port</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>Type</td>
  27. <td>{{ instance.get_type_display }}</td>
  28. </tr>
  29. <tr>
  30. <td>Description</td>
  31. <td>{{ instance.description|placeholder }}</td>
  32. </tr>
  33. <tr>
  34. <td>Maximum Draw</td>
  35. <td>{{ instance.maximum_draw|placeholder }}</td>
  36. </tr>
  37. <tr>
  38. <td>Allocated Draw</td>
  39. <td>{{ instance.allocated_draw|placeholder }}</td>
  40. </tr>
  41. </table>
  42. </div>
  43. {% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
  44. </div>
  45. <div class="col-md-6">
  46. <div class="panel panel-default">
  47. <div class="panel-heading">
  48. <strong>Connection</strong>
  49. </div>
  50. {% if instance.cable %}
  51. <table class="table table-hover panel-body attr-table">
  52. {% if instance.connected_endpoint %}
  53. <tr>
  54. <td>Device</td>
  55. <td>
  56. <a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>Name</td>
  61. <td>
  62. <a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>Type</td>
  67. <td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
  68. </tr>
  69. <tr>
  70. <td>Description</td>
  71. <td>{{ instance.connected_endpoint.description|placeholder }}</td>
  72. </tr>
  73. {% endif %}
  74. <tr>
  75. <td>Cable</td>
  76. <td>
  77. <a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
  78. <a href="{% url 'dcim:powerport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
  79. <i class="fa fa-share-alt" aria-hidden="true"></i>
  80. </a>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>Connection Status</td>
  85. <td>
  86. {% if instance.connection_status %}
  87. <span class="label label-success">{{ instance.get_connection_status_display }}</span>
  88. {% else %}
  89. <span class="label label-info">{{ instance.get_connection_status_display }}</span>
  90. {% endif %}
  91. </td>
  92. </tr>
  93. </table>
  94. {% else %}
  95. <div class="panel-body text-muted">
  96. Not connected
  97. </div>
  98. {% endif %}
  99. </div>
  100. </div>
  101. </div>
  102. {% endblock %}