alerting-kibana-plugin
alerting-kibana-plugin copied to clipboard
[BUG] Wrap Text on Monitor Name
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:
- Go to 'Alerting > Monitors'
- 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.
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.
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.
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..
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.