webcmd: cosmetic fixes to the taskinfo page
This commit is contained in:
parent
68c25fa139
commit
8f0782b829
@ -24,10 +24,8 @@ func (this *App) Serve_TaskInfo(w http.ResponseWriter, task_ref string) {
|
|||||||
|
|
||||||
fmt.Fprintf(w, `
|
fmt.Fprintf(w, `
|
||||||
<ul>
|
<ul>
|
||||||
<li>Type: %s</li>
|
|
||||||
<li>Start time: %s</li>
|
<li>Start time: %s</li>
|
||||||
`,
|
`,
|
||||||
"???",
|
|
||||||
hesc(time.Unix(taskinfo.started, 0).Format(time.RFC822Z)),
|
hesc(time.Unix(taskinfo.started, 0).Format(time.RFC822Z)),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -39,6 +37,8 @@ func (this *App) Serve_TaskInfo(w http.ResponseWriter, task_ref string) {
|
|||||||
hesc(time.Unix(taskinfo.stopped, 0).Format(time.RFC822Z)),
|
hesc(time.Unix(taskinfo.stopped, 0).Format(time.RFC822Z)),
|
||||||
taskinfo.exitCode,
|
taskinfo.exitCode,
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
fmt.Fprint(w, `<li>Currently running</li>`)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprint(w, `
|
fmt.Fprint(w, `
|
||||||
@ -69,6 +69,10 @@ func (this *App) Serve_TaskInfo(w http.ResponseWriter, task_ref string) {
|
|||||||
fmt.Fprintf(w, `
|
fmt.Fprintf(w, `
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
`)
|
||||||
|
|
||||||
|
if !taskinfo.Finished() {
|
||||||
|
fmt.Fprintf(w, `
|
||||||
<form method="POST" action="/x-abandon-task">
|
<form method="POST" action="/x-abandon-task">
|
||||||
<input type="hidden" name="task_ref" value="%s">
|
<input type="hidden" name="task_ref" value="%s">
|
||||||
<input type="submit" value="Cancel »">
|
<input type="submit" value="Cancel »">
|
||||||
@ -76,6 +80,7 @@ func (this *App) Serve_TaskInfo(w http.ResponseWriter, task_ref string) {
|
|||||||
`,
|
`,
|
||||||
hesc(task_ref),
|
hesc(task_ref),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
this.ServePartial_Footer(w)
|
this.ServePartial_Footer(w)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user