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

191 lines
7.8 KiB
HTML
Raw Normal View History

2020-04-10 10:21:02 -04:00
{% extends 'base.html' %}
{% load buttons %}
2019-04-15 21:38:04 -04:00
{% load custom_links %}
2018-05-18 11:09:11 -04:00
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}
2016-03-01 11:23:03 -05:00
2018-06-14 16:15:14 -04:00
{% block header %}
<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 'ipam:ipaddress_list' %}">IP Addresses</a></li>
{% if object.vrf %}
<li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li>
2018-06-14 16:15:14 -04:00
{% endif %}
<li>{{ object }}</li>
2018-06-14 16:15:14 -04:00
</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="mdi mdi-magnify" aria-hidden="true"></span>
2018-06-14 16:15:14 -04:00
</button>
</span>
</div>
</form>
</div>
2016-03-01 11:23:03 -05:00
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_ipaddress %}
{% clone_button object %}
{% endif %}
2018-06-14 16:15:14 -04:00
{% if perms.ipam.change_ipaddress %}
{%edit_button object %}
2018-06-14 16:15:14 -04:00
{% endif %}
{% if perms.ipam.delete_ipaddress %}
{% delete_button object %}
2018-06-14 16:15:14 -04:00
{% endif %}
2016-03-01 11:23:03 -05:00
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' with obj=object %}
2019-04-15 21:38:04 -04:00
<div class="pull-right noprint">
{% custom_links object %}
2019-04-15 21:38:04 -04:00
</div>
2018-06-14 16:15:14 -04:00
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">IP Address</a>
2018-06-14 16:15:14 -04:00
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:ipaddress_changelog' pk=object.pk %}">Change Log</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">
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>IPv{{ object.family }}</td>
2016-03-01 11:23:03 -05:00
</tr>
<tr>
<td>VRF</td>
2016-05-12 16:02:01 -04:00
<td>
{% if object.vrf %}
<a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a>
2016-05-12 16:02:01 -04:00
{% else %}
<span>Global</span>
{% endif %}
</td>
2016-03-01 11:23:03 -05:00
</tr>
<tr>
<td>Tenant</td>
<td>
{% if object.tenant %}
{% if object.tenant.group %}
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
{% endif %}
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Status</td>
<td>
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
</td>
</tr>
<tr>
<td>Role</td>
<td>
{% if object.role %}
<a href="{% url 'ipam:ipaddress_list' %}?role={{ object.role }}">{{ object.get_role_display }}</a>
2017-08-29 16:14:32 -04:00
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
2019-04-22 18:10:28 -04:00
<tr>
<td>DNS Name</td>
<td>{{ object.dns_name|placeholder }}</td>
2019-04-22 18:10:28 -04:00
</tr>
2016-03-01 11:23:03 -05:00
<tr>
<td>Description</td>
<td>{{ object.description|placeholder }}</td>
2016-03-01 11:23:03 -05:00
</tr>
<tr>
<td>Assignment</td>
<td>
{% if object.assigned_object %}
<span><a href="{{ object.assigned_object.parent.get_absolute_url }}">{{ object.assigned_object.parent }}</a> ({{ object.assigned_object }})</span>
2016-03-01 11:23:03 -05:00
{% else %}
<span class="text-muted">&mdash;</span>
2016-03-01 11:23:03 -05:00
{% endif %}
</td>
</tr>
<tr>
<td>NAT (inside)</td>
<td>
{% if object.nat_inside %}
<a href="{% url 'ipam:ipaddress' pk=object.nat_inside.pk %}">{{ object.nat_inside }}</a>
{% if object.nat_inside.assigned_object %}
(<a href="{{ object.nat_inside.assigned_object.parent.get_absolute_url }}">{{ object.nat_inside.assigned_object.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 object.nat_outside %}
<a href="{% url 'ipam:ipaddress' pk=object.nat_outside.pk %}">{{ object.nat_outside }}</a>
2016-03-01 11:23:03 -05:00
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' with obj=object %}
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:ipaddress_list' %}
{% plugin_left_page object %}
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 %}
{# Custom version of panel_table.html #}
<div class="panel panel-danger">
<div class="panel-heading">
<strong>Duplicate IP Addresses</strong>
{% if more_duplicate_ips %}
<div class="pull-right">
<a type="button" class="btn btn-primary btn-xs"
{% if object.vrf %}
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id={{ object.vrf.pk }}"
{% else %}
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id=null"
{% endif %}
>Show all</a>
</div>
{% endif %}
</div>
{% render_table duplicate_ips_table 'inc/table.html' %}
</div>
{% endif %}
2020-01-09 17:16:58 +00:00
{% include 'utilities/obj_table.html' with table=related_ips_table table_template='panel_table.html' heading='Related IP Addresses' panel_class='default noprint' %}
{% plugin_right_page object %}
2016-03-01 11:23:03 -05:00
</div>
</div>
<div class="row">
<div class="col-md-12">
{% plugin_full_width_page object %}
</div>
</div>
2016-03-01 11:23:03 -05:00
{% endblock %}