mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
4c3b0abe7b
# Conflicts: # netbox/dcim/tables/template_code.py # netbox/netbox/views/__init__.py # netbox/project-static/css/base.css # netbox/templates/base.html # netbox/templates/circuits/circuit.html # netbox/templates/circuits/circuittermination_edit.html # netbox/templates/circuits/inc/circuit_termination.html # netbox/templates/circuits/provider.html # netbox/templates/dcim/device.html # netbox/templates/dcim/device/base.html # netbox/templates/dcim/device_component.html # netbox/templates/dcim/devicetype.html # netbox/templates/dcim/inc/device_napalm_tabs.html # netbox/templates/dcim/rack.html # netbox/templates/dcim/site.html # netbox/templates/dcim/virtualchassis.html # netbox/templates/extras/configcontext.html # netbox/templates/extras/object_journal.html # netbox/templates/extras/tag.html # netbox/templates/generic/object.html # netbox/templates/generic/object_list.html # netbox/templates/home.html # netbox/templates/inc/nav_menu.html # netbox/templates/ipam/aggregate.html # netbox/templates/ipam/ipaddress.html # netbox/templates/ipam/prefix.html # netbox/templates/ipam/vlan.html # netbox/templates/ipam/vlangroup_edit.html # netbox/templates/ipam/vlangroup_vlans.html # netbox/templates/secrets/secret.html # netbox/templates/tenancy/tenant.html # netbox/templates/users/api_tokens.html # netbox/templates/virtualization/cluster.html # netbox/templates/virtualization/vminterface_edit.html # netbox/utilities/forms/fields.py # netbox/utilities/templates/buttons/export.html
310 lines
13 KiB
HTML
310 lines
13 KiB
HTML
{% extends 'layout.html' %} {% load helpers %} {% block header %}
|
|
{{ block.super }} {% if new_release %} {# new_release is set only if the current user is a superuser or staff member #}
|
|
<div class="alert alert-info text-center" role="alert">
|
|
<i class="mdi mdi-information-outline"></i>
|
|
A new release is available:
|
|
<a href="{{ new_release.url }}">NetBox v{{ new_release.version }}</a> |
|
|
<a href="https://netbox.readthedocs.io/en/stable/installation/upgrading/"
|
|
>Upgrade instructions</a
|
|
>
|
|
</div>
|
|
{% endif %} {% endblock %} {%block title %} Home {% endblock %}
|
|
{% block content %} {% include 'search_form.html' %}
|
|
<div class="row">
|
|
<div class="col-sm-6 col-md-4">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Organization</strong>
|
|
</div>
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
{% if perms.dcim.view_site %}
|
|
<span class="badge pull-right">{{ stats.site_count }}</span>
|
|
<h4 class="list-group-item-heading"><a href="{% url 'dcim:site_list' %}">Sites</a></h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Sites</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">Discrete points of presence</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.dcim.view_location %}
|
|
<span class="badge pull-right">{{ stats.location_count }}</span>
|
|
<h4 class="list-group-item-heading"><a href="{% url 'dcim:location_list' %}">Locations</a></h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Locations</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">Locations within sites</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.tenancy.view_tenant %}
|
|
<span class="badge pull-right">{{ stats.tenant_count }}</span>
|
|
<h4 class="list-group-item-heading"><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Tenants</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">Customers or departments</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.ipam.view_prefix %}
|
|
<span class="badge pull-right">{{ stats.prefix_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'ipam:prefix_list' %}">Prefixes</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Prefixes</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
IPv4 and IPv6 network assignments
|
|
</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.ipam.view_ipaddress %}
|
|
<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>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">IP Addresses</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Individual IPv4 and IPv6 addresses
|
|
</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.ipam.view_vlan %}
|
|
<span class="badge pull-right">{{ stats.vlan_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'ipam:vlan_list' %}">VLANs</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">VLANs</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Layer two domains, identified by VLAN ID
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Circuits</strong>
|
|
</div>
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
{% if perms.circuits.view_provider %}
|
|
<span class="badge pull-right">{{ stats.provider_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'circuits:provider_list' %}">Providers</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Providers</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Organizations which provide circuit connectivity
|
|
</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.circuits.view_circuit %}
|
|
<span class="badge pull-right">{{ stats.circuit_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'circuits:circuit_list' %}">Circuits</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Circuits</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Communication links for Internet transit, peering, and other
|
|
services
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Virtualization</strong>
|
|
</div>
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
{% if perms.virtualization.view_cluster %}
|
|
<span class="badge pull-right">{{ stats.cluster_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'virtualization:cluster_list' %}">Clusters</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Clusters</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Clusters of physical hosts in which VMs reside
|
|
</p>
|
|
</div>
|
|
<div class="list-group-item">
|
|
{% if perms.virtualization.view_virtualmachine %}
|
|
<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>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Virtual Machines</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Virtual compute instances running inside clusters
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-md-4">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Secrets</strong>
|
|
</div>
|
|
<div class="list-group">
|
|
<div class="list-group-item">
|
|
{% if perms.secrets.view_secret %}
|
|
<span class="badge pull-right">{{ stats.secret_count }}</span>
|
|
<h4 class="list-group-item-heading">
|
|
<a href="{% url 'secrets:secret_list' %}">Secrets</a>
|
|
</h4>
|
|
{% else %}
|
|
<span class="badge pull-right"><i class="mdi mdi-lock"></i></span>
|
|
<h4 class="list-group-item-heading">Secrets</h4>
|
|
{% endif %}
|
|
<p class="list-group-item-text text-muted">
|
|
Cryptographically secured secret data
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Reports</strong>
|
|
</div>
|
|
{% if report_results and perms.extras.view_report %}
|
|
<table class="table table-hover panel-body">
|
|
{% for result in report_results %}
|
|
<tr>
|
|
<td>
|
|
<a href="{% url 'extras:report_result' job_result_pk=result.pk %}"
|
|
>{{ result.name }}</a
|
|
>
|
|
</td>
|
|
<td class="text-right">
|
|
<span title="{{ result.created }}"
|
|
>{% include 'extras/inc/job_label.html' %}</span
|
|
>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% elif perms.extras.view_report %}
|
|
<div class="panel-body text-muted">
|
|
None found
|
|
</div>
|
|
{% else %}
|
|
<div class="panel-body text-muted">
|
|
<i class="mdi mdi-lock"></i> No permission
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Change Log</strong>
|
|
</div>
|
|
{% if changelog and perms.extras.view_objectchange %}
|
|
<div class="list-group">
|
|
{% for change in changelog %} {% with
|
|
action=change.get_action_display|lower %}
|
|
<div class="list-group-item">
|
|
{% if action == 'created' %}
|
|
<span class="label label-success">Created</span>
|
|
{% elif action == 'updated' %}
|
|
<span class="label label-warning">Modified</span>
|
|
{% elif action == 'deleted' %}
|
|
<span class="label label-danger">Deleted</span>
|
|
{% endif %} {{ change.changed_object_type.name|bettertitle }} {% if
|
|
change.changed_object.get_absolute_url %}
|
|
<a href="{{ change.changed_object.get_absolute_url }}"
|
|
>{{ change.changed_object }}</a
|
|
>
|
|
{% else %} {{ change.changed_object|default:change.object_repr }} {%
|
|
endif %}
|
|
<br />
|
|
<small>
|
|
<span class="text-muted"
|
|
>{{ change.user|default:change.user_name }} -</span
|
|
>
|
|
<a href="{{ change.get_absolute_url }}" class="text-muted"
|
|
>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</a
|
|
>
|
|
</small>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<strong>Change Log</strong>
|
|
</div>
|
|
{% if changelog and perms.extras.view_objectchange %}
|
|
<div class="list-group">
|
|
{% for change in changelog %}
|
|
{% with action=change.get_action_display|lower %}
|
|
<div class="list-group-item">
|
|
<span class="label label-{{ change.get_action_class }}">{{ change.get_action_display }}</span>
|
|
{{ change.changed_object_type.name|bettertitle }}
|
|
{% if change.changed_object.get_absolute_url %}
|
|
<a href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
|
|
{% else %}
|
|
{{ change.changed_object|default:change.object_repr }}
|
|
{% endif %}
|
|
<br />
|
|
<small>
|
|
<span class="text-muted">{{ change.user|default:change.user_name }} -</span>
|
|
<a href="{{ change.get_absolute_url }}" class="text-muted">{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</a>
|
|
</small>
|
|
</div>
|
|
{% endwith %}
|
|
{% if forloop.last %}
|
|
<div class="list-group-item text-right">
|
|
<a href="{% url 'extras:objectchange_list' %}">View All Changes</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% elif perms.extras.view_objectchange %}
|
|
<div class="panel-body text-muted">
|
|
No change history found
|
|
</div>
|
|
{% else %}
|
|
<div class="panel-body text-muted">
|
|
<i class="mdi mdi-lock"></i> No permission
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %} {% endfor %}
|
|
</div>
|
|
{% elif perms.extras.view_objectchange %}
|
|
<div class="panel-body text-muted">
|
|
No change history found
|
|
</div>
|
|
{% else %}
|
|
<div class="panel-body text-muted">
|
|
<i class="mdi mdi-lock"></i> No permission
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|