platform.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block breadcrumbs %}
  5. <li class="breadcrumb-item"><a href="{% url 'dcim:platform_list' %}">Platforms</a></li>
  6. <li class="breadcrumb-item">{{ object }}</li>
  7. {% endblock %}
  8. {% block content %}
  9. <div class="row mb-3">
  10. <div class="col-md-6">
  11. <div class="card">
  12. <h5 class="card-header">
  13. Platform
  14. </h5>
  15. <div class="card-body">
  16. <table class="table table-hover attr-table">
  17. <tr>
  18. <th scope="row">Name</th>
  19. <td>{{ object.name }}</td>
  20. </tr>
  21. <tr>
  22. <th scope="row">Description</th>
  23. <td>{{ object.description|placeholder }}</td>
  24. </tr>
  25. <tr>
  26. <th scope="row">Manufacturer</th>
  27. <td>
  28. {% if object.manufacturer %}
  29. <a href="{{ object.manufacturer.get_absolute_url }}">{{ object.manufacturer }}</a>
  30. {% else %}
  31. <span class="text-muted">None</span>
  32. {% endif %}
  33. </td>
  34. </tr>
  35. <tr>
  36. <th scope="row">NAPALM Driver</th>
  37. <td>{{ object.napalm_driver|placeholder }}</td>
  38. </tr>
  39. <tr>
  40. <th scope="row">NAPALM Arguments</th>
  41. <td><pre>{{ object.napalm_args }}</pre></td>
  42. </tr>
  43. <tr>
  44. <th scope="row">Devices</th>
  45. <td>
  46. <a href="{% url 'dcim:device_list' %}?platform_id={{ object.pk }}">{{ devices_table.rows|length }}</a>
  47. </td>
  48. </tr>
  49. </table>
  50. </div>
  51. </div>
  52. {% plugin_left_page object %}
  53. </div>
  54. <div class="col-md-6">
  55. {% include 'inc/custom_fields_panel.html' %}
  56. {% plugin_right_page object %}
  57. </div>
  58. </div>
  59. <div class="row mb-3">
  60. <div class="col-md-12">
  61. <div class="card">
  62. <h5 class="card-header">
  63. Devices
  64. </h5>
  65. <div class="card-body">
  66. {% include 'inc/table.html' with table=devices_table %}
  67. </div>
  68. {% if perms.dcim.add_device %}
  69. <div class="card-footer text-end noprint">
  70. <a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
  71. <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device
  72. </a>
  73. </div>
  74. {% endif %}
  75. </div>
  76. {% include 'inc/paginator.html' with paginator=devices_table.paginator page=devices_table.page %}
  77. {% plugin_full_width_page object %}
  78. </div>
  79. </div>
  80. {% endblock %}