2021-05-17 22:27:27 +02:00
|
|
|
{% extends 'base/layout.html' %}
|
2021-04-26 09:31:51 +02:00
|
|
|
{% load helpers %}
|
2021-07-19 22:46:12 +02:00
|
|
|
{% load render_table from django_tables2 %}
|
2021-05-01 00:55:37 +02:00
|
|
|
|
2021-07-15 02:55:01 +02:00
|
|
|
{% block header %}
|
|
|
|
{% if new_release %}
|
|
|
|
{# new_release is set only if the current user is a superuser or staff member #}
|
|
|
|
<div class="header-alert-container">
|
|
|
|
<div class="alert alert-info text-center mw-md-50" role="alert">
|
|
|
|
<h6 class="alert-heading">
|
|
|
|
<i class="mdi mdi-information-outline"></i><br/>New Release Available
|
|
|
|
</h6>
|
|
|
|
<small><a href="{{ new_release.url }}">NetBox v{{ new_release.version }}</a> is available.</small>
|
|
|
|
<hr class="my-2" />
|
|
|
|
<small class="mb-0">
|
2022-04-25 15:48:39 +02:00
|
|
|
<a href="https://docs.netbox.dev/en/stable/installation/upgrading/">Upgrade Instructions</a>
|
2021-07-15 02:55:01 +02:00
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2021-05-07 21:05:56 +02:00
|
|
|
{% block title %}Home{% endblock %}
|
2021-05-01 00:55:37 +02:00
|
|
|
|
2021-07-22 14:14:17 +02:00
|
|
|
{% block content-wrapper %}
|
2021-12-22 21:32:35 +01:00
|
|
|
<div class="px-3">
|
2021-07-22 14:14:17 +02:00
|
|
|
{# General stats #}
|
|
|
|
<div class="row masonry">
|
|
|
|
{% for section, items, icon in stats %}
|
|
|
|
<div class="col col-sm-12 col-lg-6 col-xl-4 my-2 masonry-item">
|
|
|
|
<div class="card">
|
2021-10-05 20:03:14 +02:00
|
|
|
<h6 class="card-header text-center">
|
2021-07-22 14:14:17 +02:00
|
|
|
<i class="mdi mdi-{{ icon }}"></i>
|
|
|
|
<span class="ms-1">{{ section }}</span>
|
|
|
|
</h6>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="list-group list-group-flush">
|
|
|
|
{% for item in items %}
|
|
|
|
{% if not item.disabled %}
|
|
|
|
<a href="{% url item.url %}" class="list-group-item list-group-item-action">
|
|
|
|
<div class="d-flex w-100 justify-content-between align-items-center">
|
|
|
|
{{ item.label }}
|
|
|
|
<h4 class="mb-1">{{ item.count }}</h4>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<li class="list-group-item list-group-item-action disabled">
|
|
|
|
<div class="d-flex w-100 justify-content-between align-items-center">
|
|
|
|
{{ item.label }}
|
|
|
|
<h4 class="mb-1">
|
|
|
|
<i title="No permission" class="mdi mdi-lock"></i>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-05-17 22:27:27 +02:00
|
|
|
</div>
|
2021-04-26 05:10:41 +02:00
|
|
|
</div>
|
2019-04-19 20:16:55 +02:00
|
|
|
</div>
|
2021-07-22 14:14:17 +02:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-04-26 05:10:41 +02:00
|
|
|
|
2021-07-22 14:14:17 +02:00
|
|
|
{# Changelog #}
|
|
|
|
{% if perms.extras.view_objectchange %}
|
|
|
|
<div class="row my-4 flex-grow-1 changelog-container">
|
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
2021-10-05 20:03:14 +02:00
|
|
|
<h6 class="card-header text-center">
|
2021-07-22 14:14:17 +02:00
|
|
|
<i class="mdi mdi-clipboard-clock"></i>
|
|
|
|
<span class="ms-1">Change Log</span>
|
|
|
|
</h6>
|
2021-09-15 18:41:21 +02:00
|
|
|
<div class="card-body table-responsive">
|
|
|
|
{% render_table changelog_table 'inc/table.html' %}
|
2021-07-22 14:14:17 +02:00
|
|
|
</div>
|
2021-07-19 22:46:12 +02:00
|
|
|
</div>
|
2021-05-17 22:27:27 +02:00
|
|
|
</div>
|
2021-07-19 22:46:12 +02:00
|
|
|
</div>
|
2021-07-22 14:14:17 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock content-wrapper %}
|