1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 20:14:15 +00:00
webvirtcloud/instances/templates/create_inst_block.html

60 lines
3.5 KiB
HTML
Raw Normal View History

2015-03-06 13:06:29 +00:00
{% load i18n %}
<a href="#AddInstance" type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal">
2020-07-13 09:33:09 +00:00
<span class="fa fa-plus" aria-hidden="true"></span>
</a>
2015-03-06 13:06:29 +00:00
2020-07-13 09:33:09 +00:00
<!-- Modal pool -->
<div class="modal fade" id="AddInstance" tabindex="-1" role="dialog" aria-labelledby="AddInstanceModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg">
2020-07-13 09:33:09 +00:00
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans "Choose a compute for new instance" %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
2020-07-13 09:33:09 +00:00
</div>
<div class="modal-body">
<form method="post" aria-label="Select compute for instance create form">
{% csrf_token %}
<div class="row">
<table class="table table-hover">
<thead>
<tr style="cursor:default;pointer-events:none">
<th>{% trans "Name" %}</th>
<th>{% trans "VCPU" %}
<th>{% trans "Cpu Usage" %}</th>
<th>{% trans "Memory" %}</th>
<th>{% trans "Mem Usage" %}</th>
</tr>
</thead>
<tbody>
2020-07-13 09:33:09 +00:00
{% for compute in computes %}
{% if compute.status is True %}
<tr style="cursor:pointer" onclick="goto_compute('{{ compute.id }}')">
<td>{{ compute.name }}</td>
<td>{{ compute.cpu_count }}</td>
<td>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: {{ compute.cpu_usage }}%"
aria-valuenow="{{ compute.cpu_usage }}" aria-valuemin="0" aria-valuemax="100">{{ compute.cpu_usage }}%
</div>
</div>
</td>
<td>{{ compute.ram_size|filesizeformat }}</td>
<td>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: {{ compute.ram_usage }}%"
aria-valuenow="{{ compute.ram_usage }}" aria-valuemin="0" aria-valuemax="100">{{ compute.ram_usage }}%
</div>
</div>
</td>
</tr>
{% endif %}
2020-07-13 09:33:09 +00:00
{% endfor %}
</tbody>
</table>
2020-07-13 09:33:09 +00:00
</div>
</form>
2020-07-13 09:33:09 +00:00
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->