aggregate.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {% extends '_base.html' %}
  2. {% block content %}
  3. <div class="row">
  4. <div class="col-sm-8 col-md-9">
  5. <ol class="breadcrumb">
  6. <li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
  7. <li><a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a></li>
  8. <li>{{ aggregate }}</li>
  9. </ol>
  10. </div>
  11. <div class="col-sm-4 col-md-3">
  12. <form action="{% url 'ipam:aggregate_list' %}" method="get">
  13. <div class="input-group">
  14. <input type="text" name="q" class="form-control" placeholder="Search aggregates" />
  15. <span class="input-group-btn">
  16. <button type="submit" class="btn btn-primary">
  17. <span class="fa fa-search" aria-hidden="true"></span>
  18. </button>
  19. </span>
  20. </div>
  21. </form>
  22. </div>
  23. </div>
  24. <div class="pull-right">
  25. {% if perms.ipam.change_aggregate %}
  26. <a href="{% url 'ipam:aggregate_edit' pk=aggregate.pk %}" class="btn btn-warning">
  27. <span class="fa fa-pencil" aria-hidden="true"></span>
  28. Edit this aggregate
  29. </a>
  30. {% endif %}
  31. {% if perms.ipam.delete_aggregate %}
  32. <a href="{% url 'ipam:aggregate_delete' pk=aggregate.pk %}" class="btn btn-danger">
  33. <span class="fa fa-trash" aria-hidden="true"></span>
  34. Delete this aggregate
  35. </a>
  36. {% endif %}
  37. </div>
  38. <h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
  39. {% include 'inc/created_updated.html' with obj=aggregate %}
  40. <div class="row">
  41. <div class="col-md-6">
  42. <div class="panel panel-default">
  43. <div class="panel-heading">
  44. <strong>Aggregate</strong>
  45. </div>
  46. <table class="table table-hover panel-body attr-table">
  47. <tr>
  48. <td>Family</td>
  49. <td>{{ aggregate.get_family_display }}</td>
  50. </tr>
  51. <tr>
  52. <td>RIR</td>
  53. <td>
  54. <a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td>Utilization</td>
  59. <td>
  60. {{ aggregate.get_utilization }}%
  61. </td>
  62. </tr>
  63. <tr>
  64. <td>Date Added</td>
  65. <td>
  66. {% if aggregate.date_added %}
  67. <span>{{ aggregate.date_added }}</span>
  68. {% else %}
  69. <span class="text-muted">N/A</span>
  70. {% endif %}
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>Description</td>
  75. <td>
  76. {% if aggregate.description %}
  77. <span>{{ aggregate.description }}</span>
  78. {% else %}
  79. <span class="text-muted">N/A</span>
  80. {% endif %}
  81. </td>
  82. </tr>
  83. </table>
  84. </div>
  85. </div>
  86. <div class="col-md-6">
  87. {% with aggregate.get_custom_fields as custom_fields %}
  88. {% include 'inc/custom_fields_panel.html' %}
  89. {% endwith %}
  90. </div>
  91. </div>
  92. <div class="row">
  93. <div class="col-md-12">
  94. {% 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' %}
  95. </div>
  96. </div>
  97. {% endblock %}