diff --git a/instances/templates/instance.html b/instances/templates/instance.html index abd429b..5e58ed0 100644 --- a/instances/templates/instance.html +++ b/instances/templates/instance.html @@ -1051,13 +1051,35 @@ } }); } - if (~$.inArray(hash, ['#media', '#autostart', '#xmledit', '#vncedit'])) { + if (~$.inArray(hash, ['#media', '#clone', '#autostart', '#xmledit', '#vncsettings', '#migrate'])) { var btnsect = $('#navbtn>li>a'); $(btnsect).each(function () { if ($(this).attr('href') === '#settings') { $(this).trigger('click'); } }); + + var btn = $('#settings>div>ul>li>a'); + $(btn).each(function () { + if ($(this).attr('href') === hash) { + $(this).trigger('click'); + } + }); + } + if (~$.inArray(hash, ['#takesnapshot', '#restoresnapshot'])) { + var btnsect = $('#navbtn>li>a'); + $(btnsect).each(function () { + if ($(this).attr('href') === '#snapshots') { + $(this).trigger('click'); + } + }); + + var btn = $('#snapshots>div>ul>li>a'); + $(btn).each(function () { + if ($(this).attr('href') === hash) { + $(this).trigger('click'); + } + }); } {% endblock %} \ No newline at end of file diff --git a/instances/views.py b/instances/views.py index 8ea3c01..e910a8c 100644 --- a/instances/views.py +++ b/instances/views.py @@ -297,14 +297,14 @@ def instance(request, compute_id, vname): conn.create_snapshot(name) msg = _("New snapshot") addlogmsg(request.user.id, instance.id, msg) - return HttpResponseRedirect(request.get_full_path() + '#snapshot') + return HttpResponseRedirect(request.get_full_path() + '#takesnapshot') if 'delete_snapshot' in request.POST: snap_name = request.POST.get('name', '') conn.snapshot_delete(snap_name) msg = _("Delete snapshot") addlogmsg(request.user.id, instance.id, msg) - return HttpResponseRedirect(request.get_full_path() + '#snapshot') + return HttpResponseRedirect(request.get_full_path() + '#restoresnapshot') if 'revert_snapshot' in request.POST: snap_name = request.POST.get('name', '') @@ -366,7 +366,7 @@ def instance(request, compute_id, vname): else: msg = _("Set VNC password") addlogmsg(request.user.id, instance.id, msg) - return HttpResponseRedirect(request.get_full_path() + '#vncedit') + return HttpResponseRedirect(request.get_full_path() + '#vncsettings') if 'set_console_keymap' in request.POST: keymap = request.POST.get('console_keymap', '') @@ -377,14 +377,14 @@ def instance(request, compute_id, vname): conn.set_console_keymap(keymap) msg = _("Set VNC keymap") addlogmsg(request.user.id, instance.id, msg) - return HttpResponseRedirect(request.get_full_path() + '#vncedit') + return HttpResponseRedirect(request.get_full_path() + '#vncsettings') if 'set_console_type' in request.POST: console_type = request.POST.get('console_type', '') conn.set_console_type(console_type) msg = _("Set VNC type") addlogmsg(request.user.id, instance.id, msg) - return HttpResponseRedirect(request.get_full_path() + '#vncedit') + return HttpResponseRedirect(request.get_full_path() + '#vncsettings') if 'migrate' in request.POST: compute_id = request.POST.get('compute_id', '') diff --git a/storages/templates/create_stg_vol_block.html b/storages/templates/create_stg_vol_block.html index 6353167..ac22167 100644 --- a/storages/templates/create_stg_vol_block.html +++ b/storages/templates/create_stg_vol_block.html @@ -74,7 +74,7 @@
- +
diff --git a/storages/templates/storage.html b/storages/templates/storage.html index 1456631..3c50e93 100644 --- a/storages/templates/storage.html +++ b/storages/templates/storage.html @@ -143,7 +143,7 @@