1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

Show notification after resize operation

This commit is contained in:
catborise 2020-01-13 16:14:21 +03:00
parent c37ae1dca7
commit 2a86384826

View file

@ -513,6 +513,7 @@ def instance(request, compute_id, vname):
conn.resize_cpu(cur_vcpu, vcpu) conn.resize_cpu(cur_vcpu, vcpu)
msg = _("Resize CPU") msg = _("Resize CPU")
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)
messages.success(request, msg)
return HttpResponseRedirect(request.get_full_path() + '#resize') return HttpResponseRedirect(request.get_full_path() + '#resize')
if 'resizevm_mem' in request.POST and (request.user.is_superuser or if 'resizevm_mem' in request.POST and (request.user.is_superuser or
@ -536,6 +537,7 @@ def instance(request, compute_id, vname):
conn.resize_mem(cur_memory, memory) conn.resize_mem(cur_memory, memory)
msg = _("Resize Memory") msg = _("Resize Memory")
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)
messages.success(request, msg)
return HttpResponseRedirect(request.get_full_path() + '#resize') return HttpResponseRedirect(request.get_full_path() + '#resize')
if 'resizevm_disk' in request.POST and ( if 'resizevm_disk' in request.POST and (
@ -556,6 +558,7 @@ def instance(request, compute_id, vname):
conn.resize_disk(disks_new) conn.resize_disk(disks_new)
msg = _("Resize") msg = _("Resize")
addlogmsg(request.user.username, instance.name, msg) addlogmsg(request.user.username, instance.name, msg)
messages.success(request, msg)
return HttpResponseRedirect(request.get_full_path() + '#resize') return HttpResponseRedirect(request.get_full_path() + '#resize')
if 'add_new_vol' in request.POST and allow_admin_or_not_template: if 'add_new_vol' in request.POST and allow_admin_or_not_template: