-
Notifications
You must be signed in to change notification settings - Fork 485
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
Monitor Tab: Cannot see the whole numbers in the legend #873
Conversation
Signed-off-by: nofar9792 <[email protected]>
Signed-off-by: nofar9792 <[email protected]>
…ger-ui into fix-legend-numbers
packages/jaeger-ui/src/components/Monitor/ServicesView/serviceGraph.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: nofar9792 <[email protected]>
Signed-off-by: nofar9792 <[email protected]>
…o fix-legend-numbers
Signed-off-by: nofar9792 <[email protected]>
Signed-off-by: nofar9792 <[email protected]>
@nofar9792 can you please share a screenshot of what the graph and y-axis labels look like after these changes? |
Codecov Report
@@ Coverage Diff @@
## main #873 +/- ##
==========================================
+ Coverage 95.27% 95.29% +0.01%
==========================================
Files 240 240
Lines 7475 7495 +20
Branches 1868 1870 +2
==========================================
+ Hits 7122 7142 +20
Misses 347 347
Partials 6 6
Continue to review full report at Codecov.
|
…o fix-legend-numbers
Signed-off-by: nofar9792 <[email protected]>
Thanks Albert, I added 🙏 |
Are the before/after screenshots still accurate? I was expecting to see axis ticks like |
We think it's redundant to write it in the ticks |
What about when latencies are 1ms or 1hr? |
Ah, I see, so the title's units are dynamic based on the latency data. If that's the case, it makes sense to me. |
Signed-off-by: nofar9792 <[email protected]>
@yurishkuro @albertteoh so WDYT? |
Signed-off-by: nofar9792 <[email protected]>
milliseconds: 'ms', | ||
seconds: 'Sec', | ||
minutes: 'Min', | ||
hours: 'Hrs', | ||
days: 'Days', |
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 feel these should be consistent in case and plurality. Maybe, ms
, sec
, min
, hr
, day
.
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.
It just occurred to me that min
could unfortunately be confused with "minimum", so it's worth considering the plural form: ms
, secs
, mins
, hrs
, days
.
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.
|
||
if (shortTimeUnit) return shortTimeUnit; | ||
|
||
return ''; |
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.
Under what conditions would timeUnit
not be in timeUnitToShortTermMapper
?
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.
if i don't haveshortTimeUnit
, I don't want to return undefined
@@ -40,6 +40,14 @@ const UNIT_STEPS: { unit: string; microseconds: number; ofPrevious: number }[] = | |||
{ unit: 'μs', microseconds: 1, ofPrevious: 1000 }, | |||
]; | |||
|
|||
const timeUnitToShortTermMapper = { | |||
milliseconds: 'ms', |
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.
Why isn't microseconds
supported?
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.
moment.js doesn't support it and in my cases (the only usages), we don't need microseconds
@@ -249,12 +270,13 @@ export class MonitorATMServicesViewImpl extends React.PureComponent<TProps, Stat | |||
metrics.serviceError.service_latencies_95 | |||
} | |||
loading={metrics.loading} | |||
name="Latency, ms" | |||
name={`Latency, ${convertTimeUnitToShortTerm(displayTimeUnit)}`} |
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 prefer putting the units in brackets like "Latency (ms)" or "Latency (min)", instead of a comma.
What do you/others think?
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.
done
Signed-off-by: nofar9792 <[email protected]>
Signed-off-by: nofar9792 <[email protected]>
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.
LGTM overall, thanks! It looks like there are some code coverage issues that need addressing.
Just noticed, the description's "After" screenshot shows "Latency (s)" and the scale on the left goes up to a max 390. I would have expected the units to be minutes already? |
This data is different |
Signed-off-by: nofar9792 <[email protected]>
…ger-ui into fix-legend-numbers
Signed-off-by: nofar9792 <[email protected]>
@albertteoh @yurishkuro What prevents us from merging it |
@albertteoh can you finish the review for this? |
Signed-off-by: nofar9792 [email protected]
Which problem is this PR solving?
Resolves #871
Short description of the changes
Convert the duration to a suitable time unit
Before Change:
After Change:
In order to find the suitable time unit, I find the max value, and then I use this time unit and convert the y-axis ticks.
Furthermore, I did a small refactor to
timeConversion
- use moment when I can and do all the calculation by myselfadded brackets instead of comma: