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:
Ryan McKinley
2019-06-03 17:55:59 +02:00
committed by GitHub
parent b7a9533476
commit 96ba32d0c8
46 changed files with 255 additions and 74 deletions

View File

@@ -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) {

View File

@@ -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';

View File

@@ -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: [],