From 53861f0b20a2f09c9a79741f7216d7005e6d520d Mon Sep 17 00:00:00 2001 From: DianaMoor Date: Thu, 29 Aug 2024 12:17:43 +0200 Subject: [PATCH 1/3] add fallback font: Arial, Helvetica, sans-serif --- ModulineWebUI/style/color.css | 2 +- ModulineWebUI/style/main.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ModulineWebUI/style/color.css b/ModulineWebUI/style/color.css index d900ce5..b053562 100644 --- a/ModulineWebUI/style/color.css +++ b/ModulineWebUI/style/color.css @@ -28,7 +28,7 @@ * { - font-family: NotoSans; + font-family: 'NotoSans', Arial, Helvetica, sans-serif; color: black; } diff --git a/ModulineWebUI/style/main.css b/ModulineWebUI/style/main.css index 9f80ca5..c6e952f 100644 --- a/ModulineWebUI/style/main.css +++ b/ModulineWebUI/style/main.css @@ -27,7 +27,7 @@ * { - font-family: NotoSans; + font-family: 'NotoSans', Arial, Helvetica, sans-serif; color: black; } From a64b61830815491c92096856f318dcbffe0d36a3 Mon Sep 17 00:00:00 2001 From: SpieringsAE Date: Thu, 5 Sep 2024 09:16:29 +0200 Subject: [PATCH 2/3] preperation for the 1.0.1 release --- CHANGELOG.md | 5 +++++ ModulineWebUI/controller.py | 17 ++++++++++++----- README.md | 2 +- setup.py | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..971acb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +## V1.0.1 +Changed get_sim_ver api to use the three files in mem-sim instead of trying to pull the version from the CHANGELOG.md + +## V1.0.0 +Initial release \ No newline at end of file diff --git a/ModulineWebUI/controller.py b/ModulineWebUI/controller.py index 8fc04f8..3f65b3a 100644 --- a/ModulineWebUI/controller.py +++ b/ModulineWebUI/controller.py @@ -6,7 +6,7 @@ from microdot.session import Session, with_session from ModulineWebUI.app import app, auth -from ModulineWebUI.handlers.service import get_service, set_service, services +from ModulineWebUI.handlers.service import get_service, services, set_service @app.post("/api/get_service") @@ -32,7 +32,9 @@ async def set_service_route(req: Request, session: Session): if is_changed: return json.dumps({"new_state": new_state}) else: - return json.dumps({"err": f"Failed to change service '{service}' state {error}"}) + return json.dumps( + {"err": f"Failed to change service '{service}' state {error}"} + ) else: return json.dumps({"err": "Invalid service"}) @@ -43,9 +45,14 @@ async def set_service_route(req: Request, session: Session): @auth async def get_sim_ver(req: Request, session: Session): try: - with open("/usr/simulink/CHANGELOG.md", "r") as changelog: - head = changelog.readline() - return json.dumps({"version": head.split(" ")[1].strip()}) + with open("/usr/mem-sim/MODEL_MAJOR", "r") as major: + major_ver = major.readline() + with open("/usr/mem-sim/MODEL_FEATURE", "r") as feature: + feature_ver = feature.readline() + with open("/usr/mem-sim/MODEL_FIX", "r") as fix: + fix_ver = fix.readline() + version = f"V{major_ver}.{feature_ver}.{fix_ver}" + return json.dumps({"version": version}) except Exception as ex: return json.dumps({"err": f"No changelog found\n{ex}"}) diff --git a/README.md b/README.md index abcde9e..5961582 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ then run to install the module in your venv while using the regular project files as the source then run -`go-webui -passkey test` +`go-webui --passkey test` to launch the webserver with the passkey 'test' `python3 setup.py sdist` diff --git a/setup.py b/setup.py index cc679af..fa5c68f 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="ModulineWebUI", - version="1.0.0", + version="1.0.1", description="A web UI to configure GOcontroll Moduline controllers", url="https://github.com/GOcontroll/Moduline-WebUI", license="MIT", From 8370c6752fa88bac0aa14e87e1e1204333fe92fc Mon Sep 17 00:00:00 2001 From: SpieringsAE Date: Thu, 5 Sep 2024 16:32:42 +0200 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 971acb8..83762ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## V1.0.1 -Changed get_sim_ver api to use the three files in mem-sim instead of trying to pull the version from the CHANGELOG.md +- Fix: Changed get_sim_ver api to use the three files in mem-sim instead of trying to pull the version from the CHANGELOG.md +- Fix: Added fallback font ## V1.0.0 Initial release \ No newline at end of file