Skip to content

Commit

Permalink
Admin Dashboard: Show times in Configured Timezone (#2337)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo authored Jul 11, 2024
1 parent f8b2c97 commit 4bfc490
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions app/dashboards/file_push_dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FilePushDashboard < Administrate::BaseDashboard
expire_after_days: Field::Number,
expire_after_views: Field::Number,
expired: Field::Boolean,
expired_on: Field::DateTime,
expired_on: Field::DateTime.with_options(timezone: Settings.timezone),
files_attachments: Field::HasMany,
files_blobs: Field::HasMany,
note_ciphertext: Field::Text,
Expand All @@ -25,8 +25,8 @@ class FilePushDashboard < Administrate::BaseDashboard
url_token: Field::String,
user: Field::BelongsTo,
views: Field::HasMany,
created_at: Field::DateTime,
updated_at: Field::DateTime
created_at: Field::DateTime.with_options(timezone: Settings.timezone),
updated_at: Field::DateTime.with_options(timezone: Settings.timezone)
}.freeze

# COLLECTION_ATTRIBUTES
Expand Down
6 changes: 3 additions & 3 deletions app/dashboards/password_dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ class PasswordDashboard < Administrate::BaseDashboard
expire_after_days: Field::Number,
expire_after_views: Field::Number,
expired: Field::Boolean,
expired_on: Field::DateTime,
expired_on: Field::DateTime.with_options(timezone: Settings.timezone),
note_ciphertext: Field::Text,
passphrase_ciphertext: Field::Text,
payload_ciphertext: Field::Text,
retrieval_step: Field::Boolean,
url_token: Field::String,
user: Field::BelongsTo,
views: Field::HasMany,
created_at: Field::DateTime,
updated_at: Field::DateTime
created_at: Field::DateTime.with_options(timezone: Settings.timezone),
updated_at: Field::DateTime.with_options(timezone: Settings.timezone)
}.freeze

# COLLECTION_ATTRIBUTES
Expand Down
6 changes: 3 additions & 3 deletions app/dashboards/url_dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UrlDashboard < Administrate::BaseDashboard
expire_after_days: Field::Number,
expire_after_views: Field::Number,
expired: Field::Boolean,
expired_on: Field::DateTime,
expired_on: Field::DateTime.with_options(timezone: Settings.timezone),
note_ciphertext: Field::Text,
passphrase_ciphertext: Field::Text,
payload_ciphertext: Field::Text,
Expand All @@ -22,8 +22,8 @@ class UrlDashboard < Administrate::BaseDashboard
url_token: Field::String,
user: Field::BelongsTo,
views: Field::HasMany,
created_at: Field::DateTime,
updated_at: Field::DateTime
created_at: Field::DateTime.with_options(timezone: Settings.timezone),
updated_at: Field::DateTime.with_options(timezone: Settings.timezone)
}.freeze

# COLLECTION_ATTRIBUTES
Expand Down
18 changes: 9 additions & 9 deletions app/dashboards/user_dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ class UserDashboard < Administrate::BaseDashboard
id: Field::Number,
admin: Field::Boolean,
authentication_token: Field::String,
confirmation_sent_at: Field::DateTime,
confirmation_sent_at: Field::DateTime.with_options(timezone: Settings.timezone),
confirmation_token: Field::String,
confirmed_at: Field::DateTime,
current_sign_in_at: Field::DateTime,
confirmed_at: Field::DateTime.with_options(timezone: Settings.timezone),
current_sign_in_at: Field::DateTime.with_options(timezone: Settings.timezone),
current_sign_in_ip: Field::String,
email: Field::String,
encrypted_password: Field::String,
password: Field::String.with_options(searchable: false),
password_confirmation: Field::String.with_options(searchable: false),
failed_attempts: Field::Number,
file_pushes: Field::HasMany,
last_sign_in_at: Field::DateTime,
last_sign_in_at: Field::DateTime.with_options(timezone: Settings.timezone),
last_sign_in_ip: Field::String,
locked_at: Field::DateTime,
locked_at: Field::DateTime.with_options(timezone: Settings.timezone),
passwords: Field::HasMany,
remember_created_at: Field::DateTime,
reset_password_sent_at: Field::DateTime,
remember_created_at: Field::DateTime.with_options(timezone: Settings.timezone),
reset_password_sent_at: Field::DateTime.with_options(timezone: Settings.timezone),
reset_password_token: Field::String,
sign_in_count: Field::Number,
unconfirmed_email: Field::String,
unlock_token: Field::String,
urls: Field::HasMany,
created_at: Field::DateTime,
updated_at: Field::DateTime
created_at: Field::DateTime.with_options(timezone: Settings.timezone),
updated_at: Field::DateTime.with_options(timezone: Settings.timezone)
}.freeze

# COLLECTION_ATTRIBUTES
Expand Down
4 changes: 2 additions & 2 deletions app/dashboards/view_dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class ViewDashboard < Administrate::BaseDashboard
url: Field::BelongsTo,
user: Field::BelongsTo,
user_agent: Field::String,
created_at: Field::DateTime,
updated_at: Field::DateTime
created_at: Field::DateTime.with_options(timezone: Settings.timezone),
updated_at: Field::DateTime.with_options(timezone: Settings.timezone)
}.freeze

# COLLECTION_ATTRIBUTES
Expand Down

0 comments on commit 4bfc490

Please sign in to comment.