mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
Each host is a row of what it has committed, read live from the host (in parallel, by a 10 s deadline): - Host: a status dot, the name, its address and details; when it cannot be reached, why. - vCPUs: the overcommit ratio, large (warning above 2:1, red above 4:1), over "N vCPUs on M CPUs" and the running VMs' share. - Memory: memory given to all VMs against the host's memory, as one bar: running VMs dark, shut-off VMs light (they take their memory again when they start), and a line where the host's memory ends; red when the VMs were given more than the host has. - Storage: the default pool (or the first) with its used share and free space; the others, a host may have dozens, open on a click. A host that cannot be reached, or does not answer in time, says so in one line instead. vCPUs and Memory sort by ratio and share. A host whose read hangs is not read again until that read ends, so a stuck host keeps at most one thread. The table's hidden status texts stay inside it, so the page does not widen on a phone.
286 lines
4.8 KiB
CSS
286 lines
4.8 KiB
CSS
/*!
|
||
* WebVirtCloud (http://github.com/retspen/webvirtcloud)
|
||
* Code licensed under the Apache License v2.0.
|
||
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
|
||
*/
|
||
|
||
/* Global Styles */
|
||
|
||
body {
|
||
padding-bottom: 50px;
|
||
}
|
||
|
||
.container {
|
||
max-width: 900px;
|
||
}
|
||
|
||
.page-header {
|
||
margin: 5px 5px 20px 20px;
|
||
}
|
||
|
||
#editor {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
/* Tom Select's control keeps the text colour of the select it replaces:
|
||
its own stylesheet fixes one, unreadable on some Bootswatch themes */
|
||
.ts-wrapper.form-select .ts-control,
|
||
.ts-wrapper.form-select .ts-control input {
|
||
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;
|
||
}
|
||
|
||
.ace_editor {
|
||
height: 350px;
|
||
}
|
||
|
||
/* headers of sortable tables (static/js/sort_tables.js): the sorted one shows
|
||
its direction, up for ascending */
|
||
th[role=columnheader]:not([data-sort-method="none"]) {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
}
|
||
|
||
th[aria-sort]:not([data-sort-method="none"])::after {
|
||
content: "";
|
||
display: inline-block;
|
||
margin-left: 0.4em;
|
||
vertical-align: middle;
|
||
border: 0.3em solid transparent;
|
||
border-top-color: currentColor;
|
||
}
|
||
|
||
th[aria-sort="ascending"]:not([data-sort-method="none"])::after {
|
||
border-top-color: transparent;
|
||
border-bottom-color: currentColor;
|
||
}
|
||
|
||
.host-collapsed tr[host] {
|
||
display: none;
|
||
}
|
||
|
||
.search {
|
||
margin: 5px;
|
||
}
|
||
|
||
.btn-header {
|
||
margin-top: 5px;
|
||
}
|
||
|
||
.action-block {
|
||
display: block;
|
||
padding: 15px 0;
|
||
font-weight: 400;
|
||
font-size: 14px;
|
||
width: 65px;
|
||
}
|
||
|
||
.action-button {
|
||
text-align: center;
|
||
}
|
||
|
||
.tab-pane-bordered {
|
||
border: 1px solid #eee;
|
||
border-top-width: 0;
|
||
padding: 20px;
|
||
}
|
||
|
||
p {
|
||
display: block;
|
||
margin: 10px 10px 10px 10px;
|
||
}
|
||
|
||
#power {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#access {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#resize {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#snapshots {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#settings {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#graphics {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
#undefine {
|
||
margin-top: 20px;
|
||
}
|
||
|
||
/* a live chart (static/js/charts.js) fills the width of its card */
|
||
.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;
|
||
}
|
||
|
||
.multipleselect {
|
||
width:27em;
|
||
height:10em;
|
||
border:solid 2px #c0c0c0;
|
||
overflow:auto;
|
||
padding: 0 1em;
|
||
margin: 0.9em;
|
||
}
|
||
|
||
.multipleselect label {
|
||
display:block;
|
||
}
|
||
|
||
.multipleselect-on {
|
||
color:#ffffff;
|
||
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 {
|
||
display: block;
|
||
}
|
||
}
|
||
.table > tbody > tr > td {
|
||
vertical-align: middle;
|
||
}
|
||
|
||
/* remove ugly dotted outline on tabs */
|
||
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);
|
||
}
|