Skip to content

Commit

Permalink
Merge pull request #29 from julien-wff/Feat/timezone-bound-display
Browse files Browse the repository at this point in the history
Feat/timezone bound displays
  • Loading branch information
eduardolat authored Aug 15, 2024
2 parents 8d96ed8 + 07af002 commit ef81e7b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal/view/web/dashboard/backups/list_backups.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func listBackups(
html.Td(yesNoSpan(backup.OptCreate)),
html.Td(yesNoSpan(backup.OptNoComments)),
html.Td(component.SpanText(
backup.CreatedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
backup.CreatedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
))
}
Expand Down
2 changes: 1 addition & 1 deletion internal/view/web/dashboard/databases/list_databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func listDatabases(
component.SpanText("****************"),
),
html.Td(component.SpanText(
database.CreatedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
database.CreatedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func listDestinations(
component.SpanText("**********"),
),
html.Td(component.SpanText(
destination.CreatedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
destination.CreatedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
))
}
Expand Down
4 changes: 2 additions & 2 deletions internal/view/web/dashboard/executions/list_executions.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ func listExecutions(
execution.BackupIsLocal, execution.DestinationName,
)),
html.Td(component.SpanText(
execution.StartedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
execution.StartedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
html.Td(
gomponents.If(
execution.FinishedAt.Valid,
component.SpanText(
execution.FinishedAt.Time.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
execution.FinishedAt.Time.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
),
),
),
Expand Down
6 changes: 3 additions & 3 deletions internal/view/web/dashboard/executions/show_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ func showExecutionButton(
html.Tr(
html.Th(component.SpanText("Started At")),
html.Td(component.SpanText(
execution.StartedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
execution.StartedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
),
gomponents.If(
execution.FinishedAt.Valid,
html.Tr(
html.Th(component.SpanText("Finished At")),
html.Td(component.SpanText(
execution.FinishedAt.Time.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
execution.FinishedAt.Time.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
),
),
Expand All @@ -104,7 +104,7 @@ func showExecutionButton(
html.Tr(
html.Th(component.SpanText("Deleted At")),
html.Td(component.SpanText(
execution.DeletedAt.Time.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
execution.DeletedAt.Time.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
),
),
Expand Down
2 changes: 1 addition & 1 deletion internal/view/web/dashboard/profile/close_all_sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func closeAllSessionsForm(sessions []dbgen.Session) gomponents.Node {
component.GMap(sessions, func(session dbgen.Session) gomponents.Node {
return html.Tr(
html.Td(component.SpanText(
session.CreatedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
session.CreatedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
html.Td(component.SpanText(session.Ip)),
html.Td(component.SpanText(session.UserAgent)),
Expand Down
4 changes: 2 additions & 2 deletions internal/view/web/dashboard/restorations/list_restorations.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ func listRestorations(
}())),
html.Td(component.SpanText(restoration.ExecutionID.String())),
html.Td(component.SpanText(
restoration.StartedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
restoration.StartedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
html.Td(
gomponents.If(
restoration.FinishedAt.Valid,
component.SpanText(
restoration.FinishedAt.Time.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
restoration.FinishedAt.Time.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions internal/view/web/dashboard/restorations/show_restoration.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ func showRestorationButton(
html.Tr(
html.Th(component.SpanText("Started At")),
html.Td(component.SpanText(
restoration.StartedAt.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
restoration.StartedAt.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
),
gomponents.If(
restoration.FinishedAt.Valid,
html.Tr(
html.Th(component.SpanText("Finished At")),
html.Td(component.SpanText(
restoration.FinishedAt.Time.Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
restoration.FinishedAt.Time.Local().Format(timeutil.LayoutYYYYMMDDHHMMSSPretty),
)),
),
),
Expand Down

0 comments on commit ef81e7b

Please sign in to comment.