mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
Testing moving out one type to grafana/ui
This commit is contained in:
parent
7268f16c54
commit
0ff572efbf
@ -8,7 +8,7 @@ module.exports = {
|
||||
"roots": [
|
||||
"<rootDir>/public/app",
|
||||
"<rootDir>/public/test",
|
||||
"<rootDir>packages"
|
||||
"<rootDir>/packages"
|
||||
],
|
||||
"testRegex": "(\\.|/)(test)\\.(jsx?|tsx?)$",
|
||||
"moduleFileExtensions": [
|
||||
|
@ -16,6 +16,7 @@
|
||||
"react-highlight-words": "0.11.0",
|
||||
"@torkelo/react-select": "2.1.1",
|
||||
"react-transition-group": "^2.2.1",
|
||||
"moment": "^2.22.2",
|
||||
"react-virtualized": "^9.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1 +1,2 @@
|
||||
export * from './components';
|
||||
export * from './types';
|
||||
|
1
packages/grafana-ui/src/types/index.ts
Normal file
1
packages/grafana-ui/src/types/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './series';
|
13
packages/grafana-ui/src/types/series.ts
Normal file
13
packages/grafana-ui/src/types/series.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { Moment } from 'moment';
|
||||
|
||||
export enum LoadingState {
|
||||
NotStarted = 'NotStarted',
|
||||
Loading = 'Loading',
|
||||
Done = 'Done',
|
||||
Error = 'Error',
|
||||
}
|
||||
|
||||
export interface RawTimeRange {
|
||||
from: Moment | string;
|
||||
to: Moment | string;
|
||||
}
|
@ -8,7 +8,8 @@ import { getDatasourceSrv, DatasourceSrv } from 'app/features/plugins/datasource
|
||||
import kbn from 'app/core/utils/kbn';
|
||||
|
||||
// Types
|
||||
import { TimeRange, LoadingState, DataQueryOptions, DataQueryResponse, TimeSeries } from 'app/types';
|
||||
import { TimeRange, DataQueryOptions, DataQueryResponse, TimeSeries } from 'app/types';
|
||||
import { LoadingState } from '@grafana/ui';
|
||||
|
||||
interface RenderProps {
|
||||
loading: LoadingState;
|
||||
|
@ -10,7 +10,6 @@ import { Invitee, OrgUser, User, UsersState, UserState } from './user';
|
||||
import { DataSource, DataSourceSelectItem, DataSourcesState } from './datasources';
|
||||
import {
|
||||
TimeRange,
|
||||
LoadingState,
|
||||
TimeSeries,
|
||||
TimeSeriesVM,
|
||||
TimeSeriesVMs,
|
||||
@ -69,7 +68,6 @@ export {
|
||||
User,
|
||||
UsersState,
|
||||
TimeRange,
|
||||
LoadingState,
|
||||
PanelPlugin,
|
||||
PanelProps,
|
||||
PanelOptionsProps,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { LoadingState, TimeSeries, TimeRange } from './series';
|
||||
import { TimeSeries, TimeRange } from './series';
|
||||
import { LoadingState } from '@grafana/ui';
|
||||
|
||||
export interface PanelProps<T = any> {
|
||||
timeSeries: TimeSeries[];
|
||||
|
@ -1,13 +1,6 @@
|
||||
import { Moment } from 'moment';
|
||||
import { PluginMeta } from './plugins';
|
||||
|
||||
export enum LoadingState {
|
||||
NotStarted = 'NotStarted',
|
||||
Loading = 'Loading',
|
||||
Done = 'Done',
|
||||
Error = 'Error',
|
||||
}
|
||||
|
||||
export interface RawTimeRange {
|
||||
from: Moment | string;
|
||||
to: Moment | string;
|
||||
|
Loading…
Reference in New Issue
Block a user