Update esbuild 0.27.4 and tailwind 4.2.2, add viewshed logging
This commit is contained in:
parent
bfd9ed6339
commit
6e5409bcd9
2 changed files with 7 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ import Config
|
||||||
|
|
||||||
# Configure esbuild (the version is required)
|
# Configure esbuild (the version is required)
|
||||||
config :esbuild,
|
config :esbuild,
|
||||||
version: "0.25.4",
|
version: "0.27.4",
|
||||||
microwaveprop: [
|
microwaveprop: [
|
||||||
args:
|
args:
|
||||||
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
|
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
|
||||||
|
|
@ -67,7 +67,7 @@ config :phoenix, :json_library, Jason
|
||||||
|
|
||||||
# Configure tailwind (the version is required)
|
# Configure tailwind (the version is required)
|
||||||
config :tailwind,
|
config :tailwind,
|
||||||
version: "4.1.12",
|
version: "4.2.2",
|
||||||
microwaveprop: [
|
microwaveprop: [
|
||||||
args: ~w(
|
args: ~w(
|
||||||
--input=assets/css/app.css
|
--input=assets/css/app.css
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ defmodule MicrowavepropWeb.MapLive do
|
||||||
alias Microwaveprop.Propagation.BandConfig
|
alias Microwaveprop.Propagation.BandConfig
|
||||||
alias Microwaveprop.Terrain.Viewshed
|
alias Microwaveprop.Terrain.Viewshed
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
@default_band 10_000
|
@default_band 10_000
|
||||||
@initial_bounds %{
|
@initial_bounds %{
|
||||||
"south" => 29.5,
|
"south" => 29.5,
|
||||||
|
|
@ -121,6 +123,7 @@ defmodule MicrowavepropWeb.MapLive do
|
||||||
@impl true
|
@impl true
|
||||||
def handle_async(:viewshed, {:ok, result}, socket) do
|
def handle_async(:viewshed, {:ok, result}, socket) do
|
||||||
points = Enum.map(result.boundary, fn p -> %{lat: p.lat, lon: p.lon} end)
|
points = Enum.map(result.boundary, fn p -> %{lat: p.lat, lon: p.lon} end)
|
||||||
|
Logger.info("Viewshed complete: #{length(points)} boundary points")
|
||||||
|
|
||||||
socket =
|
socket =
|
||||||
push_event(socket, "viewshed_result", %{
|
push_event(socket, "viewshed_result", %{
|
||||||
|
|
@ -131,7 +134,8 @@ defmodule MicrowavepropWeb.MapLive do
|
||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_async(:viewshed, {:exit, _reason}, socket) do
|
def handle_async(:viewshed, {:exit, reason}, socket) do
|
||||||
|
Logger.warning("Viewshed computation failed: #{inspect(reason)}")
|
||||||
{:noreply, socket}
|
{:noreply, socket}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue