diff options
author | Kai Knoblich <kai@FreeBSD.org> | 2019-12-15 12:32:20 +0000 |
---|---|---|
committer | Kai Knoblich <kai@FreeBSD.org> | 2019-12-15 12:32:20 +0000 |
commit | 875362201ba0c333e9f62003edd72ab598c2a538 (patch) | |
tree | 4f8ca653ffbdf6e9727e3d2c60035523635cca56 /net-mgmt | |
parent | 4872ecae7590d6c8648cc5c7537dbcf7c03a292f (diff) | |
download | ports-875362201ba0c333e9f62003edd72ab598c2a538.tar.gz ports-875362201ba0c333e9f62003edd72ab598c2a538.zip |
net-mgmt/netbox: Fix assignment of IP addresses to interfaces
* Backport a patch from upstream's repository which fixes the assignment of
existing IP addresses to interfaces.
Without that patch the assignment of an IP address gives no error but the
interface doesn't contain the assigned IP address at the end.
* Bump PORTREVISION for package change.
MFH: 2019Q4 (blanket: bugfix)
Notes
Notes:
svn path=/head/; revision=520173
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/netbox/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/netbox/files/patch-netbox_ipam_tables.py | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/net-mgmt/netbox/Makefile b/net-mgmt/netbox/Makefile index da62903a1768..012dc7956ded 100644 --- a/net-mgmt/netbox/Makefile +++ b/net-mgmt/netbox/Makefile @@ -3,6 +3,7 @@ PORTNAME= netbox DISTVERSIONPREFIX= v DISTVERSION= 2.6.8 +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= kai@FreeBSD.org diff --git a/net-mgmt/netbox/files/patch-netbox_ipam_tables.py b/net-mgmt/netbox/files/patch-netbox_ipam_tables.py new file mode 100644 index 000000000000..616ff4000e09 --- /dev/null +++ b/net-mgmt/netbox/files/patch-netbox_ipam_tables.py @@ -0,0 +1,20 @@ +Fix unable to assign existing IP addresses to interfaces + +Obtained from: +https://github.com/netbox-community/netbox/commit/1acdf58a4bb35d83a280464ac69aa961ff614df7 + +--- netbox/ipam/tables.py.orig 2019-12-15 11:43:12 UTC ++++ netbox/ipam/tables.py +@@ -85,7 +85,11 @@ IPADDRESS_LINK = """ + """ + + IPADDRESS_ASSIGN_LINK = """ +-<a href="{% url 'ipam:ipaddress_edit' pk=record.pk %}?interface={{ record.interface.pk }}&return_url={{ request.path }}">{{ record }}</a> ++{% if request.GET %} ++ <a href="{% url 'ipam:ipaddress_edit' pk=record.pk %}?interface={{ request.GET.interface }}&return_url={{ request.GET.return_url }}">{{ record }}</a> ++{% else %} ++ <a href="{% url 'ipam:ipaddress_edit' pk=record.pk %}?interface={{ record.interface.pk }}&return_url={{ request.path }}">{{ record }}</a> ++{% endif %} + """ + + IPADDRESS_PARENT = """ |