refactor(httpapi): standardize output formatting in job report response
CI / changes (push) Successful in 7s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 37s
CI / go (push) Successful in 50s
CI / bird2 (push) Successful in 18s
CI / release (push) Successful in 3m51s

- Adjusted the order of fields in the job report response for consistency.
- Ensured that the output structure remains clear and maintainable.
This commit is contained in:
Denozordec
2026-05-21 10:52:08 +07:00
parent 8ebce28e34
commit 880d77810a
2 changed files with 8 additions and 7 deletions
+5 -5
View File
@@ -893,11 +893,11 @@ func (s *Server) handleGetJobReport(w http.ResponseWriter, r *http.Request) {
snap := j.Snapshot()
meta, _ := snap["meta"].(map[string]any)
out := map[string]any{
"job_id": snap["job_id"],
"kind": snap["kind"],
"status": snap["status"],
"meta": meta,
"error": snap["error"],
"job_id": snap["job_id"],
"kind": snap["kind"],
"status": snap["status"],
"meta": meta,
"error": snap["error"],
"created_at": snap["created_at"],
}
if meta != nil {
@@ -25,8 +25,9 @@
<div style="height: {totalHeight}px; position: relative">
{#each visibleItems as pfx, i (`${startIndex + i}-${pfx}`)}
<p
class="font-mono text-xs leading-5 truncate px-2"
style="position: absolute; top: {(startIndex + i) * rowHeight}px; left: 0; right: 0; height: {rowHeight}px"
class="truncate px-2 font-mono text-xs leading-5"
style="position: absolute; top: {(startIndex + i) *
rowHeight}px; left: 0; right: 0; height: {rowHeight}px"
>
{pfx}
</p>