circuit.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load i18n %}
  5. {% block breadcrumbs %}
  6. {{ block.super }}
  7. <li class="breadcrumb-item"><a href="{% url 'circuits:circuit_list' %}?provider_id={{ object.provider.pk }}">{{ object.provider }}</a></li>
  8. {% endblock %}
  9. {% block content %}
  10. <div class="row">
  11. <div class="col col-md-6">
  12. <div class="card">
  13. <h2 class="card-header">{% trans "Circuit" %}</h2>
  14. <table class="table table-hover attr-table">
  15. <tr>
  16. <th scope="row">{% trans "Provider" %}</th>
  17. <td>{{ object.provider|linkify }}</td>
  18. </tr>
  19. <tr>
  20. <th scope="row">{% trans "Account" %}</th>
  21. <td>{{ object.provider_account|linkify|placeholder }}</td>
  22. </tr>
  23. <tr>
  24. <th scope="row">{% trans "Circuit ID" %}</th>
  25. <td>{{ object.cid }}</td>
  26. </tr>
  27. <tr>
  28. <th scope="row">{% trans "Type" %}</th>
  29. <td>{{ object.type|linkify }}</td>
  30. </tr>
  31. <tr>
  32. <th scope="row">{% trans "Status" %}</th>
  33. <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
  34. </tr>
  35. <tr>
  36. <th scope="row">{% trans "Distance" %}</th>
  37. <td>
  38. {% if object.distance is not None %}
  39. {{ object.distance|floatformat }} {{ object.get_distance_unit_display }}
  40. {% else %}
  41. {{ ''|placeholder }}
  42. {% endif %}
  43. </td>
  44. </tr>
  45. <tr>
  46. <th scope="row">{% trans "Tenant" %}</th>
  47. <td>
  48. {% if object.tenant.group %}
  49. {{ object.tenant.group|linkify }} /
  50. {% endif %}
  51. {{ object.tenant|linkify|placeholder }}
  52. </td>
  53. </tr>
  54. <tr>
  55. <th scope="row">{% trans "Install Date" %}</th>
  56. <td>{{ object.install_date|isodate|placeholder }}</td>
  57. </tr>
  58. <tr>
  59. <th scope="row">{% trans "Termination Date" %}</th>
  60. <td>{{ object.termination_date|isodate|placeholder }}</td>
  61. </tr>
  62. <tr>
  63. <th scope="row">{% trans "Commit Rate" %}</th>
  64. <td>{{ object.commit_rate|humanize_speed|placeholder }}</td>
  65. </tr>
  66. <tr>
  67. <th scope="row">{% trans "Description" %}</th>
  68. <td>{{ object.description|placeholder }}</td>
  69. </tr>
  70. </table>
  71. </div>
  72. <div class="card">
  73. <h2 class="card-header">
  74. {% trans "Group Assignments" %}
  75. {% if perms.circuits.add_circuitgroupassignment %}
  76. <div class="card-actions">
  77. <a href="{% url 'circuits:circuitgroupassignment_add' %}?circuit={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-ghost-primary btn-sm">
  78. <span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Assign Group" %}
  79. </a>
  80. </div>
  81. {% endif %}
  82. </h2>
  83. {% htmx_table 'circuits:circuitgroupassignment_list' circuit_id=object.pk %}
  84. </div>
  85. {% include 'inc/panels/custom_fields.html' %}
  86. {% include 'inc/panels/tags.html' %}
  87. {% include 'inc/panels/comments.html' %}
  88. {% plugin_left_page object %}
  89. </div>
  90. <div class="col col-md-6">
  91. {% include 'circuits/inc/circuit_termination.html' with termination=object.termination_a side='A' %}
  92. {% include 'circuits/inc/circuit_termination.html' with termination=object.termination_z side='Z' %}
  93. {% include 'inc/panels/image_attachments.html' %}
  94. {% plugin_right_page object %}
  95. </div>
  96. </div>
  97. <div class="row">
  98. <div class="col col-md-12">
  99. {% plugin_full_width_page object %}
  100. </div>
  101. </div>
  102. {% endblock %}