fix instance type setting,
add min-content to center-div
This commit is contained in:
parent
63943782c6
commit
cb2cc97387
@ -32,6 +32,7 @@ p {
|
||||
.center-div {
|
||||
min-width: 480px;
|
||||
max-width: 50%;
|
||||
width: min-content;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ class Instance extends HTMLElement {
|
||||
super();
|
||||
let shadowRoot = this.attachShadow({mode: "open"});
|
||||
|
||||
let instanceDiv = document.createElement("div");
|
||||
shadowRoot.append(instanceDiv);
|
||||
let instanceArticle = document.createElement("article");
|
||||
shadowRoot.append(instanceArticle);
|
||||
|
||||
let styleLink = document.createElement("link");
|
||||
styleLink.rel = "stylesheet";
|
||||
@ -71,10 +71,10 @@ class Instance extends HTMLElement {
|
||||
}
|
||||
|
||||
set data (data) {
|
||||
let instanceDiv = this.shadowElement.querySelector("div");
|
||||
let instanceArticle = this.shadowElement.querySelector("article");
|
||||
|
||||
let instanceParagraph = document.createElement("p");
|
||||
instanceParagraph.innerText = `CT | ${data.vmid} | ${data.name} | ${data.status}`;
|
||||
instanceParagraph.innerText = `${data.type} | ${data.vmid} | ${data.name} | ${data.status}`;
|
||||
instanceParagraph.style.color = data.status === "running" ? "#00ff00" : "#ff0000";
|
||||
instanceDiv.append(instanceParagraph);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user