aggregate.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {% extends 'base.html' %}
  2. {% load buttons %}
  3. {% load custom_links %}
  4. {% load helpers %}
  5. {% load plugins %}
  6. {% block header %}
  7. <div class="row noprint">
  8. <div class="col-sm-8 col-md-9">
  9. <ol class="breadcrumb">
  10. <li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
  11. <li><a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a></li>
  12. <li>{{ aggregate }}</li>
  13. </ol>
  14. </div>
  15. <div class="col-sm-4 col-md-3">
  16. <form action="{% url 'ipam:aggregate_list' %}" method="get">
  17. <div class="input-group">
  18. <input type="text" name="q" class="form-control" placeholder="Search aggregates" />
  19. <span class="input-group-btn">
  20. <button type="submit" class="btn btn-primary">
  21. <span class="mdi mdi-magnify" aria-hidden="true"></span>
  22. </button>
  23. </span>
  24. </div>
  25. </form>
  26. </div>
  27. </div>
  28. <div class="pull-right noprint">
  29. {% plugin_buttons aggregate %}
  30. {% if perms.ipam.add_aggregate %}
  31. {% clone_button aggregate %}
  32. {% endif %}
  33. {% if perms.ipam.change_aggregate %}
  34. {% edit_button aggregate %}
  35. {% endif %}
  36. {% if perms.ipam.delete_aggregate %}
  37. {% delete_button aggregate %}
  38. {% endif %}
  39. </div>
  40. <h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
  41. {% include 'inc/created_updated.html' with obj=aggregate %}
  42. {% include 'ipam/inc/toggle_available.html' %}
  43. <div class="pull-right noprint">
  44. {% custom_links aggregate %}
  45. </div>
  46. <ul class="nav nav-tabs">
  47. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  48. <a href="{{ aggregate.get_absolute_url }}">Aggregate</a>
  49. </li>
  50. {% if perms.extras.view_objectchange %}
  51. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  52. <a href="{% url 'ipam:aggregate_changelog' pk=aggregate.pk %}">Change Log</a>
  53. </li>
  54. {% endif %}
  55. </ul>
  56. {% endblock %}
  57. {% block content %}
  58. <div class="row">
  59. <div class="col-md-6">
  60. <div class="panel panel-default">
  61. <div class="panel-heading">
  62. <strong>Aggregate</strong>
  63. </div>
  64. <table class="table table-hover panel-body attr-table">
  65. <tr>
  66. <td>Family</td>
  67. <td>IPv{{ aggregate.family }}</td>
  68. </tr>
  69. <tr>
  70. <td>RIR</td>
  71. <td>
  72. <a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a>
  73. </td>
  74. </tr>
  75. <tr>
  76. <td>Utilization</td>
  77. <td>
  78. {{ aggregate.get_utilization }}%
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>Tenant</td>
  83. <td>
  84. {% if aggregate.tenant %}
  85. {% if prefix.aggregate.group %}
  86. <a href="{{ aggregate.tenant.group.get_absolute_url }}">{{ aggregate.tenant.group }}</a> /
  87. {% endif %}
  88. <a href="{{ aggregate.tenant.get_absolute_url }}">{{ aggregate.tenant }}</a>
  89. {% else %}
  90. <span class="text-muted">None</span>
  91. {% endif %}
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>Date Added</td>
  96. <td>{{ aggregate.date_added|placeholder }}</td>
  97. </tr>
  98. <tr>
  99. <td>Description</td>
  100. <td>{{ aggregate.description|placeholder }}</td>
  101. </tr>
  102. </table>
  103. </div>
  104. {% plugin_left_page aggregate %}
  105. </div>
  106. <div class="col-md-6">
  107. {% include 'inc/custom_fields_panel.html' with obj=aggregate %}
  108. {% include 'extras/inc/tags_panel.html' with tags=aggregate.tags.all url='ipam:aggregate_list' %}
  109. {% plugin_right_page aggregate %}
  110. </div>
  111. </div>
  112. <div class="row">
  113. <div class="col-md-12">
  114. {% plugin_full_width_page aggregate %}
  115. </div>
  116. </div>
  117. <div class="row">
  118. <div class="col-md-12">
  119. {% include 'utilities/obj_table.html' with table=prefix_table table_template='panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
  120. </div>
  121. </div>
  122. {% endblock %}