Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
arthur-zzz
noc
Commits
33b774f1
Commit
33b774f1
authored
May 04, 2022
by
arthur-zzz
Browse files
Fix IPAM view for release-22.1
parent
a03fc9d9
Pipeline
#36163
passed with stages
in 26 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
services/web/apps/ip/ipam/views.py
View file @
33b774f1
...
...
@@ -37,7 +37,7 @@ class IPAMApplication(ExtApplication):
ADDRESS_SPOT_DIST
=
8
# Area around used address to show in free spot
MAX_IPv4_NET_SIZE
=
256
# Cover whole IPv4 prefix with spot if size below
def
get_prefix_spot
(
self
,
prefix
,
sep
=
Tru
e
,
extra
=
None
):
def
get_prefix_spot
(
self
,
prefix
,
sep
=
Fals
e
,
extra
=
None
):
"""
Return addresses around existing ones
"""
...
...
@@ -324,7 +324,7 @@ class IPAMApplication(ExtApplication):
[
{
"address"
:
z
[
0
],
"isFree"
:
True
}
for
z
in
spot
if
str
(
z
[
0
])
not
in
allocated_addresses
if
z
[
0
]
and
str
(
z
[
0
])
not
in
allocated_addresses
]
if
spot
else
[]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment