clustertype.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load render_table from django_tables2 %}
  5. {% block extra_controls %}
  6. {% if perms.virtualization.add_cluster %}
  7. <a href="{% url 'virtualization:cluster_add' %}?type={{ object.pk }}" class="btn btn-sm btn-primary">
  8. <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Cluster
  9. </a>
  10. {% endif %}
  11. {% endblock extra_controls %}
  12. {% block content %}
  13. <div class="row mb-3">
  14. <div class="col col-md-6">
  15. <div class="card">
  16. <h5 class="card-header">
  17. Cluster Type
  18. </h5>
  19. <div class="card-body">
  20. <table class="table table-hover card-body attr-table">
  21. <tr>
  22. <th scope="row">Name</th>
  23. <td>{{ object.name }}</td>
  24. </tr>
  25. <tr>
  26. <th scope="row">Description</th>
  27. <td>{{ object.description|placeholder }}</td>
  28. </tr>
  29. <tr>
  30. <th scope="row">Clusters</th>
  31. <td>
  32. <a href="{% url 'virtualization:cluster_list' %}?type_id={{ object.pk }}">{{ clusters_table.rows|length }}</a>
  33. </td>
  34. </tr>
  35. </table>
  36. </div>
  37. </div>
  38. {% include 'inc/panels/tags.html' %}
  39. {% plugin_left_page object %}
  40. </div>
  41. <div class="col col-md-6">
  42. {% include 'inc/panels/custom_fields.html' %}
  43. {% plugin_right_page object %}
  44. </div>
  45. </div>
  46. <div class="row">
  47. <div class="col col-md-12">
  48. <div class="card">
  49. <h5 class="card-header">Clusters</h5>
  50. <div class="card-body table-responsive">
  51. {% render_table clusters_table 'inc/table.html' %}
  52. {% include 'inc/paginator.html' with paginator=clusters_table.paginator page=clusters_table.page %}
  53. </div>
  54. </div>
  55. {% plugin_full_width_page object %}
  56. </div>
  57. </div>
  58. {% endblock %}