diff --git a/netbox/templates/home.html b/netbox/templates/home.html index c6c6cb3f6..25b22d6f0 100644 --- a/netbox/templates/home.html +++ b/netbox/templates/home.html @@ -10,20 +10,26 @@ Organization
- {% if perms.dcim.view_site %} -
+
+ {% if perms.dcim.view_site %} {{ stats.site_count }}

Sites

-

Geographic locations

-
- {% endif %} - {% if perms.tenancy.view_tenant %} -
+ {% else %} + +

Sites

+ {% endif %} +

Geographic locations

+
+
+ {% if perms.tenancy.view_tenant %} {{ stats.tenant_count }}

Tenants

+ {% else %} + +

Tenants

+ {% endif %}

Customers or departments

- {% endif %}
@@ -31,37 +37,55 @@ DCIM
- {% if perms.dcim.view_rack %} -
+
+ {% if perms.dcim.view_rack %} {{ stats.rack_count }}

Racks

-

Equipment racks, optionally organized by group

-
- {% endif %} - {% if perms.dcim.view_device %} -
+ {% else %} + +

Racks

+ {% endif %} +

Equipment racks, optionally organized by group

+
+
+ {% if perms.dcim.view_device %} {{ stats.device_count }}

Devices

-

Rack-mounted network equipment, servers, and other devices

-
- {% endif %} + {% else %} + +

Devices

+ {% endif %} +

Rack-mounted network equipment, servers, and other devices

+

Connections

{% if perms.dcim.view_cable %} {{ stats.cable_count }}

Cables

+ {% else %} + +

Cables

{% endif %} {% if perms.dcim.view_interface %} {{ stats.interface_connections_count }}

Interfaces

+ {% else %} + +

Interfaces

{% endif %} {% if perms.dcim.view_consoleport and perms.dcim.view_consoleserverport %} {{ stats.console_connections_count }}

Console

+ {% else %} + +

Console

{% endif %} {% if perms.dcim.view_powerport and perms.dcim.view_poweroutlet %} {{ stats.power_connections_count }}

Power

+ {% else %} + +

Power

{% endif %}
@@ -71,20 +95,26 @@ Virtualization
- {% if perms.virtualization.view_cluster %} -
+
+ {% if perms.virtualization.view_cluster %} {{ stats.cluster_count }}

Clusters

-

Clusters of physical hosts in which VMs reside

-
- {% endif %} - {% if perms.virtualization.view_virtualmachine %} -
+ {% else %} + +

Clusters

+ {% endif %} +

Clusters of physical hosts in which VMs reside

+
+
+ {% if perms.virtualization.view_virtualmachine %} {{ stats.virtualmachine_count }}

Virtual Machines

-

Virtual compute instances running inside clusters

-
- {% endif %} + {% else %} + +

Virtual Machines

+ {% endif %} +

Virtual compute instances running inside clusters

+
@@ -94,41 +124,56 @@ IPAM
- {% if perms.ipam.view_vrf %} -
+
+ {% if perms.ipam.view_vrf %} {{ stats.vrf_count }}

VRFs

-

Virtual routing and forwarding tables

-
- {% endif %} - {% if perms.ipam.view_aggregate %} -
+ {% else %} + +

VRFs

+ {% endif %} +

Virtual routing and forwarding tables

+
+
+ {% if perms.ipam.view_aggregate %} {{ stats.aggregate_count }}

Aggregates

-

Top-level IP allocations

-
- {% endif %} - {% if perms.ipam.view_prefix %} -
+ {% else %} + +

Aggregates

+ {% endif %} +

Top-level IP allocations

+
+
+ {% if perms.ipam.view_prefix %} {{ stats.prefix_count }}

Prefixes

-

IPv4 and IPv6 network assignments

-
- {% endif %} - {% if perms.ipam.view_ipaddress %} -
+ {% else %} + +

Prefixes

+ {% endif %} +

IPv4 and IPv6 network assignments

+
+
+ {% if perms.ipam.view_ipaddress %} {{ stats.ipaddress_count }}

IP Addresses

-

Individual IPv4 and IPv6 addresses

-
- {% endif %} - {% if perms.ipam.view_vlan %} -
+ {% else %} + +

IP Addresses

+ {% endif %} +

Individual IPv4 and IPv6 addresses

+
+
+ {% if perms.ipam.view_vlan %} {{ stats.vlan_count }}

VLANs

-

Layer two domains, identified by VLAN ID

-
- {% endif %} + {% else %} + +

VLANs

+ {% endif %} +

Layer two domains, identified by VLAN ID

+
@@ -136,64 +181,75 @@ Circuits
- {% if perms.circuits.view_provider %} -
+
+ {% if perms.circuits.view_provider %} {{ stats.provider_count }}

Providers

-

Organizations which provide circuit connectivity

-
- {% endif %} - {% if perms.circuits.view_circuit %} -
+ {% else %} + +

Providers

+ {% endif %} +

Organizations which provide circuit connectivity

+
+
+ {% if perms.circuits.view_circuit %} {{ stats.circuit_count }}

Circuits

-

Communication links for Internet transit, peering, and other services

-
- {% endif %} + {% else %} + +

Circuits

+ {% endif %} +

Communication links for Internet transit, peering, and other services

+
- {% if perms.secrets %} -
-
- Secrets -
-
-
+
+
+ Secrets +
+
+
+ {% if perms.secrets.view_secret %} {{ stats.secret_count }}

Secrets

-

Sensitive data (such as passwords) which has been stored securely

-
+ {% else %} + +

Secrets

+ {% endif %} +

Sensitive data (such as passwords) which has been stored securely

- {% endif %} +
- {% if perms.extras.view_topologymap %} -
-
- Global Topology Maps -
- {% if topology_maps %} - - {% for tm in topology_maps %} - - - - - {% endfor %} -
{{ tm }}{{ tm.description }}
- {% else %} -
- None -
- {% endif %} +
+
+ Global Topology Maps
- {% endif %} - {% if report_results and perms.extras.view_reportresult %} -
-
- Reports + {% if topology_maps and perms.extras.view_topologymap %} + + {% for tm in topology_maps %} + + + + + {% endfor %} +
{{ tm }}{{ tm.description }}
+ {% elif perms.extras.view_topologymap %} +
+ None found
+ {% else %} +
+ No permission +
+ {% endif %} +
+
+
+ Reports +
+ {% if report_results and perms.extras.view_reportresult %} {% for result in report_results %} @@ -202,13 +258,21 @@ {% endfor %}
-
- {% endif %} - {% if perms.extras.view_objectchange %} -
-
- Changelog + {% elif perms.extras.view_reportresult %} +
+ None found
+ {% else %} +
+ No permission +
+ {% endif %} +
+
+
+ Changelog +
+ {% if changelog and perms.extras.view_objectchange %}
{% for change in changelog %} {% with action=change.get_action_display|lower %} @@ -238,12 +302,18 @@ View All Changes
{% endif %} - {% empty %} -
No change history found
{% endfor %}
-
- {% endif %} + {% elif perms.extras.view_objectchange %} +
+ No change history found +
+ {% else %} +
+ No permission +
+ {% endif %} +
{% endblock %}