From 3695d4874f0d465def83db2d0cfcb7f75fde9ecd Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Fri, 22 Sep 2023 21:09:36 +0300 Subject: [PATCH] Implement pump view --- manifest.toml | 8 +- priv/index.html | 28 + src/bitwise_ffi.mjs | 3 + src/geo_t/helpers/timers.gleam | 2 + src/geo_t/pump_api/api.gleam | 8 + src/geo_t/pump_api/auth/api.gleam | 15 +- .../pump_api/auth/installation_info.gleam | 12 +- src/geo_t/pump_api/device.gleam | 19 + src/geo_t/pump_api/device/api.gleam | 325 ++++++ src/geo_t/pump_api/device/opstat.gleam | 1 + src/geo_t/pump_api/device/register.gleam | 17 + src/geo_t/pump_api/http.gleam | 31 + src/geo_t/web.gleam | 84 +- src/geo_t/web/installations_view.gleam | 20 +- src/geo_t/web/pump_view.gleam | 926 ++++++++++++++++++ src/timers_ffi.mjs | 3 + 16 files changed, 1470 insertions(+), 32 deletions(-) create mode 100644 src/bitwise_ffi.mjs create mode 100644 src/geo_t/helpers/timers.gleam create mode 100644 src/geo_t/pump_api/api.gleam create mode 100644 src/geo_t/pump_api/device.gleam create mode 100644 src/geo_t/pump_api/device/api.gleam create mode 100644 src/geo_t/pump_api/device/register.gleam create mode 100644 src/geo_t/web/pump_view.gleam create mode 100644 src/timers_ffi.mjs diff --git a/manifest.toml b/manifest.toml index ef4883a..eeab1a9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,15 +2,15 @@ # You typically do not need to edit this file packages = [ - { name = "gleam_fetch", version = "0.2.0", build_tools = ["gleam"], requirements = ["gleam_http", "gleam_javascript"], otp_app = "gleam_fetch", source = "hex", outer_checksum = "D0C9E9CAE8D6EFCCC3A9FF817DCA9ED327097222086D91DE4F6CA8FBAB02D79F" }, + { name = "gleam_fetch", version = "0.2.0", build_tools = ["gleam"], requirements = ["gleam_javascript", "gleam_http"], otp_app = "gleam_fetch", source = "hex", outer_checksum = "D0C9E9CAE8D6EFCCC3A9FF817DCA9ED327097222086D91DE4F6CA8FBAB02D79F" }, { name = "gleam_http", version = "3.5.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "FAE9AE3EB1CA90C2194615D20FFFD1E28B630E84DACA670B28D959B37BCBB02C" }, { name = "gleam_javascript", version = "0.6.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_javascript", source = "hex", outer_checksum = "BFEBB63ABE4A1694E07DEFD19B160C2980304B5D775A89D4B02E7DE7C9D8008B" }, { name = "gleam_json", version = "0.6.0", build_tools = ["gleam"], requirements = ["thoas", "gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "C6CC5BEECA525117E97D0905013AB3F8836537455645DDDD10FE31A511B195EF" }, { name = "gleam_stdlib", version = "0.30.2", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "8D8BF3790AA31176B1E1C0B517DD74C86DA8235CF3389EA02043EE4FD82AE3DC" }, - { name = "lustre", version = "3.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "lustre", source = "hex", outer_checksum = "9A18A7588776C14FD14D3838DF5881EF12C611C2F55637DA528A60BCCA135B41" }, - { name = "plinth", version = "0.1.2", build_tools = ["gleam"], requirements = ["gleam_javascript", "gleam_stdlib"], otp_app = "plinth", source = "hex", outer_checksum = "E40A48FAA3AB9410803AB937BE620692D86B7ABB46459A83E8C674B82CFFD05B" }, + { name = "lustre", version = "3.0.5", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "lustre", source = "hex", outer_checksum = "6DD8FC3238623EF3CEC425780596C13FC7F7FFD53B3E44073669B61E6B5E4F02" }, + { name = "plinth", version = "0.1.3", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_javascript"], otp_app = "plinth", source = "hex", outer_checksum = "E81BA6A6CEAFFADBCB85B04DC817A4CDC43AFA7BB6AE56CE0B7C7E66D1C9ADD1" }, { name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" }, - { name = "varasto", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib", "plinth"], otp_app = "varasto", source = "hex", outer_checksum = "0621E5BFD0B9B7F7D19B8FC6369C6E2EAC5C1F3858A1E5E51342F5BCE10C3728" }, + { name = "varasto", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_json", "plinth"], otp_app = "varasto", source = "hex", outer_checksum = "0621E5BFD0B9B7F7D19B8FC6369C6E2EAC5C1F3858A1E5E51342F5BCE10C3728" }, ] [requirements] diff --git a/priv/index.html b/priv/index.html index efe3cd2..8ce4048 100644 --- a/priv/index.html +++ b/priv/index.html @@ -6,6 +6,34 @@ GeoTherminator + +