2021-03-02 15:58:33 -05:00
|
|
|
{% extends 'generic/object.html' %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{% load helpers %}
|
2020-03-01 03:24:17 -05:00
|
|
|
{% load plugins %}
|
2019-12-06 16:13:52 -05:00
|
|
|
{% load tz %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2023-11-30 02:50:59 +05:30
|
|
|
{% load mptt %}
|
2016-03-01 11:23:03 -05:00
|
|
|
|
2021-03-02 15:58:33 -05:00
|
|
|
{% block breadcrumbs %}
|
2021-07-20 12:14:01 -04:00
|
|
|
{{ block.super }}
|
2021-03-02 15:58:33 -05:00
|
|
|
{% if object.region %}
|
|
|
|
{% for region in object.region.get_ancestors %}
|
2021-07-20 12:14:01 -04:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:site_list' %}?region_id={{ region.pk }}">{{ region }}</a></li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% endfor %}
|
2021-07-20 12:14:01 -04:00
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:site_list' %}?region_id={{ object.region.pk }}">{{ object.region }}</a></li>
|
|
|
|
{% elif object.group %}
|
|
|
|
{% for group in object.group.get_ancestors %}
|
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:site_list' %}?group_id={{ group.pk }}">{{ group }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:site_list' %}?group_id={{ object.group.pk }}">{{ object.group }}</a></li>
|
2021-03-02 15:58:33 -05:00
|
|
|
{% endif %}
|
2018-06-14 16:15:14 -04:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<div class="row">
|
2021-12-06 13:43:02 -05:00
|
|
|
<div class="col col-md-6">
|
|
|
|
<div class="card">
|
2023-07-29 03:30:25 +07:00
|
|
|
<h5 class="card-header">{% trans "Site" %}</h5>
|
2021-12-06 13:43:02 -05:00
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-hover attr-table">
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Region" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>
|
2023-11-30 02:50:59 +05:30
|
|
|
{% nested_tree object.region %}
|
2021-12-06 13:43:02 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Group" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>
|
2023-11-30 02:50:59 +05:30
|
|
|
{% nested_tree object.group %}
|
2021-12-06 13:43:02 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Status" %}</th>
|
2022-02-11 14:25:13 -05:00
|
|
|
<td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
|
2021-12-06 13:43:02 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Tenant" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>
|
2022-03-22 15:29:05 -04:00
|
|
|
{% if object.tenant.group %}
|
|
|
|
{{ object.tenant.group|linkify }} /
|
2021-12-06 13:43:02 -05:00
|
|
|
{% endif %}
|
2022-03-22 15:29:05 -04:00
|
|
|
{{ object.tenant|linkify|placeholder }}
|
2021-12-06 13:43:02 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Facility" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>{{ object.facility|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Description" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>{{ object.description|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Time Zone" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>
|
|
|
|
{% if object.time_zone %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{{ object.time_zone }} ({% trans "UTC" %} {{ object.time_zone|tzoffset }})<br />
|
|
|
|
<small class="text-muted">{% trans "Site time" %}: {% timezone object.time_zone %}{% annotated_now %}{% endtimezone %}</small>
|
2021-12-06 13:43:02 -05:00
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-06 13:43:02 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Physical Address" %}</th>
|
2022-09-01 09:53:48 -04:00
|
|
|
<td class="position-relative">
|
2021-12-06 13:43:02 -05:00
|
|
|
{% if object.physical_address %}
|
2023-05-05 22:05:52 +05:30
|
|
|
{% if config.MAPS_URL %}
|
|
|
|
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
|
|
|
<a href="{{ config.MAPS_URL }}{{ object.physical_address|urlencode }}" target="_blank" class="btn btn-primary btn-sm">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-map-marker"></i> {% trans "Map" %}
|
2023-05-05 22:05:52 +05:30
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-06 13:43:02 -05:00
|
|
|
<span>{{ object.physical_address|linebreaksbr }}</span>
|
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-06 13:43:02 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "Shipping Address" %}</th>
|
2021-12-06 13:43:02 -05:00
|
|
|
<td>{{ object.shipping_address|linebreaksbr|placeholder }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-07-29 03:30:25 +07:00
|
|
|
<th scope="row">{% trans "GPS Coordinates" %}</th>
|
2022-09-01 09:53:48 -04:00
|
|
|
<td class="position-relative">
|
2021-12-06 13:43:02 -05:00
|
|
|
{% if object.latitude and object.longitude %}
|
2023-05-05 22:05:52 +05:30
|
|
|
{% if config.MAPS_URL %}
|
|
|
|
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
|
|
|
<a href="{{ config.MAPS_URL }}{{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary btn-sm">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-map-marker"></i> {% trans "Map It" %}
|
2023-05-05 22:05:52 +05:30
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-06 13:43:02 -05:00
|
|
|
<span>{{ object.latitude }}, {{ object.longitude }}</span>
|
|
|
|
{% else %}
|
2022-06-15 22:33:21 +02:00
|
|
|
{{ ''|placeholder }}
|
2021-12-06 13:43:02 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% include 'inc/panels/custom_fields.html' %}
|
|
|
|
{% include 'inc/panels/tags.html' %}
|
|
|
|
{% include 'inc/panels/comments.html' %}
|
|
|
|
{% plugin_left_page object %}
|
|
|
|
</div>
|
|
|
|
<div class="col col-md-6">
|
2023-01-25 12:26:38 -05:00
|
|
|
{% include 'inc/panels/related_objects.html' with filter_name='site_id' %}
|
2021-12-06 13:43:02 -05:00
|
|
|
{% include 'inc/panels/image_attachments.html' %}
|
|
|
|
{% plugin_right_page object %}
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-15 23:45:18 -04:00
|
|
|
<div class="row">
|
2021-12-06 13:43:02 -05:00
|
|
|
<div class="col col-md-12">
|
2023-08-28 13:03:35 -07:00
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Locations</h5>
|
|
|
|
<div class="card-body htmx-container table-responsive"
|
|
|
|
hx-get="{% url 'dcim:location_list' %}?site_id={{ object.pk }}"
|
|
|
|
hx-trigger="load"
|
|
|
|
></div>
|
|
|
|
{% if perms.dcim.add_location %}
|
|
|
|
<div class="card-footer text-end noprint">
|
|
|
|
<a href="{% url 'dcim:location_add' %}?site={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm">
|
2023-08-29 10:45:55 -04:00
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Location" %}
|
2023-08-28 13:03:35 -07:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="card">
|
|
|
|
<h5 class="card-header">Non-Racked Devices</h5>
|
|
|
|
<div class="card-body htmx-container table-responsive"
|
|
|
|
hx-get="{% url 'dcim:device_list' %}?site_id={{ object.pk }}&rack_id=null&parent_bay_id=null"
|
|
|
|
hx-trigger="load"
|
|
|
|
></div>
|
|
|
|
{% if perms.dcim.add_device %}
|
|
|
|
<div class="card-footer text-end noprint">
|
|
|
|
<a href="{% url 'dcim:device_add' %}?site={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm">
|
2023-08-29 10:45:55 -04:00
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Device" %}
|
2023-08-28 13:03:35 -07:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-12-06 13:43:02 -05:00
|
|
|
{% plugin_full_width_page object %}
|
|
|
|
</div>
|
2020-03-15 23:45:18 -04:00
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|