mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Closes #7208: Add navigation breadcrumbs for custom scripts & reports
This commit is contained in:
parent
e738ff2fa7
commit
de58f53f9f
@ -7,6 +7,7 @@
|
||||
* [#6387](https://github.com/netbox-community/netbox/issues/6387) - Add xDSL interface type
|
||||
* [#6988](https://github.com/netbox-community/netbox/issues/6988) - Order tenants alphabetically without regard to group assignment
|
||||
* [#7032](https://github.com/netbox-community/netbox/issues/7032) - Add URM port types
|
||||
* [#7208](https://github.com/netbox-community/netbox/issues/7208) - Add navigation breadcrumbs for custom scripts & reports
|
||||
* [#7239](https://github.com/netbox-community/netbox/issues/7239) - Redirect global search to filtered object list when an object type is selected
|
||||
|
||||
### Bug Fixes
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends 'base/layout.html' %}
|
||||
{% extends 'generic/object.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ report.name }}{% endblock %}
|
||||
@ -8,12 +8,20 @@
|
||||
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if report.description %}
|
||||
<p class="text-muted">{{ report.description|render_markdown }}</p>
|
||||
{% endif %}
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="float-end noprint">
|
||||
{% block subtitle %}
|
||||
{% if report.description %}
|
||||
<div class="object-subtitle">
|
||||
<div class="text-muted">{{ report.description|render_markdown }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block controls %}{% endblock %}
|
||||
{% block tabs %}{% endblock %}
|
||||
|
||||
{% block content-wrapper %}
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="px-3 float-end noprint">
|
||||
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="_run" class="btn btn-primary">
|
||||
@ -24,9 +32,9 @@
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row px-3">
|
||||
<div class="col col-md-12">
|
||||
{% if report.result %}
|
||||
Last run: <a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">
|
||||
@ -34,5 +42,5 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -2,15 +2,13 @@
|
||||
{% load helpers %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ report.name }} <span id="pending-result-label">{% include 'extras/inc/job_label.html' with result=result %}</span>{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<script src="{% static 'jobs.js' %}?v{{ settings.VERSION }}"
|
||||
onerror="window.location='{% url 'media_failure' %}?filename=jobs.js'"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% block content-wrapper %}
|
||||
<div class="row px-3">
|
||||
<div class="col col-md-12">
|
||||
<p>
|
||||
Run: <strong>{{ result.created|annotated_date }}</strong>
|
||||
@ -21,7 +19,7 @@
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<span id="pending-result-label">{% include 'extras/inc/job_label.html' with result=result %}</span>
|
||||
</p>
|
||||
{% if result.completed %}
|
||||
<div class="card">
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends 'base/layout.html' %}
|
||||
{% extends 'generic/object.html' %}
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
{% load log_levels %}
|
||||
@ -16,6 +16,8 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block controls %}{% endblock %}
|
||||
|
||||
{% block tabs %}
|
||||
<ul class="nav nav-tabs px-3">
|
||||
<li class="nav-item" role="presentation">
|
||||
|
Loading…
Reference in New Issue
Block a user