mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Convert IPAM list views to extend standard template
This commit is contained in:
@ -1,31 +1,14 @@
|
|||||||
{% extends '_base.html' %}
|
{% extends 'utilities/obj_list.html' %}
|
||||||
{% load buttons %}
|
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
|
|
||||||
{% block content %}
|
{% block sidebar %}
|
||||||
<div class="pull-right noprint">
|
<div class="panel panel-default">
|
||||||
{% if perms.ipam.add_aggregate %}
|
<div class="panel-heading">
|
||||||
{% add_button 'ipam:aggregate_add' %}
|
<strong><i class="fa fa-bar-chart"></i> Statistics</strong>
|
||||||
{% import_button 'ipam:aggregate_import' %}
|
|
||||||
{% endif %}
|
|
||||||
{% export_button content_type %}
|
|
||||||
</div>
|
|
||||||
<h1>{% block title %}Aggregates{% endblock %}</h1>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-9">
|
|
||||||
{% include 'utilities/obj_table.html' with bulk_edit_url='ipam:aggregate_bulk_edit' bulk_delete_url='ipam:aggregate_bulk_delete' %}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 noprint">
|
|
||||||
{% include 'inc/search_panel.html' %}
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<strong><i class="fa fa-bar-chart"></i> Statistics</strong>
|
|
||||||
</div>
|
|
||||||
<ul class="list-group">
|
|
||||||
<li class="list-group-item">Total IPv4 IPs <span class="badge">{{ ipv4_total|intcomma }}</span></li>
|
|
||||||
<li class="list-group-item">Total IPv6 /64s <span class="badge">{{ ipv6_total|intcomma }}</span></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<ul class="list-group">
|
||||||
</div>
|
<li class="list-group-item">Total IPv4 IPs <span class="badge">{{ ipv4_total|intcomma }}</span></li>
|
||||||
|
<li class="list-group-item">Total IPv6 /64s <span class="badge">{{ ipv6_total|intcomma }}</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,26 +1,9 @@
|
|||||||
{% extends '_base.html' %}
|
{% extends 'utilities/obj_list.html' %}
|
||||||
{% load buttons %}
|
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block content %}
|
{% block buttons %}
|
||||||
<div class="pull-right noprint">
|
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<a href="{% url 'ipam:prefix_list' %}{% querystring request expand=None page=1 %}" class="btn btn-default{% if not request.GET.expand %} active{% endif %}">Collapse</a>
|
<a href="{% url 'ipam:prefix_list' %}{% querystring request expand=None page=1 %}" class="btn btn-default{% if not request.GET.expand %} active{% endif %}">Collapse</a>
|
||||||
<a href="{% url 'ipam:prefix_list' %}{% querystring request expand='on' page=1 %}" class="btn btn-default{% if request.GET.expand %} active{% endif %}">Expand</a>
|
<a href="{% url 'ipam:prefix_list' %}{% querystring request expand='on' page=1 %}" class="btn btn-default{% if request.GET.expand %} active{% endif %}">Expand</a>
|
||||||
</div>
|
</div>
|
||||||
{% if perms.ipam.add_prefix %}
|
|
||||||
{% add_button 'ipam:prefix_add' %}
|
|
||||||
{% import_button 'ipam:prefix_import' %}
|
|
||||||
{% endif %}
|
|
||||||
{% export_button content_type %}
|
|
||||||
</div>
|
|
||||||
<h1>{% block title %}Prefixes{% endblock %}</h1>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-9">
|
|
||||||
{% include 'utilities/obj_table.html' with bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 noprint">
|
|
||||||
{% include 'inc/search_panel.html' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{% extends '_base.html' %}
|
{% extends 'utilities/obj_list.html' %}
|
||||||
{% load buttons %}
|
|
||||||
{% load humanize %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block buttons %}
|
||||||
<div class="pull-right noprint">
|
|
||||||
{% if request.GET.family == '6' %}
|
{% if request.GET.family == '6' %}
|
||||||
<a href="{% url 'ipam:rir_list' %}" class="btn btn-default">
|
<a href="{% url 'ipam:rir_list' %}" class="btn btn-default">
|
||||||
<span class="fa fa-table" aria-hidden="true"></span>
|
<span class="fa fa-table" aria-hidden="true"></span>
|
||||||
@ -15,22 +12,12 @@
|
|||||||
IPv6 Stats
|
IPv6 Stats
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.ipam.add_rir %}
|
{% endblock %}
|
||||||
{% add_button 'ipam:rir_add' %}
|
|
||||||
{% import_button 'ipam:rir_import' %}
|
{% block sidebar %}
|
||||||
{% endif %}
|
{% if request.GET.family == '6' %}
|
||||||
{% export_button content_type %}
|
<div class="alert alert-info">
|
||||||
</div>
|
<i class="fa fa-info-circle"></i> Numbers shown indicate /64 prefixes.
|
||||||
<h1>{% block title %}RIRs{% endblock %}</h1>
|
</div>
|
||||||
<div class="row">
|
{% endif %}
|
||||||
<div class="col-md-9">
|
|
||||||
{% include 'utilities/obj_table.html' with bulk_delete_url='ipam:rir_bulk_delete' %}
|
|
||||||
{% if request.GET.family == '6' %}
|
|
||||||
<div class="alert alert-info pull-right"><strong>Note:</strong> Numbers shown indicate /64 prefixes.</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 noprint">
|
|
||||||
{% include 'inc/search_panel.html' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
|
{% block buttons %}{% endblock %}
|
||||||
{% if permissions.add and 'add' in action_buttons %}
|
{% if permissions.add and 'add' in action_buttons %}
|
||||||
{% add_button content_type.model_class|url_name:"add" %}
|
{% add_button content_type.model_class|url_name:"add" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user