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

132 lines
8.2 KiB
HTML
Raw Normal View History

2020-01-08 05:53:50 +00:00
{% load i18n %}
{% if request.user.is_superuser %}
2020-05-19 16:53:54 +00:00
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-toggle="modal" title="Edit Volume">
<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-19 16:53:54 +00:00
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="#VirtualDisk{{ id }}" data-toggle="tab">{% trans 'Virtual Disk' %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#PerformanceVolume{{ id }}" data-toggle="tab">{% trans 'Performance' %}</a>
</li>
<li class="nav-item">
<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" id="VirtualDisk{{ id }}">
<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="col-sm-8">
<input class="form-control-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="col-sm-8">
<input class="form-control-static" type="checkbox" name="vol_shareable" value="True" {% if disk.shareable %}checked{% endif %}/>
</div>
</div>
2020-05-19 16:53:54 +00:00
</div>
2020-05-19 16:53:54 +00:00
<div class="tab-pane" id="AdvancedVolume{{ id }}">
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans 'Bus' %}</label>
<div class="col-sm-8">
<select class="custom-select" name="vol_bus" {% if status != 5 %} disabled {% endif %}>
{% 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" 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">
{% for key, val in 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">
{% for key, val in 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">
{% for key, val in 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">
{% for key, val in 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 %}