mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Hide non-viewable object types on home page
This commit is contained in:
@ -10,16 +10,20 @@
|
|||||||
<strong>Organization</strong>
|
<strong>Organization</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
{% if perms.dcim.view_site %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.site_count }}</span>
|
<span class="badge pull-right">{{ stats.site_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'dcim:site_list' %}">Sites</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'dcim:site_list' %}">Sites</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Geographic locations</p>
|
<p class="list-group-item-text text-muted">Geographic locations</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.tenancy.view_tenant %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.tenant_count }}</span>
|
<span class="badge pull-right">{{ stats.tenant_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Customers or departments</p>
|
<p class="list-group-item-text text-muted">Customers or departments</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -27,26 +31,38 @@
|
|||||||
<strong>DCIM</strong>
|
<strong>DCIM</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
{% if perms.dcim.view_rack %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.rack_count }}</span>
|
<span class="badge pull-right">{{ stats.rack_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'dcim:rack_list' %}">Racks</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'dcim:rack_list' %}">Racks</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Equipment racks, optionally organized by group</p>
|
<p class="list-group-item-text text-muted">Equipment racks, optionally organized by group</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.dcim.view_device %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.device_count }}</span>
|
<span class="badge pull-right">{{ stats.device_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'dcim:device_list' %}">Devices</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'dcim:device_list' %}">Devices</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Rack-mounted network equipment, servers, and other devices</p>
|
<p class="list-group-item-text text-muted">Rack-mounted network equipment, servers, and other devices</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<h4 class="list-group-item-heading">Connections</h4>
|
<h4 class="list-group-item-heading">Connections</h4>
|
||||||
|
{% if perms.dcim.view_cable %}
|
||||||
<span class="badge pull-right">{{ stats.cable_count }}</span>
|
<span class="badge pull-right">{{ stats.cable_count }}</span>
|
||||||
<p style="padding-left: 20px;"><a href="{% url 'dcim:cable_list' %}">Cables</a></p>
|
<p style="padding-left: 20px;"><a href="{% url 'dcim:cable_list' %}">Cables</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.dcim.view_interface %}
|
||||||
<span class="badge pull-right">{{ stats.interface_connections_count }}</span>
|
<span class="badge pull-right">{{ stats.interface_connections_count }}</span>
|
||||||
<p style="padding-left: 20px;"><a href="{% url 'dcim:interface_connections_list' %}">Interfaces</a></p>
|
<p style="padding-left: 20px;"><a href="{% url 'dcim:interface_connections_list' %}">Interfaces</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.dcim.view_consoleport and perms.dcim.view_consoleserverport %}
|
||||||
<span class="badge pull-right">{{ stats.console_connections_count }}</span>
|
<span class="badge pull-right">{{ stats.console_connections_count }}</span>
|
||||||
<p style="padding-left: 20px;"><a href="{% url 'dcim:console_connections_list' %}">Console</a></p>
|
<p style="padding-left: 20px;"><a href="{% url 'dcim:console_connections_list' %}">Console</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.dcim.view_powerport and perms.dcim.view_poweroutlet %}
|
||||||
<span class="badge pull-right">{{ stats.power_connections_count }}</span>
|
<span class="badge pull-right">{{ stats.power_connections_count }}</span>
|
||||||
<p class="list-group-item-text" style="padding-left: 20px;"><a href="{% url 'dcim:power_connections_list' %}">Power</a></p>
|
<p class="list-group-item-text" style="padding-left: 20px;"><a href="{% url 'dcim:power_connections_list' %}">Power</a></p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -55,16 +71,20 @@
|
|||||||
<strong>Virtualization</strong>
|
<strong>Virtualization</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
{% if perms.virtualization.view_cluster %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.cluster_count }}</span>
|
<span class="badge pull-right">{{ stats.cluster_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'virtualization:cluster_list' %}">Clusters</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'virtualization:cluster_list' %}">Clusters</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Clusters of physical hosts in which VMs reside</p>
|
<p class="list-group-item-text text-muted">Clusters of physical hosts in which VMs reside</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.virtualization.view_virtualmachine %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.virtualmachine_count }}</span>
|
<span class="badge pull-right">{{ stats.virtualmachine_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Virtual compute instances running inside clusters</p>
|
<p class="list-group-item-text text-muted">Virtual compute instances running inside clusters</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -74,31 +94,41 @@
|
|||||||
<strong>IPAM</strong>
|
<strong>IPAM</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
{% if perms.ipam.view_vrf %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.vrf_count }}</span>
|
<span class="badge pull-right">{{ stats.vrf_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:vrf_list' %}">VRFs</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:vrf_list' %}">VRFs</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Virtual routing and forwarding tables</p>
|
<p class="list-group-item-text text-muted">Virtual routing and forwarding tables</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.ipam.view_aggregate %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.aggregate_count }}</span>
|
<span class="badge pull-right">{{ stats.aggregate_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Top-level IP allocations</p>
|
<p class="list-group-item-text text-muted">Top-level IP allocations</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.ipam.view_prefix %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.prefix_count }}</span>
|
<span class="badge pull-right">{{ stats.prefix_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:prefix_list' %}">Prefixes</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:prefix_list' %}">Prefixes</a></h4>
|
||||||
<p class="list-group-item-text text-muted">IPv4 and IPv6 network assignments</p>
|
<p class="list-group-item-text text-muted">IPv4 and IPv6 network assignments</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.ipam.view_ipaddress %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.ipaddress_count }}</span>
|
<span class="badge pull-right">{{ stats.ipaddress_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Individual IPv4 and IPv6 addresses</p>
|
<p class="list-group-item-text text-muted">Individual IPv4 and IPv6 addresses</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.ipam.view_vlan %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.vlan_count }}</span>
|
<span class="badge pull-right">{{ stats.vlan_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'ipam:vlan_list' %}">VLANs</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'ipam:vlan_list' %}">VLANs</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Layer two domains, identified by VLAN ID</p>
|
<p class="list-group-item-text text-muted">Layer two domains, identified by VLAN ID</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -106,16 +136,20 @@
|
|||||||
<strong>Circuits</strong>
|
<strong>Circuits</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
{% if perms.circuits.view_provider %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.provider_count }}</span>
|
<span class="badge pull-right">{{ stats.provider_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'circuits:provider_list' %}">Providers</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'circuits:provider_list' %}">Providers</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Organizations which provide circuit connectivity</p>
|
<p class="list-group-item-text text-muted">Organizations which provide circuit connectivity</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.circuits.view_circuit %}
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<span class="badge pull-right">{{ stats.circuit_count }}</span>
|
<span class="badge pull-right">{{ stats.circuit_count }}</span>
|
||||||
<h4 class="list-group-item-heading"><a href="{% url 'circuits:circuit_list' %}">Circuits</a></h4>
|
<h4 class="list-group-item-heading"><a href="{% url 'circuits:circuit_list' %}">Circuits</a></h4>
|
||||||
<p class="list-group-item-text text-muted">Communication links for Internet transit, peering, and other services</p>
|
<p class="list-group-item-text text-muted">Communication links for Internet transit, peering, and other services</p>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if perms.secrets %}
|
{% if perms.secrets %}
|
||||||
@ -134,6 +168,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 col-md-4">
|
<div class="col-sm-6 col-md-4">
|
||||||
|
{% if perms.extras.view_topologymap %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Global Topology Maps</strong>
|
<strong>Global Topology Maps</strong>
|
||||||
@ -153,7 +188,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if report_results %}
|
{% endif %}
|
||||||
|
{% if report_results and perms.extras.view_reportresult %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Reports</strong>
|
<strong>Reports</strong>
|
||||||
@ -168,6 +204,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if perms.extras.view_objectchange %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong>Changelog</strong>
|
<strong>Changelog</strong>
|
||||||
@ -206,6 +243,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user