l2vpn.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load render_table from django_tables2 %}
  5. {% load i18n %}
  6. {% block content %}
  7. <div class="row mb-3">
  8. <div class="col col-md-6">
  9. <div class="card">
  10. <h5 class="card-header">{% trans "L2VPN Attributes" %}</h5>
  11. <table class="table table-hover attr-table">
  12. <tr>
  13. <th scope="row">{% trans "Name" %}</th>
  14. <td>{{ object.name|placeholder }}</td>
  15. </tr>
  16. <tr>
  17. <th scope="row">{% trans "Identifier" %}</th>
  18. <td>{{ object.identifier|placeholder }}</td>
  19. </tr>
  20. <tr>
  21. <th scope="row">{% trans "Type" %}</th>
  22. <td>{{ object.get_type_display }}</td>
  23. </tr>
  24. <tr>
  25. <th scope="row">{% trans "Description" %}</th>
  26. <td>{{ object.description|placeholder }}</td>
  27. </tr>
  28. <tr>
  29. <th scope="row">{% trans "Tenant" %}</th>
  30. <td>{{ object.tenant|linkify|placeholder }}</td>
  31. </tr>
  32. </table>
  33. </div>
  34. {% include 'inc/panels/tags.html' with tags=object.tags.all url='vpn:l2vpn_list' %}
  35. {% plugin_left_page object %}
  36. </div>
  37. <div class="col col-md-6">
  38. {% include 'inc/panels/custom_fields.html' %}
  39. {% include 'inc/panels/comments.html' %}
  40. {% plugin_right_page object %}
  41. </div>
  42. </div>
  43. <div class="row mb-3">
  44. <div class="col col-md-6">
  45. {% include 'inc/panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
  46. </div>
  47. <div class="col col-md-6">
  48. {% include 'inc/panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
  49. </div>
  50. </div>
  51. <div class="row mb-3">
  52. <div class="col col-md-12">
  53. <div class="card">
  54. <h5 class="card-header">{% trans "Terminations" %}</h5>
  55. {% htmx_table 'vpn:l2vpntermination_list' l2vpn_id=object.pk %}
  56. {% if perms.vpn.add_l2vpntermination %}
  57. <div class="card-footer text-end d-print-none">
  58. <a href="{% url 'vpn:l2vpntermination_add' %}?l2vpn={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary{% if not object.can_add_termination %} disabled" aria-disabled="true{% endif %}">
  59. <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Termination" %}
  60. </a>
  61. </div>
  62. {% endif %}
  63. </div>
  64. </div>
  65. </div>
  66. <div class="row mb-3">
  67. <div class="col col-md-12">
  68. {% plugin_full_width_page object %}
  69. </div>
  70. </div>
  71. {% endblock %}