From 364cb5f85a59aced6c6e78cce67100672a35e723 Mon Sep 17 00:00:00 2001 From: Alice Sedgwick Date: Mon, 11 Nov 2024 02:06:30 -0500 Subject: [PATCH] Still looking at getting a dropdown working --- ui/general/health.html | 5 +++++ ui/general/health.js | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ui/general/health.html b/ui/general/health.html index 44b66b0..a95a4e9 100644 --- a/ui/general/health.html +++ b/ui/general/health.html @@ -57,6 +57,11 @@
  • Something else here
  • +
    + + + +
    diff --git a/ui/general/health.js b/ui/general/health.js index b754384..3f3570c 100644 --- a/ui/general/health.js +++ b/ui/general/health.js @@ -13,7 +13,22 @@ document.onload = initPage(); // Function to initialize the page function initPage() { + // TODO: Replace /home/spiri/services with some root level path + // Search for drones files in the services directory and populate the dropdown with directory names + const currentDrone = getValueByKey(content, "common", "drone"); + addDropDown(drone, drones, currentDrone); +} + +function dockerComposeFileChanged() { + if (composeFileSelection.value === "") { + populateEditor(""); + return; + } + const composeLocation = composeFileSelection.value + "/docker-compose.yaml"; + cockpit.file(composeLocation) + .read().then((content) => successReadFile(content)) + .catch(error => failureReadFile(error)); } function successReadFile(content) {