diff --git a/firmware/config/config.exs b/firmware/config/config.exs index d8cb81f..1ad0366 100644 --- a/firmware/config/config.exs +++ b/firmware/config/config.exs @@ -27,7 +27,7 @@ config :shoehorn, config :logger, backends: [RingLogger] config :ui, UiWeb.Endpoint, - url: [host: "localhost"], + url: [host: "www.geokunis2.nl"], http: [port: 80], secret_key_base: "HEY05EB1dFVSu6KykKHuS4rQPQzSHv4F7mGVB/gnDLrIu75wE/ytBXy2TaL3A6RA", root: Path.dirname(__DIR__), diff --git a/morse/lib/morse_server.ex b/morse/lib/morse_server.ex index af38117..8965cdf 100644 --- a/morse/lib/morse_server.ex +++ b/morse/lib/morse_server.ex @@ -37,7 +37,7 @@ defmodule MorseServer do end @impl true - def handle_cast({:progress, new_progress}, {pid, progress}) do + def handle_cast({:progress, new_progress}, {pid, _progress}) do broadcast_progress(new_progress) {:noreply, {pid, new_progress}} end diff --git a/ui/assets/js/socket.js b/ui/assets/js/socket.js index be009a5..799035e 100644 --- a/ui/assets/js/socket.js +++ b/ui/assets/js/socket.js @@ -12,8 +12,8 @@ channel.join() let progressBar = document.getElementById("morse-progress") channel.on("update", (content) => { - console.log(content["value"]) progressBar.value = content["value"] + progressBar.innerHTML = content["value"] }); export default socket diff --git a/ui/lib/ui_web/channels/morse_progress_channel.ex b/ui/lib/ui_web/channels/morse_progress_channel.ex index 80a6dcb..90fb6eb 100644 --- a/ui/lib/ui_web/channels/morse_progress_channel.ex +++ b/ui/lib/ui_web/channels/morse_progress_channel.ex @@ -2,6 +2,6 @@ defmodule UiWeb.MorseProgressChannel do use UiWeb, :channel def join(channel_name, _params, socket) do - {:ok, %{hi: :there}, socket} + {:ok, channel: channel_name, socket} end end