Prometheus: Add info that using Loki as Prometheus data source is no longer supported and might stop working (#34650)

* Add information that Loki as Prometheus data source is not supported

* Fix ugly error when loki as prometheus used

* Refactor, add test

* Fix type error

* Fix test by passing missing method

* Update public/app/plugins/datasource/prometheus/query_hints.ts

* Remove optionality in prop
This commit is contained in:
Ivana Huckova
2021-05-28 17:10:10 +02:00
committed by GitHub
parent 6adcfa9e50
commit add1b827ae
6 changed files with 94 additions and 14 deletions

View File

@@ -12,6 +12,7 @@ import { testIds as regularTestIds } from './PromQueryEditor';
function setup(app: CoreApp): RenderResult {
const dataSource = ({
createQuery: jest.fn((q) => q),
getInitHints: () => [],
getPrometheusTime: jest.fn((date, roundup) => 123),
languageProvider: {
start: () => Promise.resolve([]),