mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Closes #181: Implemented support for bulk IP address creation
This commit is contained in:
		
							
								
								
									
										4
									
								
								netbox/templates/ipam/inc/ipadress_edit_header.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								netbox/templates/ipam/inc/ipadress_edit_header.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
<ul class="nav nav-tabs" style="margin-bottom: 20px">
 | 
			
		||||
    <li role="presentation"{% if active_tab == 'add' %} class="active"{% endif %}><a href="{% url 'ipam:ipaddress_add' %}">Individual</a></li>
 | 
			
		||||
    <li role="presentation"{% if active_tab == 'bulk_add' %} class="active"{% endif %}><a href="{% url 'ipam:ipaddress_bulk_add' %}">Bulk</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
							
								
								
									
										22
									
								
								netbox/templates/ipam/ipaddress_bulk_add.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								netbox/templates/ipam/ipaddress_bulk_add.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
{% extends 'utilities/obj_edit.html' %}
 | 
			
		||||
{% load static from staticfiles %}
 | 
			
		||||
{% load form_helpers %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Bulk Add IP Addresses{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block tabs %}
 | 
			
		||||
    {% include 'ipam/inc/ipadress_edit_header.html' with active_tab='bulk_add' %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block form %}
 | 
			
		||||
    <div class="panel panel-default">
 | 
			
		||||
        <div class="panel-heading"><strong>IP Address</strong></div>
 | 
			
		||||
        <div class="panel-body">
 | 
			
		||||
            {% render_field form.address %}
 | 
			
		||||
            {% render_field form.vrf %}
 | 
			
		||||
            {% render_field form.tenant %}
 | 
			
		||||
            {% render_field form.status %}
 | 
			
		||||
            {% render_field form.description %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -2,6 +2,12 @@
 | 
			
		||||
{% load static from staticfiles %}
 | 
			
		||||
{% load form_helpers %}
 | 
			
		||||
 | 
			
		||||
{% block tabs %}
 | 
			
		||||
    {% if not obj.pk %}
 | 
			
		||||
        {% include 'ipam/inc/ipadress_edit_header.html' with active_tab='add' %}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block form %}
 | 
			
		||||
    <div class="panel panel-default">
 | 
			
		||||
        <div class="panel-heading"><strong>IP Address</strong></div>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,6 @@
 | 
			
		||||
{% extends '_base.html' %}
 | 
			
		||||
{% load form_helpers %}
 | 
			
		||||
 | 
			
		||||
{% block title %}
 | 
			
		||||
    {% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <form action="." method="post" class="form form-horizontal">
 | 
			
		||||
        {% csrf_token %}
 | 
			
		||||
@@ -13,7 +9,8 @@
 | 
			
		||||
        {% endfor %}
 | 
			
		||||
        <div class="row">
 | 
			
		||||
            <div class="col-md-6 col-md-offset-3">
 | 
			
		||||
                <h3>{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}</h3>
 | 
			
		||||
                <h3>{% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}</h3>
 | 
			
		||||
                {% block tabs %}{% endblock %}
 | 
			
		||||
                {% if form.non_field_errors %}
 | 
			
		||||
                    <div class="panel panel-danger">
 | 
			
		||||
                        <div class="panel-heading"><strong>Errors</strong></div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user