Uh oh!
There was an error while loading. Please reload this page.
Conversation
| github.com/fatih/color v1.18.0 | ||
| github.com/google/go-cmp v0.7.0 | ||
| github.com/metal-stack-cloud/api v0.12.0 | ||
| github.com/metal-stack-cloud/api v0.13.1-0.20250325121620-df8dd0323b54 |
There was a problem hiding this comment.
Update metal-stack-cloud/api dependency, after audit-api got merged: metal-stack-cloud/api#186
| defer cancel() | ||
| project := a.c.GetProject() | ||
| fmt.Printf("project: %s", project) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| err = json.Unmarshal([]byte(trimmed), &body) | ||
| if err == nil { |
There was a problem hiding this comment.
| err=json.Unmarshal([]byte(trimmed), &body) | |
| iferr==nil { | |
| iferr:=json.Unmarshal([]byte(trimmed), &body); err==nil { |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| rows [][]string | ||
| ) | ||
| header := []string{"TIME", "REQUEST-ID", "USER", "PROJECT", "METHOD", "PHASE"} |
There was a problem hiding this comment.
The used library automatically turns headers into capitals.
| header := []string{"TIME", "REQUEST-ID", "USER", "PROJECT", "METHOD", "PHASE"} | ||
| if wide { | ||
| header = []string{"TIME", "REQUEST-ID", "USER", "PROJECT", "METHOD", "PHASE", "SOURCE-IP", "RESULT-CODE", "BODY"} |
There was a problem hiding this comment.
| header= []string{"TIME", "REQUEST-ID", "USER", "PROJECT", "METHOD", "PHASE", "SOURCE-IP", "RESULT-CODE", "BODY"} | |
| header= []string{"TIME", "REQUEST-ID", "USER", "PROJECT", "METHOD", "PHASE", "SOURCE-IP", "CODE", "BODY"} |
| } | ||
| rows = append(rows, []string{time, id, user, project, method, phase, sourceIp, resultCode, body}) | ||
| } else { | ||
| rows = append(rows, []string{time, id, user, project, method, phase}) |
There was a problem hiding this comment.
Maybe we can add the status code column here as well? It's quite short and intersting?
| func truncateToSeconds(t time.Time) time.Time { | ||
| return time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), 0, t.Location()) | ||
| } |
There was a problem hiding this comment.
Is this really required? I think by using the format layout specified this should already be done.
No description provided.