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
+1
-1
@@ -9,7 +9,7 @@ import { getBackendSrv } from '@grafana/runtime';
|
||||
import { FormLabel, Select, SelectOptionItem } from '@grafana/ui';
|
||||
|
||||
// Types
|
||||
import { QueryEditorProps } from '@grafana/ui/src/types';
|
||||
import { QueryEditorProps } from '@grafana/ui';
|
||||
import { TestDataDatasource } from './datasource';
|
||||
import { TestDataQuery, Scenario } from './types';
|
||||
|
||||
|
||||
+3
-12
@@ -1,16 +1,7 @@
|
||||
import defaults from 'lodash/defaults';
|
||||
import {
|
||||
DataQueryRequest,
|
||||
FieldType,
|
||||
DataFrame,
|
||||
DataQueryResponse,
|
||||
DataQueryError,
|
||||
DataStreamObserver,
|
||||
DataStreamState,
|
||||
LoadingState,
|
||||
LogLevel,
|
||||
CSVReader,
|
||||
} from '@grafana/ui';
|
||||
import { DataQueryRequest, DataQueryResponse, DataQueryError, DataStreamObserver, DataStreamState } from '@grafana/ui';
|
||||
|
||||
import { FieldType, DataFrame, LoadingState, LogLevel, CSVReader } from '@grafana/data';
|
||||
import { TestDataQuery, StreamingQuery } from './types';
|
||||
|
||||
export const defaultQuery: StreamingQuery = {
|
||||
|
||||
+3
-8
@@ -1,12 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import {
|
||||
DataSourceApi,
|
||||
DataQueryRequest,
|
||||
TableData,
|
||||
TimeSeries,
|
||||
DataSourceInstanceSettings,
|
||||
DataStreamObserver,
|
||||
} from '@grafana/ui';
|
||||
import { DataSourceApi, DataQueryRequest, DataSourceInstanceSettings, DataStreamObserver } from '@grafana/ui';
|
||||
|
||||
import { TableData, TimeSeries } from '@grafana/data';
|
||||
import { TestDataQuery, Scenario } from './types';
|
||||
import { getBackendSrv } from 'app/core/services/backend_srv';
|
||||
import { StreamHandler } from './StreamHandler';
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
import { QueryCtrl } from 'app/plugins/sdk';
|
||||
import { defaultQuery } from './StreamHandler';
|
||||
import { getBackendSrv } from 'app/core/services/backend_srv';
|
||||
import { dateTime } from '@grafana/ui/src/utils/moment_wrapper';
|
||||
import { dateTime } from '@grafana/data';
|
||||
|
||||
export class TestDataQueryCtrl extends QueryCtrl {
|
||||
static templateUrl = 'partials/query.editor.html';
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { DataQuery } from '@grafana/ui/src/types';
|
||||
import { DataQuery } from '@grafana/ui';
|
||||
|
||||
export interface Scenario {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user