-
assigned issue to
SensorThings Observations Chart is empty when string IDs are configured in FROST-Server
FROST-Server allows the usage of UUIDs and String keys in all entities. See https://fraunhoferiosb.github.io/FROST-Server/settings/settings.html under the persistence section. The keys can be provided by the client as well (see persistence.idGenerationMode setting). This has some benefits if someone has already a unique primary key for their data (for idempotent operations etc.).
The function isObservation() at staTools.js returns false if the “@iot.id” field (the primary key) is not a number. Therefore the chart is empty if the FROST-Server is configured with String keys.
Removing the line && typeof observation["@iot.id"] === "number"
fixes the issue.
For non-developers, in the minified version, one can remove the above line by running:
sed -i 's/&&"number"==typeof e\["@iot.id"\]//g' masterportal.js
Comments (4)
-
-
- changed status to open
-
Dieser Bug ist nun gefixed.
Wir lassen für die iot.id jetzt sowohl number als auch string zu.
-
- changed status to resolved
Der neue Code ist voraussichtlich ab Version v2.23.0 verfügbar.
- Log in to comment