mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into develop-2.7
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
<div class="col-md-4 col-md-offset-1 text-center">
|
||||
<h4>Near End</h4>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3 text-center">
|
||||
<div class="col-md-3 text-center">
|
||||
{% if total_length %}<h5>Total length: {{ total_length|floatformat:"-2" }} Meters<h5>{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h4>Far End</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -556,6 +556,9 @@
|
||||
<span class="glyphicon glyphicon-check" aria-hidden="true"></span> Show IPs
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 pull-right noprint">
|
||||
<input class="form-control interface-filter" type="text" placeholder="Filter" title="RegEx-enabled" style="height: 23px" />
|
||||
</div>
|
||||
</div>
|
||||
<table id="interfaces_table" class="table table-hover table-headings panel-body component-list">
|
||||
<thead>
|
||||
@@ -902,19 +905,8 @@ function toggleConnection(elem) {
|
||||
$(".cable-toggle").click(function() {
|
||||
return toggleConnection($(this));
|
||||
});
|
||||
// Toggle the display of IP addresses under interfaces
|
||||
$('button.toggle-ips').click(function() {
|
||||
var selected = $(this).attr('selected');
|
||||
if (selected) {
|
||||
$('#interfaces_table tr.ipaddresses').hide();
|
||||
} else {
|
||||
$('#interfaces_table tr.ipaddresses').show();
|
||||
}
|
||||
$(this).attr('selected', !selected);
|
||||
$(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
<script src="{% static 'js/interface_toggles.js' %}?v{{ settings.VERSION }}"></script>
|
||||
<script src="{% static 'js/graphs.js' %}?v{{ settings.VERSION }}"></script>
|
||||
<script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
@@ -112,7 +112,7 @@
|
||||
{% if configcontext.roles.all %}
|
||||
<ul>
|
||||
{% for role in configcontext.roles.all %}
|
||||
<li><a href="{{ role.get_absolute_url }}">{{ role }}</a></li>
|
||||
<li><a href="{% url 'dcim:device_list' %}?role={{ role.slug }}">{{ role }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<tr{% if not attachment.size %} class="danger"{% endif %}>
|
||||
<td>
|
||||
<i class="fa fa-image"></i>
|
||||
<a href="{{ attachment.image.url }}" target="_blank">{{ attachment }}</a>
|
||||
<a class="image-preview" href="{{ attachment.image.url }}" target="_blank">{{ attachment }}</a>
|
||||
</td>
|
||||
<td>{{ attachment.size|filesizeformat }}</td>
|
||||
<td>{{ attachment.created }}</td>
|
||||
|
@@ -38,6 +38,7 @@
|
||||
</div>
|
||||
<h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=aggregate %}
|
||||
{% include 'ipam/inc/toggle_available.html' %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links aggregate %}
|
||||
</div>
|
||||
|
9
netbox/templates/ipam/inc/toggle_available.html
Normal file
9
netbox/templates/ipam/inc/toggle_available.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% load helpers %}
|
||||
{% if show_available is not None %}
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}">Show available</a>
|
||||
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-default{% if not show_available %} active disabled{% endif %}">Hide available</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
@@ -158,7 +158,7 @@
|
||||
{% if duplicate_ips_table.rows %}
|
||||
{% include 'panel_table.html' with table=duplicate_ips_table heading='Duplicate IP Addresses' panel_class='danger' %}
|
||||
{% endif %}
|
||||
{% include 'panel_table.html' with table=related_ips_table heading='Related IP Addresses' panel_class='default noprint' %}
|
||||
{% include 'utilities/obj_table.html' with table=related_ips_table table_template='panel_table.html' heading='Related IP Addresses' panel_class='default noprint' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -51,6 +51,7 @@
|
||||
</div>
|
||||
<h1>{% block title %}{{ prefix }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=prefix %}
|
||||
{% include 'ipam/inc/toggle_available.html' %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links prefix %}
|
||||
</div>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load buttons %}
|
||||
{% load custom_links %}
|
||||
{% load static %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block header %}
|
||||
@@ -251,6 +252,9 @@
|
||||
<span class="glyphicon glyphicon-check" aria-hidden="true"></span> Show IPs
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 pull-right noprint">
|
||||
<input class="form-control interface-filter" type="text" placeholder="Filter" title="RegEx-enabled" style="height: 23px" />
|
||||
</div>
|
||||
</div>
|
||||
<table id="interfaces_table" class="table table-hover table-headings panel-body component-list">
|
||||
<thead>
|
||||
@@ -310,18 +314,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript">
|
||||
// Toggle the display of IP addresses under interfaces
|
||||
$('button.toggle-ips').click(function() {
|
||||
var selected = $(this).attr('selected');
|
||||
if (selected) {
|
||||
$('#interfaces_table tr.ipaddresses').hide();
|
||||
} else {
|
||||
$('#interfaces_table tr.ipaddresses').show();
|
||||
}
|
||||
$(this).attr('selected', !selected);
|
||||
$(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
<script src="{% static 'js/interface_toggles.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user