From 2eb874580b1889774260e5bbf40f5106d7afd9c7 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 23 Jun 2023 03:03:28 +0000 Subject: [PATCH] fix issues in pci device config and add --- scripts/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/config.js b/scripts/config.js index 5f6fd30..970b518 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -703,7 +703,7 @@ async function handleDeviceConfig() { let deviceDetails = this.dataset.values; let deviceName = this.dataset.name; let header = `Edit Expansion Card ${deviceID}`; - let body = ``; + let body = ``; let d = dialog(header, body, async (result, form) => { if (result === "confirm") { @@ -730,10 +730,10 @@ async function handleDeviceConfig() { }); let availDevices = await requestAPI(`/nodes/pci?node=${node}`, "GET"); + d.querySelector("#device").append(new Option(deviceName, deviceDetails.split(",")[0])); for (let availDevice of availDevices) { d.querySelector("#device").append(new Option(availDevice.device_name, availDevice.id)); } - d.querySelector("#device").append(new Option(deviceName, deviceID)); d.querySelector("#pcie").checked = deviceDetails.includes("pcie=1"); } @@ -767,7 +767,7 @@ async function handleDeviceDelete() { async function handleDeviceAdd() { let header = `Add Expansion Card`; - let body = ``; + let body = ``; let d = dialog(header, body, async (result, form) => { if (result === "confirm") {