/
component-progress.html
44 lines (36 loc) · 1.4 KB
/
component-progress.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load permissions %}
{% block breadcrumbs %}
{% path_object_breadcrumbs object %}
<li><a href="{% url 'component_progress' path=object.get_url_path %}">{% trans "Progress" %}</a></li>
{% endblock %}
{% block content %}
{% perm 'component.edit' object as user_can_edit_component %}
<div class="panel panel-default" data-progress-url="{% url 'api:task-detail' pk=object.background_task %}">
<div class="panel-heading">{% trans "Component is being updated…" %}</div>
<div class="panel-body">
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ progress }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ progress }}%;"></div>
</div>
<pre class="update-log">
{{ log }}
</pre>
</div>
<div class="panel-footer">
<form class="form-inline">
<div class="form-group">
<a href="{% url return_url path=object.get_url_path %}" class="btn btn-primary" id="progress-return">{% trans "Return to the component" %}</a>
{% if user_can_edit_component %}
<a href="#" class="btn btn-danger" id="terminate-task-button">{% trans "Abort the update" %}</a>
{% endif %}
</div>
<div class="form-group">
<input type="checkbox" id="progress-redirect" checked="checked">
<label for="progress-redirect">{% trans "Return to the component after completion" %}</label>
</div>
</form>
</div>
</div>
{% endblock %}