Applied tenancy to sites, racks, and devices

This commit is contained in:
Jeremy Stretch
2016-07-26 16:46:22 -04:00
parent 1939db1574
commit 82a98f0e8f
17 changed files with 135 additions and 27 deletions

View File

@@ -14,6 +14,16 @@
<strong>Device</strong>
</div>
<table class="table table-hover panel-body">
<tr>
<td>Tenant</td>
<td>
{% if device.tenant %}
<a href="{{ device.tenant.get_absolute_url }}">{{ device.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Site</td>
<td>

View File

@@ -9,6 +9,7 @@
<td><a href="{% url 'dcim:device' pk=device.pk %}">{{ device }}</a></td>
<td>{{ device.device_type }}</td>
<td>{{ device.device_role }}</td>
<td>{{ device.tenant }}</td>
<td>{{ device.serial }}</td>
</tr>
{% endfor %}

View File

@@ -7,6 +7,7 @@
<div class="panel-body">
{% render_field form.name %}
{% render_field form.device_role %}
{% render_field form.tenant %}
</div>
</div>
<div class="panel panel-default">

View File

@@ -36,6 +36,11 @@
<td>Functional role of device</td>
<td>ToR Switch</td>
</tr>
<tr>
<td>Tenant</td>
<td>Name of tenant (optional)</td>
<td>Pied Piper</td>
</tr>
<tr>
<td>Device manufacturer</td>
<td>Hardware manufacturer</td>
@@ -79,7 +84,7 @@
</tbody>
</table>
<h4>Example</h4>
<pre>rack101_sw1,ToR Switch,Juniper,EX4300-48T,Juniper Junos,CAB00577291,Ashburn-VA,R101,21,Rear</pre>
<pre>rack101_sw1,ToR Switch,Pied Piper,Juniper,EX4300-48T,Juniper Junos,CAB00577291,Ashburn-VA,R101,21,Rear</pre>
</div>
</div>
{% endblock %}

View File

@@ -86,6 +86,16 @@
{% endif %}
</td>
</tr>
<tr>
<td>Tenant</td>
<td>
{% if rack.tenant %}
<a href="{{ rack.tenant.get_absolute_url }}">{{ rack.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Height</td>
<td>{{ rack.u_height }}U</td>

View File

@@ -9,6 +9,7 @@
<td><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack }}</a></td>
<td>{{ rack.facility_id }}</td>
<td>{{ rack.site }}</td>
<td>{{ rack.tenant }}</td>
<td>{{ rack.u_height }}</td>
</tr>
{% endfor %}

View File

@@ -9,6 +9,7 @@
{% render_field form.group %}
{% render_field form.name %}
{% render_field form.facility_id %}
{% render_field form.tenant %}
{% render_field form.u_height %}
</div>
</div>

View File

@@ -48,6 +48,11 @@
<td>Rack ID assigned by the facility (optional)</td>
<td>J12.100</td>
</tr>
<tr>
<td>Tenant</td>
<td>Name of tenant (optional)</td>
<td>Pied Piper</td>
</tr>
<tr>
<td>Height</td>
<td>Height in rack units</td>
@@ -56,7 +61,7 @@
</tbody>
</table>
<h4>Example</h4>
<pre>DC-4,Cage 1400,R101,J12.100,42</pre>
<pre>DC-4,Cage 1400,R101,J12.100,Pied Piper,42</pre>
</div>
</div>
{% endblock %}

View File

@@ -52,6 +52,16 @@
<strong>Site</strong>
</div>
<table class="table table-hover panel-body">
<tr>
<td>Tenant</td>
<td>
{% if site.tenant %}
<a href="{{ site.tenant.get_absolute_url }}">{{ site.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Facility</td>
<td>{{ site.facility }}</td>

View File

@@ -7,6 +7,7 @@
<div class="panel-body">
{% render_field form.name %}
{% render_field form.slug %}
{% render_field form.tenant %}
{% render_field form.facility %}
{% render_field form.asn %}
{% render_field form.physical_address %}

View File

@@ -38,6 +38,11 @@
<td>URL-friendly name</td>
<td>ash4-south</td>
</tr>
<tr>
<td>Tenant</td>
<td>Name of tenant (optional)</td>
<td>Pied Piper</td>
</tr>
<tr>
<td>Facility</td>
<td>Name of the hosting facility (optional)</td>
@@ -51,7 +56,7 @@
</tbody>
</table>
<h4>Example</h4>
<pre>ASH-4 South,ash4-south,Equinix DC6,65000</pre>
<pre>ASH-4 South,ash4-south,Pied Piper,Equinix DC6,65000</pre>
</div>
</div>
{% endblock %}