Icinga / icingaweb2-module-cube

Drill-down view for Icinga web 2 based on custom variables
GNU General Public License v2.0
45 stars 12 forks source link

Controller: Rawurlencode slice params when preparing dimensions #110

Closed yhabteab closed 1 year ago

yhabteab commented 1 year ago

The parameters are all url encoded, the keys and the values, i.e. such a parameter key slice.host.vars.notification.mail.groups[*] becomes slice.host.vars.notification.mail.groups%5B%2A%5D and when trying to check whether the $this->cube::SLICE_PREFIX . $dimension already exists, will always return false.

fixes #109

nilmerg commented 1 year ago

Thanks! Though, you're encoding $dimension now. Below it's decoded. (plus another return value of params->shift) Isn't this then redundant and always was? params->shift decodes already after all. Please check this as well.

yhabteab commented 1 year ago

Below it's decoded. (plus another return value of params->shift) Isn't this then redundant and always was? params->shift decodes already after all. Please check this as well.

This is indeed redundant since the dimensions are already decoded when shift('dimendsions') is called and passed to DimensionParams::fromString() at the beginning of the method.