tidy up forrmatting on pages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -109,10 +109,20 @@ func (h *Handler) renderSnapshotList(w http.ResponseWriter, r *http.Request, sna
|
||||
entries := make([]views.SnapshotEntry, 0, len(records))
|
||||
for _, record := range records {
|
||||
label := report.FormatSnapshotLabel(snapshotType, record.SnapshotTime, record.TableName)
|
||||
group := ""
|
||||
switch snapshotType {
|
||||
case "hourly":
|
||||
group = record.SnapshotTime.Format("2006-01-02")
|
||||
case "daily":
|
||||
group = record.SnapshotTime.Format("January 2006")
|
||||
case "monthly":
|
||||
group = record.SnapshotTime.Format("2006")
|
||||
}
|
||||
entries = append(entries, views.SnapshotEntry{
|
||||
Label: label,
|
||||
Link: "/reports/" + url.PathEscape(record.TableName) + ".xlsx",
|
||||
Count: record.SnapshotCount,
|
||||
Group: group,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user