uchiwa-web icon indicating copy to clipboard operation
uchiwa-web copied to clipboard

Fix aggregate's link in case of a boolean value

Open jrRibeiro opened this issue 5 years ago • 0 comments

As per Sensu's documentation - https://docs.sensu.io/sensu-core/1.7/reference/checks/#check-attributes - named aggregates were only introduced in version 0.24.

NOTE: named aggregates are new to Sensu version 0.24, now being defined with a String data type rather than a Boolean (i.e. true or false). Legacy check definitions with "aggregate": true attributes will default to using the check name as the aggregate name.

If the aggregation attribute is set to true, an aggregation is created using the check's name.

This PR fixes an issue in Uchiwa, where an incorrect link is created, pointing to an (obviously un-existing) aggregation's page called true.

sensu

The fix is simply to point to the correct aggregation by using the check's name in the link if true is found.

jrRibeiro avatar Apr 06 '19 17:04 jrRibeiro