generated from coulomb/repo-seed
- flake.nix adapted from inter-hub: appName=ihp-railiance-probe, stripped to core packages, GHC 9.10.3 Bug 1+2 overlays carried verbatim (pname check updated to ihp-railiance-probe-models) - IHP project scaffold: Main.hs, Config.hs, App.cabal, Setup.hs, Makefile - Schema: probes table (id, name, created_at) - Health endpoint: GET /healthz → "ok" (HealthController) - Probes CRUD: ProbesController + 4 views (Index, New, Show, Edit) - Hspec test suite: Test/ProbeControllerSpec covers /probes and /healthz - Helm chart in chart/: deployment, service, ingress, secret templates - devenv.nix, devenv.yaml, .ghci, tailwind config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
533 B
Haskell
23 lines
533 B
Haskell
module Web.View.Probes.Index where
|
|
|
|
import Web.View.Prelude
|
|
|
|
data IndexView = IndexView { probes :: [Probe] }
|
|
|
|
instance View IndexView where
|
|
html IndexView { .. } = [hsx|
|
|
<h1>Probes</h1>
|
|
<a href={NewProbeAction}>New Probe</a>
|
|
<ul>
|
|
{forEach probes renderProbe}
|
|
</ul>
|
|
|]
|
|
|
|
renderProbe :: Probe -> Html
|
|
renderProbe probe = [hsx|
|
|
<li>
|
|
<a href={ShowProbeAction probe.id}>{probe.name}</a>
|
|
<a href={DeleteProbeAction probe.id} class="js-delete">Delete</a>
|
|
</li>
|
|
|]
|