diff --git a/ui/src/routes/works/[wid]/+page.svelte b/ui/src/routes/works/[wid]/+page.svelte
index 11f167c..4705f95 100644
--- a/ui/src/routes/works/[wid]/+page.svelte
+++ b/ui/src/routes/works/[wid]/+page.svelte
@@ -154,16 +154,21 @@
{#if trace.items}
-
+
{#each trace.items as item}
- -
+
-
- {item.title}
+
+ {item.title}
+
+ {#if item.msg}
+ {item.msg}
+ {/if}
{/each}
diff --git a/works.go b/works.go
index 30aed6d..215ba46 100644
--- a/works.go
+++ b/works.go
@@ -375,8 +375,9 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
}
type UserTraceItem struct {
- Title string `json:"title"`
- Status string `json:"status"`
+ Title string `json:"title"`
+ Status string `json:"status"`
+ Message string `json:"msg,omitempty"`
}
type UserTrace struct {
@@ -516,14 +517,19 @@ func declareAPIAuthWorksRoutes(router *gin.RouterGroup) {
items := []UserTraceItem{}
for _, line := range result {
if strings.HasPrefix(line.Message, "report:") {
- tmp := strings.Split(strings.TrimSpace(line.Message), ":")
- if len(tmp) != 3 {
+ tmp := strings.SplitN(strings.TrimSpace(line.Message), ":", 4)
+ if len(tmp) < 3 {
continue
}
- items = append(items, UserTraceItem{
+
+ uti := UserTraceItem{
Title: tmp[1],
Status: tmp[2],
- })
+ }
+ if len(tmp) >= 4 {
+ uti.Message = tmp[3]
+ }
+ items = append(items, uti)
}
}