1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add scheduling for reports and scripts

This commit is contained in:
kkthxbye-code
2022-09-18 15:06:28 +02:00
parent 41d653738a
commit 824b4e0923
7 changed files with 63 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
{% extends 'generic/object.html' %}
{% load helpers %}
{% load form_helpers %}
{% block title %}{{ report.name }}{% endblock %}
@@ -33,18 +34,24 @@
{% block content %}
<div role="tabpanel" class="tab-pane active" id="report">
{% if perms.extras.run_report %}
<div class="float-end noprint">
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
<div class="row">
<div class="col">
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post" class="form-object-edit">
{% csrf_token %}
<button type="submit" name="_run" class="btn btn-primary">
{% if report.result %}
<i class="mdi mdi-replay"></i> Run Again
{% else %}
<i class="mdi mdi-play"></i> Run Report
{% endif %}
</button>
{% render_form form %}
<div class="float-end">
<button type="submit" name="_run" class="btn btn-primary">
{% if report.result %}
<i class="mdi mdi-replay"></i> Run Again
{% else %}
<i class="mdi mdi-play"></i> Run Report
{% endif %}
</button>
</div>
</form>
</div>
</div>
{% endif %}
<div class="row">
<div class="col col-md-12">

View File

@@ -43,7 +43,7 @@
You do not have permission to run scripts.
</div>
{% endif %}
<form action="" method="post" enctype="multipart/form-data" class="form form-horizontal">
<form action="" method="post" enctype="multipart/form-data" class="form form-object-edit">
{% csrf_token %}
<div class="field-group my-4">
{% if form.requires_input %}