DataSourcePlugin class

Signature

  1. export declare class DataSourcePlugin<DSType extends DataSourceApi<TQuery, TOptions>, TQuery extends DataQuery = DataSourceQueryType<DSType>, TOptions extends DataSourceJsonData = DataSourceOptionsType<DSType>, TSecureOptions = {}> extends GrafanaPlugin<DataSourcePluginMeta<TOptions>>

Import

  1. import { DataSourcePlugin } from '@grafana/data';

Constructors

ConstructorModifiersDescription
constructor(DataSourceClass)Constructs a new instance of the DataSourcePlugin class

Properties

PropertyModifiersTypeDescription
componentsDataSourcePluginComponents<DSType, TQuery, TOptions, TSecureOptions>
DataSourceClassDataSourceConstructor<DSType, TQuery, TOptions>

Methods

MethodModifiersDescription
setAnnotationQueryCtrl(AnnotationsQueryCtrl)
setComponentsFromLegacyExports(pluginExports)
setConfigCtrl(ConfigCtrl)
setConfigEditor(editor)
setExploreLogsQueryField(ExploreQueryField)
setExploreMetricsQueryField(ExploreQueryField)
setExploreQueryField(ExploreQueryField)
setExploreStartPage(ExploreStartPage)
setMetadataInspector(MetadataInspector)
setQueryCtrl(QueryCtrl)
setQueryEditor(QueryEditor)
setQueryEditorHelp(QueryEditorHelp)
setVariableQueryEditor(VariableQueryEditor)

constructor(DataSourceClass)

Constructs a new instance of the DataSourcePlugin class

Signature

  1. constructor(DataSourceClass: DataSourceConstructor<DSType, TQuery, TOptions>);

Parameters

ParameterTypeDescription
DataSourceClassDataSourceConstructor<DSType, TQuery, TOptions>

components property

Signature

  1. components: DataSourcePluginComponents<DSType, TQuery, TOptions, TSecureOptions>;

DataSourceClass property

Signature

  1. DataSourceClass: DataSourceConstructor<DSType, TQuery, TOptions>;

setAnnotationQueryCtrl method

Signature

  1. setAnnotationQueryCtrl(AnnotationsQueryCtrl: any): this;

Parameters

ParameterTypeDescription
AnnotationsQueryCtrlany

Returns:

this

setComponentsFromLegacyExports method

Signature

  1. setComponentsFromLegacyExports(pluginExports: any): void;

Parameters

ParameterTypeDescription
pluginExportsany

Returns:

void

setConfigCtrl method

Signature

  1. setConfigCtrl(ConfigCtrl: any): this;

Parameters

ParameterTypeDescription
ConfigCtrlany

Returns:

this

setConfigEditor method

Signature

  1. setConfigEditor(editor: ComponentType<DataSourcePluginOptionsEditorProps<TOptions, TSecureOptions>>): this;

Parameters

ParameterTypeDescription
editorComponentType<DataSourcePluginOptionsEditorProps<TOptions, TSecureOptions>>

Returns:

this

setExploreLogsQueryField method

Signature

  1. setExploreLogsQueryField(ExploreQueryField: ComponentType<QueryEditorProps<DSType, TQuery, TOptions>>): this;

Parameters

ParameterTypeDescription
ExploreQueryFieldComponentType<QueryEditorProps<DSType, TQuery, TOptions>>

Returns:

this

setExploreMetricsQueryField method

Signature

  1. setExploreMetricsQueryField(ExploreQueryField: ComponentType<QueryEditorProps<DSType, TQuery, TOptions>>): this;

Parameters

ParameterTypeDescription
ExploreQueryFieldComponentType<QueryEditorProps<DSType, TQuery, TOptions>>

Returns:

this

setExploreQueryField method

Signature

  1. setExploreQueryField(ExploreQueryField: ComponentType<QueryEditorProps<DSType, TQuery, TOptions>>): this;

Parameters

ParameterTypeDescription
ExploreQueryFieldComponentType<QueryEditorProps<DSType, TQuery, TOptions>>

Returns:

this

setExploreStartPage method

Signature

  1. setExploreStartPage(ExploreStartPage: ComponentType<QueryEditorHelpProps<TQuery>>): this;

Parameters

ParameterTypeDescription
ExploreStartPageComponentType<QueryEditorHelpProps<TQuery>>

Returns:

this

setMetadataInspector method

Signature

  1. setMetadataInspector(MetadataInspector: ComponentType<MetadataInspectorProps<DSType, TQuery, TOptions>>): this;

Parameters

ParameterTypeDescription
MetadataInspectorComponentType<MetadataInspectorProps<DSType, TQuery, TOptions>>

Returns:

this

setQueryCtrl method

Signature

  1. setQueryCtrl(QueryCtrl: any): this;

Parameters

ParameterTypeDescription
QueryCtrlany

Returns:

this

setQueryEditor method

Signature

  1. setQueryEditor(QueryEditor: ComponentType<QueryEditorProps<DSType, TQuery, TOptions>>): this;

Parameters

ParameterTypeDescription
QueryEditorComponentType<QueryEditorProps<DSType, TQuery, TOptions>>

Returns:

this

setQueryEditorHelp method

Signature

  1. setQueryEditorHelp(QueryEditorHelp: ComponentType<QueryEditorHelpProps<TQuery>>): this;

Parameters

ParameterTypeDescription
QueryEditorHelpComponentType<QueryEditorHelpProps<TQuery>>

Returns:

this

setVariableQueryEditor method

Signature

  1. setVariableQueryEditor(VariableQueryEditor: any): this;

Parameters

ParameterTypeDescription
VariableQueryEditorany

Returns:

this