Skip to content

Commit

Permalink
[ML] AIOps: Enhance the UX for grouped results which only contain fie…
Browse files Browse the repository at this point in the history
…ld / value pairs that appear in other groups (#148757)

## Summary

Related meta issue: #146162

This PR updates the UX for grouped results which only contain field /
value pairs that appear in other groups. In the updated text the '+' and
'more' are dropped from the label.

<img width="1098" alt="image"
src="https://user-images.githubusercontent.com/7405507/212317301-7cd40c62-d96f-4a0e-934e-2dc6e39e25a4.png">


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
  • Loading branch information
alvarezmelissa87 authored Jan 13, 2023
1 parent c9469e0 commit 852072f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,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 {# field/value pairs}} also appearing in other groups"
values={{ count: repeatedValues.length }}
/>
) : null}
</EuiBadge>
<EuiSpacer size="xs" />
</>
Expand Down

0 comments on commit 852072f

Please sign in to comment.