mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Refactor: move some files to @grafana/data (#17952)
* moving to data WIP * more refactoring * add missing test * mock full path * remove sinon from grafana-ui
This commit is contained in:
committed by
Torkel Ödegaard
parent
baed5d7bd9
commit
3f15170914
@@ -4,7 +4,7 @@ import { DataSourceApi, DataSourceInstanceSettings, DataQueryRequest, DataQueryR
|
||||
import { ElasticResponse } from './elastic_response';
|
||||
import { IndexPattern } from './index_pattern';
|
||||
import { ElasticQueryBuilder } from './query_builder';
|
||||
import { toUtc } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
import { toUtc } from '@grafana/data';
|
||||
import * as queryDef from './query_def';
|
||||
import { BackendSrv } from 'app/core/services/backend_srv';
|
||||
import { TemplateSrv } from 'app/features/templating/template_srv';
|
||||
|
||||
@@ -2,7 +2,8 @@ import _ from 'lodash';
|
||||
import flatten from 'app/core/utils/flatten';
|
||||
import * as queryDef from './query_def';
|
||||
import TableModel from 'app/core/table_model';
|
||||
import { DataFrame, DataQueryResponse, toDataFrame, FieldType } from '@grafana/ui';
|
||||
import { DataFrame, toDataFrame, FieldType } from '@grafana/data';
|
||||
import { DataQueryResponse } from '@grafana/ui';
|
||||
|
||||
export class ElasticResponse {
|
||||
constructor(private targets, private response) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { toUtc, dateTime } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
import { toUtc, dateTime } from '@grafana/data';
|
||||
|
||||
const intervalMap = {
|
||||
Hourly: { startOf: 'hour', amount: 'hours' },
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import angular, { IQService } from 'angular';
|
||||
import * as dateMath from '@grafana/ui/src/utils/datemath';
|
||||
import * as dateMath from '@grafana/data/src/utils/datemath';
|
||||
import _ from 'lodash';
|
||||
import { ElasticDatasource, getMaxConcurrenShardRequestOrDefault } from '../datasource';
|
||||
import { toUtc, dateTime } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
import { toUtc, dateTime } from '@grafana/data';
|
||||
import { BackendSrv } from 'app/core/services/backend_srv';
|
||||
import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
import { TemplateSrv } from 'app/features/templating/template_srv';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///<amd-dependency path="test/specs/helpers" name="helpers" />
|
||||
|
||||
import { IndexPattern } from '../index_pattern';
|
||||
import { toUtc } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
import { toUtc } from '@grafana/data';
|
||||
|
||||
describe('IndexPattern', () => {
|
||||
describe('when getting index for today', () => {
|
||||
|
||||
Reference in New Issue
Block a user