Skip to content

[Fix]: Label generation for grouped by, single metric time series charts#3566

Closed
fabianmenges wants to merge 1 commit intoapache:masterfrom
tc-dc:fmenges/verbose_fix
Closed

[Fix]: Label generation for grouped by, single metric time series charts#3566
fabianmenges wants to merge 1 commit intoapache:masterfrom
tc-dc:fmenges/verbose_fix

Conversation

@fabianmenges
Copy link
Contributor

@mistercrunch reported a change in behavior/bug introduced in #3504
This addresses the issue.

.reduce((distinct, v) => distinct.add(v), new Set()).size;
// remove the msg key from the label if these conditions are true
const removeMostSignificant = mostSignificant.length === payload.data.length &&
distinctMostSignificant === 1;
Copy link
Contributor Author

@fabianmenges fabianmenges Oct 2, 2017

Choose a reason for hiding this comment

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

instead of this (complicated) logic in line 103 to 112 we could simplify how we set the removeMostSignificant flag to:

const removeMostSignificant = slice.formData.metrics.length === 1;

However that would make the label generation depend on the fromData and it would therefore be less generic. Let me know what you think...

@coveralls
Copy link

coveralls commented Oct 2, 2017

Coverage Status

Coverage remained the same at 70.141% when pulling 7647865 on tc-dc:fmenges/verbose_fix into b39d165 on apache:master.

@mistercrunch
Copy link
Member

Sorry about the confusion, I should have created an issue and assigned it to myself.

@fabianmenges
Copy link
Contributor Author

No worries, sorry for all these bugs... naming stuff is hard.

@mistercrunch
Copy link
Member

mistercrunch commented Oct 4, 2017

Oh wait sorry about more confusion, I though this was the duplicate fix for the thing I fixed. I knew I had to close that duplicate fix and just assumed this was the PR, wrong one...

@mistercrunch mistercrunch reopened this Oct 4, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 70.145% when pulling 7647865 on tc-dc:fmenges/verbose_fix into b39d165 on apache:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 70.145% when pulling 7647865 on tc-dc:fmenges/verbose_fix into b39d165 on apache:master.

@coveralls
Copy link

coveralls commented Oct 4, 2017

Coverage Status

Coverage increased (+0.004%) to 70.145% when pulling 7647865 on tc-dc:fmenges/verbose_fix into b39d165 on apache:master.

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.

3 participants