Javascript for writing to InfluxDB via HTTP API

#1

I see the InfluxDB documentation for using the Influxdb JavaScript library to write the database. Does anyone have any javascript code to write to inject data into a series using the HTTP API?

I’m trying to use the javascript functionality inside Text panels in Grafana to create push buttons on the dashboard. I want these push buttons to inject data into existing series. These text buttons only allow javascript for click events, so I can’t execute a shell script, for example.