From 358d7ac5623b90e359c33873bfcdae8c896eb76d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 8 Mar 2021 17:16:07 -0500 Subject: [PATCH] Closes #5942: Add button to add a new IP address on interface view --- docs/release-notes/version-2.10.md | 2 ++ netbox/templates/dcim/interface.html | 19 ++++++++++++++++++- .../templates/virtualization/vminterface.html | 19 ++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index f00e38476..942da03da 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -7,6 +7,8 @@ * [#5592](https://github.com/netbox-community/netbox/issues/5592) - Add IP addresses count to VRF view * [#5630](https://github.com/netbox-community/netbox/issues/5630) - Add QSFP+ (64GFC) FibreChannel Interface option * [#5884](https://github.com/netbox-community/netbox/issues/5884) - Enable custom links for device components +* [#5914](https://github.com/netbox-community/netbox/issues/5914) - Add edit/delete buttons for IP addresses on interface view +* [#5942](https://github.com/netbox-community/netbox/issues/5942) - Add button to add a new IP address on interface view ### Bug Fixes diff --git a/netbox/templates/dcim/interface.html b/netbox/templates/dcim/interface.html index 3ae0733a1..2c0f6e01f 100644 --- a/netbox/templates/dcim/interface.html +++ b/netbox/templates/dcim/interface.html @@ -1,6 +1,7 @@ {% extends 'dcim/device_component.html' %} {% load helpers %} {% load plugins %} +{% load render_table from django_tables2 %} {% block content %}
@@ -226,7 +227,23 @@
- {% include 'panel_table.html' with table=ipaddress_table heading="IP Addresses" %} +
+
+ IP Addresses +
+ {% if ipaddress_table.rows %} + {% render_table ipaddress_table 'inc/table.html' %} + {% else %} +
None
+ {% endif %} + {% if perms.ipam.add_ipaddress %} + + {% endif %} +
diff --git a/netbox/templates/virtualization/vminterface.html b/netbox/templates/virtualization/vminterface.html index 7263fd9ae..fb1190d72 100644 --- a/netbox/templates/virtualization/vminterface.html +++ b/netbox/templates/virtualization/vminterface.html @@ -1,6 +1,7 @@ {% extends 'base.html' %} {% load helpers %} {% load plugins %} +{% load render_table from django_tables2 %} {% block header %}
@@ -93,7 +94,23 @@
- {% include 'panel_table.html' with table=ipaddress_table heading="IP Addresses" %} +
+
+ IP Addresses +
+ {% if ipaddress_table.rows %} + {% render_table ipaddress_table 'inc/table.html' %} + {% else %} +
None
+ {% endif %} + {% if perms.ipam.add_ipaddress %} + + {% endif %} +