WIP: Confirm that `db` and `rp` are still required for `/chronograf/v1/sources/proxy`
The request appears to work if the payload contains just a query key. It appears that we can omit the db and rp key, and get back a successful response. Ex:
Request
{
query: "SELECT mean("usage_user") AS "usage_user" FROM "telegraf"."autogen"."cpu" where time > now() - 15m group by time(1m)"
}
Response
{"results":[{"statement_id":0,"series":[{"name":"cpu","columns":["time","usage_user"],"values":[[1490219580000,null],[1490219640000,2.902227554014626],[1490219700000,3.173108096018694],[1490219760000,5.110384474685628],[1490219820000,6.19047281937956],[1490219880000,6.4138261123043545],[1490219940000,4.328690344172141],[1490220000000,2.313048447008925],[1490220060000,3.520382500349046],[1490220120000,7.976910227416558],[1490220180000,6.681763512273218],[1490220240000,6.991315959697197],[1490220300000,4.616479474422906],[1490220360000,3.5955589132036283],[1490220420000,5.6448023170125],[1490220480000,3.307784218148033]]}]}]}
Dashboard tries to populate db before passing the whole query object through to its descendants. The queryUrlGenerator eventually uses these keys via an AJAX request to chronograf/v1/sources/proxy. If db is no longer necessary, we can remove this logic.
@lukevmorris yup, you are right... if the query specifies the database and retention policy, then there is no need for db or rp.
@lukevmorris does this mean we should change the query? what are next steps on this issue
@121watts why close this?
@nhaugo I believe this has to do with removing keys from the queryConfig, not changing the query. The dp and rp keys on the object being sent to the database are redundant.
@jaredscheib no idea, will reopen and discuss