prefix.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {% extends 'ipam/prefix/base.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col col-md-6">
  7. <div class="card">
  8. <h5 class="card-header">
  9. Prefix
  10. </h5>
  11. <div class="card-body">
  12. <table class="table table-hover attr-table">
  13. <tr>
  14. <th scope="row">Family</th>
  15. <td>IPv{{ object.family }}</td>
  16. </tr>
  17. <tr>
  18. <th scope="row">VRF</th>
  19. <td>
  20. {% if object.vrf %}
  21. <a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a> ({{ object.vrf.rd }})
  22. {% else %}
  23. <span>Global</span>
  24. {% endif %}
  25. </td>
  26. </tr>
  27. <tr>
  28. <th scope="row">Tenant</th>
  29. <td>
  30. {% if object.tenant %}
  31. {% if object.tenant.group %}
  32. <a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
  33. {% endif %}
  34. <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
  35. {% else %}
  36. <span class="text-muted">None</span>
  37. {% endif %}
  38. </td>
  39. </tr>
  40. <tr>
  41. <th scope="row">Aggregate</th>
  42. <td>
  43. {% if aggregate %}
  44. <a href="{% url 'ipam:aggregate' pk=aggregate.pk %}">{{ aggregate.prefix }}</a> ({{ aggregate.rir }})
  45. {% else %}
  46. <span class="text-warning">None</span>
  47. {% endif %}
  48. </td>
  49. </tr>
  50. <tr>
  51. <th scope="row">Site</th>
  52. <td>
  53. {% if object.site %}
  54. {% if object.site.region %}
  55. <a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
  56. {% endif %}
  57. <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
  58. {% else %}
  59. <span class="text-muted">None</span>
  60. {% endif %}
  61. </td>
  62. </tr>
  63. <tr>
  64. <th scope="row">VLAN</th>
  65. <td>
  66. {% if object.vlan %}
  67. {% if object.vlan.group %}
  68. <a href="{{ object.vlan.group.get_absolute_url }}">{{ object.vlan.group }}</a> /
  69. {% endif %}
  70. <a href="{% url 'ipam:vlan' pk=object.vlan.pk %}">{{ object.vlan }}</a>
  71. {% else %}
  72. <span class="text-muted">None</span>
  73. {% endif %}
  74. </td>
  75. </tr>
  76. <tr>
  77. <th scope="row">Status</th>
  78. <td>
  79. <span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
  80. </td>
  81. </tr>
  82. <tr>
  83. <th scope="row">Role</th>
  84. <td>
  85. {% if object.role %}
  86. <a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
  87. {% else %}
  88. <span class="text-muted">None</span>
  89. {% endif %}
  90. </td>
  91. </tr>
  92. <tr>
  93. <th scope="row">Description</th>
  94. <td>{{ object.description|placeholder }}</td>
  95. </tr>
  96. <tr>
  97. <th scope="row">Is a pool</th>
  98. <td>
  99. {% if object.is_pool %}
  100. <i class="mdi mdi-check-bold text-success" title="Yes"></i>
  101. {% else %}
  102. <i class="mdi mdi-close-thick text-danger" title="No"></i>
  103. {% endif %}
  104. </td>
  105. </tr>
  106. <tr>
  107. <th scope="row">Utilization</th>
  108. <td>
  109. {% if object.mark_utilized %}
  110. {% utilization_graph 100 warning_threshold=0 danger_threshold=0 %}
  111. <small>(Marked fully utilized)</small>
  112. {% else %}
  113. {% utilization_graph object.get_utilization %}
  114. {% endif %}
  115. </td>
  116. </tr>
  117. </table>
  118. </div>
  119. </div>
  120. {% plugin_left_page object %}
  121. </div>
  122. <div class="col col-md-6">
  123. {% include 'inc/custom_fields_panel.html' %}
  124. {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:prefix_list' %}
  125. {% plugin_right_page object %}
  126. </div>
  127. </div>
  128. <div class="row">
  129. <div class="col col-md-12">
  130. {% if duplicate_prefix_table.rows %}
  131. {% include 'inc/panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %}
  132. {% endif %}
  133. {% include 'inc/panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
  134. {% plugin_full_width_page object %}
  135. </div>
  136. </div>
  137. {% endblock %}