From 2a863848265f71e5530ba2a99a13c8490a924b46 Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 13 Jan 2020 16:14:21 +0300 Subject: [PATCH] Show notification after resize operation --- instances/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instances/views.py b/instances/views.py index 6d01486..852d112 100644 --- a/instances/views.py +++ b/instances/views.py @@ -513,6 +513,7 @@ def instance(request, compute_id, vname): conn.resize_cpu(cur_vcpu, vcpu) msg = _("Resize CPU") addlogmsg(request.user.username, instance.name, msg) + messages.success(request, msg) return HttpResponseRedirect(request.get_full_path() + '#resize') 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) msg = _("Resize Memory") addlogmsg(request.user.username, instance.name, msg) + messages.success(request, msg) return HttpResponseRedirect(request.get_full_path() + '#resize') if 'resizevm_disk' in request.POST and ( @@ -556,6 +558,7 @@ def instance(request, compute_id, vname): conn.resize_disk(disks_new) msg = _("Resize") addlogmsg(request.user.username, instance.name, msg) + messages.success(request, msg) return HttpResponseRedirect(request.get_full_path() + '#resize') if 'add_new_vol' in request.POST and allow_admin_or_not_template: