abort running task
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<th name="deploy">
|
||||
<button class="btn btn-primary" type="button" disabled>
|
||||
<span class="spinner-border spinner-border-sm" aria-hidden="true"></span>
|
||||
<span role="status">Deploy</span>
|
||||
<span role="status">Deploying...</span>
|
||||
</button>
|
||||
</th>
|
||||
{% else %}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
{% block title %} Deployment details: {{ deployment.name }} {% endblock %}
|
||||
|
||||
{% if deployment.status == "RUNNING" %}
|
||||
|
||||
{% block bodyattr %}
|
||||
{% if deployment.status == "RUNNING" %}
|
||||
onload="start('{{ url|safe }}');"
|
||||
@@ -19,7 +18,6 @@
|
||||
<script src="{% static 'django_eventstream/reconnecting-eventsource.js' %}"></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
@@ -66,13 +64,21 @@
|
||||
<label for="updated-at">Error</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="button" onclick="goBack()" class="btn btn-secondary">Back</button>
|
||||
{% if deployment.status != "RUNNING" %}
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if deployment.status != "RUNNING" and deployment.status != "PENDING" %}
|
||||
<form id="delete-deployment" action="" method="post">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% else %}
|
||||
<form id="abort-deployment" action="{% url 'deployment-abort' deployment.id %}" method="post">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endif %}
|
||||
<button type="button" onclick="goBack()" class="btn btn-secondary">Back</button>
|
||||
{% if deployment.status != "RUNNING" and deployment.status != "PENDING" %}
|
||||
<button form="delete-deployment" type="submit" class="btn btn-danger">Delete</button>
|
||||
{% else %}
|
||||
<button form="abort-deployment" type="submit" class="btn btn-danger">Abort</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h4 style="text-align: center;">Please log in !</h4>
|
||||
{% endif %}
|
||||
@@ -88,7 +94,7 @@
|
||||
{% endif %}
|
||||
<script>
|
||||
function goBack() {
|
||||
window.location=document.referrer;
|
||||
window.location={% url 'deployment' %};
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user