mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add a @grafana/runtime package with backendSrv interface (#16533)
grafana-runtime/tsconfig.json imports query to avoid a build error ¯\_(ツ)_/¯
This commit is contained in:
@@ -7,7 +7,7 @@ import { TemplateSrv } from 'app/features/templating/template_srv';
|
||||
import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { IQService } from 'angular';
|
||||
jest.mock('../datasource');
|
||||
jest.mock('app/core/services/backend_srv');
|
||||
jest.mock('@grafana/ui');
|
||||
|
||||
describe('Prometheus editor completer', () => {
|
||||
function getSessionStub(data) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
import appEvents from 'app/core/app_events';
|
||||
|
||||
import { QueryMeta } from '../types';
|
||||
import { getAngularLoader, AngularComponent } from 'app/core/services/AngularLoader';
|
||||
import { getAngularLoader, AngularComponent } from '@grafana/runtime';
|
||||
import { TemplateSrv } from 'app/features/templating/template_srv';
|
||||
import StackdriverDatasource from '../datasource';
|
||||
import '../query_filter_ctrl';
|
||||
|
||||
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
// Services & Utils
|
||||
import { getBackendSrv, BackendSrv } from 'app/core/services/backend_srv';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
|
||||
// Components
|
||||
import { FormLabel, Select, SelectOptionItem } from '@grafana/ui';
|
||||
@@ -21,7 +21,7 @@ interface State {
|
||||
type Props = QueryEditorProps<TestDataDatasource, TestDataQuery>;
|
||||
|
||||
export class QueryEditor extends PureComponent<Props> {
|
||||
backendSrv: BackendSrv = getBackendSrv();
|
||||
backendSrv = getBackendSrv();
|
||||
|
||||
state: State = {
|
||||
scenarioList: [],
|
||||
|
||||
Reference in New Issue
Block a user