feat(status): show radar enrichment progress alongside HRRR/Weather/Terrain/IEMRE
This commit is contained in:
parent
26640b1204
commit
a7bea4a7f2
1 changed files with 7 additions and 1 deletions
|
|
@ -91,6 +91,7 @@ defmodule MicrowavepropWeb.StatusLive do
|
||||||
hrrr = count_incomplete(:hrrr_status, incomplete)
|
hrrr = count_incomplete(:hrrr_status, incomplete)
|
||||||
weather = count_incomplete(:weather_status, incomplete)
|
weather = count_incomplete(:weather_status, incomplete)
|
||||||
iemre = count_incomplete(:iemre_status, incomplete)
|
iemre = count_incomplete(:iemre_status, incomplete)
|
||||||
|
radar = count_incomplete(:radar_status, incomplete)
|
||||||
|
|
||||||
narr_candidates = count_narr_candidates()
|
narr_candidates = count_narr_candidates()
|
||||||
narr_done = count_narr_done()
|
narr_done = count_narr_done()
|
||||||
|
|
@ -102,6 +103,7 @@ defmodule MicrowavepropWeb.StatusLive do
|
||||||
hrrr: hrrr,
|
hrrr: hrrr,
|
||||||
weather: weather,
|
weather: weather,
|
||||||
iemre: iemre,
|
iemre: iemre,
|
||||||
|
radar: radar,
|
||||||
narr_candidates: narr_candidates,
|
narr_candidates: narr_candidates,
|
||||||
narr_done: narr_done,
|
narr_done: narr_done,
|
||||||
remaining: max(terrain, max(hrrr, max(weather, iemre))),
|
remaining: max(terrain, max(hrrr, max(weather, iemre))),
|
||||||
|
|
@ -380,6 +382,9 @@ defmodule MicrowavepropWeb.StatusLive do
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
'iemre', iemre_status, count(*) FROM contacts GROUP BY iemre_status
|
'iemre', iemre_status, count(*) FROM contacts GROUP BY iemre_status
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
'radar', radar_status, count(*) FROM contacts GROUP BY radar_status
|
||||||
ORDER BY 1, 2
|
ORDER BY 1, 2
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
@ -484,6 +489,7 @@ defmodule MicrowavepropWeb.StatusLive do
|
||||||
{"weather", "Weather", @unprocessed.total - @unprocessed.weather, @unprocessed.total},
|
{"weather", "Weather", @unprocessed.total - @unprocessed.weather, @unprocessed.total},
|
||||||
{"terrain", "Terrain", @unprocessed.total - @unprocessed.terrain, @unprocessed.total},
|
{"terrain", "Terrain", @unprocessed.total - @unprocessed.terrain, @unprocessed.total},
|
||||||
{"iemre", "IEMRE", @unprocessed.total - @unprocessed.iemre, @unprocessed.total},
|
{"iemre", "IEMRE", @unprocessed.total - @unprocessed.iemre, @unprocessed.total},
|
||||||
|
{"radar", "Radar", @unprocessed.total - @unprocessed.radar, @unprocessed.total},
|
||||||
{"narr", "NARR", @unprocessed.narr_done, @unprocessed.narr_candidates}
|
{"narr", "NARR", @unprocessed.narr_done, @unprocessed.narr_candidates}
|
||||||
] do %>
|
] do %>
|
||||||
<% pct = if denom > 0, do: round(complete * 100 / denom), else: 0 %>
|
<% pct = if denom > 0, do: round(complete * 100 / denom), else: 0 %>
|
||||||
|
|
@ -632,7 +638,7 @@ defmodule MicrowavepropWeb.StatusLive do
|
||||||
|
|
||||||
<h2 class="text-base font-semibold mb-2">Enrichment Status by Type</h2>
|
<h2 class="text-base font-semibold mb-2">Enrichment Status by Type</h2>
|
||||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
||||||
<%= for {type, label} <- [{"hrrr", "HRRR"}, {"weather", "Weather"}, {"terrain", "Terrain"}, {"iemre", "IEMRE"}, {"narr", "NARR"}] do %>
|
<%= for {type, label} <- [{"hrrr", "HRRR"}, {"weather", "Weather"}, {"terrain", "Terrain"}, {"iemre", "IEMRE"}, {"radar", "Radar"}, {"narr", "NARR"}] do %>
|
||||||
<div class="bg-base-200 rounded-box p-3 text-xs">
|
<div class="bg-base-200 rounded-box p-3 text-xs">
|
||||||
<div class="font-semibold mb-1">{label}</div>
|
<div class="font-semibold mb-1">{label}</div>
|
||||||
<%= for {status, count} <- Map.get(@db_stats.statuses, type, []) do %>
|
<%= for {status, count} <- Map.get(@db_stats.statuses, type, []) do %>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue