mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 20:22:53 -06:00
Allow for setting mgmt_only=True in "Add management interfaces" link
This commit is contained in:
parent
a5f6e64849
commit
46b1ac23af
@ -353,7 +353,7 @@ class ComponentTemplateCreateView(View):
|
|||||||
return render(request, 'dcim/component_template_add.html', {
|
return render(request, 'dcim/component_template_add.html', {
|
||||||
'devicetype': devicetype,
|
'devicetype': devicetype,
|
||||||
'component_type': self.model._meta.verbose_name,
|
'component_type': self.model._meta.verbose_name,
|
||||||
'form': self.form(),
|
'form': self.form(initial=request.GET),
|
||||||
'cancel_url': reverse('dcim:devicetype', kwargs={'pk': devicetype.pk}),
|
'cancel_url': reverse('dcim:devicetype', kwargs={'pk': devicetype.pk}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -75,11 +75,15 @@
|
|||||||
<td>Is a Network Device</td>
|
<td>Is a Network Device</td>
|
||||||
<td>{{ devicetype.is_network_device|yesno|capfirst }}</td>
|
<td>{{ devicetype.is_network_device|yesno|capfirst }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Parent/Child Role</td>
|
||||||
|
<td>{{ devicetype.get_subdevice_role_display }}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' add_url='dcim:devicetype_add_consoleport' delete_url='dcim:devicetype_delete_consoleport' %}
|
{% include 'dcim/inc/devicetype_component_table.html' with table=consoleport_table title='Console Ports' add_url='dcim:devicetype_add_consoleport' delete_url='dcim:devicetype_delete_consoleport' %}
|
||||||
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' add_url='dcim:devicetype_add_powerport' delete_url='dcim:devicetype_delete_powerport' %}
|
{% include 'dcim/inc/devicetype_component_table.html' with table=powerport_table title='Power Ports' add_url='dcim:devicetype_add_powerport' delete_url='dcim:devicetype_delete_powerport' %}
|
||||||
{% include 'dcim/inc/devicetype_component_table.html' with table=mgmt_interface_table title='Management Interfaces' add_url='dcim:devicetype_add_interface' delete_url='dcim:devicetype_delete_interface' %}
|
{% include 'dcim/inc/devicetype_component_table.html' with table=mgmt_interface_table title='Management Interfaces' add_url='dcim:devicetype_add_interface' add_url_extra='?mgmt_only=1' delete_url='dcim:devicetype_delete_interface' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{% if devicetype.is_parent_device %}
|
{% if devicetype.is_parent_device %}
|
||||||
|
@ -4,7 +4,10 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<a href="{% url add_url pk=devicetype.pk %}" class="btn btn-primary btn-xs pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add {{ title }}</a>
|
<a href="{% url add_url pk=devicetype.pk %}{{ add_url_extra }}" class="btn btn-primary btn-xs pull-right">
|
||||||
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||||
|
Add {{ title }}
|
||||||
|
</a>
|
||||||
<strong>{{ title }}</strong>
|
<strong>{{ title }}</strong>
|
||||||
</div>
|
</div>
|
||||||
{% render_table table 'table.html' %}
|
{% render_table table 'table.html' %}
|
||||||
|
Loading…
Reference in New Issue
Block a user