This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Add new mapping options "table+json" and "table+jsonp" #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear Daniel and all contributors,
first things first: Thanks for conceiving and maintaining this great plugin, we are using it extensively for displaying geospatial information with the Hiveeyes Project.
In one of our data planes, we are feeding data from the luftdaten.info project into an InfluxDB database using luftdatenpumpe.
As the data from InfluxDB is designated by
"FORMAT AS Table"
into the Worldmap Panel, we couldn't find a way to acquire the Location Name from a JSON/JSONP data source as it is possible with the"FORMAT AS Time series"
variant already.This PR accounts for that. When choosing to load location data using the new mapping options
"table+json"
or"table+jsonp"
, it is possible to load location information from JSON. The value of the data field designated by the"Location Name Field"
will be used as a key for looking up the appropriate record in the JSON dataset. If the lookup fails, the specific code path is backward compatible and should produce the same results as before by using the value of the"Location Name Field"
itself.By applying that to our installation, we have been able to display a long location name acquired from ldi-stations.json on the map overlay of LDI stations map without having to store the name inside the InfluxDB measurement table itself. We don't even want to keep a short name there, the lookup is solely done by using a single location identifier, the numeric
station_id
:With kind regards,
Andreas.
P.S.: This might also help along with #176.