mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Default site to that of parent when adding a child prefix
This commit is contained in:
@ -21,13 +21,13 @@ PREFIX_LINK = """
|
|||||||
{% else %}
|
{% else %}
|
||||||
<span style="padding-left: {{ record.depth }}9px">
|
<span style="padding-left: {{ record.depth }}9px">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% endif %}">{{ record.prefix }}</a>
|
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% if site %}&site={{ site.pk }}{% endif %}{% endif %}">{{ record.prefix }}</a>
|
||||||
</span>
|
</span>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
PREFIX_LINK_BRIEF = """
|
PREFIX_LINK_BRIEF = """
|
||||||
<span style="padding-left: {{ record.depth }}0px">
|
<span style="padding-left: {{ record.depth }}0px">
|
||||||
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% endif %}">{{ record.prefix }}</a>
|
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% if site %}&site={{ site.pk }}{% endif %}{% endif %}">{{ record.prefix }}</a>
|
||||||
</span>
|
</span>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{% include 'ipam/inc/prefix_table.html' with table=child_prefix_table table_template='panel_table.html' heading='Child Prefixes' %}
|
{% include 'ipam/inc/prefix_table.html' with table=child_prefix_table table_template='panel_table.html' heading='Child Prefixes' site=prefix.site %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user