mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Introduce the RouteTarget model
This commit is contained in:
@@ -331,6 +331,15 @@
|
||||
{% endif %}
|
||||
<a href="{% url 'ipam:vrf_list' %}">VRFs</a>
|
||||
</li>
|
||||
<li{% if not perms.ipam.view_routetarget %} class="disabled"{% endif %}>
|
||||
{% if perms.ipam.add_routetarget %}
|
||||
<div class="buttons pull-right">
|
||||
<a href="{% url 'ipam:routetarget_add' %}" class="btn btn-xs btn-success" title="Add"><i class="fa fa-plus"></i></a>
|
||||
<a href="{% url 'ipam:routetarget_import' %}" class="btn btn-xs btn-info" title="Import"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{% url 'ipam:routetarget_list' %}">Route Targets</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">VLANs</li>
|
||||
<li{% if not perms.ipam.view_vlan %} class="disabled"{% endif %}>
|
||||
|
98
netbox/templates/ipam/routetarget.html
Normal file
98
netbox/templates/ipam/routetarget.html
Normal file
@@ -0,0 +1,98 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load buttons %}
|
||||
{% load custom_links %}
|
||||
{% load helpers %}
|
||||
{% load plugins %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:routetarget_list' %}">Route Targets</a></li>
|
||||
<li>{{ routetarget }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
<form action="{% url 'ipam:routetarget_list' %}" method="get">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search roue targets" />
|
||||
<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>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons routetarget %}
|
||||
{% if perms.ipam.add_routetarget %}
|
||||
{% clone_button routetarget %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_routetarget %}
|
||||
{% edit_button routetarget %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_routetarget %}
|
||||
{% delete_button routetarget %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}Route target {{ routetarget }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=routetarget %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links routetarget %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ routetarget.get_absolute_url }}">Route Target</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:routetarget_changelog' pk=routetarget.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Route Target</strong>
|
||||
</div>
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ routetarget.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if routetarget.tenant %}
|
||||
<a href="{{ routetarget.tenant.get_absolute_url }}">{{ routetarget.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ vrf.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'extras/inc/tags_panel.html' with tags=routetarget.tags.all url='ipam:routetarget_list' %}
|
||||
{% plugin_left_page routetarget %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'inc/custom_fields_panel.html' with obj=routetarget %}
|
||||
{% plugin_right_page routetarget %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page routetarget %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user