From 8fe8e761af94f68c9944b86559e10dbdf04fd999 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:38:56 +0000 Subject: [PATCH 1/9] Bump org.junit.jupiter:junit-jupiter-params Bumps [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- software/oqm-core-base-station/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/oqm-core-base-station/build.gradle b/software/oqm-core-base-station/build.gradle index 852b27d70..5dbf86a20 100644 --- a/software/oqm-core-base-station/build.gradle +++ b/software/oqm-core-base-station/build.gradle @@ -42,7 +42,7 @@ dependencies { implementation 'org.webjars:bootstrap:5.3.3' testImplementation 'io.quarkus:quarkus-junit5' - testImplementation "org.junit.jupiter:junit-jupiter-params:5.10.3" + testImplementation "org.junit.jupiter:junit-jupiter-params:5.11.0" testImplementation 'io.rest-assured:rest-assured' testImplementation 'net.datafaker:datafaker:2.3.1' From 06e4f3e50031211c43f48aa505e275c3714bba47 Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Wed, 21 Aug 2024 23:01:12 -0400 Subject: [PATCH 2/9] Lib - CoreAPI - Quarkus - Updated image used for core api dev service --- .../core/api/quarkus/deployment/CoreApiLibDevserviceConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/libs/core-api-lib-quarkus/deployment/src/main/java/tech/ebp/oqm/lib/core/api/quarkus/deployment/CoreApiLibDevserviceConfig.java b/software/libs/core-api-lib-quarkus/deployment/src/main/java/tech/ebp/oqm/lib/core/api/quarkus/deployment/CoreApiLibDevserviceConfig.java index bb18b2844..a443642ba 100644 --- a/software/libs/core-api-lib-quarkus/deployment/src/main/java/tech/ebp/oqm/lib/core/api/quarkus/deployment/CoreApiLibDevserviceConfig.java +++ b/software/libs/core-api-lib-quarkus/deployment/src/main/java/tech/ebp/oqm/lib/core/api/quarkus/deployment/CoreApiLibDevserviceConfig.java @@ -40,6 +40,6 @@ public class CoreApiLibDevserviceConfig { /** * The version/ tag of the core api container image */ - @ConfigItem(name="coreApiVersion", defaultValue = "2.1.2") + @ConfigItem(name="coreApiVersion", defaultValue = "2.1.3") public String coreApiVersion; } From d2ef5511b16579bdfc4522b4976ac9a7fd9c2e4a Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Thu, 22 Aug 2024 22:22:14 -0400 Subject: [PATCH 3/9] Core - Base Station - Updating core api lib dependency, config --- software/oqm-core-base-station/build.gradle | 2 +- .../oqm-core-base-station/src/main/resources/application.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/software/oqm-core-base-station/build.gradle b/software/oqm-core-base-station/build.gradle index 852b27d70..afb1cef9b 100644 --- a/software/oqm-core-base-station/build.gradle +++ b/software/oqm-core-base-station/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation 'io.quarkus:quarkus-opentelemetry' implementation 'io.quarkus:quarkus-scheduler' - implementation 'tech.ebp.oqm.lib:core-api-lib-quarkus:2.1.0-SNAPSHOT' + implementation 'tech.ebp.oqm.lib:core-api-lib-quarkus:2.2.0-SNAPSHOT' implementation 'org.apache.commons:commons-io:1.3.2' implementation 'org.apache.commons:commons-text:1.12.0' diff --git a/software/oqm-core-base-station/src/main/resources/application.yml b/software/oqm-core-base-station/src/main/resources/application.yml index 69d09ca59..c4dd9f43f 100644 --- a/software/oqm-core-base-station/src/main/resources/application.yml +++ b/software/oqm-core-base-station/src/main/resources/application.yml @@ -68,6 +68,9 @@ ui: quarkus: application: name: ${service.nameShort} - V${service.apiVersion} + container-image: + name: oqm-core-base_station + group: ebprod rest-client: logging: scope: all From ca0e6a56593ca4b0189df67230163e84b207bb57 Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Fri, 23 Aug 2024 10:06:48 -0400 Subject: [PATCH 4/9] Core - API - Version bump for dev, added some config for docker images --- software/oqm-core-api/build.gradle | 2 +- software/oqm-core-api/docs/development/Releasing.md | 2 +- software/oqm-core-api/src/main/resources/application.yaml | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/software/oqm-core-api/build.gradle b/software/oqm-core-api/build.gradle index d0e7c7849..50d4e8bd9 100644 --- a/software/oqm-core-api/build.gradle +++ b/software/oqm-core-api/build.gradle @@ -5,7 +5,7 @@ plugins { } group 'com.ebp.openQuarterMaster' -version '2.1.3' +version '2.1.4-DEV' repositories { mavenCentral() diff --git a/software/oqm-core-api/docs/development/Releasing.md b/software/oqm-core-api/docs/development/Releasing.md index ad98e0ac3..2ecf1d770 100644 --- a/software/oqm-core-api/docs/development/Releasing.md +++ b/software/oqm-core-api/docs/development/Releasing.md @@ -31,7 +31,7 @@ These are the steps to take to perform a release of the software: 4. Ensure everything committed and pushed to github. Check workflows. 5. Be logged into docker hub with ebprod user `docker login` 6. Deploy jvm version - 1. Clean/build/push project `./gradlew clean build -Pquarkus.container-image.build=true -Pquarkus.jib.platforms=linux/arm64,linux/amd64 -Pquarkus.container-image.group=ebprod -Pquarkus.container-image.name=oqm-core-api -Pquarkus.container-image.push=true -Pquarkus.jib.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20` + 1. Clean/build/push project `./gradlew clean build -Pquarkus.container-image.build=true -Pquarkus.jib.platforms=linux/arm64,linux/amd64 -Pquarkus.container-image.push=true -Pquarkus.jib.base-jvm-image=registry.access.redhat.com/ubi9/openjdk-21-runtime:1.20` 2. Ensure was deployed successfully: https://hub.docker.com/repository/registry-1.docker.io/ebprod/open-qm-base-station/tags?page=1&ordering=last_updated 7. Make installers: `./makeInstallers.sh` 8. Make release for version on Github, attach all installers to it (`build/installers`) \ No newline at end of file diff --git a/software/oqm-core-api/src/main/resources/application.yaml b/software/oqm-core-api/src/main/resources/application.yaml index 7b0c3f32d..76e3aa718 100644 --- a/software/oqm-core-api/src/main/resources/application.yaml +++ b/software/oqm-core-api/src/main/resources/application.yaml @@ -58,6 +58,9 @@ externalService: quarkus: application: name: ${service.nameShort} - V${service.apiVersion} + container-image: + name: oqm-core-api + group: ebprod log: level: DEBUG console: From 458fd2181cd4e01a634aa7a56516d364ac5bf070 Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Fri, 23 Aug 2024 13:52:50 -0400 Subject: [PATCH 5/9] Plugin - Mss Controller - Now have a semi-working deployment of test mss module --- .../CoreApiLibQuarkusProcessor.java | 45 +++++++++++++++---- .../deployment/testModules/MssTestModule.java | 44 ++++++++++++++++-- .../testModules/MssTestSerialModule.java | 14 +++++- .../pom.xml | 8 ++++ .../testModuleServer/StartupHandler.java | 29 ++++++++++++ .../testModuleServer/config/ModuleConfig.java | 1 - .../src/main/resources/application.properties | 6 ++- .../src/test/resources/application.properties | 6 +++ .../mss-controller-plugin/pom.xml | 2 +- .../src/main/resources/application.yaml | 3 ++ 10 files changed, 139 insertions(+), 19 deletions(-) create mode 100644 software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java create mode 100644 software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/resources/application.properties diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java index 1696b58c7..d62cca038 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java @@ -9,19 +9,20 @@ import tech.ebp.oqm.plugin.mssController.devTools.deployment.config.DevModuleConfig; import tech.ebp.oqm.plugin.mssController.devTools.deployment.config.MssControllerDevtoolBuildTimeConfig; import tech.ebp.oqm.plugin.mssController.devTools.deployment.testModules.MssTestModule; +import tech.ebp.oqm.plugin.mssController.devTools.deployment.testModules.MssTestSerialModule; import tech.ebp.oqm.plugin.mssController.lib.command.response.ModuleInfo; import java.util.*; class CoreApiLibQuarkusProcessor { - + private static final String FEATURE = "mss-controller-devtooling"; - + @BuildStep FeatureBuildItem feature() { return new FeatureBuildItem(FEATURE); } - + // @BuildStep // List addRestConfiguration() { // return List.of( @@ -37,7 +38,7 @@ public List createContainer( ) { List output = new ArrayList<>(); - for(DevModuleConfig curModuleConfig : config.devServices().modules()){ + for (DevModuleConfig curModuleConfig : config.devServices().modules()) { ModuleInfo newModuleInfo = new ModuleInfo( curModuleConfig.info().specVersion().orElse("1"), curModuleConfig.info().serialId().orElse(UUID.randomUUID().toString()), @@ -45,19 +46,45 @@ public List createContainer( curModuleConfig.info().numBlocks() ); - MssTestModule testModule = switch (curModuleConfig.type()){ - case SERIAL -> null; + MssTestModule testModule = switch (curModuleConfig.type()) { + case SERIAL -> new MssTestSerialModule(newModuleInfo); case NETWORK -> null; - } ; + }; + + testModule.start(); // new DevServicesResultBuildItem.RunningDevService() - } + output.add(new DevServicesResultBuildItem.RunningDevService( + FEATURE, + testModule.getContainerId(), + testModule::close, + new HashMap<>() + ) + .toBuildItem() + ); + } + ModuleInfo newModuleInfo = new ModuleInfo( + "1", + UUID.randomUUID().toString(), + "today", + 5 + ); + MssTestModule testModule = new MssTestSerialModule(newModuleInfo); + testModule.start(); + output.add(new DevServicesResultBuildItem.RunningDevService( + FEATURE, + testModule.getContainerId(), + testModule::close, + new HashMap<>() + ) + .toBuildItem() + ); - return List.of(); + return output; } } diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java index d9adf56ce..af51dc62d 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java @@ -1,17 +1,53 @@ package tech.ebp.oqm.plugin.mssController.devTools.deployment.testModules; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.eclipse.microprofile.config.ConfigProvider; +import org.eclipse.microprofile.config.inject.ConfigProperties; +import org.eclipse.microprofile.config.inject.ConfigProperty; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.Network; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.utility.DockerImageName; import tech.ebp.oqm.plugin.mssController.lib.command.MssCommand; import tech.ebp.oqm.plugin.mssController.lib.command.response.ModuleInfo; -public class MssTestModule { +public abstract class MssTestModule> extends GenericContainer { - private ModuleInfo moduleInfo; + protected ModuleInfo moduleInfo; protected MssTestModule(ModuleInfo moduleInfo) { + super(DockerImageName.parse("ebprod/oqm-plugin-mss_controller-test_module_server:" + ConfigProvider.getConfig().getValue("quarkus.application.version", String.class))); this.moduleInfo = moduleInfo; } - protected MssCommand processCommand(MssCommand command) { - return command;//TODO + static final int PORT = 8123; + + + @Override + protected void configure() { + withNetwork(Network.SHARED); + withEnv("quarkus.http.port", ""+PORT); + addEnv("moduleConfig.serialId", this.moduleInfo.getSerialId()); + addEnv("moduleConfig.manufactureDate", this.moduleInfo.getManufactureDate()); + addEnv("moduleConfig.specVersion", this.moduleInfo.getSpecVersion()); + addEnv("moduleConfig.numBlocks", "" + this.moduleInfo.getNumBlocks()); + + addExposedPorts(PORT); + // Tell the dev service how to know the container is ready + waitingFor(Wait.forLogMessage(".*MSS Test Module Server started.*", 1)); + waitingFor(Wait.forHttp("/q/health").forResponsePredicate((String response)->{ + ObjectNode status; + try { + status = (ObjectNode) new ObjectMapper().readTree(response); + } catch(Exception e) { + return false; + } + return status.get("status").asText().equals("UP"); + })); + } + + public Integer getPort() { + return this.getMappedPort(PORT); } } diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java index d44309f67..c9d572474 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java @@ -2,8 +2,18 @@ import tech.ebp.oqm.plugin.mssController.lib.command.response.ModuleInfo; -public class MssTestSerialModule extends MssTestModule { - protected MssTestSerialModule(ModuleInfo moduleInfo) { +public class MssTestSerialModule extends MssTestModule { + public MssTestSerialModule(ModuleInfo moduleInfo) { super(moduleInfo); } + + + @Override + protected void configure() { + addEnv("moduleConfig.type", "SERIAL"); + + //TODO:: directory mapping for serial ports + + super.configure(); + } } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/pom.xml b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/pom.xml index cf4f7f1da..7c0038b1c 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/pom.xml +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/pom.xml @@ -65,6 +65,14 @@ io.quarkus quarkus-scheduler + + io.quarkus + quarkus-container-image-jib + + + io.quarkus + quarkus-smallrye-health + com.fazecast jSerialComm diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java new file mode 100644 index 000000000..12d204163 --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java @@ -0,0 +1,29 @@ +package tech.ebp.oqm.plugin.mssController.testModuleServer; + +import io.quarkus.runtime.StartupEvent; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import lombok.extern.slf4j.Slf4j; +import tech.ebp.oqm.plugin.mssController.testModuleServer.config.ModuleConfig; + +@Singleton +@Slf4j +public class StartupHandler { + @Inject + ModuleConfig moduleConfig; + + + void onStart( + @Observes + StartupEvent ev + ) { + log.info("Starting test module server: \n\t{} \n\t{} \n\t{}", + this.moduleConfig.type(), + this.moduleConfig.serialId(), + this.moduleConfig.numBlocks() + ); + + log.info("MSS Test Module Server started."); + } +} diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/config/ModuleConfig.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/config/ModuleConfig.java index 87ed12853..9083ed15c 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/config/ModuleConfig.java +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/config/ModuleConfig.java @@ -11,7 +11,6 @@ public interface ModuleConfig { TestModuleType type(); - enum TestModuleType{ SERIAL, NETWORK } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/resources/application.properties b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/resources/application.properties index 70882b76a..18fb98303 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/resources/application.properties +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/resources/application.properties @@ -1,2 +1,4 @@ - -moduleConfig.type=serial \ No newline at end of file +moduleConfig.type=serial +quarkus.container-image.name=oqm-plugin-mss_controller-test_module_server +quarkus.container-image.group=ebprod +quarkus.container-image.build=true \ No newline at end of file diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/resources/application.properties b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/resources/application.properties new file mode 100644 index 000000000..039a237ad --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/resources/application.properties @@ -0,0 +1,6 @@ + +moduleConfig.serialId=test-1234 +moduleConfig.type=SERIAL +moduleConfig.manufactureDate="today" +moduleConfig.numBlocks=10 +moduleConfig.specVersion="1" \ No newline at end of file diff --git a/software/plugins/mss-controller/mss-controller-plugin/pom.xml b/software/plugins/mss-controller/mss-controller-plugin/pom.xml index b27f382af..4a439a119 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/pom.xml +++ b/software/plugins/mss-controller/mss-controller-plugin/pom.xml @@ -105,7 +105,7 @@ tech.ebp.oqm.lib core-api-lib-quarkus - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT com.fazecast diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/main/resources/application.yaml b/software/plugins/mss-controller/mss-controller-plugin/src/main/resources/application.yaml index 949d75aae..387d934ed 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/src/main/resources/application.yaml +++ b/software/plugins/mss-controller/mss-controller-plugin/src/main/resources/application.yaml @@ -13,6 +13,9 @@ voiceSearch: quarkus: application: name: OQM MSS Controller Plugin + container-image: + name: oqm-plugin-mss_controller + group: ebprod rest-client: "com.ebp.openQuarterMaster.plugin.restClients.KeycloakRestClient": url: ${quarkus.oidc.auth-server-url} From f049ba60aac37aafffac72618c6d4b33d09c304b Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Fri, 23 Aug 2024 15:57:11 -0400 Subject: [PATCH 6/9] Plugin - Mss Controller - Now have functionalish test setup --- .../CoreApiLibQuarkusProcessor.java | 41 +++++++++---------- .../deployment/testModules/MssTestModule.java | 11 +++-- .../testModules/MssTestSerialModule.java | 16 +++++++- .../testModuleServer/ShutdownHandler.java | 41 +++++++++++++++++++ .../testModuleServer/StartupHandler.java | 12 ++++++ .../serial/SerialModuleInterface.java | 13 ++++-- .../interfaces/serial/TestSerialPort.java | 12 ++++-- .../testModuleServer/SerialPortTest.java | 27 ++++++++++++ .../testProfiles/SerialPortTestProfile.java | 15 +++++++ .../plugin/mssController/LifecycleBean.java | 32 +++++++++++++++ .../mssController/config/ModuleConfig.java | 6 ++- .../interfaces/ui/BasicUiTest.java | 3 ++ .../profiles/NoModulesTestProfile.java | 15 +++++++ .../profiles/SingleSerialPortTestProfile.java | 15 +++++++ .../src/test/resources/application.yaml | 4 ++ 15 files changed, 228 insertions(+), 35 deletions(-) create mode 100644 software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/ShutdownHandler.java create mode 100644 software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/SerialPortTest.java create mode 100644 software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/testProfiles/SerialPortTestProfile.java create mode 100644 software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/NoModulesTestProfile.java create mode 100644 software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/SingleSerialPortTestProfile.java diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java index d62cca038..f5dbee272 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/CoreApiLibQuarkusProcessor.java @@ -46,44 +46,41 @@ public List createContainer( curModuleConfig.info().numBlocks() ); - MssTestModule testModule = switch (curModuleConfig.type()) { + MssTestModule testModule = switch (curModuleConfig.type()) { case SERIAL -> new MssTestSerialModule(newModuleInfo); case NETWORK -> null; }; testModule.start(); - -// new DevServicesResultBuildItem.RunningDevService() - output.add(new DevServicesResultBuildItem.RunningDevService( FEATURE, testModule.getContainerId(), testModule::close, - new HashMap<>() + testModule.getAppConfig() ) .toBuildItem() ); } - ModuleInfo newModuleInfo = new ModuleInfo( - "1", - UUID.randomUUID().toString(), - "today", - 5 - ); - - MssTestModule testModule = new MssTestSerialModule(newModuleInfo); - testModule.start(); - output.add(new DevServicesResultBuildItem.RunningDevService( - FEATURE, - testModule.getContainerId(), - testModule::close, - new HashMap<>() - ) - .toBuildItem() - ); +// ModuleInfo newModuleInfo = new ModuleInfo( +// "1", +// UUID.randomUUID().toString(), +// "today", +// 5 +// ); +// +// MssTestModule testModule = new MssTestSerialModule(newModuleInfo); +// testModule.start(); +// output.add(new DevServicesResultBuildItem.RunningDevService( +// FEATURE, +// testModule.getContainerId(), +// testModule::close, +// testModule.getAppConfig() +// ) +// .toBuildItem() +// ); return output; } diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java index af51dc62d..d399793d8 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestModule.java @@ -3,18 +3,19 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.eclipse.microprofile.config.ConfigProvider; -import org.eclipse.microprofile.config.inject.ConfigProperties; -import org.eclipse.microprofile.config.inject.ConfigProperty; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.Network; import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.utility.DockerImageName; -import tech.ebp.oqm.plugin.mssController.lib.command.MssCommand; import tech.ebp.oqm.plugin.mssController.lib.command.response.ModuleInfo; +import java.util.HashMap; +import java.util.Map; + public abstract class MssTestModule> extends GenericContainer { protected ModuleInfo moduleInfo; + protected Map appConfig = new HashMap<>(); protected MssTestModule(ModuleInfo moduleInfo) { super(DockerImageName.parse("ebprod/oqm-plugin-mss_controller-test_module_server:" + ConfigProvider.getConfig().getValue("quarkus.application.version", String.class))); @@ -23,6 +24,10 @@ protected MssTestModule(ModuleInfo moduleInfo) { static final int PORT = 8123; + public Map getAppConfig() { + return this.appConfig; + } + @Override protected void configure() { diff --git a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java index c9d572474..e0917eafc 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java +++ b/software/plugins/mss-controller/mss-controller-plugin-devtools/deployment/src/main/java/tech/ebp/oqm/plugin/mssController/devTools/deployment/testModules/MssTestSerialModule.java @@ -1,18 +1,30 @@ package tech.ebp.oqm.plugin.mssController.devTools.deployment.testModules; +import org.testcontainers.containers.BindMode; +import org.testcontainers.containers.SelinuxContext; import tech.ebp.oqm.plugin.mssController.lib.command.response.ModuleInfo; public class MssTestSerialModule extends MssTestModule { + private static final String HOST_SERIAL_DIR = "/tmp/oqm/mss-test/serialModules/"; + public MssTestSerialModule(ModuleInfo moduleInfo) { super(moduleInfo); } - @Override protected void configure() { addEnv("moduleConfig.type", "SERIAL"); + addFileSystemBind( + HOST_SERIAL_DIR, + "/dev/pts/", + BindMode.READ_WRITE, + SelinuxContext.NONE + ); - //TODO:: directory mapping for serial ports + this.appConfig.put("moduleConfig.serial.scanSerial", "true"); + this.appConfig.put("moduleConfig.serial.scanDir", HOST_SERIAL_DIR); + //TODO:: do? How? even possible? +// addEnv("moduleConfig.serial.modules[0].portPath", "GET"); super.configure(); } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/ShutdownHandler.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/ShutdownHandler.java new file mode 100644 index 000000000..2775e0524 --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/ShutdownHandler.java @@ -0,0 +1,41 @@ +package tech.ebp.oqm.plugin.mssController.testModuleServer; + +import io.quarkus.runtime.ShutdownEvent; +import io.quarkus.runtime.StartupEvent; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import lombok.extern.slf4j.Slf4j; +import tech.ebp.oqm.plugin.mssController.testModuleServer.config.ModuleConfig; +import tech.ebp.oqm.plugin.mssController.testModuleServer.interfaces.serial.SerialModuleInterface; + +@Singleton +@Slf4j +public class ShutdownHandler { + @Inject + ModuleConfig moduleConfig; + + @Inject + SerialModuleInterface serialModuleInterface; + + void onEnd( + @Observes + ShutdownEvent ev + ) { + log.info("CLOSING test module server: \n\t{} \n\t{} \n\t{}", + this.moduleConfig.type(), + this.moduleConfig.serialId(), + this.moduleConfig.numBlocks() + ); + + switch (this.moduleConfig.type()){ + case SERIAL -> { + this.serialModuleInterface.getTestSerialPort().close(); + } + case NETWORK -> { + } + } + + log.info("MSS Test Module Server shutdown."); + } +} diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java index 12d204163..d9bd5df0e 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/StartupHandler.java @@ -6,6 +6,7 @@ import jakarta.inject.Singleton; import lombok.extern.slf4j.Slf4j; import tech.ebp.oqm.plugin.mssController.testModuleServer.config.ModuleConfig; +import tech.ebp.oqm.plugin.mssController.testModuleServer.interfaces.serial.SerialModuleInterface; @Singleton @Slf4j @@ -13,6 +14,8 @@ public class StartupHandler { @Inject ModuleConfig moduleConfig; + @Inject + SerialModuleInterface serialModuleInterface; void onStart( @Observes @@ -24,6 +27,15 @@ void onStart( this.moduleConfig.numBlocks() ); + switch (this.moduleConfig.type()){ + case SERIAL -> { + //to ensure initted + this.serialModuleInterface.getTestSerialPort(); + } + case NETWORK -> { + } + } + log.info("MSS Test Module Server started."); } } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/SerialModuleInterface.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/SerialModuleInterface.java index d819ea464..e85e3d4b4 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/SerialModuleInterface.java +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/SerialModuleInterface.java @@ -8,6 +8,7 @@ import jakarta.annotation.PostConstruct; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; import tech.ebp.oqm.plugin.mssController.lib.command.MssCommand; import tech.ebp.oqm.plugin.mssController.lib.command.response.CommandResponse; @@ -20,19 +21,23 @@ @Slf4j @ApplicationScoped public class SerialModuleInterface { - + @Inject + ModuleConfig config; @Inject TestModuleImpl testModuleImpl; @Inject ObjectMapper objectMapper; + + @Getter TestSerialPort testSerialPort; @Inject Scheduler scheduler; @PostConstruct - public void init(ModuleConfig config) throws IOException { - if(config.type() == ModuleConfig.TestModuleType.SERIAL){ + public void init() throws IOException { + if(this.config.type() != ModuleConfig.TestModuleType.SERIAL){ + log.info("NOT configured to setup serial."); return; } @@ -60,4 +65,6 @@ public void process(ScheduledExecution scheduledExecution) { } log.debug("Done with process loop."); } + + } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/TestSerialPort.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/TestSerialPort.java index 2cfe8af3d..8d4e4634a 100644 --- a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/TestSerialPort.java +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/main/java/tech/ebp/oqm/plugin/mssController/testModuleServer/interfaces/serial/TestSerialPort.java @@ -6,7 +6,6 @@ import lombok.*; import lombok.extern.slf4j.Slf4j; import tech.ebp.oqm.plugin.mssController.lib.command.MssCommand; -import tech.ebp.oqm.plugin.mssController.lib.command.response.CommandResponse; import tech.ebp.oqm.plugin.mssController.testModuleServer.interfaces.TestModuleInterface; import java.io.Closeable; @@ -71,7 +70,7 @@ public TestSerialPort(ObjectMapper objectMapper) throws IOException { this.mssModuleSerialPort = SerialPort.getCommPort(this.mssModulePortLocation); - log.info("Got ports: {} (for hw impl) and {} (to connect to)", mssModulePortLocation, mssConnectionPortLocation); + log.info("Got ports: {} (for hw impl) and {} (to connect to)", this.mssModulePortLocation, this.mssConnectionPortLocation); } private String readLine() { @@ -134,10 +133,15 @@ public void sendCommand(Object object) { @SneakyThrows @Override - public void close() throws IOException { + public void close() { log.info("Closing out test serial port."); this.process.destroy(); - this.process.waitFor(); + try { + this.process.waitFor(); + } catch (InterruptedException e) { + log.error("Failed to wait for process to finish.", e); + this.process.destroyForcibly(); + } log.info("Exited socat with code {}", this.process.exitValue()); } } diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/SerialPortTest.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/SerialPortTest.java new file mode 100644 index 000000000..87791d5c0 --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/SerialPortTest.java @@ -0,0 +1,27 @@ +package tech.ebp.oqm.plugin.mssController.testModuleServer; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.QuarkusTestProfile; +import io.quarkus.test.junit.TestProfile; +import org.junit.jupiter.api.Test; +import tech.ebp.oqm.plugin.mssController.testModuleServer.testProfiles.SerialPortTestProfile; + +import java.util.Map; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.is; + +@QuarkusTest +@TestProfile(SerialPortTestProfile.class) +class SerialPortTest { + + @Test + void testHelloEndpoint() { + given() + .when().get("/hello") + .then() + .statusCode(200) + .body(is("Hello from Quarkus REST")); + } + +} \ No newline at end of file diff --git a/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/testProfiles/SerialPortTestProfile.java b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/testProfiles/SerialPortTestProfile.java new file mode 100644 index 000000000..de2f83580 --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin-testModuleServer/src/test/java/tech/ebp/oqm/plugin/mssController/testModuleServer/testProfiles/SerialPortTestProfile.java @@ -0,0 +1,15 @@ +package tech.ebp.oqm.plugin.mssController.testModuleServer.testProfiles; + +import io.quarkus.test.junit.QuarkusTestProfile; + +import java.util.Map; + + +public class SerialPortTestProfile implements QuarkusTestProfile { + @Override + public Map getConfigOverrides() { + return Map.of( + "moduleConfig.type", "SERIAL" + ); + } +} diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/LifecycleBean.java b/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/LifecycleBean.java index f7cb64ede..db795ed01 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/LifecycleBean.java +++ b/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/LifecycleBean.java @@ -1,5 +1,6 @@ package tech.ebp.oqm.plugin.mssController; +import org.eclipse.microprofile.config.ConfigProvider; import tech.ebp.oqm.plugin.mssController.moduleInteraction.ModuleMaster; import io.quarkus.runtime.ShutdownEvent; import io.quarkus.runtime.StartupEvent; @@ -9,6 +10,8 @@ import lombok.extern.slf4j.Slf4j; import java.io.IOException; +import java.util.NoSuchElementException; +import java.util.TreeMap; @Singleton @Slf4j @@ -19,11 +22,40 @@ public class LifecycleBean { // @Inject // VoiceSearchService voiceSearchService; + + public static void logConfig(){ + if (log.isDebugEnabled()) { + TreeMap configMap = new TreeMap<>(); + + for(String curProp : ConfigProvider.getConfig().getPropertyNames()){ + String value; + try { + value = ConfigProvider.getConfig().getValue(curProp, String.class); + } catch(NoSuchElementException e) { + value = ""; + } + configMap.put(curProp, value); + } + + StringBuilder sb = new StringBuilder(); + for (String curProp : configMap.keySet()) { + + sb.append('\t'); + sb.append(curProp); + sb.append('='); + sb.append(configMap.get(curProp)); + sb.append(System.lineSeparator()); + } + log.debug("Configuration: \n{}", sb); + } + } void onStart( @Observes StartupEvent ev ) throws IOException { + logConfig(); + log.info( "Finished initting Module Master. Picked up on modules: {}", this.moduleMaster.getModuleIds() diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/config/ModuleConfig.java b/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/config/ModuleConfig.java index 15cbf7375..1d334b01b 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/config/ModuleConfig.java +++ b/software/plugins/mss-controller/mss-controller-plugin/src/main/java/tech/ebp/oqm/plugin/mssController/config/ModuleConfig.java @@ -18,10 +18,14 @@ public interface ModuleConfig { SerialConfig serial(); interface SerialConfig { - + @WithName("scanSerial") @WithDefault("true") boolean scanSerial(); + + @WithName("scanDir") + @WithDefault("/dev/")//TODO:: doublecheck + String scanDir(); @WithName("modules") Set modules(); diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/interfaces/ui/BasicUiTest.java b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/interfaces/ui/BasicUiTest.java index 015262cd2..55cbbe7d3 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/interfaces/ui/BasicUiTest.java +++ b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/interfaces/ui/BasicUiTest.java @@ -1,5 +1,7 @@ package tech.ebp.oqm.plugin.mssController.interfaces.ui; +import io.quarkus.test.junit.TestProfile; +import tech.ebp.oqm.plugin.mssController.testResources.profiles.NoModulesTestProfile; import tech.ebp.oqm.plugin.mssController.testResources.testClasses.WebUiTest; import tech.ebp.oqm.plugin.mssController.testResources.testUsers.TestUserService; import io.quarkus.test.junit.QuarkusTest; @@ -9,6 +11,7 @@ @Slf4j @QuarkusTest +@TestProfile(NoModulesTestProfile.class) public class BasicUiTest extends WebUiTest { @Getter diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/NoModulesTestProfile.java b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/NoModulesTestProfile.java new file mode 100644 index 000000000..386770c96 --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/NoModulesTestProfile.java @@ -0,0 +1,15 @@ +package tech.ebp.oqm.plugin.mssController.testResources.profiles; + +import io.quarkus.test.junit.QuarkusTestProfile; + +import java.util.Map; + + +public class NoModulesTestProfile implements QuarkusTestProfile { + @Override + public Map getConfigOverrides() { + return Map.of( + "quarkus.mssControllerDev.devservices.modules[0].type", "SERIAL" + ); + } +} diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/SingleSerialPortTestProfile.java b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/SingleSerialPortTestProfile.java new file mode 100644 index 000000000..fc485013d --- /dev/null +++ b/software/plugins/mss-controller/mss-controller-plugin/src/test/java/tech/ebp/oqm/plugin/mssController/testResources/profiles/SingleSerialPortTestProfile.java @@ -0,0 +1,15 @@ +package tech.ebp.oqm.plugin.mssController.testResources.profiles; + +import io.quarkus.test.junit.QuarkusTestProfile; + +import java.util.Map; + + +public class SingleSerialPortTestProfile implements QuarkusTestProfile { + @Override + public Map getConfigOverrides() { + return Map.of( + "quarkus.mssControllerDev.devservices.modules[0].type", "SERIAL" + ); + } +} diff --git a/software/plugins/mss-controller/mss-controller-plugin/src/test/resources/application.yaml b/software/plugins/mss-controller/mss-controller-plugin/src/test/resources/application.yaml index af2466cd0..ac31ca788 100644 --- a/software/plugins/mss-controller/mss-controller-plugin/src/test/resources/application.yaml +++ b/software/plugins/mss-controller/mss-controller-plugin/src/test/resources/application.yaml @@ -1,6 +1,10 @@ quarkus: application: name: Open QuarterMaster MSS Controller Plugin (TEST) + mssControllerDev: + devServices: + modules: + - type: SERIAL log: level: DEBUG smallrye-openapi: From e5cf1b7f25edef30034b3a7d2a9a219ce667ff40 Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Tue, 27 Aug 2024 22:35:06 -0400 Subject: [PATCH 7/9] Core - Base Station - Top search bar now more compact --- .../resources/META-INF/resources/res/js/main.js | 14 +++++--------- .../templates/webui/mainWebPageTemplate.html | 15 +++++++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/software/oqm-core-base-station/src/main/resources/META-INF/resources/res/js/main.js b/software/oqm-core-base-station/src/main/resources/META-INF/resources/res/js/main.js index 7eff615ef..fd2f731dd 100644 --- a/software/oqm-core-base-station/src/main/resources/META-INF/resources/res/js/main.js +++ b/software/oqm-core-base-station/src/main/resources/META-INF/resources/res/js/main.js @@ -2,14 +2,10 @@ const navSearchInput = $('#navSearchInput'); const navSearchForm = $('#navSearchForm'); const navSearchTypeSelect = $('#navSearchTypeSelect'); -navSearchTypeSelect.on("change", function(event){ - console.log( - "Changing nav form to " + - "action: " + navSearchTypeSelect[0].options[event.target.selectedIndex].dataset.action + - " with fieldName: " + navSearchTypeSelect[0].options[event.target.selectedIndex].dataset.field - ); - navSearchForm.attr("action", navSearchTypeSelect[0].options[event.target.selectedIndex].dataset.action); - navSearchInput.attr("name", navSearchTypeSelect[0].options[event.target.selectedIndex].dataset.field); -}); +function updateNavSearchDestination(action, icon, fieldName){ + navSearchForm.attr("action", action); + navSearchTypeSelect.html(icon); + navSearchInput.attr("name", fieldName); +} TimeHelpers.setupDateTimeInputs(); \ No newline at end of file diff --git a/software/oqm-core-base-station/src/main/resources/templates/webui/mainWebPageTemplate.html b/software/oqm-core-base-station/src/main/resources/templates/webui/mainWebPageTemplate.html index 7a77b63da..7490e3dd9 100644 --- a/software/oqm-core-base-station/src/main/resources/templates/webui/mainWebPageTemplate.html +++ b/software/oqm-core-base-station/src/main/resources/templates/webui/mainWebPageTemplate.html @@ -163,12 +163,15 @@ - - From d205af21bdd7b7419d2b4f8c3f4808b38d2a9a61 Mon Sep 17 00:00:00 2001 From: GregJohnStewart Date: Wed, 28 Aug 2024 08:15:59 -0400 Subject: [PATCH 9/9] Core - Base Station - version bump --- software/oqm-core-base-station/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/oqm-core-base-station/build.gradle b/software/oqm-core-base-station/build.gradle index ede222347..be6d322bd 100644 --- a/software/oqm-core-base-station/build.gradle +++ b/software/oqm-core-base-station/build.gradle @@ -5,7 +5,7 @@ plugins { } group 'com.ebp.openQuarterMaster' -version '1.4.2' +version '1.4.3' repositories { mavenCentral()