2016-03-01 11:23:03 -05:00
|
|
|
{% extends '_base.html' %}
|
2018-11-02 14:42:15 -04:00
|
|
|
{% load static %}
|
2017-12-19 17:24:14 -05:00
|
|
|
{% load tz %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{% load helpers %}
|
|
|
|
|
2018-06-14 16:15:14 -04:00
|
|
|
{% block header %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="row noprint">
|
2018-06-14 16:15:14 -04:00
|
|
|
<div class="col-sm-8 col-md-9">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><a href="{% url 'dcim:site_list' %}">Sites</a></li>
|
|
|
|
{% if site.region %}
|
|
|
|
{% for region in site.region.get_ancestors %}
|
|
|
|
<li><a href="{{ region.get_absolute_url }}">{{ region }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
<li><a href="{{ site.region.get_absolute_url }}">{{ site.region }}</a></li>
|
|
|
|
{% endif %}
|
|
|
|
<li>{{ site }}</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4 col-md-3">
|
|
|
|
<form action="{% url 'dcim:site_list' %}" method="get">
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" name="q" class="form-control" placeholder="Search sites" />
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type="submit" class="btn btn-primary">
|
|
|
|
<span class="fa fa-search" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-06-29 12:06:37 -04:00
|
|
|
</div>
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="pull-right noprint">
|
2018-06-14 16:15:14 -04:00
|
|
|
{% if show_graphs %}
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ site.name }}" data-url="{% url 'dcim-api:site-graphs' pk=site.pk %}" title="Show graphs">
|
|
|
|
<i class="fa fa-signal" aria-hidden="true"></i>
|
|
|
|
Graphs
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.change_site %}
|
|
|
|
<a href="{% url 'dcim:site_edit' slug=site.slug %}" class="btn btn-warning">
|
|
|
|
<span class="fa fa-pencil" aria-hidden="true"></span>
|
|
|
|
Edit this site
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.delete_site %}
|
|
|
|
<a href="{% url 'dcim:site_delete' slug=site.slug %}" class="btn btn-danger">
|
|
|
|
<span class="fa fa-trash" aria-hidden="true"></span>
|
|
|
|
Delete this site
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2016-06-29 12:06:37 -04:00
|
|
|
</div>
|
2018-06-14 16:15:14 -04:00
|
|
|
<h1>{% block title %}{{ site }}{% endblock %}</h1>
|
|
|
|
{% include 'inc/created_updated.html' with obj=site %}
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
|
|
|
<a href="{{ site.get_absolute_url }}">Site</a>
|
|
|
|
</li>
|
2019-04-12 09:29:36 -04:00
|
|
|
{% if perms.extras.view_objectchange %}
|
|
|
|
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
|
|
|
<a href="{% url 'dcim:site_changelog' slug=site.slug %}">Changelog</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2018-06-14 16:15:14 -04:00
|
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<div class="row">
|
2016-07-29 15:31:35 -04:00
|
|
|
<div class="col-md-7">
|
2016-03-01 11:23:03 -05:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2016-06-22 10:57:32 -04:00
|
|
|
<strong>Site</strong>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2016-12-14 17:09:33 -05:00
|
|
|
<table class="table table-hover panel-body attr-table">
|
2018-01-25 13:07:04 -05:00
|
|
|
<tr>
|
|
|
|
<td>Status</td>
|
|
|
|
<td>
|
|
|
|
<span class="label label-{{ site.get_status_class }}">{{ site.get_status_display }}</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2017-02-28 16:10:53 -05:00
|
|
|
<tr>
|
|
|
|
<td>Region</td>
|
|
|
|
<td>
|
|
|
|
{% if site.region %}
|
|
|
|
{% for region in site.region.get_ancestors %}
|
|
|
|
<a href="{{ region.get_absolute_url }}">{{ region }}</a>
|
|
|
|
<i class="fa fa-angle-right"></i>
|
|
|
|
{% endfor %}
|
|
|
|
<a href="{{ site.region.get_absolute_url }}">{{ site.region }}</a>
|
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-07-26 16:46:22 -04:00
|
|
|
<tr>
|
|
|
|
<td>Tenant</td>
|
|
|
|
<td>
|
|
|
|
{% if site.tenant %}
|
2017-02-28 16:10:53 -05:00
|
|
|
{% if site.tenant.group %}
|
2017-11-02 08:51:27 -07:00
|
|
|
<a href="{{ site.tenant.group.get_absolute_url }}">{{ site.tenant.group }}</a>
|
2017-02-28 16:10:53 -05:00
|
|
|
<i class="fa fa-angle-right"></i>
|
|
|
|
{% endif %}
|
2016-07-26 16:46:22 -04:00
|
|
|
<a href="{{ site.tenant.get_absolute_url }}">{{ site.tenant }}</a>
|
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-03-01 11:23:03 -05:00
|
|
|
<tr>
|
|
|
|
<td>Facility</td>
|
2018-11-05 13:00:46 -05:00
|
|
|
<td>{{ site.facility|placeholder }}</td>
|
2016-03-01 11:23:03 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>AS Number</td>
|
2018-11-05 13:00:46 -05:00
|
|
|
<td>{{ site.asn|placeholder }}</td>
|
2016-03-01 11:23:03 -05:00
|
|
|
</tr>
|
2017-12-19 17:24:14 -05:00
|
|
|
<tr>
|
|
|
|
<td>Time Zone</td>
|
|
|
|
<td>
|
|
|
|
{% if site.time_zone %}
|
|
|
|
{{ site.time_zone }} (UTC {{ site.time_zone|tzoffset }})<br />
|
|
|
|
<small class="text-muted">Site time: {% timezone site.time_zone %}{% now "SHORT_DATETIME_FORMAT" %}{% endtimezone %}</small>
|
|
|
|
{% else %}
|
2018-11-05 13:00:46 -05:00
|
|
|
<span class="text-muted">—</span>
|
2017-12-19 17:24:14 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-01-25 13:29:09 -05:00
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
2018-11-05 13:00:46 -05:00
|
|
|
<td>{{ site.description|placeholder }}</td>
|
2018-01-25 13:29:09 -05:00
|
|
|
</tr>
|
2017-02-28 16:10:53 -05:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Contact Info</strong>
|
|
|
|
</div>
|
|
|
|
<table class="table table-hover panel-body attr-table">
|
2016-03-01 11:23:03 -05:00
|
|
|
<tr>
|
|
|
|
<td>Physical Address</td>
|
|
|
|
<td>
|
|
|
|
{% if site.physical_address %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="pull-right noprint">
|
2019-01-17 17:41:46 -08:00
|
|
|
<a href="http://maps.google.com/?q={{ site.physical_address|oneline|urlencode }}" target="_blank" class="btn btn-primary btn-xs">
|
2016-03-01 11:23:03 -05:00
|
|
|
<i class="glyphicon glyphicon-map-marker"></i> Map it
|
|
|
|
</a>
|
|
|
|
</div>
|
2016-07-29 15:31:35 -04:00
|
|
|
<span>{{ site.physical_address|linebreaksbr }}</span>
|
|
|
|
{% else %}
|
2018-11-05 13:00:46 -05:00
|
|
|
<span class="text-muted">—</span>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Shipping Address</td>
|
2018-11-05 13:00:46 -05:00
|
|
|
<td>{{ site.shipping_address|linebreaksbr|placeholder }}</td>
|
2016-03-01 11:23:03 -05:00
|
|
|
</tr>
|
2018-06-21 14:55:10 -04:00
|
|
|
<tr>
|
|
|
|
<td>GPS Coordinates</td>
|
|
|
|
<td>
|
|
|
|
{% if site.latitude and site.longitude %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="pull-right noprint">
|
2018-07-27 16:15:56 -04:00
|
|
|
<a href="http://maps.google.com/?q={{ site.latitude }},{{ site.longitude }}" target="_blank" class="btn btn-primary btn-xs">
|
|
|
|
<i class="glyphicon glyphicon-map-marker"></i> Map it
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<span>{{ site.latitude }}, {{ site.longitude }}</span>
|
2018-06-21 14:55:10 -04:00
|
|
|
{% else %}
|
2018-11-05 13:00:46 -05:00
|
|
|
<span class="text-muted">—</span>
|
2018-06-21 14:55:10 -04:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-12-29 11:37:40 -05:00
|
|
|
<tr>
|
|
|
|
<td>Contact Name</td>
|
2018-11-05 13:00:46 -05:00
|
|
|
<td>{{ site.contact_name|placeholder }}</td>
|
2016-12-29 11:37:40 -05:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Contact Phone</td>
|
|
|
|
<td>
|
|
|
|
{% if site.contact_phone %}
|
|
|
|
<a href="tel:{{ site.contact_phone }}">{{ site.contact_phone }}</a>
|
|
|
|
{% else %}
|
2018-11-05 13:00:46 -05:00
|
|
|
<span class="text-muted">—</span>
|
2016-12-29 11:37:40 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Contact E-Mail</td>
|
|
|
|
<td>
|
|
|
|
{% if site.contact_email %}
|
|
|
|
<a href="mailto:{{ site.contact_email }}">{{ site.contact_email }}</a>
|
|
|
|
{% else %}
|
2018-11-05 13:00:46 -05:00
|
|
|
<span class="text-muted">—</span>
|
2016-12-29 11:37:40 -05:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-03-01 11:23:03 -05:00
|
|
|
</table>
|
|
|
|
</div>
|
2018-07-20 19:56:04 -04:00
|
|
|
{% include 'inc/custom_fields_panel.html' with obj=site %}
|
2018-07-10 10:48:33 -04:00
|
|
|
{% include 'extras/inc/tags_panel.html' with tags=site.tags.all url='dcim:site_list' %}
|
2016-03-01 11:23:03 -05:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Comments</strong>
|
|
|
|
</div>
|
2018-11-13 11:02:48 -05:00
|
|
|
<div class="panel-body rendered-markdown">
|
2016-07-29 15:31:35 -04:00
|
|
|
{% if site.comments %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{{ site.comments|gfm }}
|
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">None</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-29 15:31:35 -04:00
|
|
|
<div class="col-md-5">
|
2016-03-01 11:23:03 -05:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Stats</strong>
|
|
|
|
</div>
|
2016-07-29 15:31:35 -04:00
|
|
|
<div class="row panel-body">
|
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'dcim:rack_list' %}?site={{ site.slug }}" class="btn {% if stats.rack_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rack_count }}</a></h2>
|
|
|
|
<p>Racks</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'dcim:device_list' %}?site={{ site.slug }}" class="btn {% if stats.device_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.device_count }}</a></h2>
|
|
|
|
<p>Devices</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'ipam:prefix_list' %}?site={{ site.slug }}" class="btn {% if stats.prefix_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.prefix_count }}</a></h2>
|
|
|
|
<p>Prefixes</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'ipam:vlan_list' %}?site={{ site.slug }}" class="btn {% if stats.vlan_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vlan_count }}</a></h2>
|
|
|
|
<p>VLANs</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'circuits:circuit_list' %}?site={{ site.slug }}" class="btn {% if stats.circuit_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.circuit_count }}</a></h2>
|
|
|
|
<p>Circuits</p>
|
|
|
|
</div>
|
2017-11-27 10:59:24 -05:00
|
|
|
<div class="col-md-4 text-center">
|
|
|
|
<h2><a href="{% url 'virtualization:virtualmachine_list' %}?site={{ site.slug }}" class="btn {% if stats.vm_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vm_count }}</a></h2>
|
|
|
|
<p>Virtual Machines</p>
|
|
|
|
</div>
|
2016-07-29 15:31:35 -04:00
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
2016-06-28 14:53:33 -04:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Rack Groups</strong>
|
|
|
|
</div>
|
|
|
|
{% if rack_groups %}
|
|
|
|
<table class="table table-hover panel-body">
|
|
|
|
{% for rg in rack_groups %}
|
|
|
|
<tr>
|
2017-11-02 08:51:27 -07:00
|
|
|
<td><i class="fa fa-fw fa-folder-o"></i> <a href="{{ rg.get_absolute_url }}">{{ rg }}</a></td>
|
2016-06-28 14:53:33 -04:00
|
|
|
<td>{{ rg.rack_count }}</td>
|
2019-03-05 15:42:47 -06:00
|
|
|
<td class="text-right noprint">
|
2018-07-27 16:25:48 -04:00
|
|
|
<a href="{% url 'dcim:rack_elevation_list' %}?group_id={{ rg.pk }}" class="btn btn-xs btn-primary" title="View elevations">
|
|
|
|
<i class="fa fa-eye"></i>
|
|
|
|
</a>
|
|
|
|
</td>
|
2016-06-28 14:53:33 -04:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="panel-body text-muted">
|
|
|
|
None
|
|
|
|
</div>
|
2017-03-31 15:19:44 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Images</strong>
|
|
|
|
</div>
|
|
|
|
{% include 'inc/image_attachments.html' with images=site.images.all %}
|
|
|
|
{% if perms.extras.add_imageattachment %}
|
2019-03-05 15:42:47 -06:00
|
|
|
<div class="panel-footer text-right noprint">
|
2017-03-31 15:19:44 -04:00
|
|
|
<a href="{% url 'dcim:site_add_image' object_id=site.pk %}" class="btn btn-primary btn-xs">
|
|
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
|
|
Attach an image
|
|
|
|
</a>
|
|
|
|
</div>
|
2016-06-28 14:53:33 -04:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2016-04-08 14:57:54 -04:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<strong>Topology Maps</strong>
|
|
|
|
</div>
|
|
|
|
{% if topology_maps %}
|
|
|
|
<table class="table table-hover panel-body">
|
|
|
|
{% for tm in topology_maps %}
|
|
|
|
<tr>
|
2017-04-05 17:33:39 -04:00
|
|
|
<td><i class="fa fa-fw fa-map-o"></i> <a href="{% url 'extras-api:topologymap-render' pk=tm.pk %}" target="_blank">{{ tm }}</a></td>
|
2016-04-08 14:57:54 -04:00
|
|
|
<td>{{ tm.description }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="panel-body text-muted">
|
|
|
|
None
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2016-03-01 11:23:03 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-29 16:45:20 -04:00
|
|
|
{% include 'inc/modal.html' with modal_name='graphs' %}
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block javascript %}
|
2017-03-30 15:40:00 -04:00
|
|
|
<script src="{% static 'js/graphs.js' %}?v{{ settings.VERSION }}"></script>
|
2016-03-01 11:23:03 -05:00
|
|
|
{% endblock %}
|