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 #} -
| {% trans "Host" %} | @@ -37,13 +37,13 @@ {% for compute in computes %} {% with given=compute.shown_capacity %}|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + |
{% if compute.status is True %}
-
+
{% trans "Connected" %}
{% else %}
-
+
{% trans "Not Connected" %}
{% endif %}
{{ compute.name }}
@@ -54,19 +54,19 @@
{% endif %}
|
{% if given %}
- + | {% include "computes/capacity_vcpus.html" %} | -+ | {% include "computes/capacity_memory.html" %} | -+ | {% include "computes/capacity_storage.html" %} | {% else %} -{% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %} | +{% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %} | {% endif %} -+ |
{# a host the panel cannot reach opens too: its page says why #}
{% bs_icon 'eye-fill' %}
diff --git a/computes/templates/computes/pool_bar.html b/computes/templates/computes/pool_bar.html
index 46c2fd3f..ad873d01 100644
--- a/computes/templates/computes/pool_bar.html
+++ b/computes/templates/computes/pool_bar.html
@@ -1,6 +1,7 @@
{% load i18n %}
{% endfor %}
diff --git a/static/css/webvirtcloud.css b/static/css/webvirtcloud.css
index e3627f96..e0e4fac6 100644
--- a/static/css/webvirtcloud.css
+++ b/static/css/webvirtcloud.css
@@ -33,18 +33,6 @@ body {
color: inherit;
}
-/* a disclosure's chevron points up while its section is open */
-.disclosure[aria-expanded="true"] .bi-chevron-down {
- transform: rotate(180deg);
-}
-
-/* the steps of creating a VM: the separator is drawn, not a list item */
-.create-steps li + li::before {
- content: "›";
- margin-right: 0.5rem;
- color: var(--bs-secondary-color);
-}
-
.xmlheight {
height: 364px;
}
@@ -137,43 +125,11 @@ p {
margin-top: 20px;
}
-/* a live chart (static/js/charts.js) fills the width of its card */
+/* a live chart (static/js/charts.js) fills the width of its card at this height */
.chart {
- position: relative;
height: 160px;
}
-.netIN {
- border-color: rgb(83, 191, 189);
- margin: 0.5em;
- border-style: solid;
- border-width: 0 0 0 1em;
- padding: 0 0.3em;
-}
-
-.netOUT {
- border-color: rgb(151, 187, 205);
- margin: 0.5em;
- border-style: solid;
- border-width: 0 0 0 1em;
- padding: 0 0.3em;
-}
-
-.diskRD {
- border-color: rgb(190, 195, 205);
- margin: 0.5em;
- border-style: solid;
- border-width: 0 0 0 1em;
- padding: 0 0.3em;
-}
-
-.diskWR {
- border-color: rgb(249, 134, 33);
- margin: 0.5em;
- border-style: solid;
- border-width: 0 0 0 1em;
- padding: 0 0.3em;
-}
.keyselect {
display: inline;
min-width: 250px;
@@ -197,10 +153,6 @@ p {
background-color:#000099;
}
-.bottom-bar-margin {
- margin-top: 65px;
-}
-
/* make dropdowns show on hover */
@media only screen and (min-width: 768px) {
.dropdown:hover .dropdown-menu {
@@ -215,72 +167,3 @@ p {
a {
outline: 0;
}
-
-.input-xs {
- height: 22px;
- padding: 2px 5px;
- font-size: 12px;
- line-height: 1.5; /* If Placeholder of the input is moved up, rem/modify this. */
- border-radius: 2px;
- }
-
-/* the Computes list: what each host has given its VMs */
-.compute-list td {
- padding-top: 1rem;
- padding-bottom: 1rem;
-}
-
-.compute-dot {
- display: inline-block;
- width: 0.6rem;
- height: 0.6rem;
- border-radius: 50%;
- flex-shrink: 0;
-}
-
-.compute-ratio {
- font-size: 1.5rem;
- line-height: 1.2;
- font-variant-numeric: tabular-nums;
-}
-
-.compute-memory {
- min-width: 11rem;
-}
-
-.compute-storage {
- min-width: 9rem;
-}
-
-/* a bar of given capacity: running VMs solid, shut-off VMs faint, and a
- mark where the host's own capacity ends */
-.cap-bar {
- position: relative;
- display: flex;
- height: 0.6rem;
- border-radius: 0.3rem;
- background: var(--bs-secondary-bg);
-}
-
-.cap-bar.cap-thin {
- height: 0.3rem;
-}
-
-.cap-running {
- background: var(--bs-primary);
- border-radius: 0.3rem 0 0 0.3rem;
-}
-
-.cap-stopped {
- background: var(--bs-primary);
- opacity: 0.35;
-}
-
-.cap-host {
- position: absolute;
- top: -0.2rem;
- bottom: -0.2rem;
- width: 2px;
- margin-left: -1px;
- background: var(--bs-body-color);
-}
{{ pool.name }}
-
-
+
+
{% blocktrans with free=pool.free|filesizeformat size=pool.size|filesizeformat %}{{ free }} free of {{ size }}{% endblocktrans %}
diff --git a/computes/templates/overview.html b/computes/templates/overview.html
index 31b27aff..5588fd3d 100644
--- a/computes/templates/overview.html
+++ b/computes/templates/overview.html
@@ -16,9 +16,9 @@
{% if connected %}
- {% trans "Connected" %}
+ {% trans "Connected" %}
{% else %}
- {% trans "Not connected" %}
+ {% trans "Not connected" %}
{% endif %}
{{ compute.hostname }}
@@ -45,7 +45,7 @@
{% endfor %}
@@ -57,7 +57,7 @@
{% bs_icon 'server' %} {% trans "VMs" %}
-
diff --git a/computes/views.py b/computes/views.py
index 59508bc6..827e7320 100644
--- a/computes/views.py
+++ b/computes/views.py
@@ -35,13 +35,13 @@ def shown_capacity(compute):
be read."""
given = compute.capacity
if given:
- # the memory bar: running and shut-off VMs' memory, and a mark at the
- # host's memory, on a scale that holds whichever is larger
+ # the memory bar: running and shut-off VMs' memory, on a scale that
+ # holds the host's memory or all given, whichever is larger
assigned, memory = given["assigned"], given["memory"]
+ assigned["stopped"] = assigned["all"] - assigned["running"]
scale = max(assigned["all"], memory) or 1
- given["bar"] = {"running": assigned["running"] * 100 / scale,
- "stopped": (assigned["all"] - assigned["running"]) * 100 / scale,
- "host": memory * 100 / scale, "over": assigned["all"] > memory}
+ given["bar"] = {"running": assigned["running"] * 100 / scale, "stopped": assigned["stopped"] * 100 / scale,
+ "over": assigned["all"] > memory}
given["memory_percent"] = round(assigned["all"] * 100 / memory) if memory else 0
given["vm_count"] = sum(given["vms"].values())
# the default pool (else the first) shows; the others (a host may
diff --git a/instances/templates/create_instance_w1.html b/instances/templates/create_instance_w1.html
index 5e01a09a..72bc2da0 100644
--- a/instances/templates/create_instance_w1.html
+++ b/instances/templates/create_instance_w1.html
@@ -44,16 +44,16 @@
{{ given.vm_count }}
+ {{ given.vm_count }}
{% blocktrans with running=given.vms.running shutoff=given.vms.shutoff %}{{ running }} running, {{ shutoff }} shut off{% endblocktrans %}{% if given.vms.paused %}, {% blocktrans with paused=given.vms.paused %}{{ paused }} paused{% endblocktrans %}{% endif %}{% if given.vms.other %}, {% blocktrans with other=given.vms.other %}{{ other }} other{% endblocktrans %}{% endif %}
@@ -64,7 +64,7 @@
{% bs_icon 'memory' %} {% trans "Memory" %}
-
+
@@ -72,7 +72,7 @@
{% include "computes/capacity_memory.html" %}
{% bs_icon 'device-hdd' %} {% trans "Storage" %}
-
+
{% include "computes/capacity_storage.html" %}
{% trans "Storages" %} →
@@ -91,7 +91,7 @@
{% bs_icon 'speedometer2' %} {% trans "CPU in use" %} –
-
+
-
+
-
-
-
+
-
+
| ||||