mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Merge v3.1.4
This commit is contained in:
		@@ -3,6 +3,11 @@
 | 
			
		||||
 | 
			
		||||
{% block extra_controls %}
 | 
			
		||||
  {% include 'ipam/inc/toggle_available.html' %}
 | 
			
		||||
  {% if perms.ipam.add_prefix and first_available_prefix %}
 | 
			
		||||
    <a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}" class="btn btn-sm btn-primary">
 | 
			
		||||
      <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Prefix
 | 
			
		||||
    </a>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {{ block.super }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
{% extends 'ipam/prefix/base.html' %}
 | 
			
		||||
{% load humanize %}
 | 
			
		||||
{% load helpers %}
 | 
			
		||||
{% load plugins %}
 | 
			
		||||
 | 
			
		||||
@@ -124,9 +125,18 @@
 | 
			
		||||
                <a href="{% url 'ipam:prefix_ipaddresses' pk=object.pk %}">{{ child_ip_count }}</a>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
          {% endwith %}
 | 
			
		||||
          {% with available_count=object.get_available_ips.size %}
 | 
			
		||||
            <tr>
 | 
			
		||||
              <th scope="row">Available IPs</th>
 | 
			
		||||
              <td>{{ object.get_available_ips|length }}</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                {# Use human-friendly words for counts greater than one million #}
 | 
			
		||||
                {% if available_count > 1000000 %}
 | 
			
		||||
                  {{ available_count|intword }}
 | 
			
		||||
                {% else %}
 | 
			
		||||
                  {{ available_count|intcomma }}
 | 
			
		||||
                {% endif %}
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
          {% endwith %}
 | 
			
		||||
          <tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
{% block extra_controls %}
 | 
			
		||||
  {% if perms.ipam.add_iprange and first_available_ip %}
 | 
			
		||||
    <a href="{% url 'ipam:iprange_add' %}?start_address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}&return_url={% url 'ipam:prefix_ipaddresses' pk=object.pk %}" class="btn btn-sm btn-primary">
 | 
			
		||||
    <a href="{% url 'ipam:iprange_add' %}?start_address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}&return_url={% url 'ipam:prefix_ipranges' pk=object.pk %}" class="btn btn-sm btn-primary">
 | 
			
		||||
        <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Range
 | 
			
		||||
    </a>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user