1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-26 16:15:25 +00:00
webvirtcloud/instances/templates/edit_instance_volume.html

132 lines
8.4 KiB
HTML
Raw Normal View History

2020-01-08 05:53:50 +00:00
{% load i18n %}
{% if request.user.is_superuser %}
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-toggle="modal" title="{% trans "Edit Volume" %}">
2020-05-19 16:53:54 +00:00
<i class="fa fa-edit" aria-hidden="true"></i>
</button>
2020-01-08 05:53:50 +00:00
<!-- Modal pool -->
<div class="modal fade" id="editvol{{ id }}" tabindex="-1" role="dialog" aria-labelledby="editInstanceVolumeLabel{{ id }}" aria-hidden="true">
2020-01-08 05:53:50 +00:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2020-05-19 16:53:54 +00:00
<h5 class="modal-title">{% trans "Edit Instance Volume" %}</h5>
2020-01-08 05:53:50 +00:00
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
2020-01-08 05:53:50 +00:00
<div class="modal-body">
2020-05-26 13:18:38 +00:00
<ul class="nav nav-tabs mb-3" role="tablist" aria-label="Disk options">
<li class="nav-item" role="presentation">
2020-05-19 16:53:54 +00:00
<a class="nav-link active" href="#VirtualDisk{{ id }}" data-toggle="tab">{% trans 'Virtual Disk' %}</a>
</li>
<li class="nav-item" role="presentation">
2020-05-19 16:53:54 +00:00
<a class="nav-link" href="#PerformanceVolume{{ id }}" data-toggle="tab">{% trans 'Performance' %}</a>
</li>
<li class="nav-item" role="presentation">
2020-05-19 16:53:54 +00:00
<a class="nav-link" href="#AdvancedVolume{{ id }}" data-toggle="tab">{% trans 'Advanced' %}</a>
</li>
</ul>
2020-05-19 16:53:54 +00:00
<div class="tab-content">
<div class="tab-pane active" role="tabpanel" id="VirtualDisk{{ id }}">
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Volume Path' %}</label>
<div class="col-sm-8">
<input class="form-control" name="vol_path" value="{{ disk.path }}"/>
2020-01-08 05:53:50 +00:00
</div>
2020-05-19 16:53:54 +00:00
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Readonly' %}</label>
<div class="form-check">
<input class="form-check-input position-static" type="checkbox" name="vol_readonly" value="True" {% if disk.readonly %}checked{% endif %}/>
2020-01-08 05:53:50 +00:00
</div>
2020-05-19 16:53:54 +00:00
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Shareable' %}</label>
<div class="form-check">
<input class="form-check-input position-static" type="checkbox" name="vol_shareable" value="True" {% if disk.shareable %}checked{% endif %}/>
</div>
</div>
2020-05-19 16:53:54 +00:00
</div>
<div class="tab-pane" role="tabpanel" id="AdvancedVolume{{ id }}">
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Bus' %}</label>
<div class="col-sm-8">
2020-07-13 09:33:09 +00:00
<select class="custom-select" name="vol_bus" {% if instance.status != 5 %} disabled {% endif %}>
2020-05-19 16:53:54 +00:00
{% for bus in bus_host %}
<option value="{{ bus }}" {% if bus == disk.bus %}selected{% endif %}>{{ bus }}</option>
{% endfor %}
</select>
2020-01-08 05:53:50 +00:00
</div>
2020-05-19 16:53:54 +00:00
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Serial Number' %}</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="vol_serial" value="{{ disk.serial }}"/>
2020-01-08 05:53:50 +00:00
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Storage Format' %}</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="vol_format" value="{{ disk.format }}"/>
2020-01-08 05:53:50 +00:00
</div>
</div>
</div>
<div class="tab-pane" role="tabpanel" id="PerformanceVolume{{ id }}">
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Cache mode' %}</label>
<div class="col-sm-8">
2020-05-19 16:53:54 +00:00
<select class="custom-select" name="vol_cache">
2020-07-13 09:33:09 +00:00
{% for key, val in instance.cache_modes %}
<option value="{{ key }}" {% if key == disk.cache %}selected{% endif %}>{{ val }}</option>
{% endfor %}
2020-01-08 05:53:50 +00:00
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'IO mode' %}</label>
<div class="col-sm-8">
2020-05-19 16:53:54 +00:00
<select class="custom-select" name="vol_io_mode">
2020-07-13 09:33:09 +00:00
{% for key, val in instance.io_modes %}
<option value="{{ key }}" {% if key == disk.io %}selected{% endif %}>{{ val }}</option>
{% endfor %}
</select>
2020-01-08 05:53:50 +00:00
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Discard mode' %}</label>
<div class="col-sm-8">
2020-05-19 16:53:54 +00:00
<select class="custom-select" name="vol_discard_mode">
2020-07-13 09:33:09 +00:00
{% for key, val in instance.discard_modes %}
<option value="{{ key }}" {% if key == disk.discard %}selected{% endif %}>{{ val }}</option>
{% endfor %}
</select>
2020-01-08 05:53:50 +00:00
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Detect zeroes' %}</label>
<div class="col-sm-8">
2020-05-19 16:53:54 +00:00
<select class="custom-select" name="vol_detect_zeroes">
2020-07-13 09:33:09 +00:00
{% for key, val in instance.detect_zeroes_modes %}
<option value="{{ key }}" {% if key == disk.detect_zeroes %}selected{% endif %}>{{ val }}</option>
{% endfor %}
</select>
</div>
2020-01-08 05:53:50 +00:00
</div>
2020-05-19 16:53:54 +00:00
<input class="form-control" name="vol_bus_old" value="{{ disk.bus }}" hidden/>
</div><!-- /.tabpane-content -->
</div><!-- /.tab-content -->
2020-01-08 05:53:50 +00:00
</div> <!-- /.modal-body -->
<div class="clearfix"></div>
<div class="modal-footer">
2020-05-19 16:53:54 +00:00
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-success" name="edit_volume">{% trans "Save" %}</button>
</div><!-- /.modal-footer -->
2020-01-08 05:53:50 +00:00
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
2020-01-08 05:53:50 +00:00
</div> <!-- /.modal -->
{% endif %}