alerting-kibana-plugin icon indicating copy to clipboard operation
alerting-kibana-plugin copied to clipboard

[BUG] Wrap Text on Monitor Name

Open abdalians opened this issue 3 years ago • 3 comments

Describe the bug Under Alerting > Monitors The Monitor name should wrap the text for Monitor Name. At the moment it shows ... after 22 characters.

Other plugins installed security

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Alerting > Monitors'
  2. Create a Monitor with name larger than 22 characters.

Expected behavior It should either wrap text or make the column width adjustable

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

  • OS: IOS 11.1
  • Browser Chrome
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

abdalians avatar Jan 22 '21 20:01 abdalians

Hi abdalians,

Thank you for pointing it out! I transferred the issue from Alerting plugin repo to here, as it's related to the front-end part. Besides, I labeled the issue as a feature instead of a bug.

I think wrapping the text to the column width, can be made by setting the truncateText property to false in this line:

https://github.com/opendistro-for-elasticsearch/alerting-kibana-plugin/blob/23a14dd6827b9cd6ceceba4035b1587a093cb29a/public/pages/Monitors/containers/Monitors/utils/tableUtils.js#L33

And there are other properties like width which can set the width of the column. IMO, wrapping the text sounds a good idea.

tlfeng avatar Feb 06 '21 04:02 tlfeng

setting the truncateText: false did not change the behaviour. also if there was a tool tip that showed the full name that could help too..

abdalians avatar Mar 08 '21 19:03 abdalians

poking around the directories I found this file

/usr/share/kibana/plugins/opendistro-alerting/public/pages/Monitors/containers/Monitors/snapshots/Monitors.test.js.snap

I edited line 43 in the above file in addition to line 33 in tableUtils.js and cleared the optimize directory and restarted kibana to achieve the desired result. i.e. Monitor names are text wrapping properly.

abdalians avatar Mar 08 '21 20:03 abdalians