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

[ML] AIOps: Enhance the UX for grouped results which only contain field / value pairs that appear in other groups #148757

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,20 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({
<br />
</>
) : null}
{repeatedValues.length > 0 ? (
{repeatedValues.length > 0 && valuesBadges.length ? (
<FormattedMessage
id="xpack.aiops.explainLogRateSpikes.spikeAnalysisTableGroups.moreRepeatedLabel"
defaultMessage="+{count, plural, one {# more field/value pair} other {# more field/value pairs}} also appearing in other groups"
values={{ count: repeatedValues.length }}
/>
) : null}
{repeatedValues.length > 0 && !valuesBadges.length ? (
<FormattedMessage
id="xpack.aiops.explainLogRateSpikes.spikeAnalysisTableGroups.onlyMoreRepeatedLabel"
defaultMessage="{count, plural, one {# field/value pair} other {# more field/value pairs}} also appearing in other groups"
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to drop the more from the other case too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes - don't know how I missed that 🙏 - added to the singular case in cf37b20

values={{ count: repeatedValues.length }}
/>
) : null}
</EuiBadge>
<EuiSpacer size="xs" />
</>
Expand Down