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

slices don't work with whitespace or umlaut in data field #10

Closed verboEse closed 5 years ago

verboEse commented 7 years ago

when trying to slice for a data field containing a white space or umlauts, the filter fails, as these characters get HTMLized ("%20" instead of " ").

sant-swedge commented 7 years ago

We actually encountered the same problem with white space, after some investigation it seems that the function cubeFromParams($params) is the cause, as the URL is not decoded when the cube is created by that function.

I did find a solution which is as follows: Edit cube/application/controllers/IndexController.php Find: $cube->slice($param[0], $param[1]); Change to: $cube->slice($param[0], urldecode($param[1]));

I did initially see if decoding the name aka $param[0] would allow us to use custom variable names with spaces (and upper cases) but this is more of an architectural limitation of Icinga2 as a whole as it doesn't seem to "escape" the custom variable names when used with database commands which results in errors.

Not sure if this also works with umlauts but I would imagine that it would.

Simon.

nilmerg commented 5 years ago

17 is merged. Closed.