Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UTC timestamp display option #7602

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamint
Copy link
Member

@adamint adamint commented Feb 13, 2025

Description

Unsure about the specific icon, or whether it should be turned into a select and promoted to the toolbar. @JamesNK thoughts?

(hidden timestamps)
image

(set to local)
image

Fixes #5373

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@adamint adamint requested review from Copilot, JamesNK and drewnoakes and removed request for Copilot and JamesNK February 13, 2025 19:39
@sebastienros
Copy link
Member

How often do people prefer UTC instead of local if it's available? Is there the notion of dashboard configuration that could decide what is the format (UTC, local to server, local to user, ... any other specific one).

My own preference would be a user setting (stored in cookies, local storage?) if not an app one (code, app settings?) instead of a per-link action.

@adamint
Copy link
Member Author

adamint commented Feb 13, 2025

How often do people prefer UTC instead of local if it's available? Is there the notion of dashboard configuration that could decide what is the format (UTC, local to server, local to user, ... any other specific one).

We could do that, not trivially

My own preference would be a user setting (stored in cookies, local storage?) if not an app one (code, app settings?) instead of a per-link action.

It is a user setting persisted, not per-resource.

@adamint
Copy link
Member Author

adamint commented Feb 13, 2025

Ok I’ve decided to turn this into a select

@JamesNK
Copy link
Member

JamesNK commented Feb 14, 2025

I think it is confusing UI to have two options for showing timestamps. Here is what I think it should be:

  • Download logs (unchanged)
  • --- (separator)
  • Show timestamps/hide timestamps (unchanged)
  • UTC timestamps (Disabled if timestamps are hidden. The icon is either an empty box icon or a checked box icon, depending if UTC is selected or not. Basically, we're recreating a checkbox in the menu using icons)

Does that make sense?

I think the menu control we're using here already supports these features: seperators, disabling items

Comment on lines 33 to +34
[Parameter]
public bool ShowTimestamp { get; set; }
public TimestampDisplayMode TimestampDisplayMode { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be different bool parameters:

ShowTimestamp
IsTimestampUtc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Options for displaying console log timestamp - Local time, UTC time, or off
3 participants