consoleport.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {% extends 'dcim/device_component.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-md-6">
  7. <div class="panel panel-default">
  8. <div class="panel-heading">
  9. <strong>Console Port</strong>
  10. </div>
  11. <table class="table table-hover panel-body attr-table">
  12. <tr>
  13. <td>Device</td>
  14. <td>
  15. <a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a>
  16. </td>
  17. </tr>
  18. <tr>
  19. <td>Name</td>
  20. <td>{{ instance.name }}</td>
  21. </tr>
  22. <tr>
  23. <td>Label</td>
  24. <td>{{ instance.label|placeholder }}</td>
  25. </tr>
  26. <tr>
  27. <td>Type</td>
  28. <td>{{ instance.get_type_display }}</td>
  29. </tr>
  30. <tr>
  31. <td>Description</td>
  32. <td>{{ instance.description|placeholder }}</td>
  33. </tr>
  34. </table>
  35. </div>
  36. {% include 'extras/inc/tags_panel.html' with tags=instance.tags.all %}
  37. {% plugin_left_page instance %}
  38. </div>
  39. <div class="col-md-6">
  40. <div class="panel panel-default">
  41. <div class="panel-heading">
  42. <strong>Connection</strong>
  43. </div>
  44. {% if instance.cable %}
  45. <table class="table table-hover panel-body attr-table">
  46. <tr>
  47. <td>Cable</td>
  48. <td>
  49. <a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
  50. <a href="{% url 'dcim:consoleport_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
  51. <i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
  52. </a>
  53. </td>
  54. </tr>
  55. {% if instance.connected_endpoint %}
  56. <tr>
  57. <td>Device</td>
  58. <td>
  59. <a href="{{ instance.connected_endpoint.device.get_absolute_url }}">{{ instance.connected_endpoint.device }}</a>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td>Name</td>
  64. <td>
  65. <a href="{{ instance.connected_endpoint.get_absolute_url }}">{{ instance.connected_endpoint.name }}</a>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td>Type</td>
  70. <td>{{ instance.connected_endpoint.get_type_display|placeholder }}</td>
  71. </tr>
  72. <tr>
  73. <td>Description</td>
  74. <td>{{ instance.connected_endpoint.description|placeholder }}</td>
  75. </tr>
  76. <tr>
  77. <td>Path Status</td>
  78. <td>
  79. {% if instance.path.is_active %}
  80. <span class="label label-success">Reachable</span>
  81. {% else %}
  82. <span class="label label-danger">Not Reachable</span>
  83. {% endif %}
  84. </td>
  85. </tr>
  86. {% endif %}
  87. </table>
  88. {% else %}
  89. <div class="panel-body text-muted">
  90. Not connected
  91. {% if perms.dcim.add_cable %}
  92. <span class="dropdown pull-right">
  93. <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  94. <span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
  95. </button>
  96. <ul class="dropdown-menu dropdown-menu-right">
  97. <li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='console-server-port' %}?return_url={{ instance.get_absolute_url }}">Console Server Port</a></li>
  98. <li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='front-port' %}?return_url={{ instance.get_absolute_url }}">Front Port</a></li>
  99. <li><a href="{% url 'dcim:consoleport_connect' termination_a_id=instance.pk termination_b_type='rear-port' %}?return_url={{ instance.get_absolute_url }}">Rear Port</a></li>
  100. </ul>
  101. </span>
  102. {% endif %}
  103. </div>
  104. {% endif %}
  105. </div>
  106. {% plugin_right_page instance %}
  107. </div>
  108. </div>
  109. <div class="row">
  110. <div class="col-md-12">
  111. {% plugin_full_width_page instance %}
  112. </div>
  113. </div>
  114. {% endblock %}