aggregate.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {% extends '_base.html' %}
  2. {% load custom_links %}
  3. {% load helpers %}
  4. {% block header %}
  5. <div class="row noprint">
  6. <div class="col-sm-8 col-md-9">
  7. <ol class="breadcrumb">
  8. <li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
  9. <li><a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a></li>
  10. <li>{{ aggregate }}</li>
  11. </ol>
  12. </div>
  13. <div class="col-sm-4 col-md-3">
  14. <form action="{% url 'ipam:aggregate_list' %}" method="get">
  15. <div class="input-group">
  16. <input type="text" name="q" class="form-control" placeholder="Search aggregates" />
  17. <span class="input-group-btn">
  18. <button type="submit" class="btn btn-primary">
  19. <span class="fa fa-search" aria-hidden="true"></span>
  20. </button>
  21. </span>
  22. </div>
  23. </form>
  24. </div>
  25. </div>
  26. <div class="pull-right noprint">
  27. {% if perms.ipam.change_aggregate %}
  28. <a href="{% url 'ipam:aggregate_edit' pk=aggregate.pk %}" class="btn btn-warning">
  29. <span class="fa fa-pencil" aria-hidden="true"></span>
  30. Edit this aggregate
  31. </a>
  32. {% endif %}
  33. {% if perms.ipam.delete_aggregate %}
  34. <a href="{% url 'ipam:aggregate_delete' pk=aggregate.pk %}" class="btn btn-danger">
  35. <span class="fa fa-trash" aria-hidden="true"></span>
  36. Delete this aggregate
  37. </a>
  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 %}">Changelog</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>{{ aggregate.get_family_display }}</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>Date Added</td>
  83. <td>{{ aggregate.date_added|placeholder }}</td>
  84. </tr>
  85. <tr>
  86. <td>Description</td>
  87. <td>{{ aggregate.description|placeholder }}</td>
  88. </tr>
  89. </table>
  90. </div>
  91. </div>
  92. <div class="col-md-6">
  93. {% include 'inc/custom_fields_panel.html' with obj=aggregate %}
  94. {% include 'extras/inc/tags_panel.html' with tags=aggregate.tags.all url='ipam:aggregate_list' %}
  95. </div>
  96. </div>
  97. <div class="row">
  98. <div class="col-md-12">
  99. {% 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' %}
  100. </div>
  101. </div>
  102. {% endblock %}