I’m trying to do a screen with charts formed by data coming from InfluxDB (using ember 2.1.0) InfluxDB allows to tag measurements, and allows to query for those tags values. I need to fetch these tags and present them to the user prior to the actual query
For example I have:
Measurement: “Operation”. Tags: “username”. Tag values for “username”: [‘Carl’, ‘Jane’]
In order to form a query I need some input from the user:
- Pick start and end date
- Select usernames
So, in order to present option one I need to prefetch the tags from InfluxDB (ajax request), then ask the user input for option 1 and 2 and finally construct a query based on that to send again to InfluxDB. The response of this query will be passed down to a component that builds the graph.
Flow is: Navigate to route → fetch tags from InfluxDB → ask user for input → send query to InfluxDB → show chart
So, my problem is that I’m not sure how to approach this in an Ember way. I considered making a route to get the tags, and show them in a form along with date pickers for option 1. On submit, I’d pass the user input somehow (queryparams?) to a nested route where I’d form the final query for Influxdb and bring that final data. None of this seems a good solution to me. What options do I have?