update config to api change

This commit is contained in:
Arthur Lu 2024-10-01 18:19:59 +00:00
parent f09ca0507e
commit 7d64715c30
2 changed files with 9 additions and 1 deletions

View File

@ -14,6 +14,14 @@
<script src="scripts/draggable.js" type="module"></script> <script src="scripts/draggable.js" type="module"></script>
<script src="modules/Sortable.min.js"></script> <script src="modules/Sortable.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<style>
.input-grid p, .input-grid div {
margin-top: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
</style>
</head> </head>
<body> <body>
<header> <header>

View File

@ -81,7 +81,7 @@ async function getConfig () {
async function populateResources () { async function populateResources () {
const field = document.querySelector("#resources"); const field = document.querySelector("#resources");
if (type === "qemu") { if (type === "qemu") {
const global = await requestAPI("/global/config/resources"); const global = (await requestAPI("/global/config/resources")).resources;
const user = await requestAPI("/user/config/resources"); const user = await requestAPI("/user/config/resources");
let options = []; let options = [];
const globalCPU = global.cpu; const globalCPU = global.cpu;