Icinga / icingaweb2-module-elasticsearch

This module will not be updated by Icinga anymore. Please don't attempt to use it.
GNU General Public License v2.0
29 stars 9 forks source link

Sort columns by selected fields #45

Closed GalipoliX closed 5 years ago

GalipoliX commented 5 years ago

Sort the columns displayed by the order you select the fields in event type definition. Before they were displayed in the order elastic returned them in json object. But Json order is random. This creates a new array in order of the fields an passes it to extractFields function. If there is a dot in fieldname i assume that the content is an array (for example geoip.countryname, geoip.ip, etc.).

GalipoliX commented 5 years ago

Fixes #28

lippserd commented 5 years ago

Hi,

Thanks for your PR. Much appreciated 👍

I came up with a different solution which uses native PHP function instead of the do it yourself approach. Hope you don't mind 😆

Best, Eric