* If POST, pass params as data not in url string
* Fix metricNameAndLabelsQuery
* Improve test for new functionality
* Add multiple parameters in test scenarios
* Change urlParams to object
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.
* Remove unnecessary _ import from Graph component
* Enforce lodash import style
* Fix remaining lodash imports
* Add typing to prometheus response
* Refactor result_transformer to return DataFrame
* Refactor + test fixes
* Fix Prometheus data source test
* Modify heatmap function + add back tests
* Update performInstantQuery return type
* Remove duplicate code from result_transformer
* Address review comments
* Update metric labels retrival logic to be safer
* Add time range parameters to labels API
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Fix minor issues
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Add range to explore component
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Add range to query component
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Cache metric names for time range
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Update public/app/plugins/datasource/prometheus/components/PromQueryField.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Remove unused method
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Only compare the ranges
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Update public/app/plugins/datasource/prometheus/components/PromQueryField.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Fixing issue 16090 where Grafana uses illegal characters in requests to Prometheus
* Rebase with Grafana and Merge branch 'master' of https://github.com/BhartiAgrawalNvidia/grafana into fix-16090
# Conflicts:
# public/app/plugins/datasource/prometheus/language_provider.ts
* Rebase with Grafana and Merge branch 'master' of https://github.com/BhartiAgrawalNvidia/grafana into fix-16090
# Conflicts:
# public/app/plugins/datasource/prometheus/language_provider.ts
* Use querystring to escape the url
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Remove implicit anys from ResultProcessor and tests
* Chore: Removes implicit anys for /loki/**/*.ts
* Chore: Removes implicit anys for prometheus/**/*
* updated rules for variable name and fixed files that didn't follow new rules
* fixed test so it uses new rule
* made exceptions to rule in interval_variable
From review feedback:
* s/helper/metadata
* combined positional args to _request into options dict
* metadataRequest reuses _request()
* moved consumption of this.httpMethod into _request, can be overwritten
in options due to spread-after
* When set to `true`, the `silent` option for backend_srv requests
suppresses all event emitters that are triggered when the response is
received.
* Added `helperRequest()` to the Prometheus datasource to support
requests that are not triggered by the user, e.g., for tab completion.
`helperRequest()` sets the `silent` option.
* Migrated all non-timeseries queries of the Prometheus datasource to
use `helperRequest()`.
Fixes#11673