2021-05-17 16:27:27 -04:00
|
|
|
{% extends 'base/layout.html' %}
|
2021-04-26 00:31:51 -07:00
|
|
|
{% load helpers %}
|
2021-07-19 16:46:12 -04:00
|
|
|
{% load render_table from django_tables2 %}
|
2023-07-29 03:30:25 +07:00
|
|
|
{% load i18n %}
|
2021-04-30 15:55:37 -07:00
|
|
|
|
2021-07-14 17:55:01 -07:00
|
|
|
{% block header %}
|
2024-01-17 16:25:42 -05:00
|
|
|
{{ block.super }}
|
2023-02-24 16:04:00 -05:00
|
|
|
{% if new_release %}
|
2024-01-17 16:25:42 -05:00
|
|
|
<div class="alert alert-info bg-info-subtle mx-3" role="alert">
|
|
|
|
<div class="d-flex">
|
|
|
|
<div>
|
|
|
|
<i class="mdi mdi-information-outline p-2"></i>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h4 class="alert-title">{% trans "New Release Available" %}</h4>
|
|
|
|
<a href="{{ new_release.url }}">NetBox v{{ new_release.version }}</a> {% trans "is available" %}.
|
|
|
|
<a href="https://docs.netbox.dev/en/stable/installation/upgrading/" target="_blank">
|
|
|
|
{% trans "Upgrade Instructions" context "Document title" %}
|
|
|
|
<i class="mdi mdi-open-in-new"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
2023-02-24 16:04:00 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-07-14 17:55:01 -07:00
|
|
|
{% endblock %}
|
|
|
|
|
2023-07-29 03:30:25 +07:00
|
|
|
{% block title %}{% trans "Home" %}{% endblock %}
|
2021-04-30 15:55:37 -07:00
|
|
|
|
2024-01-17 16:25:42 -05:00
|
|
|
{% block page %}
|
2023-02-24 16:04:00 -05:00
|
|
|
{# Render the user's customized dashboard #}
|
2024-01-17 16:25:42 -05:00
|
|
|
<div class="grid-stack m-2" id="dashboard">
|
2023-02-24 16:04:00 -05:00
|
|
|
{% for widget in dashboard %}
|
|
|
|
{% include 'extras/dashboard/widget.html' %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-04-05 09:59:22 -04:00
|
|
|
<div class="collapse multi-collapse show">
|
|
|
|
<div class="d-flex px-3">
|
|
|
|
<div class="flex-grow-1">
|
2024-01-17 16:25:42 -05:00
|
|
|
<button type="button" id="unlock_dashboard" class="btn btn-light" data-bs-toggle="collapse" data-bs-target=".multi-collapse">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-lock-open-outline"></i> {% trans "Unlock Dashboard" %}
|
2023-04-05 09:59:22 -04:00
|
|
|
</button>
|
|
|
|
</div>
|
2023-03-30 12:46:06 -04:00
|
|
|
</div>
|
2023-04-05 09:59:22 -04:00
|
|
|
</div>
|
|
|
|
<div class="collapse multi-collapse">
|
|
|
|
<div class="d-flex px-3">
|
|
|
|
<div class="flex-grow-1">
|
2024-01-17 16:25:42 -05:00
|
|
|
<button type="button" id="lock_dashboard" class="btn btn-light" data-bs-toggle="collapse" data-bs-target=".multi-collapse">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-lock-outline"></i> {% trans "Lock Dashboard" %}
|
2023-04-05 09:59:22 -04:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<a href="#"
|
|
|
|
hx-get="{% url 'extras:dashboardwidget_add' %}"
|
|
|
|
hx-target="#htmx-modal-content"
|
|
|
|
data-bs-toggle="modal"
|
|
|
|
data-bs-target="#htmx-modal"
|
2024-01-17 16:25:42 -05:00
|
|
|
class="btn btn-success"
|
2023-04-05 09:59:22 -04:00
|
|
|
>
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-plus"></i> {% trans "Add Widget" %}
|
2023-04-05 09:59:22 -04:00
|
|
|
</a>
|
2024-01-17 16:25:42 -05:00
|
|
|
<button id="save_dashboard" class="btn btn-primary" data-url="{% url 'extras-api:dashboard' %}">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-content-save-outline"></i> {% trans "Save Layout" %}
|
2023-04-05 09:59:22 -04:00
|
|
|
</button>
|
2024-01-17 16:25:42 -05:00
|
|
|
<a href="{% url 'extras:dashboard_reset' %}" class="btn btn-danger">
|
2023-07-29 03:30:25 +07:00
|
|
|
<i class="mdi mdi-backspace"></i> {% trans "Reset Dashboard" %}
|
2023-04-05 09:59:22 -04:00
|
|
|
</a>
|
|
|
|
</div>
|
2023-03-30 12:46:06 -04:00
|
|
|
</div>
|
2021-07-22 08:14:17 -04:00
|
|
|
</div>
|
2024-01-17 16:25:42 -05:00
|
|
|
{% endblock page %}
|
2023-02-24 16:04:00 -05:00
|
|
|
|
|
|
|
{% block modals %}
|
|
|
|
{% include 'inc/htmx_modal.html' %}
|
|
|
|
{% endblock modals %}
|