mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
139 lines
5.4 KiB
HTML
139 lines
5.4 KiB
HTML
{% extends '_base.html' %}
|
|
{% load render_table from django_tables2 %}
|
|
|
|
{% block title %}{{ ipaddress }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-md-9">
|
|
<ol class="breadcrumb">
|
|
{% for p in parent_prefixes %}
|
|
<li><a href="{% url 'ipam:prefix' pk=p.pk %}">{{ p }}</a></li>
|
|
{% empty %}
|
|
<li><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></li>
|
|
{% endfor %}
|
|
<li>{{ ipaddress.address.ip }}</li>
|
|
</ol>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<form action="{% url 'ipam:ipaddress_list' %}" method="get">
|
|
<div class="input-group">
|
|
<input type="text" name="q" class="form-control" placeholder="IP address" />
|
|
<span class="input-group-btn">
|
|
<button type="submit" class="btn btn-primary">
|
|
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="pull-right">
|
|
{% if perms.ipam.change_ipaddress %}
|
|
<a href="{% url 'ipam:ipaddress_edit' pk=ipaddress.pk %}" class="btn btn-warning">
|
|
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
|
|
Edit this IP
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.ipam.delete_ipaddress %}
|
|
<a href="{% url 'ipam:ipaddress_delete' pk=ipaddress.pk %}" class="btn btn-danger">
|
|
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
|
|
Delete this IP
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
<h1>{{ ipaddress }}</h1>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Details</strong>
|
|
</div>
|
|
<table class="table table-hover panel-body">
|
|
<tr>
|
|
<td>Family</td>
|
|
<td>{{ ipaddress.get_family_display }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>VRF</td>
|
|
<td>{{ ipaddress.vrf|default:"Global" }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Description</td>
|
|
<td>
|
|
{% if ipaddress.description %}
|
|
<span>{{ ipaddress.description }}</span>
|
|
{% else %}
|
|
<span class="text-muted">None</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Assignment</td>
|
|
<td>
|
|
{% if ipaddress.interface %}
|
|
<span><a href="{% url 'dcim:device' pk=ipaddress.interface.device.pk %}">{{ ipaddress.interface.device }}</a> ({{ ipaddress.interface }})</span>
|
|
{% else %}
|
|
<span class="text-muted">None</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>NAT (inside)</td>
|
|
<td>
|
|
{% if ipaddress.nat_inside %}
|
|
<a href="{% url 'ipam:ipaddress' pk=ipaddress.nat_inside.pk %}">{{ ipaddress.nat_inside }}</a>
|
|
{% if ipaddress.nat_inside.interface %}
|
|
(<a href="{% url 'dcim:device' pk=ipaddress.nat_inside.interface.device.pk %}">{{ ipaddress.nat_inside.interface.device }}</a>)
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">None</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>NAT (outside)</td>
|
|
<td>
|
|
{% if ipaddress.nat_outside %}
|
|
<a href="{% url 'ipam:ipaddress' pk=ipaddress.nat_outside.pk %}">{{ ipaddress.nat_outside }}</a>
|
|
{% else %}
|
|
<span class="text-muted">None</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Parent Prefixes</strong>
|
|
</div>
|
|
{% if parent_prefixes %}
|
|
<table class="table table-hover panel-body">
|
|
{% for p in parent_prefixes %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'ipam:prefix' pk=p.pk %}">{{ p }}</a>
|
|
</td>
|
|
<td>
|
|
{% if p.site %}
|
|
<a href="{% url 'dcim:site' slug=p.site.slug %}">{{ p.site }}</a>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ p.status }}</td>
|
|
<td>{{ p.role }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<div class="panel-body text-muted">None</div>
|
|
{% endif %}
|
|
</div>
|
|
{% with heading='Related IP Addresses' %}
|
|
{% render_table related_ips_table 'panel_table.html' %}
|
|
{% endwith %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|