fhrpgroup.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load render_table from django_tables2 %}
  5. {% load i18n %}
  6. {# Omit assigned IP addresses from object representation #}
  7. {% block title %}{{ object.get_protocol_display }}: {{ object.group_id }}{% endblock %}
  8. {% block breadcrumbs %}
  9. {{ block.super }}
  10. <li class="breadcrumb-item"><a href="{% url 'ipam:fhrpgroup_list' %}?protocol={{ object.protocol }}">{{ object.get_protocol_display }}</a></li>
  11. {% endblock breadcrumbs %}
  12. {% block content %}
  13. <div class="row">
  14. <div class="col col-md-6">
  15. <div class="card">
  16. <h5 class="card-header">{% trans "FHRP Group" %}</h5>
  17. <table class="table table-hover attr-table">
  18. <tr>
  19. <th scope="row">{% trans "Protocol" %}</th>
  20. <td>{{ object.get_protocol_display }}</td>
  21. </tr>
  22. <tr>
  23. <th scope="row">{% trans "Group ID" %}</th>
  24. <td>{{ object.group_id }}</td>
  25. </tr>
  26. <tr>
  27. <th scope="row">{% trans "Name" %}</th>
  28. <td>{{ object.name|placeholder }}</td>
  29. </tr>
  30. <tr>
  31. <th scope="row">{% trans "Description" %}</th>
  32. <td>{{ object.description|placeholder }}</td>
  33. </tr>
  34. <tr>
  35. <th scope="row">{% trans "Members" %}</th>
  36. <td>{{ member_count }}</td>
  37. </tr>
  38. </table>
  39. </div>
  40. {% include 'inc/panels/tags.html' %}
  41. {% include 'inc/panels/comments.html' %}
  42. {% plugin_left_page object %}
  43. </div>
  44. <div class="col col-md-6">
  45. <div class="card">
  46. <h5 class="card-header">{% trans "Authentication" %}</h5>
  47. <table class="table table-hover attr-table">
  48. <tr>
  49. <th scope="row">{% trans "Authentication Type" %}</th>
  50. <td>{{ object.get_auth_type_display|placeholder }}</td>
  51. </tr>
  52. <tr>
  53. <th scope="row">{% trans "Authentication Key" %}</th>
  54. <td>{{ object.auth_key|placeholder }}</td>
  55. </tr>
  56. </table>
  57. </div>
  58. {% include 'inc/panels/custom_fields.html' %}
  59. {% plugin_right_page object %}
  60. </div>
  61. </div>
  62. <div class="row">
  63. <div class="col col-md-12">
  64. <div class="card">
  65. <h5 class="card-header">{% trans "Virtual IP Addresses" %}</h5>
  66. {% htmx_table 'ipam:ipaddress_list' fhrpgroup_id=object.pk %}
  67. {% if perms.ipam.add_ipaddress %}
  68. <div class="card-footer text-end">
  69. <a href="{% url 'ipam:ipaddress_add' %}?fhrpgroup={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
  70. <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add IP Address" %}
  71. </a>
  72. </div>
  73. {% endif %}
  74. </div>
  75. {% include 'inc/panel_table.html' with table=members_table heading='Members' %}
  76. {% plugin_full_width_page object %}
  77. </div>
  78. </div>
  79. {% endblock %}