poweroutlet.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block breadcrumbs %}
  5. {{ block.super }}
  6. <li class="breadcrumb-item">
  7. <a href="{% url 'dcim:device_poweroutlets' pk=object.device.pk %}">{{ object.device }}</a>
  8. </li>
  9. {% endblock %}
  10. {% block content %}
  11. <div class="row mb-3">
  12. <div class="col col-md-6">
  13. <div class="card">
  14. <h5 class="card-header">
  15. Power Outlet
  16. </h5>
  17. <div class="card-body">
  18. <table class="table table-hover attr-table">
  19. <tr>
  20. <th scope="row">Device</th>
  21. <td>{{ object.device|linkify }}</td>
  22. </tr>
  23. <tr>
  24. <th scope="row">Module</th>
  25. <td>{{ object.module|linkify|placeholder }}</td>
  26. </tr>
  27. <tr>
  28. <th scope="row">Name</th>
  29. <td>{{ object.name }}</td>
  30. </tr>
  31. <tr>
  32. <th scope="row">Label</th>
  33. <td>{{ object.label|placeholder }}</td>
  34. </tr>
  35. <tr>
  36. <th scope="row">Type</th>
  37. <td>{{ object.get_type_display }}</td>
  38. </tr>
  39. <tr>
  40. <th scope="row">Description</th>
  41. <td>{{ object.description|placeholder }}</td>
  42. </tr>
  43. <tr>
  44. <th scope="row">Power Port</th>
  45. <td>{{ object.power_port|linkify|placeholder }}</td>
  46. </tr>
  47. <tr>
  48. <th scope="row">Feed Leg</th>
  49. <td>{{ object.get_feed_leg_display|placeholder }}</td>
  50. </tr>
  51. </table>
  52. </div>
  53. </div>
  54. {% include 'inc/panels/custom_fields.html' %}
  55. {% include 'inc/panels/tags.html' %}
  56. {% plugin_left_page object %}
  57. </div>
  58. <div class="col col-md-6">
  59. <div class="card">
  60. <h5 class="card-header">Connection</h5>
  61. <div class="card-body">
  62. {% if object.mark_connected %}
  63. <div class="text-muted">
  64. <span class="text-success"><i class="mdi mdi-check-bold"></i></span> Marked as Connected
  65. </div>
  66. {% elif object.cable %}
  67. {% include 'dcim/inc/connection_endpoints.html' with trace_url='dcim:poweroutlet_trace' %}
  68. {% else %}
  69. <div class="text-muted">
  70. Not Connected
  71. {% if perms.dcim.add_cable %}
  72. <a href="{% url 'dcim:cable_add' %}?a_terminations_type=dcim.poweroutlet&a_terminations={{ object.pk }}&b_terminations_type=dcim.powerport&termination_b_site={{ object.device.site.pk }}&termination_b_rack={{ object.device.rack.pk }}&return_url={{ object.get_absolute_url }}" title="Connect" class="btn btn-primary btn-sm float-end">
  73. <i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> Connect
  74. </a>
  75. {% endif %}
  76. </div>
  77. {% endif %}
  78. </div>
  79. </div>
  80. {% include 'dcim/inc/panels/inventory_items.html' %}
  81. {% plugin_right_page object %}
  82. </div>
  83. </div>
  84. <div class="row mb-3">
  85. <div class="col col-md-12">
  86. {% plugin_full_width_page object %}
  87. </div>
  88. </div>
  89. {% endblock %}