+
+
+
+
+
+ if len(data.DetectionHistory) == 0 {
+
No detection records
+ } else {
+
+
+
+
+ | Timestamp |
+ Type |
+ Severity |
+ Description |
+ Resource |
+
+
+
+ for _, record := range data.DetectionHistory {
+
+ | { record.Timestamp.Format("2006-01-02 15:04:05") } |
+ { record.DetectionType } |
+
+ if record.Severity == "high" {
+ HIGH
+ } else if record.Severity == "medium" {
+ MEDIUM
+ } else if record.Severity == "low" {
+ LOW
+ } else {
+ { record.Severity }
+ }
+ |
+ { record.Description } |
+ { record.AffectedResource } |
+
+ }
+
+
+
+ }
+
+
+
+
+ if len(data.ExecutionHistory) == 0 {
+
No execution records
+ } else {
+
+
+
+
+ | Job ID |
+ State |
+ Created |
+ Started |
+ Completed |
+ Retries |
+ Error |
+
+
+
+ for _, record := range data.ExecutionHistory {
+
+ { record.JobID } |
+
+ if record.State.String() == "COMPLETED" {
+ COMPLETED
+ } else if record.State.String() == "FAILED" {
+ FAILED
+ } else if record.State.String() == "RUNNING" {
+ RUNNING
+ } else {
+ { record.State.String() }
+ }
+ |
+ { record.CreatedAt.Format("2006-01-02 15:04:05") } |
+
+ if record.StartedAt != nil {
+ { record.StartedAt.Format("2006-01-02 15:04:05") }
+ } else {
+ -
+ }
+ |
+
+ if record.CompletedAt != nil {
+ { record.CompletedAt.Format("2006-01-02 15:04:05") }
+ } else {
+ -
+ }
+ |
+ { fmt.Sprintf("%d", record.RetryCount) } |
+
+ if record.LastError != "" {
+ { record.LastError }
+ } else {
+ -
+ }
+ |
+
+ }
+
+
+
+ }
+
+