From 44b3b6569ac15d6e181c40ee38d1c88ba652b83d Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 7 Oct 2026 23:57:10 +0300 Subject: [PATCH] fix(instances): the VM page opens the tab a redirect points to, and host links are for administrators Redirects to #access (root password, SSH key) and other top-level panes opened nothing, and some sub-tab ids did not exist. static/js/instance_tabs.js opens the pane and the tab that holds it from the page structure, and opens Settings on its first section, without leaving the current tab; guest OS info is loaded whenever it is the section opened. The bottom bar linked to host pages, which only administrators may open, and showed host names to everyone. A stray is removed; the page's inline scripts and the tab logic are checked with Node. --- instances/templates/bottom_bar.html | 2 + instances/templates/instance.html | 44 ++++------- instances/templates/instances/resize_tab.html | 1 - instances/test_page_controls.py | 25 +++++- static/js/instance_tabs.js | 40 ++++++++++ webvirtcloud/js_tests/instance_tabs.test.js | 77 +++++++++++++++++++ webvirtcloud/test_instance_tabs_js.py | 23 ++++++ 7 files changed, 181 insertions(+), 31 deletions(-) create mode 100644 static/js/instance_tabs.js create mode 100644 webvirtcloud/js_tests/instance_tabs.test.js create mode 100644 webvirtcloud/test_instance_tabs_js.py diff --git a/instances/templates/bottom_bar.html b/instances/templates/bottom_bar.html index ef52bd2c..c2945340 100644 --- a/instances/templates/bottom_bar.html +++ b/instances/templates/bottom_bar.html @@ -8,6 +8,7 @@