mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
287 lines
7.2 KiB
Markdown
287 lines
7.2 KiB
Markdown
|
+++
|
||
|
# -----------------------------------------------------------------------
|
||
|
# Do not edit this file. It is automatically generated by API Documenter.
|
||
|
# -----------------------------------------------------------------------
|
||
|
title = "DataSourcePlugin"
|
||
|
keywords = ["grafana","documentation","sdk","@grafana/data"]
|
||
|
type = "docs"
|
||
|
+++
|
||
|
|
||
|
## DataSourcePlugin class
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare class DataSourcePlugin<DSType extends DataSourceApi<TQuery, TOptions>, TQuery extends DataQuery = DataSourceQueryType<DSType>, TOptions extends DataSourceJsonData = DataSourceOptionsType<DSType>, TSecureOptions = {}> extends GrafanaPlugin<DataSourcePluginMeta<TOptions>>
|
||
|
```
|
||
|
<b>Import</b>
|
||
|
|
||
|
```typescript
|
||
|
import { DataSourcePlugin } from '@grafana/data';
|
||
|
```
|
||
|
<b>Constructors</b>
|
||
|
|
||
|
| Constructor | Modifiers | Description |
|
||
|
| --- | --- | --- |
|
||
|
| [constructor(DataSourceClass)](#constructor-datasourceclass) | | Constructs a new instance of the <code>DataSourcePlugin</code> class |
|
||
|
|
||
|
<b>Properties</b>
|
||
|
|
||
|
| Property | Modifiers | Type | Description |
|
||
|
| --- | --- | --- | --- |
|
||
|
| [components](#components-property) | | <code>DataSourcePluginComponents<DSType, TQuery, TOptions, TSecureOptions></code> | |
|
||
|
| [DataSourceClass](#datasourceclass-property) | | <code>DataSourceConstructor<DSType, TQuery, TOptions></code> | |
|
||
|
|
||
|
<b>Methods</b>
|
||
|
|
||
|
| Method | Modifiers | Description |
|
||
|
| --- | --- | --- |
|
||
|
| [setAnnotationQueryCtrl(AnnotationsQueryCtrl)](#setannotationqueryctrl-method) | | |
|
||
|
| [setComponentsFromLegacyExports(pluginExports)](#setcomponentsfromlegacyexports-method) | | |
|
||
|
| [setConfigCtrl(ConfigCtrl)](#setconfigctrl-method) | | |
|
||
|
| [setConfigEditor(editor)](#setconfigeditor-method) | | |
|
||
|
| [setExploreLogsQueryField(ExploreQueryField)](#setexplorelogsqueryfield-method) | | |
|
||
|
| [setExploreMetricsQueryField(ExploreQueryField)](#setexploremetricsqueryfield-method) | | |
|
||
|
| [setExploreQueryField(ExploreQueryField)](#setexplorequeryfield-method) | | |
|
||
|
| [setExploreStartPage(ExploreStartPage)](#setexplorestartpage-method) | | |
|
||
|
| [setMetadataInspector(MetadataInspector)](#setmetadatainspector-method) | | |
|
||
|
| [setQueryCtrl(QueryCtrl)](#setqueryctrl-method) | | |
|
||
|
| [setQueryEditor(QueryEditor)](#setqueryeditor-method) | | |
|
||
|
| [setVariableQueryEditor(VariableQueryEditor)](#setvariablequeryeditor-method) | | |
|
||
|
|
||
|
### constructor(DataSourceClass)
|
||
|
|
||
|
Constructs a new instance of the `DataSourcePlugin` class
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
constructor(DataSourceClass: DataSourceConstructor<DSType, TQuery, TOptions>);
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| DataSourceClass | <code>DataSourceConstructor<DSType, TQuery, TOptions></code> | |
|
||
|
|
||
|
### components property
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
components: DataSourcePluginComponents<DSType, TQuery, TOptions, TSecureOptions>;
|
||
|
```
|
||
|
|
||
|
### DataSourceClass property
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
DataSourceClass: DataSourceConstructor<DSType, TQuery, TOptions>;
|
||
|
```
|
||
|
|
||
|
### setAnnotationQueryCtrl method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setAnnotationQueryCtrl(AnnotationsQueryCtrl: any): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| AnnotationsQueryCtrl | <code>any</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setComponentsFromLegacyExports method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setComponentsFromLegacyExports(pluginExports: any): void;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| pluginExports | <code>any</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`void`
|
||
|
|
||
|
### setConfigCtrl method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setConfigCtrl(ConfigCtrl: any): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| ConfigCtrl | <code>any</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setConfigEditor method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setConfigEditor(editor: ComponentType<DataSourcePluginOptionsEditorProps<TOptions, TSecureOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| editor | <code>ComponentType<DataSourcePluginOptionsEditorProps<TOptions, TSecureOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setExploreLogsQueryField method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setExploreLogsQueryField(ExploreQueryField: ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| ExploreQueryField | <code>ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setExploreMetricsQueryField method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setExploreMetricsQueryField(ExploreQueryField: ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| ExploreQueryField | <code>ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setExploreQueryField method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setExploreQueryField(ExploreQueryField: ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| ExploreQueryField | <code>ComponentType<ExploreQueryFieldProps<DSType, TQuery, TOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setExploreStartPage method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setExploreStartPage(ExploreStartPage: ComponentType<ExploreStartPageProps>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| ExploreStartPage | <code>ComponentType<ExploreStartPageProps></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setMetadataInspector method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setMetadataInspector(MetadataInspector: ComponentType<MetadataInspectorProps<DSType, TQuery, TOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| MetadataInspector | <code>ComponentType<MetadataInspectorProps<DSType, TQuery, TOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setQueryCtrl method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setQueryCtrl(QueryCtrl: any): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| QueryCtrl | <code>any</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setQueryEditor method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setQueryEditor(QueryEditor: ComponentType<QueryEditorProps<DSType, TQuery, TOptions>>): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| QueryEditor | <code>ComponentType<QueryEditorProps<DSType, TQuery, TOptions>></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|
||
|
### setVariableQueryEditor method
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
setVariableQueryEditor(VariableQueryEditor: any): this;
|
||
|
```
|
||
|
<b>Parameters</b>
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| VariableQueryEditor | <code>any</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`this`
|
||
|
|