mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 23:55:24 +00:00
127 lines
8 KiB
HTML
127 lines
8 KiB
HTML
{% load i18n %}
|
|
{% if request.user.is_superuser %}
|
|
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-default" data-toggle="modal" title="Edit Volume">
|
|
<i class="glyphicon glyphicon-edit" aria-hidden="true"></i>
|
|
</button>
|
|
|
|
<!-- Modal pool -->
|
|
<div class="modal fade" id="editvol{{ id }}" tabindex="-1" role="dialog" aria-labelledby="editInstanceVolumeLabel{{ id }}" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title">{% trans "Edit Instance Volume" %}</h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<ul class="nav nav-tabs">
|
|
<li role="presentation" class="active"><a href="#VirtualDisk{{ id }}" data-toggle="tab">{% trans 'Virtual Disk' %}</a></li>
|
|
<li role="presentation"><a href="#PerformanceVolume{{ id }}" data-toggle="tab">{% trans 'Performance' %}</a></li>
|
|
<li role="presentation"><a href="#AdvancedVolume{{ id }}" data-toggle="tab">{% trans 'Advanced' %}</a></li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane active" id="VirtualDisk{{ id }}">
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Volume Path' %}</label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control" name="vol_path" value="{{ disk.path }}"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-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 %}/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-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>
|
|
</div>
|
|
|
|
<div class="tab-pane" id="AdvancedVolume{{ id }}">
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Bus' %}</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" 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>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Serial Number' %}</label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control" type="text" name="vol_serial" value="{{ disk.serial }}"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Storage Format' %}</label>
|
|
<div class="col-sm-8">
|
|
<input class="form-control" type="text" name="vol_format" value="{{ disk.format }}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane" id="PerformanceVolume{{ id }}">
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Cache mode' %}</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" name="vol_cache">
|
|
{% for key, val in cache_modes %}
|
|
<option value="{{ key }}" {% if key == disk.cache %}selected{% endif %}>{{ val }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'IO mode' %}</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" name="vol_io_mode">
|
|
{% for key, val in io_modes %}
|
|
<option value="{{ key }}" {% if key == disk.io %}selected{% endif %}>{{ val }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Discard mode' %}</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" name="vol_discard_mode">
|
|
{% for key, val in discard_modes %}
|
|
<option value="{{ key }}" {% if key == disk.discard %}selected{% endif %}>{{ val }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-4 control-label">{% trans 'Detect zeroes' %}</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" 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>
|
|
</div>
|
|
<input class="form-control" name="vol_bus_old" value="{{ disk.bus }}"/>
|
|
</div><!-- /.tabpane-content -->
|
|
</div><!-- /.tab-content -->
|
|
</div> <!-- /.modal-body -->
|
|
<div class="clearfix"></div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
|
|
<button type="submit" class="btn btn-success" name="edit_volume">{% trans "Save" %}</button>
|
|
</div><!-- /.modal-footer -->
|
|
|
|
</div> <!-- /.modal-content -->
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
</div> <!-- /.modal -->
|
|
{% endif %}
|