service.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {% extends 'generic/object.html' %}
  2. {% load buttons %}
  3. {% load helpers %}
  4. {% load perms %}
  5. {% load plugins %}
  6. {% block breadcrumbs %}
  7. {{ block.super }}
  8. {% if object.device %}
  9. <li class="breadcrumb-item"><a href="{% url 'ipam:service_list' %}?device_id={{ object.device.pk }}">{{ object.device }}</a></li>
  10. {% elif object.virtual_machine %}
  11. <li class="breadcrumb-item"><a href="{% url 'ipam:service_list' %}?virtual_machine_id={{ object.virtual_machine.pk }}">{{ object.virtual_machine }}</a></li>
  12. {% endif %}
  13. {% endblock %}
  14. {% block content %}
  15. <div class="row mb-3">
  16. <div class="col col-md-6">
  17. <div class="card">
  18. <h5 class="card-header">
  19. Service
  20. </h5>
  21. <div class="card-body">
  22. <table class="table table-hover attr-table">
  23. <tr>
  24. <th scope="row">Name</th>
  25. <td>{{ object.name }}</td>
  26. </tr>
  27. <tr>
  28. <th scope="row">Parent</th>
  29. <td>{{ object.parent|linkify }}</td>
  30. </tr>
  31. <tr>
  32. <th scope="row">Protocol</th>
  33. <td>{{ object.get_protocol_display }}</td>
  34. </tr>
  35. <tr>
  36. <th scope="row">Ports</th>
  37. <td>{{ object.port_list }}</td>
  38. </tr>
  39. <tr>
  40. <th scope="row">IP Addresses</th>
  41. <td>
  42. {% for ipaddress in object.ipaddresses.all %}
  43. {{ ipaddress|linkify }}<br />
  44. {% empty %}
  45. {{ ''|placeholder }}
  46. {% endfor %}
  47. </td>
  48. </tr>
  49. <tr>
  50. <th scope="row">Description</th>
  51. <td>{{ object.description|placeholder }}</td>
  52. </tr>
  53. </table>
  54. </div>
  55. </div>
  56. {% plugin_left_page object %}
  57. </div>
  58. <div class="col col-md-6">
  59. {% include 'inc/panels/custom_fields.html' %}
  60. {% include 'inc/panels/tags.html' %}
  61. {% plugin_right_page object %}
  62. </div>
  63. </div>
  64. <div class="row mb-3">
  65. <div class="col col-md-12">
  66. {% plugin_full_width_page object %}
  67. </div>
  68. </div>
  69. {% endblock %}