Display start and last updated timestamp on system status page#3788
Merged
stchris merged 4 commits intorelease/4.0.0from Jul 19, 2024
Merged
Display start and last updated timestamp on system status page#3788stchris merged 4 commits intorelease/4.0.0from
stchris merged 4 commits intorelease/4.0.0from
Conversation
Rosencrantz
approved these changes
Jul 1, 2024
Contributor
Rosencrantz
left a comment
There was a problem hiding this comment.
Such a small change!
bf4c974 to
81bcc73
Compare
Contributor
Author
|
@Rosencrantz I’ve pushed a small update. When testing this with a few larger datasets, I found that the relative times would add a lot of noise. Specifically:
Instead, I’m now displaying just the absolute time (if the date is today) or otherwise the date and time: |
Contributor
Author
|
This can be merged as soon as alephdata/servicelayer#190 is released |
Contributor
|
Nioce update. I approve! |
With relative times, when looking at a full status page, there will be a lot of numbers that are constantly updated. For example, even if "last updated" hasn’t changed, how it is rendered will change over time (from "last updated now" to "last updated 5 seconds ago" etc.) In addition, the different lengths of the rendered strings can cause layout shifts/line breaks. This makes it more difficult to track a specific row and to identify values that have actually changed. Instead, I’m now displaying the absolute time (if the day is today) or the absolute date and time. This leads to a slightly less cluttered and noisy UI.
81bcc73 to
e6a4dde
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This exposes the two timestamps (that are already returned per collection by the status API) in the UI. Times are relative (for example "45 seconds ago"), but hovering over them displays the full date/time (for example "Fri, Jun 28, 2024, 5:05 PM").
Todos: