-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InfluxDB: Add support for POST HTTP verb #16690
InfluxDB: Add support for POST HTTP verb #16690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking time to contribute to Grafana.
This should be implemented backend as well. https://github.com/grafana/grafana/tree/master/pkg/tsdb/influxdb So all requests for a datasource is using the same http verb.
@bergquist thanks for your review, I clearly overlooked this part. I will add a commit for the backend. |
No worries. It's kinda weird that Grafana have backend and frontend implementation ;) |
002de9d
to
00f3f37
Compare
@bergquist I am ready for a new review, since the backend has now its changes. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Here are some minor comments from me. I do not think they would prevent merging of this so let me know if you have time for those and if not we can address them after merging.
Yeah we do not have that much backend validation fur such cases. For example for dashboards validation is here so it can be the same for all API updates but also provisioning. So even though validation would be nice I am not sure it makes sense to do it in this PR, as this would need to add some more validation boilerplate and I am not sure if there is consensus in where to actually put the validation (for example I think it makes sense to have single validation logic for all inputs but I think data should be validated as soon as possible on the API boundary). cc @bergquist |
00f3f37
to
27fd995
Compare
27fd995
to
9487621
Compare
…rce. A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with an heavy request. Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour. Fixes grafana#10038
9487621
to
0092c23
Compare
@bergquist @aocenas I am ready for a new review. :) |
Thanks for the changes @StephenSorriaux |
* grafana/master: Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841)
* grafana/master: Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790)
* grafana/master: Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790)
…MetricPanelCtrl * grafana/master: (24 commits) CSV: escape quotes in toCSV (grafana#16874) Dashboard: Lazy load out of view panels (grafana#15554) LDAP: Added reload endpoint for LDAP config (grafana#15470) PluginsList: Removed icons and updated snapshots (grafana#16872) Panels: Fixed issue with panel type change and data updates (grafana#16871) Chore: fix modes for non-executable files (grafana#16864) DataSourceSettings: Minor fix for uncontrolled input (grafana#16863) Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841) prometheus: fix regression after adding support for tracing headers (grafana#16829) area/circleci: Speed up circleci build process for branches and pr (grafana#16778) ...
* grafana/master: (44 commits) CSV: escape quotes in toCSV (grafana#16874) Dashboard: Lazy load out of view panels (grafana#15554) LDAP: Added reload endpoint for LDAP config (grafana#15470) PluginsList: Removed icons and updated snapshots (grafana#16872) Panels: Fixed issue with panel type change and data updates (grafana#16871) Chore: fix modes for non-executable files (grafana#16864) DataSourceSettings: Minor fix for uncontrolled input (grafana#16863) Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841) prometheus: fix regression after adding support for tracing headers (grafana#16829) area/circleci: Speed up circleci build process for branches and pr (grafana#16778) ...
What this PR does / why we need it:
A new parameter
queryMode
is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with an heavy request.Default configuration is kept to GET for backward compatibility. Tests have been added for this new behaviour.
Which issue(s) this PR fixes:
Fixes #10038
Special notes for your reviewer:
None at the moment.