add proper account resource usage functionality
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
cabea750db
commit
729f8c0faa
@ -15,6 +15,7 @@
|
|||||||
* {
|
* {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: large;
|
font-size: large;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -13,14 +13,14 @@ function buildResourceTable (object, tableid) {
|
|||||||
|
|
||||||
let table = document.querySelector(tableid);
|
let table = document.querySelector(tableid);
|
||||||
let tbody = table.querySelector("tbody");
|
let tbody = table.querySelector("tbody");
|
||||||
Object.keys(object).forEach((element) => {
|
Object.keys(object.available).forEach((element) => {
|
||||||
let row = tbody.insertRow();
|
let row = tbody.insertRow();
|
||||||
let key = row.insertCell();
|
let key = row.insertCell();
|
||||||
key.innerText = `${element}`;
|
key.innerText = `${element}`;
|
||||||
let val = row.insertCell();
|
let val = row.insertCell();
|
||||||
val.innerText = `${object[element]}`
|
val.innerText = `${object.available[element]}`
|
||||||
let total = row.insertCell();;
|
let total = row.insertCell();;
|
||||||
total.innerText = `${object[element]}`
|
total.innerText = `${object.maximum[element]}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user