From 8d2b3e3024e0a35e6899dc0c1cf34bb9f69b84cf Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 24 Jan 2019 08:41:45 +0300 Subject: [PATCH] Add explanation for boot menu changes. Minor cosmetic fixes --- instances/templates/instance.html | 4 +++- instances/views.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/instances/templates/instance.html b/instances/templates/instance.html index 4631120..59fcc40 100644 --- a/instances/templates/instance.html +++ b/instances/templates/instance.html @@ -616,7 +616,9 @@ {% endifequal %} {% else %} -

{% trans "**** Please shutdown instance to modify boot menu ****" %} + {% ifequal bootmenu 0 %} +

{% trans "**** Please shutdown instance to modify boot menu ****" %} + {% endifequal %} {% endifequal %}

diff --git a/instances/views.py b/instances/views.py index e3c7628..36b7327 100644 --- a/instances/views.py +++ b/instances/views.py @@ -622,6 +622,11 @@ def instance(request, compute_id, vname): order_list[idx] = {"type": type, "dev": dev} conn.set_bootorder(order_list) msg = _("Set boot order") + + if not conn.get_status() == 5: + messages.success(request, _("Boot menu changes applied. But it will be activated after shutdown")) + else: + messages.success(request, _("Boot order changed successfully.")) addlogmsg(request.user.username, instance.name, msg) return HttpResponseRedirect(request.get_full_path() + '#boot_opt')