From c1e30aeb7f83c85ffe556142078637f73a02dd2f Mon Sep 17 00:00:00 2001 From: catborise Date: Tue, 27 Oct 2026 16:50:47 +0300 Subject: [PATCH] refactor(templates): Bootstrap's components instead of the panel's own CSS for capacity, steps and disclosures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fork's own rules in webvirtcloud.css redid what Bootstrap 5.3 has: - the capacity bars (.cap-*) are Bootstrap progress bars: the memory a .progress-stacked of running VMs' memory and shut-off VMs' (at half opacity), each segment a progressbar with its amount as its value text; the pool bars a thin .progress. The line where the host's memory ends goes: the share above the bar says it, red when over; - the status dot (.compute-dot) is a rounded-circle, the big figures (.compute-ratio) fs-4, the Computes table's cell padding py-3; - the steps of creating a VM (.create-steps) are a breadcrumb with "›" as its divider; - the XML and Advanced disclosures (.disclosure with a turning chevron) are Bootstrap accordions; - the chosen volumes and networks (.row-list) are list-unstyled, their names text-break; - a chart's container is position-relative by utility; its height stays. Dead rules go too: .netIN, .netOUT, .diskRD, .diskWR, .input-xs and .bottom-bar-margin had no users. --- .../templates/computes/capacity_memory.html | 19 ++- .../templates/computes/capacity_vcpus.html | 2 +- computes/templates/computes/list.html | 18 +-- computes/templates/computes/pool_bar.html | 5 +- computes/templates/overview.html | 14 +-- computes/views.py | 10 +- instances/templates/create_instance_w1.html | 14 +-- instances/templates/create_instance_w2.html | 26 ++-- instances/templates/create_steps.html | 20 +-- instances/templates/instances/stats_tab.html | 8 +- static/css/webvirtcloud.css | 119 +----------------- 11 files changed, 75 insertions(+), 180 deletions(-) diff --git a/computes/templates/computes/capacity_memory.html b/computes/templates/computes/capacity_memory.html index 263a8aea..03d121fa 100644 --- a/computes/templates/computes/capacity_memory.html +++ b/computes/templates/computes/capacity_memory.html @@ -1,11 +1,18 @@ {% load i18n %} {# the memory a host has given its VMs: given, from views.shown_capacity #} -
{{ given.memory_percent }} %
+
{{ given.memory_percent }} %
{{ given.assigned.all|filesizeformat }} / {{ given.memory|filesizeformat }}
-