vrf.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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:vrf_list' %}">VRFs</a></li>
  11. <li>{{ vrf }}</li>
  12. </ol>
  13. </div>
  14. <div class="col-sm-4 col-md-3">
  15. <form action="{% url 'ipam:vrf_list' %}" method="get">
  16. <div class="input-group">
  17. <input type="text" name="q" class="form-control" placeholder="Search VRFs" />
  18. <span class="input-group-btn">
  19. <button type="submit" class="btn btn-primary">
  20. <span class="fa fa-search" aria-hidden="true"></span>
  21. </button>
  22. </span>
  23. </div>
  24. </form>
  25. </div>
  26. </div>
  27. <div class="pull-right noprint">
  28. {% plugin_buttons vrf %}
  29. {% if perms.ipam.add_vrf %}
  30. {% clone_button vrf %}
  31. {% endif %}
  32. {% if perms.ipam.change_vrf %}
  33. {% edit_button vrf %}
  34. {% endif %}
  35. {% if perms.ipam.delete_vrf %}
  36. {% delete_button vrf %}
  37. {% endif %}
  38. </div>
  39. <h1>{% block title %}VRF {{ vrf }}{% endblock %}</h1>
  40. {% include 'inc/created_updated.html' with obj=vrf %}
  41. <div class="pull-right noprint">
  42. {% custom_links vrf %}
  43. </div>
  44. <ul class="nav nav-tabs">
  45. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  46. <a href="{{ vrf.get_absolute_url }}">VRF</a>
  47. </li>
  48. {% if perms.extras.view_objectchange %}
  49. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  50. <a href="{% url 'ipam:vrf_changelog' pk=vrf.pk %}">Change Log</a>
  51. </li>
  52. {% endif %}
  53. </ul>
  54. {% endblock %}
  55. {% block content %}
  56. <div class="row">
  57. <div class="col-md-6">
  58. <div class="panel panel-default">
  59. <div class="panel-heading">
  60. <strong>VRF</strong>
  61. </div>
  62. <table class="table table-hover panel-body attr-table">
  63. <tr>
  64. <td>Route Distinguisher</td>
  65. <td>{{ vrf.rd }}</td>
  66. </tr>
  67. <tr>
  68. <td>Tenant</td>
  69. <td>
  70. {% if vrf.tenant %}
  71. <a href="{{ vrf.tenant.get_absolute_url }}">{{ vrf.tenant }}</a>
  72. {% else %}
  73. <span class="text-muted">None</span>
  74. {% endif %}
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>Unique IP Space</td>
  79. <td>
  80. {% if vrf.enforce_unique %}
  81. <i class="glyphicon glyphicon-ok text-success" title="Yes"></i>
  82. {% else %}
  83. <i class="glyphicon glyphicon-remove text-danger" title="No"></i>
  84. {% endif %}
  85. </td>
  86. </tr>
  87. <tr>
  88. <td>Description</td>
  89. <td>{{ vrf.description|placeholder }}</td>
  90. </tr>
  91. <tr>
  92. <td>Prefixes</td>
  93. <td>
  94. <a href="{% url 'ipam:prefix_list' %}?vrf_id={{ vrf.pk }}">{{ prefix_count }}</a>
  95. </td>
  96. </tr>
  97. </table>
  98. </div>
  99. {% include 'extras/inc/tags_panel.html' with tags=vrf.tags.all url='ipam:vrf_list' %}
  100. {% include 'inc/custom_fields_panel.html' with obj=vrf %}
  101. {% plugin_left_page vrf %}
  102. </div>
  103. <div class="col-md-6">
  104. {% include 'panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
  105. {% include 'panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
  106. {% plugin_right_page vrf %}
  107. </div>
  108. </div>
  109. <div class="row">
  110. <div class="col-md-12">
  111. {% plugin_full_width_page vrf %}
  112. </div>
  113. </div>
  114. {% endblock %}