diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-04-26 19:56:36 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-04-26 19:56:36 -0400 |
| commit | cc70fd1fc49ec08a8dba80508626cc42ac24cc26 (patch) | |
| tree | 2cffa4d44cd7b36d107871418aff20e330a33d24 | |
| parent | b02d2ba479446de6f38fce1e25cec8564ef9010a (diff) | |
| download | x-cc70fd1fc49ec08a8dba80508626cc42ac24cc26.tar.xz x-cc70fd1fc49ec08a8dba80508626cc42ac24cc26.zip | |
chore: run go mod generate
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | cmd/hdrwtch/docs_templ.go | 21 | ||||
| -rw-r--r-- | cmd/hdrwtch/main.go | 2 | ||||
| -rw-r--r-- | cmd/hdrwtch/probes_templ.go | 144 | ||||
| -rw-r--r-- | cmd/hdrwtch/static/css/styles.css | 3585 | ||||
| -rw-r--r-- | cmd/hdrwtch/styles.css | 2 | ||||
| -rw-r--r-- | cmd/hdrwtch/web_templ.go | 110 | ||||
| -rw-r--r-- | internal/mainsa/date.go | 6 | ||||
| -rw-r--r-- | langs/tokipona/internal/bindata.go | 233 | ||||
| -rw-r--r-- | langs/tokipona/internal/generate.go | 3 | ||||
| -rw-r--r-- | langs/tokipona/nimi.go | 8 | ||||
| -rw-r--r-- | langs/tokipona/tokipona.json (renamed from langs/tokipona/internal/data/tokipona.json) | 0 |
11 files changed, 1402 insertions, 2712 deletions
diff --git a/cmd/hdrwtch/docs_templ.go b/cmd/hdrwtch/docs_templ.go index 2134d2a..ce6f9fe 100644 --- a/cmd/hdrwtch/docs_templ.go +++ b/cmd/hdrwtch/docs_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.3.857 package main //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -11,6 +11,9 @@ import templruntime "github.com/a-h/templ/runtime" func docRender(d Doc) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -26,17 +29,17 @@ func docRender(d Doc) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if d.Frontmatter.Slug != "/" { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <a href=\"/docs/\" class=\"ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2\">Docs</a></div></li>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<li><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <a href=\"/docs/\" class=\"ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2\">Docs</a></div></li>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -49,7 +52,7 @@ func docRender(d Doc) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span></div></li></ol></div><div class=\"prose max-w-2xl\"><h1>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</span></div></li></ol></div><div class=\"prose max-w-2xl\"><h1>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -62,7 +65,7 @@ func docRender(d Doc) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><small>Last modified: ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</h1><small>Last modified: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -75,7 +78,7 @@ func docRender(d Doc) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</small><br>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</small><br>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -83,11 +86,11 @@ func docRender(d Doc) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/cmd/hdrwtch/main.go b/cmd/hdrwtch/main.go index eac3ddd..c568bac 100644 --- a/cmd/hdrwtch/main.go +++ b/cmd/hdrwtch/main.go @@ -20,7 +20,7 @@ import ( ) //go:generate tailwindcss --input styles.css --output static/css/styles.css -//go:generate go run github.com/a-h/templ/cmd/templ@latest generate +//go:generate go tool templ generate var ( botToken = flag.String("bot-token", "", "Telegram bot token") diff --git a/cmd/hdrwtch/probes_templ.go b/cmd/hdrwtch/probes_templ.go index 2d9619e..dec18f6 100644 --- a/cmd/hdrwtch/probes_templ.go +++ b/cmd/hdrwtch/probes_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.771 +// templ: version: v0.3.857 package main //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -16,6 +16,9 @@ import ( func probeListPage(probes []Probe) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -31,7 +34,7 @@ func probeListPage(probes []Probe) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"parent\"><div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li><li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">Probes</span></div></li></ol></div><h1 class=\"my-2 pt-4 mt-0 text-3xl font-medium leading-tight text-primary\">Probes</h1><div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300 table-auto\"><thead><tr><th scope=\"col\" class=\"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0\">Name</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">URL</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">Last Result</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\"></th></tr></thead> <tbody class=\"divide-y divide-gray-200\" hx-target=\"closest tr\" hx-swap=\"outerHTML\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div id=\"parent\"><div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li><li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">Probes</span></div></li></ol></div><h1 class=\"my-2 pt-4 mt-0 text-3xl font-medium leading-tight text-primary\">Probes</h1><div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300 table-auto\"><thead><tr><th scope=\"col\" class=\"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0\">Name</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">URL</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">Last Result</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\"></th></tr></thead> <tbody class=\"divide-y divide-gray-200\" hx-target=\"closest tr\" hx-swap=\"outerHTML\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -41,7 +44,7 @@ func probeListPage(probes []Probe) templ.Component { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</tbody></table></div></div></div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</tbody></table></div></div></div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -49,17 +52,20 @@ func probeListPage(probes []Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } func probeCreateForm() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -75,17 +81,20 @@ func probeCreateForm() templ.Component { templ_7745c5c3_Var2 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<form hx-post=\"/probe\" hx-target=\"#parent\"><div class=\"space-y-12\"><div class=\"pb-12\"><h2 class=\"text-base font-semibold leading-7 text-gray-900\">Create new probe</h2><p class=\"mt-1 text-sm leading-6 text-gray-600\">This will count towards your probe limit.</p><div class=\"mt-10 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6\"><div class=\"sm:col-span-4\"><label for=\"username\" class=\"block text-sm font-medium leading-6 text-gray-900\">Name <span class=\"text-xs\">(used in notifications)</span></label><div class=\"mt-2\"><div class=\"flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md\"><input type=\"text\" name=\"name\" class=\"block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"Bus schedule data\"></div></div></div><div class=\"sm:col-span-4\"><label for=\"username\" class=\"block text-sm font-medium leading-6 text-gray-900\">URL to monitor</label><div class=\"mt-2\"><div class=\"flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md\"><input type=\"text\" name=\"url\" class=\"block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"https://example.com\"></div></div></div></div></div></div><button type=\"submit\" class=\"rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600\">Submit</button></form>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<form hx-post=\"/probe\" hx-target=\"#parent\"><div class=\"space-y-12\"><div class=\"pb-12\"><h2 class=\"text-base font-semibold leading-7 text-gray-900\">Create new probe</h2><p class=\"mt-1 text-sm leading-6 text-gray-600\">This will count towards your probe limit.</p><div class=\"mt-10 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6\"><div class=\"sm:col-span-4\"><label for=\"username\" class=\"block text-sm font-medium leading-6 text-gray-900\">Name <span class=\"text-xs\">(used in notifications)</span></label><div class=\"mt-2\"><div class=\"flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md\"><input type=\"text\" name=\"name\" class=\"block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"Bus schedule data\"></div></div></div><div class=\"sm:col-span-4\"><label for=\"username\" class=\"block text-sm font-medium leading-6 text-gray-900\">URL to monitor</label><div class=\"mt-2\"><div class=\"flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md\"><input type=\"text\" name=\"url\" class=\"block flex-1 border-0 bg-transparent py-1.5 pl-1 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6\" placeholder=\"https://example.com\"></div></div></div></div></div></div><button type=\"submit\" class=\"rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600\">Submit</button></form>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } func probeRow(probe Probe) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -101,7 +110,7 @@ func probeRow(probe Probe) templ.Component { templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0\"><a href=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<tr><td class=\"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0\"><a href=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -110,7 +119,7 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -123,7 +132,7 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></td><td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\"><code>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</a></td><td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\"><code>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -136,17 +145,17 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></td>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</code></td>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if probe.LastResult.CreatedAt.IsZero() { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\">Not run yet</td>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\">Not run yet</td>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\"><a href=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<td class=\"whitespace-nowrap px-3 py-4 text-sm text-gray-500\"><a href=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -155,7 +164,7 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -168,12 +177,12 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></td>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</a></td>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<td><button class=\"focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2\" hx-get=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<td><button class=\"focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2\" hx-get=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -186,17 +195,20 @@ func probeRow(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-trigger=\"edit\" onClick=\"let editing = document.querySelector('.editing')\n if(editing) {\n Swal.fire({title: 'Already Editing',\n showCancelButton: true,\n confirmButtonText: 'Yep, Edit This Row!',\n text:'Hey! You are already editing a row! Do you want to cancel that edit and continue?'})\n .then((result) => {\n if(result.isConfirmed) {\n htmx.trigger(editing, 'cancel')\n htmx.trigger(this, 'edit')\n }\n })\n } else {\n htmx.trigger(this, 'edit')\n }\">Edit</button></td></tr>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" hx-trigger=\"edit\" onClick=\"let editing = document.querySelector('.editing')\n if(editing) {\n Swal.fire({title: 'Already Editing',\n showCancelButton: true,\n confirmButtonText: 'Yep, Edit This Row!',\n text:'Hey! You are already editing a row! Do you want to cancel that edit and continue?'})\n .then((result) => {\n if(result.isConfirmed) {\n htmx.trigger(editing, 'cancel')\n htmx.trigger(this, 'edit')\n }\n })\n } else {\n htmx.trigger(this, 'edit')\n }\">Edit</button></td></tr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } func probeEdit(probe Probe) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -212,7 +224,7 @@ func probeEdit(probe Probe) templ.Component { templ_7745c5c3_Var10 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr hx-trigger=\"cancel\" class=\"editing\" hx-get=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<tr hx-trigger=\"cancel\" class=\"editing\" hx-get=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -225,7 +237,7 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><td class=\"whitespace-nowrap px-2 py-4 text-sm text-gray-500\"><input type=\"text\" class=\"form-input rounded-lg w-full text-sm\" name=\"name\" value=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\"><td class=\"whitespace-nowrap px-2 py-4 text-sm text-gray-500\"><input type=\"text\" class=\"form-input rounded-lg w-full text-sm\" name=\"name\" value=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -238,7 +250,7 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></td><td class=\"whitespace-nowrap px-2 py-4 text-sm text-gray-500\"><input type=\"text\" class=\"form-input rounded-lg w-full text-sm\" name=\"url\" value=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\"></td><td class=\"whitespace-nowrap px-2 py-4 text-sm text-gray-500\"><input type=\"text\" class=\"form-input rounded-lg w-full text-sm\" name=\"url\" value=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -251,7 +263,7 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></td><td class=\"whitespace-nowrap px-2` py-4 text-sm text-gray-500\"><button class=\"focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-get=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\"></td><td class=\"whitespace-nowrap px-2` py-4 text-sm text-gray-500\"><button class=\"focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-get=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -264,7 +276,7 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">Cancel</button> <button class=\"focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-put=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">Cancel</button> <button class=\"focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-put=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -277,7 +289,7 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"closest tr\">Save</button> <button class=\"focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-delete=\"") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" hx-include=\"closest tr\">Save</button> <button class=\"focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-xs px-2.5 py-1.5 me-1\" hx-delete=\"") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -290,17 +302,20 @@ func probeEdit(probe Probe) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" hx-include=\"closest tr\" hx-target=\"closest tr\" hx-prompt=\"To confirm, write 'DELETE FOREVER' in all caps.\">Delete</button></td></tr>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" hx-include=\"closest tr\" hx-target=\"closest tr\" hx-prompt=\"To confirm, write 'DELETE FOREVER' in all caps.\">Delete</button></td></tr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } func probePage(probe Probe, history []ProbeResult) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) if !templ_7745c5c3_IsBuffer { defer func() { @@ -316,7 +331,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { templ_7745c5c3_Var17 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li><li><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <a href=\"/probe\" class=\"ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2\">Probes</a></div></li><li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<div class=\"flex p-4 mt-4\" aria-label=\"Breadcrumb\"><ol class=\"inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse\"><li class=\"inline-flex items-center\"><a href=\"/\" class=\"inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600\"><svg class=\"w-3 h-3 me-2.5\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 20 20\"><path d=\"m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z\"></path></svg> Home</a></li><li><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <a href=\"/probe\" class=\"ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2\">Probes</a></div></li><li aria-current=\"page\"><div class=\"flex items-center\"><svg class=\"rtl:rotate-180 w-3 h-3 text-gray-400 mx-1\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 6 10\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 9 4-4-4-4\"></path></svg> <span class=\"ms-1 text-sm font-medium text-gray-500 md:ms-2\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -329,7 +344,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span></div></li></ol></div><h1 class=\"my-2 pt-4 mt-0 text-3xl font-medium leading-tight text-primary\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</span></div></li></ol></div><h1 class=\"my-2 pt-4 mt-0 text-3xl font-medium leading-tight text-primary\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -342,7 +357,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><div class=\"px-4 sm:px-6 lg:px-8\"><div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300\"><tbody><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Name</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</h1><div class=\"px-4 sm:px-6 lg:px-8\"><div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300\"><tbody><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Name</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -355,7 +370,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Created At</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Created At</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -368,7 +383,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">URL</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\"><code>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">URL</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\"><code>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -381,12 +396,12 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></td></tr>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</code></td></tr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if probe.LastResultID != 0 { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result at</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result at</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -399,7 +414,7 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result contents</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\"><code>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</td></tr><tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result contents</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\"><code>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -412,27 +427,27 @@ func probePage(probe Probe, history []ProbeResult) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></td></tr>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</code></td></tr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result at</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">Probe has not been run yet</td></tr>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<tr><td class=\"whitespace-nowrap py-2 pl-4 pr-3 font-medium text-gray-900 sm:pl-0\">Last result at</td><td class=\"whitespace-nowrap py-2 pl-4 pr-3 text-gray-900 sm:pl-0\">Probe has not been run yet</td></tr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</tbody></table></div></div></div></div><div class=\"px-4 py-8 sm:px-6 lg:px-8\"><div class=\"sm:flex sm:items-center\"><div class=\"sm:flex-auto\"><h2 class=\"text-base font-semibold leading-6 text-gray-900\">Run history</h2><p class=\"mt-2 text-sm text-gray-700\">The most recent 15 runs of this probe.</p></div></div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</tbody></table></div></div></div></div><div class=\"px-4 py-8 sm:px-6 lg:px-8\"><div class=\"sm:flex sm:items-center\"><div class=\"sm:flex-auto\"><h2 class=\"text-base font-semibold leading-6 text-gray-900\">Run history</h2><p class=\"mt-2 text-sm text-gray-700\">The most recent 15 runs of this probe.</p></div></div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(history) != 0 { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300\"><thead><tr><th scope=\"col\" class=\"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0\">Time</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">Result</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">Status code</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\">Last Modified</th></tr></thead> <tbody class=\"divide-y divide-gray-200\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<div class=\"mt-8 flow-root\"><div class=\"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8\"><div class=\"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8\"><table class=\"min-w-full divide-y divide-gray-300\"><thead><tr><th scope=\"col\" class=\"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0\">Time</th><th scope=\"col\" class=\"px-3 py-3.5 text-left text-sm font-semibold text-gray-900\"& |
