uchiwa-web
uchiwa-web copied to clipboard
Fix aggregate's link in case of a boolean value
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
.
The fix is simply to point to the correct aggregation by using the check's name in the link if true
is found.