mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Instances overhaul
This commit is contained in:
parent
f23e6b000f
commit
47009d47ca
69 changed files with 5011 additions and 4127 deletions
|
|
@ -23,7 +23,7 @@
|
|||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="NewDisk">
|
||||
<form method="post" role="form" aria-label="Add new volume to disk form">{% csrf_token %}
|
||||
<form action="{% url 'instances:add_new_vol' instance.id %}" method="post" role="form" aria-label="Add new volume to disk form">{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<p class="font-weight-bold">{% trans "Volume parameters" %}</p>
|
||||
<div class="form-group row">
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<label class="col-sm-3 col-form-label">{% trans "Format" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select name="format" class="custom-select image-format">
|
||||
{% for format in formats %}
|
||||
{% for format in instance.formats %}
|
||||
<option value="{{ format }}" {% if format == default_format %}selected{% endif %}>{% trans format %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
<label class="col-sm-3 col-form-label">{% trans "Cache" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select name="cache" class="custom-select image-format">
|
||||
{% for mode, name in cache_modes %}
|
||||
{% for mode, name in instance.cache_modes %}
|
||||
<option value="{{ mode }}" {% if mode == default_cache %}selected{% endif %}>{% trans name %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
</div> <!-- /.modal-body -->
|
||||
<div class="tab-pane" id="ExistingDisk">
|
||||
<form method="post" role="form" aria-label="Add existing volume to instance form">{% csrf_token %}
|
||||
<form action="{% url 'instances:add_existing_vol' instance.id %}" method="post" role="form" aria-label="Add existing volume to instance form">{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<p class="font-weight-bold">{% trans "Volume parameters" %}</p>
|
||||
<div class="form-group row">
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<button id="select_storage" class="btn btn-secondary dropdown-toggle form-control" type="button" data-toggle="dropdown">{% trans 'Select Pool' %}...</button>
|
||||
<div class="dropdown-menu">
|
||||
{% for storage in storages_host %}
|
||||
<a class="dropdown-item" href="#" onclick="get_volumes({{ compute_id }}, '{{ storage }}')">{{ storage }}</a>
|
||||
<a class="dropdown-item" href="#" onclick="get_volumes({{ instance.compute.id }}, '{{ storage }}')">{{ storage }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input id="selected_storage" name="selected_storage" hidden/>
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
<label class="col-sm-3 col-form-label">{% trans "Cache" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select name="cache" class="custom-select image-format">
|
||||
{% for mode, name in cache_modes %}
|
||||
{% for mode, name in instance.cache_modes %}
|
||||
<option value="{{ mode }}" {% if mode == default_cache %}selected{% endif %}>{% trans name %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
|
||||
<button type="submit" class="btn btn-success" name="add_existing_vol">{% trans "Add Volume" %}</button>
|
||||
<button type="submit" class="btn btn-success">{% trans "Add Volume" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue