Added status field to a booked VM. Added the capability to change a booked VM status from the admin panel. Send email to user after his VM is approved
This commit is contained in:
parent
5da39e8ed3
commit
c33c4f4148
14 changed files with 177 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
|
|
|||
13
hosting/templates/emails/vm_activated.html
Normal file
13
hosting/templates/emails/vm_activated.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
{% load staticfiles bootstrap3%}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
You virtual machine {{vm.name}} has been activated. You can manage your vm on this <a href="{{request.HOS}}{% url 'hosting:virtual_machines' vm.id %}"> link </a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
15
hosting/templates/emails/vm_activated.txt
Normal file
15
hosting/templates/emails/vm_activated.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
{% load staticfiles bootstrap3%}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
You virtual machine {{vm.name}} has been activated. You can manage your vm in this <a href="{% url 'hosting:virtual_machines' vm.id %}"> link </a>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -122,12 +122,16 @@
|
|||
</div><!--/row-->
|
||||
</div>
|
||||
<div class="tab-pane" id="status-v">
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12 inline-headers">
|
||||
<h3>Current status</h3>
|
||||
<span class="h3 pull-right label label-success"><strong>Online</strong></span>
|
||||
<hr>
|
||||
{% if virtual_machine.status == 'pending' %}
|
||||
<span class="h3 pull-right label label-warning"><strong>{{virtual_machine.get_status_display}}</strong></span>
|
||||
{% elif virtual_machine.status == 'online' %}
|
||||
<span class="h3 pull-right label label-success"><strong>{{virtual_machine.get_status_display}}</strong></span>
|
||||
{% else %}
|
||||
<span class="h3 pull-right label label-error"><strong>{{virtual_machine.get_status_display}}</strong></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Type</th>
|
||||
<th>Location</th>
|
||||
<th>Amount</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
{% for vm in vms %}
|
||||
<tr>
|
||||
<td scope="row">{{vm.name}}</td>
|
||||
<td>{{vm.hosting_company_name}}</td>
|
||||
<td>{{vm.location}}</td>
|
||||
<td>{{vm.price}} CHF</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-default"><a href="{% url 'hosting:virtual_machines' vm.id %}">View Detail</a></button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue