1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

173 lines
7.3 KiB
HTML
Raw Normal View History

2016-03-01 11:23:03 -05:00
{% extends '_base.html' %}
2018-05-18 11:09:11 -04:00
{% load helpers %}
2016-03-01 11:23:03 -05:00
2018-06-14 16:15:14 -04:00
{% block header %}
<div class="row">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></li>
{% if ipaddress.vrf %}
<li><a href="{% url 'ipam:vrf' pk=ipaddress.vrf.pk %}">{{ ipaddress.vrf }}</a></li>
{% endif %}
<li>{{ ipaddress }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'ipam:ipaddress_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search IPs" />
<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-03-01 11:23:03 -05:00
</div>
2018-06-14 16:15:14 -04:00
<div class="pull-right">
{% if perms.ipam.change_ipaddress %}
<a href="{% url 'ipam:ipaddress_edit' pk=ipaddress.pk %}" class="btn btn-warning">
<span class="fa fa-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="fa fa-trash" aria-hidden="true"></span>
Delete this IP
</a>
{% endif %}
2016-03-01 11:23:03 -05:00
</div>
2018-06-14 16:15:14 -04:00
<h1>{% block title %}{{ ipaddress }}{% endblock %}</h1>
{% include 'inc/created_updated.html' with obj=ipaddress %}
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ ipaddress.get_absolute_url }}">IP Address</a>
</li>
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:ipaddress_changelog' pk=ipaddress.pk %}">Changelog</a>
</li>
</ul>
{% endblock %}
{% block content %}
2016-03-01 11:23:03 -05:00
<div class="row">
2017-08-02 12:55:21 -04:00
<div class="col-md-4">
2016-03-01 11:23:03 -05:00
<div class="panel panel-default">
<div class="panel-heading">
<strong>IP Address</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">
2016-03-01 11:23:03 -05:00
<tr>
<td>Family</td>
<td>{{ ipaddress.get_family_display }}</td>
</tr>
<tr>
<td>VRF</td>
2016-05-12 16:02:01 -04:00
<td>
{% if ipaddress.vrf %}
<a href="{% url 'ipam:vrf' pk=ipaddress.vrf.pk %}">{{ ipaddress.vrf }}</a> ({{ ipaddress.vrf.rd }})
{% else %}
<span>Global</span>
{% endif %}
</td>
2016-03-01 11:23:03 -05:00
</tr>
<tr>
<td>Tenant</td>
<td>
{% if ipaddress.tenant %}
<a href="{{ ipaddress.tenant.get_absolute_url }}">{{ ipaddress.tenant }}</a>
{% elif ipaddress.vrf.tenant %}
<a href="{{ ipaddress.vrf.tenant.get_absolute_url }}">{{ ipaddress.vrf.tenant }}</a>
<label class="label label-info">Inherited</label>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Status</td>
<td>
<span class="label label-{{ ipaddress.get_status_class }}">{{ ipaddress.get_status_display }}</span>
</td>
</tr>
<tr>
<td>Role</td>
<td>
2017-08-29 16:14:32 -04:00
{% if ipaddress.role %}
<a href="{% url 'ipam:ipaddress_list' %}?role={{ ipaddress.role }}">{{ ipaddress.get_role_display }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
2016-03-01 11:23:03 -05:00
<tr>
<td>Description</td>
<td>
{% if ipaddress.description %}
2016-03-01 11:23:03 -05:00
<span>{{ ipaddress.description }}</span>
{% else %}
<span class="text-muted">N/A</span>
2016-03-01 11:23:03 -05:00
{% endif %}
</td>
</tr>
<tr>
<td>Assignment</td>
<td>
{% if ipaddress.interface %}
<span><a href="{{ ipaddress.interface.parent.get_absolute_url }}">{{ ipaddress.interface.parent }}</a> ({{ ipaddress.interface }})</span>
2016-03-01 11:23:03 -05:00
{% 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="{{ ipaddress.nat_inside.interface.parent.get_absolute_url }}">{{ ipaddress.nat_inside.interface.parent }}</a>)
2016-03-01 11:23:03 -05:00
{% 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>
<tr>
<td>Tags</td>
2018-05-18 11:09:11 -04:00
<td>
{% for tag in ipaddress.tags.all %}
{% tag tag 'ipam:ipaddress_list' %}
2018-05-18 11:09:11 -04:00
{% empty %}
<span class="text-muted">N/A</span>
{% endfor %}
</td>
</tr>
2016-03-01 11:23:03 -05:00
</table>
</div>
{% with ipaddress.get_custom_fields as custom_fields %}
{% include 'inc/custom_fields_panel.html' %}
{% endwith %}
2016-03-01 11:23:03 -05:00
</div>
2017-08-02 12:55:21 -04:00
<div class="col-md-8">
{% include 'panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %}
{% if duplicate_ips_table.rows %}
{% include 'panel_table.html' with table=duplicate_ips_table heading='Duplicate IP Addresses' panel_class='danger' %}
{% endif %}
2018-02-15 10:01:02 -05:00
{% include 'panel_table.html' with table=related_ips_table heading='Related IP Addresses' panel_class='default' %}
2016-03-01 11:23:03 -05:00
</div>
</div>
{% endblock %}