mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 23:55:24 +00:00
fix edit instance volume for running instances to prevent bus error
This commit is contained in:
parent
768b49ea88
commit
646eae59a2
3 changed files with 3 additions and 3 deletions
|
@ -121,7 +121,7 @@
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
|
<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>
|
<button type="submit" class="btn btn-success" name="edit_volume" onclick="return confirm('{% trans "Are you sure to change volume properties?" %}')">{% trans "Save" %}</button>
|
||||||
</div><!-- /.modal-footer -->
|
</div><!-- /.modal-footer -->
|
||||||
|
|
||||||
</div> <!-- /.modal-content -->
|
</div> <!-- /.modal-content -->
|
|
@ -290,7 +290,7 @@
|
||||||
<input type="hidden" name="dev" value="{{ disk.dev }}">
|
<input type="hidden" name="dev" value="{{ disk.dev }}">
|
||||||
<input type="hidden" name="storage" value="{{ disk.storage }}">
|
<input type="hidden" name="storage" value="{{ disk.storage }}">
|
||||||
<input type="hidden" name="name" value="{{ disk.image }}">
|
<input type="hidden" name="name" value="{{ disk.image }}">
|
||||||
{% include 'edit_instance_volume.html' with id=forloop.counter0 %}
|
{% include 'instances/edit_instance_volume.html' with id=forloop.counter0 %}
|
||||||
</form>
|
</form>
|
||||||
<form class="d-inline" action="{% url 'instances:detach_vol' instance.id %}" method="post">
|
<form class="d-inline" action="{% url 'instances:detach_vol' instance.id %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -596,8 +596,8 @@ def edit_volume(request, pk):
|
||||||
shareable = bool(request.POST.get("vol_shareable", False))
|
shareable = bool(request.POST.get("vol_shareable", False))
|
||||||
readonly = bool(request.POST.get("vol_readonly", False))
|
readonly = bool(request.POST.get("vol_readonly", False))
|
||||||
disk_type = request.POST.get("vol_type", "")
|
disk_type = request.POST.get("vol_type", "")
|
||||||
new_bus = request.POST.get("vol_bus", "")
|
|
||||||
bus = request.POST.get("vol_bus_old", "")
|
bus = request.POST.get("vol_bus_old", "")
|
||||||
|
new_bus = request.POST.get("vol_bus", bus)
|
||||||
serial = request.POST.get("vol_serial", "")
|
serial = request.POST.get("vol_serial", "")
|
||||||
format = request.POST.get("vol_format", "")
|
format = request.POST.get("vol_format", "")
|
||||||
cache = request.POST.get("vol_cache", app_settings.INSTANCE_VOLUME_DEFAULT_CACHE)
|
cache = request.POST.get("vol_cache", app_settings.INSTANCE_VOLUME_DEFAULT_CACHE)
|
||||||
|
|
Loading…
Reference in a new issue