diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index f315ffbf7..23d655c6c 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -2,6 +2,10 @@ ## v3.0.6 (FUTURE) +### Enhancements + +* [#7462](https://github.com/netbox-community/netbox/issues/7462) - Include count of assigned virtual machines under platform view + ### Bug Fixes * [#7442](https://github.com/netbox-community/netbox/issues/7442) - Fix missing actions column on user-configured tables diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index a82d7dadf..16f88b9c3 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -1229,6 +1229,7 @@ class PlatformView(generic.ObjectView): return { 'devices_table': devices_table, + 'virtualmachine_count': VirtualMachine.objects.filter(platform=instance).count() } diff --git a/netbox/templates/dcim/platform.html b/netbox/templates/dcim/platform.html index 3a45905e9..7229d8078 100644 --- a/netbox/templates/dcim/platform.html +++ b/netbox/templates/dcim/platform.html @@ -46,6 +46,12 @@ {{ devices_table.rows|length }} + + Virtual Machines + + {{ virtualmachine_count }} + +