refine create and details deployment ui
This commit is contained in:
@@ -3,30 +3,49 @@
|
||||
{% block title %} Deployment details: {{ deployment.name }} {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>name</th>
|
||||
<th>type</th>
|
||||
<th>status</th>
|
||||
</tr>
|
||||
<tr id="{{ deployment.id }}">
|
||||
<th name="id">{{ deployment.id }}</th>
|
||||
<th name="name">{{ deployment.name }}</th>
|
||||
<th name="type">{{ deployment.type }}</th>
|
||||
<th name="status">{{ deployment.status }}</th>
|
||||
</tr>
|
||||
</table>
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="delete">
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-lg-8 col-md-8 col-sm-6">
|
||||
<h4 style="text-align: center;">Please log in !</h4>
|
||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||
{% if user.is_authenticated %}
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" readonly class="form-control-plaintext" id="id" value="{{ deployment.id }}">
|
||||
<label for="id">UUID</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" readonly class="form-control-plaintext" id="type" value="{{ deployment.type }}">
|
||||
<label for="type">Type</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" readonly class="form-control-plaintext" id="status" value="{{ deployment.status }}">
|
||||
<label for="status">Status</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" readonly class="form-control-plaintext" id="created_at" value="{{ deployment.created_at }}">
|
||||
<label for="created-at">Created at</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" readonly class="form-control-plaintext" id="updated_at" value="{{ deployment.updated_at }}">
|
||||
<label for="updated-at">{{ deployment.updated_at }}</label>
|
||||
</div>
|
||||
<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>
|
||||
{% else %}
|
||||
<h4 style="text-align: center;">Please log in !</h4>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user