mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Fixes #8922 - Add service list to IP address view
This commit is contained in:
parent
2a4c728375
commit
24ff360ee0
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v3.2.4 (FUTURE)
|
## v3.2.4 (FUTURE)
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
* [#8922](https://github.com/netbox-community/netbox/issues/8922) - Add service list to IP address view
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* [#9094](https://github.com/netbox-community/netbox/issues/9094) - Fix partial address search within Prefix and Aggregate filters
|
* [#9094](https://github.com/netbox-community/netbox/issues/9094) - Fix partial address search within Prefix and Aggregate filters
|
||||||
|
@ -674,11 +674,14 @@ class IPAddressView(generic.ObjectView):
|
|||||||
related_ips_table = tables.IPAddressTable(related_ips, orderable=False)
|
related_ips_table = tables.IPAddressTable(related_ips, orderable=False)
|
||||||
related_ips_table.configure(request)
|
related_ips_table.configure(request)
|
||||||
|
|
||||||
|
services = Service.objects.restrict(request.user, 'view').filter(ipaddresses=instance)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'parent_prefixes_table': parent_prefixes_table,
|
'parent_prefixes_table': parent_prefixes_table,
|
||||||
'duplicate_ips_table': duplicate_ips_table,
|
'duplicate_ips_table': duplicate_ips_table,
|
||||||
'more_duplicate_ips': duplicate_ips.count() > 10,
|
'more_duplicate_ips': duplicate_ips.count() > 10,
|
||||||
'related_ips_table': related_ips_table,
|
'related_ips_table': related_ips_table,
|
||||||
|
'services': services,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,6 +128,24 @@
|
|||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
{% include 'inc/panel_table.html' with table=related_ips_table heading='Related IP Addresses' %}
|
{% include 'inc/panel_table.html' with table=related_ips_table heading='Related IP Addresses' %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">
|
||||||
|
Services
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
{% if services %}
|
||||||
|
<table class="table table-hover">
|
||||||
|
{% for service in services %}
|
||||||
|
{% include 'ipam/inc/service.html' %}
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<div class="text-muted">
|
||||||
|
None
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user