From 7f752d91029db3c51d814e1392f709d6a565f0cc Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 1 Mar 2022 11:32:17 -0500 Subject: [PATCH] Closes #8762: Link to rack elevations list from site view --- docs/release-notes/version-3.1.md | 1 + netbox/templates/dcim/site.html | 126 +++++++++++++++++++++--------- 2 files changed, 92 insertions(+), 35 deletions(-) diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md index ebe9bee46..d34271f4c 100644 --- a/docs/release-notes/version-3.1.md +++ b/docs/release-notes/version-3.1.md @@ -6,6 +6,7 @@ * [#8594](https://github.com/netbox-community/netbox/issues/8594) - Enable filtering by exact description match for all applicable models * [#8629](https://github.com/netbox-community/netbox/issues/8629) - Add description to tag table search function +* [#8762](https://github.com/netbox-community/netbox/issues/8762) - Link to rack elevations list from site view * [#8766](https://github.com/netbox-community/netbox/issues/8766) - Add SCTP to service protocols list ### Bug Fixes diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index 2ad970301..f71105d1b 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -183,42 +183,98 @@
-
Stats
+
Related Objects
-
-
-

{{ stats.location_count }}

-

Locations

-
- -
-

{{ stats.device_count }}

-

Devices

-
-
-

{{ stats.prefix_count }}

-

Prefixes

-
- -
-

{{ stats.circuit_count }}

-

Circuits

-
-
-

{{ stats.vm_count }}

-

Virtual Machines

-
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Locations + {% if stats.location_count %} + {{ stats.location_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
Racks + {% if stats.rack_count %} + + {% else %} + {{ ''|placeholder }} + {% endif %} +
Devices + {% if stats.device_count %} + {{ stats.device_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
Virtual Machines + {% if stats.vm_count %} + {{ stats.vm_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
Prefixes + {% if stats.prefix_count %} + {{ stats.prefix_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
VLANs + {% if stats.vlan_count %} + {{ stats.vlan_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
ASNs + {% if stats.asn_count %} + {{ stats.asn_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
Circuits + {% if stats.circuit_count %} + {{ stats.circuit_count }} + {% else %} + {{ ''|placeholder }} + {% endif %} +
{% include 'inc/panels/contacts.html' %}