diff --git a/internal/handler/kill.go b/internal/handler/kill.go index c525c6d..e5d6157 100644 --- a/internal/handler/kill.go +++ b/internal/handler/kill.go @@ -18,7 +18,7 @@ import ( func htmlError(w http.ResponseWriter, code int, msg string) { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(code) - _, _ = fmt.Fprintf(w, `
{{.InnoDBStatus}}
+ {{.InnoDBStatus}}
| {{template "sortHeader" (dict "name" $name "sc" $sc "sd" $sd "ar" $ar "hs" $hs "fu" $fu "fd" $fd "col" "Id" "label" "Id")}} {{template "sortHeader" (dict "name" $name "sc" $sc "sd" $sd "ar" $ar "hs" $hs "fu" $fu "fd" $fd "col" "User" "label" "User")}} @@ -42,21 +42,21 @@ {{template "sortHeader" (dict "name" $name "sc" $sc "sd" $sd "ar" $ar "hs" $hs "fu" $fu "fd" $fd "col" "Host" "label" "Host")}} | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - | {{.ID}} | +{{.ID}} | {{/* Clicking filters by this user; clicking again clears the filter */}} - {{if .DB}} - - | {{.Command}} | +{{.Command}} | -{{formatNumber .Time}}s | +{{formatNumber .Time}}s | -{{.State}} | +{{.State}} |
{{if .Transaction}}
+ {{if ge .Transaction.ActiveTime 60}}text-red-700 dark:text-red-400 font-semibold
+ {{else if ge .Transaction.ActiveTime 30}}text-orange-700 dark:text-orange-400 font-medium
+ {{else if ge .Transaction.ActiveTime 5}}text-yellow-700 dark:text-yellow-400
+ {{else}}text-gray-700 dark:text-gray-300{{end}}">
{{formatNumber .Transaction.ActiveTime}}s
-
- |
- {{.Info}}
+ {{.Info}}
|
- {{if .Progress}}{{.Progress}}%{{end}} | +{{if .Progress}}{{.Progress}}%{{end}} | -{{.Host}} | +{{.Host}} |