2015-03-06 13:06:29 +00:00
|
|
|
{% load i18n %}
|
2021-07-07 11:12:38 +00:00
|
|
|
<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="AddNetPoolLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title">{% trans "Choose a compute for new instance" %}</h5>
|
2021-07-07 11:12:38 +00:00
|
|
|
<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 %}
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row">
|
2020-07-13 09:33:09 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Compute" %}</label>
|
|
|
|
<div class="col-sm-6">
|
2021-07-07 11:12:38 +00:00
|
|
|
<select class="form-select" id="compute_select">
|
2020-07-13 09:33:09 +00:00
|
|
|
<option>{% trans "Please select" %}</option>
|
|
|
|
{% for compute in computes %}
|
|
|
|
<option {% if compute.status is not True %} class="font-italic text-muted" {% else %} value="{{ compute.id }}" {% endif %}>{{ compute.name }}</option>
|
|
|
|
{% empty %}
|
|
|
|
<option value="None">{% trans "None" %}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2015-03-06 13:06:29 +00:00
|
|
|
</div>
|
2020-07-13 09:33:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2021-07-07 11:12:38 +00:00
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
2020-07-13 09:33:09 +00:00
|
|
|
{% trans "Close" %}
|
|
|
|
</button>
|
|
|
|
{% if computes %}
|
|
|
|
<button type="submit" class="btn btn-primary" name="choose" onclick='goto_compute()'>
|
|
|
|
{% trans "Choose" %}
|
2015-03-06 13:06:29 +00:00
|
|
|
</button>
|
2020-07-13 09:33:09 +00:00
|
|
|
{% else %}
|
|
|
|
<button class="btn btn-primary disabled">
|
|
|
|
{% trans "Choose" %}
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div> <!-- /.modal-content -->
|
|
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
</div> <!-- /.modal -->
|