circuit_termination.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <div class="panel panel-default">
  2. <div class="panel-heading">
  3. <div class="pull-right">
  4. {% if not termination and perms.circuits.add_circuittermination %}
  5. <a href="{% url 'circuits:circuittermination_add' circuit=circuit.pk %}?term_side={{ side }}" class="btn btn-xs btn-success">
  6. <span class="fa fa-plus" aria-hidden="true"></span> Add
  7. </a>
  8. {% endif %}
  9. {% if termination and perms.circuits.change_circuittermination %}
  10. <a href="{% url 'circuits:circuittermination_edit' pk=termination.pk %}" class="btn btn-xs btn-warning">
  11. <span class="fa fa-pencil" aria-hidden="true"></span> Edit
  12. </a>
  13. <a href="{% url 'circuits:circuit_terminations_swap' pk=circuit.pk %}" class="btn btn-xs btn-primary">
  14. <span class="fa fa-refresh" aria-hidden="true"></span> Swap
  15. </a>
  16. {% endif %}
  17. {% if termination and perms.circuits.delete_circuittermination %}
  18. <a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ circuit.get_absolute_url }}" class="btn btn-xs btn-danger">
  19. <span class="fa fa-trash" aria-hidden="true"></span> Delete
  20. </a>
  21. {% endif %}
  22. </div>
  23. <strong>Termination - {{ side }} Side</strong>
  24. </div>
  25. {% if termination %}
  26. <table class="table table-hover panel-body attr-table">
  27. <tr>
  28. <td>Site</td>
  29. <td>
  30. {% if termination.site.region %}
  31. <a href="{{ termination.site.region.get_absolute_url }}">{{ termination.site.region }}</a>
  32. <i class="fa fa-angle-right"></i>
  33. {% endif %}
  34. <a href="{% url 'dcim:site' slug=termination.site.slug %}">{{ termination.site }}</a>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td>Termination</td>
  39. <td>
  40. {% if termination.interface %}
  41. <a href="{% url 'dcim:device' pk=termination.interface.device.pk %}">{{ termination.interface.device }}</a>
  42. <i class="fa fa-angle-right"></i> {{ termination.interface }}
  43. {% else %}
  44. <span class="text-muted">Not defined</span>
  45. {% endif %}
  46. </td>
  47. </tr>
  48. <tr>
  49. <td>Speed</td>
  50. <td>
  51. {% if termination.upstream_speed %}
  52. <i class="fa fa-arrow-down" title="Downstream"></i> {{ termination.port_speed_human }} &nbsp;
  53. <i class="fa fa-arrow-up" title="Upstream"></i> {{ termination.upstream_speed_human }}
  54. {% else %}
  55. {{ termination.port_speed_human }}
  56. {% endif %}
  57. </td>
  58. </tr>
  59. <tr>
  60. <td>IP Addressing</td>
  61. <td>
  62. {% if termination.interface %}
  63. {% for ip in termination.interface.ip_addresses.all %}
  64. {% if not forloop.first %}<br />{% endif %}
  65. <a href="{% url 'ipam:ipaddress' pk=ip.pk %}">{{ ip }}</a> ({{ ip.vrf|default:"Global" }})
  66. {% empty %}
  67. <span class="text-muted">None</span>
  68. {% endfor %}
  69. {% else %}
  70. <span class="text-muted">N/A</span>
  71. {% endif %}
  72. </td>
  73. </tr>
  74. <tr>
  75. <td>Cross-Connect</td>
  76. <td>
  77. {% if termination.xconnect_id %}
  78. {{ termination.xconnect_id }}
  79. {% else %}
  80. <span class="text-muted">N/A</span>
  81. {% endif %}
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>Patch Panel/Port</td>
  86. <td>
  87. {% if termination.pp_info %}
  88. {{ termination.pp_info }}
  89. {% else %}
  90. <span class="text-muted">N/A</span>
  91. {% endif %}
  92. </td>
  93. </tr>
  94. </table>
  95. {% else %}
  96. <div class="panel-body">
  97. <span class="text-muted">None</span>
  98. </div>
  99. {% endif %}
  100. </div>