-
Notifications
You must be signed in to change notification settings - Fork 488
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
Adds a configuration option to customize the standard datetime format #403
Conversation
… used. Signed-off-by: Leonardo FREITAS GOMES <leonardo.gomes@amadeus.com>
2d55f0f
to
e0e19aa
Compare
Codecov Report
@@ Coverage Diff @@
## master #403 +/- ##
==========================================
+ Coverage 91.58% 91.63% +0.05%
==========================================
Files 176 176
Lines 3994 3995 +1
Branches 921 922 +1
==========================================
+ Hits 3658 3661 +3
+ Misses 298 296 -2
Partials 38 38
Continue to review full report at Codecov.
|
Can you provide a screenshot? Which timestamps is this affecting? Also, there should be some documentation about the config file format, it needs to be updated to describe the new property. |
For documentation update, it would be a separate PR here: https://github.com/jaegertracing/documentation/blob/master/content/docs/next-release/frontend-ui.md right, @yurishkuro ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a config value, maybe it makes sense to change the trace page header to show a more precise datetime, instead? What is your preferred level of precision?
I think this change looks good but the use of the word "standard" is out of place.
@@ -66,6 +66,7 @@ export default deepFreeze( | |||
gaID: null, | |||
trackErrors: true, | |||
}, | |||
standardDatetimeFormat: FALLBACK_STANDARD_DATETIME_FORMAT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is used in only one place, I don't think it's the "standard" date time format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I called it like that, because it overrides the format used by the STANDARD_DATETIME_FORMAT constant. Today, it's only used in one place, but if other bits of the UI start using https://github.com/jaegertracing/jaeger-ui/blob/master/packages/jaeger-ui/src/utils/date.tsx#L64 they will also be affected. I'm fine with calling it "traceStartDateFormat" too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tiffon What do you suggest? Shall I remove the config option and add the fractional seconds to the format as shown below? Or should I keep the config and just rename the variable to remove the standard_ prefix?
@yurishkuro The fractional seconds work for you? I think it looks good and is preferable over another config option. |
It's fine. Using smaller font for decimals is another option (but harder to implement). |
@leogomes Thanks for your help with this. Reducing the contrast might be preferable over making the text smaller; it's already pretty small. That was done using the {
key: 'timestamp',
label: 'Trace Start',
renderer: (trace: Trace) => {
const dateStr = formatDatetime(trace.startTime);
const match = dateStr.match(/^(.+)(\.\d+)$/);
return match ? <>{match[1]}<span className="u-tx-muted">{match[2]}</span></> : dateStr;
}
}, |
Hello @tiffon, @yurishkuro, What's the status on this one? Have @tiffon changes been merged somewhere and we can close this one? Thanks, |
@tiffon any more feedback? |
Signed-off-by: Joe Farro <joef@uber.com>
Signed-off-by: Joe Farro <joef@uber.com>
Signed-off-by: Joe Farro <joef@uber.com> Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Signed-off-by: Leonardo FREITAS GOMES leonardo.f.gomes@gmail.com
Which problem is this PR solving?
Short description of the changes