Commit 4fc9d794 by Torkel Ödegaard

Moved plugin types to @grafana/ui

parent a201c76c
......@@ -18,3 +18,54 @@ export interface PluginExports {
PanelDefaults?: any;
}
export interface PluginMeta {
id: string;
name: string;
info: PluginMetaInfo;
includes: PluginInclude[];
// Datasource-specific
metrics?: boolean;
tables?: boolean;
logs?: boolean;
explore?: boolean;
annotations?: boolean;
mixed?: boolean;
hasQueryHelp?: boolean;
queryOptions?: PluginMetaQueryOptions;
}
interface PluginMetaQueryOptions {
cacheTimeout?: boolean;
maxDataPoints?: boolean;
minInterval?: boolean;
}
export interface PluginInclude {
type: string;
name: string;
path: string;
}
interface PluginMetaInfoLink {
name: string;
url: string;
}
export interface PluginMetaInfo {
author: {
name: string;
url?: string;
};
description: string;
links: PluginMetaInfoLink[];
logos: {
large: string;
small: string;
};
screenshots: any[];
updated: string;
version: string;
}
import { DataSource, NavModel, NavModelItem, PluginMeta } from 'app/types';
import { DataSource, NavModel, NavModelItem } from 'app/types';
import { PluginMeta } from '@grafana/ui/src/types';
import config from 'app/core/config';
export function buildNavModel(dataSource: DataSource, pluginMeta: PluginMeta): NavModelItem {
......
import _ from 'lodash';
import { DataSource, PluginMeta, NavModel } from 'app/types';
import { DataSource, NavModel } from 'app/types';
import { PluginMeta } from '@grafana/ui/src/types';
import config from 'app/core/config';
export function buildNavModel(ds: DataSource, plugin: PluginMeta, currentPage: string): NavModel {
......
......@@ -2,7 +2,8 @@ import _ from 'lodash';
import * as dateMath from 'app/core/utils/datemath';
import { LogsStream, LogsModel, makeSeriesForLogs } from 'app/core/logs_model';
import { PluginMeta, DataQuery } from 'app/types';
import { DataQuery } from 'app/types';
import { PluginMeta } from '@grafana/ui/src/types';
import { addLabelToSelector } from 'app/plugins/datasource/prometheus/add_label_to_query';
import LanguageProvider from './language_provider';
......
import React, { PureComponent } from 'react';
interface Props {
}
export class QueryEditor extends PureComponent<Props> {
render() {
return (
<h2>Test data</h2>
);
}
}
import { LayoutMode } from '../core/components/LayoutSelector/LayoutSelector';
import { Plugin, PluginMeta } from './plugins';
import { PluginExports } from '@grafana/ui';
import { Plugin } from './plugins';
import { PluginExports, PluginMeta } from '@grafana/ui/src/types';
export interface DataSource {
id: number;
......
import { PluginExports } from '@grafana/ui/src/types';
import { PluginExports, PluginMetaInfo } from '@grafana/ui/src/types';
export interface PanelPlugin {
id: string;
......@@ -11,56 +11,6 @@ export interface PanelPlugin {
exports?: PluginExports;
}
interface PluginMetaQueryOptions {
cacheTimeout?: boolean;
maxDataPoints?: boolean;
minInterval?: boolean;
}
export interface PluginMeta {
id: string;
name: string;
info: PluginMetaInfo;
includes: PluginInclude[];
// Datasource-specific
metrics?: boolean;
tables?: boolean;
logs?: boolean;
explore?: boolean;
annotations?: boolean;
mixed?: boolean;
hasQueryHelp?: boolean;
queryOptions?: PluginMetaQueryOptions;
}
export interface PluginInclude {
type: string;
name: string;
path: string;
}
interface PluginMetaInfoLink {
name: string;
url: string;
}
export interface PluginMetaInfo {
author: {
name: string;
url?: string;
};
description: string;
links: PluginMetaInfoLink[];
logos: {
large: string;
small: string;
};
screenshots: any[];
updated: string;
version: string;
}
export interface Plugin {
defaultNavUrl: string;
enabled: boolean;
......
import { PluginMeta } from './plugins';
import { TimeSeries, TimeRange, RawTimeRange, PluginExports } from '@grafana/ui';
import { TimeSeries, TimeRange, RawTimeRange, PluginExports, PluginMeta } from '@grafana/ui/src/types';
export interface DataQueryResponse {
data: TimeSeries[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment