2016-05-03 05:59:40 +00:00
|
|
|
{% extends "hosting/base_short.html" %}
|
|
|
|
{% load staticfiles bootstrap3 %}
|
|
|
|
{% block content %}
|
|
|
|
<div>
|
|
|
|
<div class="container dashboard-container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<table class="table borderless table-hover">
|
2016-07-19 02:24:44 +00:00
|
|
|
<h3><i class="fa fa-server" aria-hidden="true"></i>{% trans "Virtual Machines"%} </h3>
|
2016-05-03 05:59:40 +00:00
|
|
|
<br/>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2016-07-19 02:24:44 +00:00
|
|
|
<th>{% trans "ID"%}</th>
|
|
|
|
<th>{% trans "Location"%} </th>
|
|
|
|
<th>{% trans "Amount"%}</th>
|
|
|
|
<th>{% trans "Status"%}</th>
|
2016-05-03 05:59:40 +00:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for vm in vms %}
|
|
|
|
<tr>
|
2016-05-04 05:16:41 +00:00
|
|
|
<td scope="row">{{vm.name}}</td>
|
2016-05-27 05:51:10 +00:00
|
|
|
<td>{{vm.location}}</td>
|
2016-05-03 05:59:40 +00:00
|
|
|
<td>{{vm.price}} CHF</td>
|
2016-06-03 05:07:47 +00:00
|
|
|
<td>
|
|
|
|
|
|
|
|
{% if vm.status == 'pending' %}
|
|
|
|
<span class="h3 label label-warning"><strong>{{vm.get_status_display}}</strong></span>
|
|
|
|
{% elif vm.status == 'online' %}
|
|
|
|
<span class="h3 label label-success"><strong>{{vm.get_status_display}}</strong></span>
|
|
|
|
{% else %}
|
2016-06-10 04:50:49 +00:00
|
|
|
<span class="h3 label label-danger"><strong>{{vm.get_status_display}}</strong></span>
|
2016-06-03 05:07:47 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</td>
|
2016-05-03 05:59:40 +00:00
|
|
|
<td>
|
2016-07-19 02:24:44 +00:00
|
|
|
<button type="button" class="btn btn-default"><a href="{% url 'hosting:virtual_machines' vm.id %}">{% trans "View Detail"%}</a></button>
|
2016-05-03 05:59:40 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{% if is_paginated %}
|
|
|
|
<div class="pagination">
|
|
|
|
<span class="page-links">
|
|
|
|
{% if page_obj.has_previous %}
|
2016-07-19 02:24:44 +00:00
|
|
|
<a href="{{request.path}}?page={{ page_obj.previous_page_number }}">{% trans "previous"%}</a>
|
2016-05-03 05:59:40 +00:00
|
|
|
{% endif %}
|
|
|
|
<span class="page-current">
|
|
|
|
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
|
|
|
|
</span>
|
|
|
|
{% if page_obj.has_next %}
|
2016-07-19 02:24:44 +00:00
|
|
|
<a href="{{request.path}}?page={{ page_obj.next_page_number }}">{% trans "next"%}</a>
|
2016-05-03 05:59:40 +00:00
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{%endblock%}
|