Commit 83df83fa by Marcus Andersson Committed by GitHub

Docs: updated packages reference docs for 7.1.0-beta1. (#25958)

parent e9364087
...@@ -20,7 +20,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -20,7 +20,7 @@ A library containing most of the core functionality and data types used in Grafa
| [ArrayVector](./arrayvector/) | | | [ArrayVector](./arrayvector/) | |
| [BinaryOperationVector](./binaryoperationvector/) | | | [BinaryOperationVector](./binaryoperationvector/) | |
| [CircularDataFrame](./circulardataframe/) | This dataframe can have values constantly added, and will never exceed the given capacity | | [CircularDataFrame](./circulardataframe/) | This dataframe can have values constantly added, and will never exceed the given capacity |
| [CircularVector](./circularvector/) | Circular vector uses a single buffer to capture a stream of values overwriting the oldest value on add.<!-- -->This supports addting to the 'head' or 'tail' and will grow the buffer to match a configured capacity. | | [CircularVector](./circularvector/) | Circular vector uses a single buffer to capture a stream of values overwriting the oldest value on add.<!-- -->This supports adding to the 'head' or 'tail' and will grow the buffer to match a configured capacity. |
| [ConstantVector](./constantvector/) | | | [ConstantVector](./constantvector/) | |
| [CSVReader](./csvreader/) | | | [CSVReader](./csvreader/) | |
| [DataFrameView](./dataframeview/) | <b><i>(BETA)</i></b> This abstraction will present the contents of a DataFrame as if it were a well typed javascript object Vector. | | [DataFrameView](./dataframeview/) | <b><i>(BETA)</i></b> This abstraction will present the contents of a DataFrame as if it were a well typed javascript object Vector. |
...@@ -29,6 +29,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -29,6 +29,7 @@ A library containing most of the core functionality and data types used in Grafa
| [FieldCache](./fieldcache/) | | | [FieldCache](./fieldcache/) | |
| [FieldConfigEditorBuilder](./fieldconfigeditorbuilder/) | Fluent API for declarative creation of field config option editors | | [FieldConfigEditorBuilder](./fieldconfigeditorbuilder/) | Fluent API for declarative creation of field config option editors |
| [FieldConfigOptionsRegistry](./fieldconfigoptionsregistry/) | | | [FieldConfigOptionsRegistry](./fieldconfigoptionsregistry/) | |
| [FormattedVector](./formattedvector/) | |
| [GrafanaPlugin](./grafanaplugin/) | | | [GrafanaPlugin](./grafanaplugin/) | |
| [LanguageProvider](./languageprovider/) | | | [LanguageProvider](./languageprovider/) | |
| [MutableDataFrame](./mutabledataframe/) | | | [MutableDataFrame](./mutabledataframe/) | |
...@@ -54,6 +55,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -54,6 +55,7 @@ A library containing most of the core functionality and data types used in Grafa
| [FieldType](./fieldtype/) | | | [FieldType](./fieldtype/) | |
| [FrameMatcherID](./framematcherid/) | Field name matchers | | [FrameMatcherID](./framematcherid/) | Field name matchers |
| [GrafanaThemeType](./grafanathemetype/) | | | [GrafanaThemeType](./grafanathemetype/) | |
| [InternalTimeZones](./internaltimezones/) | |
| [LoadingState](./loadingstate/) | Represent panel data loading state. | | [LoadingState](./loadingstate/) | Represent panel data loading state. |
| [LogLevel](./loglevel/) | Mapping of log level abbreviation to canonical log level. Supported levels are reduce to limit color variation. | | [LogLevel](./loglevel/) | Mapping of log level abbreviation to canonical log level. Supported levels are reduce to limit color variation. |
| [LogsDedupDescription](./logsdedupdescription/) | | | [LogsDedupDescription](./logsdedupdescription/) | |
...@@ -110,7 +112,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -110,7 +112,7 @@ A library containing most of the core functionality and data types used in Grafa
| [getValueFormat(id)](./getvalueformat/) | | | [getValueFormat(id)](./getvalueformat/) | |
| [getValueFormats()](./getvalueformats/) | | | [getValueFormats()](./getvalueformats/) | |
| [getValueFormatterIndex()](./getvalueformatterindex/) | | | [getValueFormatterIndex()](./getvalueformatterindex/) | |
| [grafanaDataFrameToArrowTable(data)](./grafanadataframetoarrowtable/) | | | [grafanaDataFrameToArrowTable(data, keepOriginalNames)](./grafanadataframetoarrowtable/) | |
| [guessFieldTypeForField(field)](./guessfieldtypeforfield/) | Looks at the data to guess the column type. This ignores any existing setting | | [guessFieldTypeForField(field)](./guessfieldtypeforfield/) | Looks at the data to guess the column type. This ignores any existing setting |
| [guessFieldTypeFromNameAndValue(name, v)](./guessfieldtypefromnameandvalue/) | Given a name and value, this will pick a reasonable field type | | [guessFieldTypeFromNameAndValue(name, v)](./guessfieldtypefromnameandvalue/) | Given a name and value, this will pick a reasonable field type |
| [guessFieldTypeFromValue(v)](./guessfieldtypefromvalue/) | Given a value this will guess the best column type<!-- -->TODO: better Date/Time support! Look for standard date strings? | | [guessFieldTypeFromValue(v)](./guessfieldtypefromvalue/) | Given a value this will guess the best column type<!-- -->TODO: better Date/Time support! Look for standard date strings? |
...@@ -167,7 +169,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -167,7 +169,7 @@ A library containing most of the core functionality and data types used in Grafa
| [DataConfigSource](./dataconfigsource/) | Describes and API for exposing panel specific data configurations. | | [DataConfigSource](./dataconfigsource/) | Describes and API for exposing panel specific data configurations. |
| [DataFrame](./dataframe/) | | | [DataFrame](./dataframe/) | |
| [DataFrameDTO](./dataframedto/) | Like a DataFrame, but fields may be a FieldDTO | | [DataFrameDTO](./dataframedto/) | Like a DataFrame, but fields may be a FieldDTO |
| [DataLink](./datalink/) | Link configuration. The values may contain variables that need to be processed before running | | [DataLink](./datalink/) | Link configuration. The values may contain variables that need to be processed before showing the link to user.<!-- -->TODO: &lt;<!-- -->T extends DataQuery<!-- -->&gt; is not strictly true for internal links as we do not need refId for example but all data source defined queries extend this so this is more for documentation. |
| [DataLinkClickEvent](./datalinkclickevent/) | Callback info for DataLink click events | | [DataLinkClickEvent](./datalinkclickevent/) | Callback info for DataLink click events |
| [DataLinksFieldConfigSettings](./datalinksfieldconfigsettings/) | | | [DataLinksFieldConfigSettings](./datalinksfieldconfigsettings/) | |
| [DataQuery](./dataquery/) | These are the common properties available to all queries in all datasources Specific implementations will extend this interface adding the required properties for the given context | | [DataQuery](./dataquery/) | These are the common properties available to all queries in all datasources Specific implementations will extend this interface adding the required properties for the given context |
...@@ -224,6 +226,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -224,6 +226,7 @@ A library containing most of the core functionality and data types used in Grafa
| [GrafanaTheme](./grafanatheme/) | | | [GrafanaTheme](./grafanatheme/) | |
| [GrafanaThemeCommons](./grafanathemecommons/) | | | [GrafanaThemeCommons](./grafanathemecommons/) | |
| [GraphSeriesXY](./graphseriesxy/) | View model projection of a series | | [GraphSeriesXY](./graphseriesxy/) | View model projection of a series |
| [GroupedTimeZones](./groupedtimezones/) | |
| [HistoryItem](./historyitem/) | | | [HistoryItem](./historyitem/) | |
| [IntervalValues](./intervalvalues/) | | | [IntervalValues](./intervalvalues/) | |
| [Labels](./labels/) | | | [Labels](./labels/) | |
...@@ -280,6 +283,7 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -280,6 +283,7 @@ A library containing most of the core functionality and data types used in Grafa
| [ScreenshotInfo](./screenshotinfo/) | | | [ScreenshotInfo](./screenshotinfo/) | |
| [SelectableValue](./selectablevalue/) | Used in select elements | | [SelectableValue](./selectablevalue/) | Used in select elements |
| [SelectFieldConfigSettings](./selectfieldconfigsettings/) | | | [SelectFieldConfigSettings](./selectfieldconfigsettings/) | |
| [StandardEditorContext](./standardeditorcontext/) | |
| [StandardEditorProps](./standardeditorprops/) | | | [StandardEditorProps](./standardeditorprops/) | |
| [StandardEditorsRegistryItem](./standardeditorsregistryitem/) | | | [StandardEditorsRegistryItem](./standardeditorsregistryitem/) | |
| [StringFieldConfigSettings](./stringfieldconfigsettings/) | | | [StringFieldConfigSettings](./stringfieldconfigsettings/) | |
...@@ -292,6 +296,8 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -292,6 +296,8 @@ A library containing most of the core functionality and data types used in Grafa
| [TimeOptions](./timeoptions/) | | | [TimeOptions](./timeoptions/) | |
| [TimeRange](./timerange/) | | | [TimeRange](./timerange/) | |
| [TimeSeries](./timeseries/) | | | [TimeSeries](./timeseries/) | |
| [TimeZoneCountry](./timezonecountry/) | |
| [TimeZoneInfo](./timezoneinfo/) | |
| [TransformerRegistyItem](./transformerregistyitem/) | | | [TransformerRegistyItem](./transformerregistyitem/) | |
| [TransformerUIProps](./transformeruiprops/) | | | [TransformerUIProps](./transformeruiprops/) | |
| [UnitFieldConfigSettings](./unitfieldconfigsettings/) | | | [UnitFieldConfigSettings](./unitfieldconfigsettings/) | |
...@@ -358,6 +364,8 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -358,6 +364,8 @@ A library containing most of the core functionality and data types used in Grafa
| [getSeriesTimeStep](./getseriestimestep/) | Returns minimal time step from series time field | | [getSeriesTimeStep](./getseriestimestep/) | Returns minimal time step from series time field |
| [getTimeField](./gettimefield/) | | | [getTimeField](./gettimefield/) | |
| [getTimeZoneGroups](./gettimezonegroups/) | | | [getTimeZoneGroups](./gettimezonegroups/) | |
| [getTimeZoneInfo](./gettimezoneinfo/) | |
| [getTimeZones](./gettimezones/) | |
| [getValueFromDimension](./getvaluefromdimension/) | | | [getValueFromDimension](./getvaluefromdimension/) | |
| [guessFieldTypes](./guessfieldtypes/) | | | [guessFieldTypes](./guessfieldtypes/) | |
| [hasMsResolution](./hasmsresolution/) | Checks if series time field has ms resolution | | [hasMsResolution](./hasmsresolution/) | Checks if series time field has ms resolution |
...@@ -451,6 +459,15 @@ A library containing most of the core functionality and data types used in Grafa ...@@ -451,6 +459,15 @@ A library containing most of the core functionality and data types used in Grafa
| [TimeZoneBrowser](./timezonebrowser/) | | | [TimeZoneBrowser](./timezonebrowser/) | |
| [TimeZoneResolver](./timezoneresolver/) | The type to describe the time zone resolver function that will be used to access the default time zone of a user. | | [TimeZoneResolver](./timezoneresolver/) | The type to describe the time zone resolver function that will be used to access the default time zone of a user. |
| [TimeZoneUtc](./timezoneutc/) | | | [TimeZoneUtc](./timezoneutc/) | |
| [Trace](./trace/) | |
| [TraceData](./tracedata/) | |
| [TraceKeyValuePair](./tracekeyvaluepair/) | All timestamps are in microseconds |
| [TraceLink](./tracelink/) | |
| [TraceLog](./tracelog/) | |
| [TraceProcess](./traceprocess/) | |
| [TraceSpan](./tracespan/) | |
| [TraceSpanData](./tracespandata/) | |
| [TraceSpanReference](./tracespanreference/) | |
| [UrlQueryMap](./urlquerymap/) | Type to represent the values parsed from the query string. | | [UrlQueryMap](./urlquerymap/) | Type to represent the values parsed from the query string. |
| [UrlQueryValue](./urlqueryvalue/) | Type to represent the value of a single query variable. | | [UrlQueryValue](./urlqueryvalue/) | Type to represent the value of a single query variable. |
| [ValueConverter](./valueconverter/) | | | [ValueConverter](./valueconverter/) | |
......
...@@ -27,6 +27,7 @@ import { ApplyFieldOverrideOptions } from '@grafana/data'; ...@@ -27,6 +27,7 @@ import { ApplyFieldOverrideOptions } from '@grafana/data';
| [data](#data-property) | <code>DataFrame[]</code> | | | [data](#data-property) | <code>DataFrame[]</code> | |
| [fieldConfig](#fieldconfig-property) | <code>FieldConfigSource</code> | | | [fieldConfig](#fieldconfig-property) | <code>FieldConfigSource</code> | |
| [fieldConfigRegistry](#fieldconfigregistry-property) | <code>FieldConfigOptionsRegistry</code> | | | [fieldConfigRegistry](#fieldconfigregistry-property) | <code>FieldConfigOptionsRegistry</code> | |
| [getDataSourceSettingsByUid](#getdatasourcesettingsbyuid-property) | <code>(uid: string) =&gt; DataSourceInstanceSettings &#124; undefined</code> | |
| [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | | | [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | |
| [theme](#theme-property) | <code>GrafanaTheme</code> | | | [theme](#theme-property) | <code>GrafanaTheme</code> | |
| [timeZone](#timezone-property) | <code>TimeZone</code> | | | [timeZone](#timezone-property) | <code>TimeZone</code> | |
...@@ -63,6 +64,14 @@ fieldConfig: FieldConfigSource; ...@@ -63,6 +64,14 @@ fieldConfig: FieldConfigSource;
fieldConfigRegistry?: FieldConfigOptionsRegistry; fieldConfigRegistry?: FieldConfigOptionsRegistry;
``` ```
### getDataSourceSettingsByUid property
<b>Signature</b>
```typescript
getDataSourceSettingsByUid: (uid: string) => DataSourceInstanceSettings | undefined;
```
### replaceVariables property ### replaceVariables property
<b>Signature</b> <b>Signature</b>
......
...@@ -29,6 +29,7 @@ import { BuildInfo } from '@grafana/data'; ...@@ -29,6 +29,7 @@ import { BuildInfo } from '@grafana/data';
| [edition](#edition-property) | <code>string</code> | | | [edition](#edition-property) | <code>string</code> | |
| [env](#env-property) | <code>string</code> | | | [env](#env-property) | <code>string</code> | |
| [hasUpdate](#hasupdate-property) | <code>boolean</code> | | | [hasUpdate](#hasupdate-property) | <code>boolean</code> | |
| [hideVersion](#hideversion-property) | <code>boolean</code> | |
| [isEnterprise](#isenterprise-property) | <code>boolean</code> | Is set to true when running Grafana Enterprise edition. | | [isEnterprise](#isenterprise-property) | <code>boolean</code> | Is set to true when running Grafana Enterprise edition. |
| [latestVersion](#latestversion-property) | <code>string</code> | | | [latestVersion](#latestversion-property) | <code>string</code> | |
| [version](#version-property) | <code>string</code> | | | [version](#version-property) | <code>string</code> | |
...@@ -65,6 +66,14 @@ env: string; ...@@ -65,6 +66,14 @@ env: string;
hasUpdate: boolean; hasUpdate: boolean;
``` ```
### hideVersion property
<b>Signature</b>
```typescript
hideVersion: boolean;
```
### isEnterprise property ### isEnterprise property
Is set to true when running Grafana Enterprise edition. Is set to true when running Grafana Enterprise edition.
......
...@@ -11,7 +11,7 @@ type = "docs" ...@@ -11,7 +11,7 @@ type = "docs"
Circular vector uses a single buffer to capture a stream of values overwriting the oldest value on add. Circular vector uses a single buffer to capture a stream of values overwriting the oldest value on add.
This supports addting to the 'head' or 'tail' and will grow the buffer to match a configured capacity. This supports adding to the 'head' or 'tail' and will grow the buffer to match a configured capacity.
<b>Signature</b> <b>Signature</b>
......
...@@ -23,12 +23,30 @@ import { ColorFieldConfigSettings } from '@grafana/data'; ...@@ -23,12 +23,30 @@ import { ColorFieldConfigSettings } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [enableNamedColors](#enablenamedcolors-property) | <code>boolean</code> | | | [allowUndefined](#allowundefined-property) | <code>boolean</code> | |
| [disableNamedColors](#disablenamedcolors-property) | <code>boolean</code> | |
| [textWhenUndefined](#textwhenundefined-property) | <code>string</code> | |
### enableNamedColors property ### allowUndefined property
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
enableNamedColors?: boolean; allowUndefined?: boolean;
```
### disableNamedColors property
<b>Signature</b>
```typescript
disableNamedColors?: boolean;
```
### textWhenUndefined property
<b>Signature</b>
```typescript
textWhenUndefined?: string;
``` ```
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
createDimension: (name: string, columns: Field<any, import("..").Vector<any>>[]) => Dimension<any> createDimension: (name: string, columns: Field[]) => Dimension
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -9,12 +9,14 @@ type = "docs" ...@@ -9,12 +9,14 @@ type = "docs"
## DataLink interface ## DataLink interface
Link configuration. The values may contain variables that need to be processed before running Link configuration. The values may contain variables that need to be processed before showing the link to user.
TODO: &lt;<!-- -->T extends DataQuery<!-- -->&gt; is not strictly true for internal links as we do not need refId for example but all data source defined queries extend this so this is more for documentation.
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export interface DataLink export interface DataLink<T extends DataQuery = any>
``` ```
<b>Import</b> <b>Import</b>
...@@ -25,20 +27,21 @@ import { DataLink } from '@grafana/data'; ...@@ -25,20 +27,21 @@ import { DataLink } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [meta](#meta-property) | <code>{</code><br/><code> datasourceUid?: string;</code><br/><code> }</code> | | | [internal](#internal-property) | <code>{</code><br/><code> query: T;</code><br/><code> datasourceUid: string;</code><br/><code> }</code> | |
| [onBuildUrl](#onbuildurl-property) | <code>(event: DataLinkClickEvent) =&gt; string</code> | | | [onBuildUrl](#onbuildurl-property) | <code>(event: DataLinkClickEvent) =&gt; string</code> | |
| [onClick](#onclick-property) | <code>(event: DataLinkClickEvent) =&gt; void</code> | | | [onClick](#onclick-property) | <code>(event: DataLinkClickEvent) =&gt; void</code> | |
| [targetBlank](#targetblank-property) | <code>boolean</code> | | | [targetBlank](#targetblank-property) | <code>boolean</code> | |
| [title](#title-property) | <code>string</code> | | | [title](#title-property) | <code>string</code> | |
| [url](#url-property) | <code>string</code> | | | [url](#url-property) | <code>string</code> | |
### meta property ### internal property
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
meta?: { internal?: {
datasourceUid?: string; query: T;
datasourceUid: string;
}; };
``` ```
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
dataLinksOverrideProcessor: (value: any, _context: FieldOverrideContext, _settings?: DataLinksFieldConfigSettings | undefined) => DataLink[] dataLinksOverrideProcessor: (value: any, _context: FieldOverrideContext, _settings?: DataLinksFieldConfigSettings | undefined) => DataLink<any>[]
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -25,7 +25,7 @@ import { DataSourceInstanceSettings } from '@grafana/data'; ...@@ -25,7 +25,7 @@ import { DataSourceInstanceSettings } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [basicAuth](#basicauth-property) | <code>string</code> | This is the full Authorization header if basic auth is ennabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username &amp; password is never exposted to browser/Frontend so this will be empty then. | | [basicAuth](#basicauth-property) | <code>string</code> | This is the full Authorization header if basic auth is enabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username &amp; password is never exposed to browser/Frontend so this will be empty then. |
| [database](#database-property) | <code>string</code> | | | [database](#database-property) | <code>string</code> | |
| [id](#id-property) | <code>number</code> | | | [id](#id-property) | <code>number</code> | |
| [jsonData](#jsondata-property) | <code>T</code> | | | [jsonData](#jsondata-property) | <code>T</code> | |
...@@ -40,7 +40,7 @@ import { DataSourceInstanceSettings } from '@grafana/data'; ...@@ -40,7 +40,7 @@ import { DataSourceInstanceSettings } from '@grafana/data';
### basicAuth property ### basicAuth property
This is the full Authorization header if basic auth is ennabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username &amp; password is never exposted to browser/Frontend so this will be empty then. This is the full Authorization header if basic auth is enabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username &amp; password is never exposed to browser/Frontend so this will be empty then.
<b>Signature</b> <b>Signature</b>
......
...@@ -34,6 +34,7 @@ import { DataTransformerID } from '@grafana/data'; ...@@ -34,6 +34,7 @@ import { DataTransformerID } from '@grafana/data';
| filterFieldsByName | <code>&quot;filterFieldsByName&quot;</code> | | | filterFieldsByName | <code>&quot;filterFieldsByName&quot;</code> | |
| filterFrames | <code>&quot;filterFrames&quot;</code> | | | filterFrames | <code>&quot;filterFrames&quot;</code> | |
| labelsToFields | <code>&quot;labelsToFields&quot;</code> | | | labelsToFields | <code>&quot;labelsToFields&quot;</code> | |
| merge | <code>&quot;merge&quot;</code> | |
| noop | <code>&quot;noop&quot;</code> | | | noop | <code>&quot;noop&quot;</code> | |
| order | <code>&quot;order&quot;</code> | | | order | <code>&quot;order&quot;</code> | |
| organize | <code>&quot;organize&quot;</code> | | | organize | <code>&quot;organize&quot;</code> | |
......
...@@ -25,12 +25,21 @@ import { FeatureToggles } from '@grafana/data'; ...@@ -25,12 +25,21 @@ import { FeatureToggles } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [datasourceInsights](#datasourceinsights-property) | <code>boolean</code> | |
| [expressions](#expressions-property) | <code>boolean</code> | | | [expressions](#expressions-property) | <code>boolean</code> | |
| [meta](#meta-property) | <code>boolean</code> | | | [meta](#meta-property) | <code>boolean</code> | |
| [newEdit](#newedit-property) | <code>boolean</code> | | | [newEdit](#newedit-property) | <code>boolean</code> | |
| [newVariables](#newvariables-property) | <code>boolean</code> | | | [reportGrid](#reportgrid-property) | <code>boolean</code> | |
| [transformations](#transformations-property) | <code>boolean</code> | | | [transformations](#transformations-property) | <code>boolean</code> | |
### datasourceInsights property
<b>Signature</b>
```typescript
datasourceInsights: boolean;
```
### expressions property ### expressions property
<b>Signature</b> <b>Signature</b>
...@@ -59,12 +68,12 @@ Available only in Grafana Enterprise ...@@ -59,12 +68,12 @@ Available only in Grafana Enterprise
newEdit: boolean; newEdit: boolean;
``` ```
### newVariables property ### reportGrid property
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
newVariables: boolean; reportGrid: boolean;
``` ```
### transformations property ### transformations property
......
...@@ -12,7 +12,7 @@ type = "docs" ...@@ -12,7 +12,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export interface FieldOverrideContext export interface FieldOverrideContext extends StandardEditorContext<any>
``` ```
<b>Import</b> <b>Import</b>
...@@ -26,8 +26,6 @@ import { FieldOverrideContext } from '@grafana/data'; ...@@ -26,8 +26,6 @@ import { FieldOverrideContext } from '@grafana/data';
| [data](#data-property) | <code>DataFrame[]</code> | | | [data](#data-property) | <code>DataFrame[]</code> | |
| [dataFrameIndex](#dataframeindex-property) | <code>number</code> | | | [dataFrameIndex](#dataframeindex-property) | <code>number</code> | |
| [field](#field-property) | <code>Field</code> | | | [field](#field-property) | <code>Field</code> | |
| [getSuggestions](#getsuggestions-property) | <code>(scope?: VariableSuggestionsScope) =&gt; VariableSuggestion[]</code> | |
| [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | |
### data property ### data property
...@@ -52,19 +50,3 @@ dataFrameIndex?: number; ...@@ -52,19 +50,3 @@ dataFrameIndex?: number;
```typescript ```typescript
field?: Field; field?: Field;
``` ```
### getSuggestions property
<b>Signature</b>
```typescript
getSuggestions?: (scope?: VariableSuggestionsScope) => VariableSuggestion[];
```
### replaceVariables property
<b>Signature</b>
```typescript
replaceVariables?: InterpolateFunction;
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FormattedVector"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## FormattedVector class
<b>Signature</b>
```typescript
export declare class FormattedVector<T = any> implements Vector<string>
```
<b>Import</b>
```typescript
import { FormattedVector } from '@grafana/data';
```
<b>Constructors</b>
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(source, formatter)](#constructor-sourceformatter) | | Constructs a new instance of the <code>FormattedVector</code> class |
<b>Properties</b>
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [length](#length-property) | | <code>number</code> | |
<b>Methods</b>
| Method | Modifiers | Description |
| --- | --- | --- |
| [get(index)](#get-method) | | |
| [toArray()](#toarray-method) | | |
| [toJSON()](#tojson-method) | | |
### constructor(source, formatter)
Constructs a new instance of the `FormattedVector` class
<b>Signature</b>
```typescript
constructor(source: Vector<T>, formatter: DisplayProcessor);
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| source | <code>Vector&lt;T&gt;</code> | |
| formatter | <code>DisplayProcessor</code> | |
### length property
<b>Signature</b>
```typescript
get length(): number;
```
### get method
<b>Signature</b>
```typescript
get(index: number): string;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| index | <code>number</code> | |
<b>Returns:</b>
`string`
### toArray method
<b>Signature</b>
```typescript
toArray(): string[];
```
<b>Returns:</b>
`string[]`
### toJSON method
<b>Signature</b>
```typescript
toJSON(): string[];
```
<b>Returns:</b>
`string[]`
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getAllValuesFromDimension: (dimension: Dimension<any>, column: number, row: number) => any[] getAllValuesFromDimension: (dimension: Dimension, column: number, row: number) => any[]
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getColorName: (color?: string | undefined, theme?: GrafanaThemeType | undefined) => "green" | "yellow" | "red" | "blue" | "orange" | "purple" | "dark-green" | "semi-dark-green" | "light-green" | "super-light-green" | "dark-yellow" | "semi-dark-yellow" | "light-yellow" | "super-light-yellow" | "dark-red" | "semi-dark-red" | "light-red" | "super-light-red" | "dark-blue" | "semi-dark-blue" | "light-blue" | "super-light-blue" | "dark-orange" | "semi-dark-orange" | "light-orange" | "super-light-orange" | "dark-purple" | "semi-dark-purple" | "light-purple" | "super-light-purple" | undefined getColorName: (color?: string | undefined, theme?: GrafanaThemeType | undefined) => Color | undefined
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getColumnFromDimension: (dimension: Dimension<any>, column: number) => Field<any, import("..").Vector<any>> getColumnFromDimension: (dimension: Dimension, column: number) => Field<any, import("..").Vector<any>>
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getColumnsFromDimension: (dimension: Dimension<any>) => Field<any, import("..").Vector<any>>[] getColumnsFromDimension: (dimension: Dimension) => Field<any, import("..").Vector<any>>[]
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getDimensionByName: (dimensions: KeyValue<Dimension<any>>, name: string) => Dimension<any> getDimensionByName: (dimensions: Dimensions, name: string) => Dimension<any>
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -16,7 +16,7 @@ Returns minimal time step from series time field ...@@ -16,7 +16,7 @@ Returns minimal time step from series time field
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getSeriesTimeStep: (timeField: Field<any, import("..").Vector<any>>) => number getSeriesTimeStep: (timeField: Field) => number
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -15,8 +15,8 @@ type = "docs" ...@@ -15,8 +15,8 @@ type = "docs"
```typescript ```typescript
getTimeField: (series: DataFrame) => { getTimeField: (series: DataFrame) => {
timeField?: Field<any, import("../types").Vector<any>> | undefined; timeField?: Field;
timeIndex?: number | undefined; timeIndex?: number;
} }
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,10 +14,7 @@ type = "docs" ...@@ -14,10 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getTimeZoneGroups: () => { getTimeZoneGroups: ((includeInternal?: any) => GroupedTimeZones[]) & import("lodash").MemoizedFunction
label: string;
options: string[];
}[]
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getTimeZoneInfo"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## getTimeZoneInfo variable
### getTimeZoneInfo variable
<b>Signature</b>
```typescript
getTimeZoneInfo: (zone: string, timestamp: number) => TimeZoneInfo | undefined
```
<b>Import</b>
```typescript
import { getTimeZoneInfo } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getTimeZones"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## getTimeZones variable
### getTimeZones variable
<b>Signature</b>
```typescript
getTimeZones: ((includeInternal?: any) => TimeZone[]) & import("lodash").MemoizedFunction
```
<b>Import</b>
```typescript
import { getTimeZones } from '@grafana/data';
```
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getValueFromDimension: (dimension: Dimension<any>, column: number, row: number) => any getValueFromDimension: (dimension: Dimension, column: number, row: number) => any
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export declare function grafanaDataFrameToArrowTable(data: DataFrame): Table; export declare function grafanaDataFrameToArrowTable(data: DataFrame, keepOriginalNames?: boolean): Table;
``` ```
<b>Import</b> <b>Import</b>
...@@ -26,6 +26,7 @@ import { grafanaDataFrameToArrowTable } from '@grafana/data'; ...@@ -26,6 +26,7 @@ import { grafanaDataFrameToArrowTable } from '@grafana/data';
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| data | <code>DataFrame</code> | | | data | <code>DataFrame</code> | |
| keepOriginalNames | <code>boolean</code> | by default, the exported Table will get names that match the display within grafana. This typically includes any labels defined in the metadata.<!-- -->When using this function to round-trip data, be sure to set <code>keepOriginalNames=true</code> |
<b>Returns:</b> <b>Returns:</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "GroupedTimeZones"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## GroupedTimeZones interface
<b>Signature</b>
```typescript
export interface GroupedTimeZones
```
<b>Import</b>
```typescript
import { GroupedTimeZones } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [name](#name-property) | <code>string</code> | |
| [zones](#zones-property) | <code>TimeZone[]</code> | |
### name property
<b>Signature</b>
```typescript
name: string;
```
### zones property
<b>Signature</b>
```typescript
zones: TimeZone[];
```
...@@ -16,7 +16,7 @@ Checks if series time field has ms resolution ...@@ -16,7 +16,7 @@ Checks if series time field has ms resolution
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
hasMsResolution: (timeField: Field<any, import("..").Vector<any>>) => boolean hasMsResolution: (timeField: Field) => boolean
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "InternalTimeZones"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## InternalTimeZones enum
### InternalTimeZones enum
<b>Signature</b>
```typescript
export declare enum InternalTimeZones
```
<b>Import</b>
```typescript
import { InternalTimeZones } from '@grafana/data';
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| default | <code>&quot;&quot;</code> | |
| localBrowserTime | <code>&quot;browser&quot;</code> | |
| utc | <code>&quot;utc&quot;</code> | |
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export declare type LinkTarget = '_blank' | '_self'; export declare type LinkTarget = '_blank' | '_self' | undefined;
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -27,6 +27,7 @@ import { LogsModel } from '@grafana/data'; ...@@ -27,6 +27,7 @@ import { LogsModel } from '@grafana/data';
| [meta](#meta-property) | <code>LogsMetaItem[]</code> | | | [meta](#meta-property) | <code>LogsMetaItem[]</code> | |
| [rows](#rows-property) | <code>LogRowModel[]</code> | | | [rows](#rows-property) | <code>LogRowModel[]</code> | |
| [series](#series-property) | <code>GraphSeriesXY[]</code> | | | [series](#series-property) | <code>GraphSeriesXY[]</code> | |
| [visibleRange](#visiblerange-property) | <code>AbsoluteTimeRange</code> | |
### hasUniqueLabels property ### hasUniqueLabels property
...@@ -59,3 +60,11 @@ rows: LogRowModel[]; ...@@ -59,3 +60,11 @@ rows: LogRowModel[];
```typescript ```typescript
series?: GraphSeriesXY[]; series?: GraphSeriesXY[];
``` ```
### visibleRange property
<b>Signature</b>
```typescript
visibleRange?: AbsoluteTimeRange;
```
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceJsonDataOption: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (event: import("react").SyntheticEvent<HTMLInputElement | HTMLSelectElement, Event>) => void onUpdateDatasourceJsonDataOption: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (event: React.SyntheticEvent<HTMLInputElement | HTMLSelectElement>) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceJsonDataOptionChecked: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (event: import("react").SyntheticEvent<HTMLInputElement, Event>) => void onUpdateDatasourceJsonDataOptionChecked: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (event: React.SyntheticEvent<HTMLInputElement>) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceJsonDataOptionSelect: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (selected: SelectableValue<any>) => void onUpdateDatasourceJsonDataOptionSelect: <J, S, K extends keyof J>(props: DataSourcePluginOptionsEditorProps<J, S>, key: K) => (selected: SelectableValue) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceOption: (props: DataSourcePluginOptionsEditorProps<import("../types").DataSourceJsonData, {}>, key: "type" | "name" | "id" | "orgId" | "typeLogoUrl" | "access" | "url" | "password" | "user" | "database" | "basicAuth" | "basicAuthPassword" | "basicAuthUser" | "isDefault" | "jsonData" | "secureJsonData" | "secureJsonFields" | "readOnly" | "withCredentials" | "version") => (event: import("react").SyntheticEvent<HTMLInputElement | HTMLSelectElement, Event>) => void onUpdateDatasourceOption: (props: DataSourcePluginOptionsEditorProps, key: keyof DataSourceSettings) => (event: React.SyntheticEvent<HTMLInputElement | HTMLSelectElement>) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceResetOption: (props: DataSourcePluginOptionsEditorProps<import("../types").DataSourceJsonData, {}>, key: string) => (event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => void onUpdateDatasourceResetOption: (props: DataSourcePluginOptionsEditorProps, key: string) => (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceSecureJsonDataOption: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps<J, S>, key: string) => (event: import("react").SyntheticEvent<HTMLInputElement | HTMLSelectElement, Event>) => void onUpdateDatasourceSecureJsonDataOption: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps<J, S>, key: string) => (event: React.SyntheticEvent<HTMLInputElement | HTMLSelectElement>) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onUpdateDatasourceSecureJsonDataOptionSelect: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps<J, S>, key: string) => (selected: SelectableValue<any>) => void onUpdateDatasourceSecureJsonDataOptionSelect: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps<J, S>, key: string) => (selected: SelectableValue) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -30,7 +30,9 @@ import { PanelOptionsEditorBuilder } from '@grafana/data'; ...@@ -30,7 +30,9 @@ import { PanelOptionsEditorBuilder } from '@grafana/data';
| [addNumberInput(config)](#addnumberinput-method) | | | | [addNumberInput(config)](#addnumberinput-method) | | |
| [addRadio(config)](#addradio-method) | | | | [addRadio(config)](#addradio-method) | | |
| [addSelect(config)](#addselect-method) | | | | [addSelect(config)](#addselect-method) | | |
| [addStringArray(config)](#addstringarray-method) | | |
| [addTextInput(config)](#addtextinput-method) | | | | [addTextInput(config)](#addtextinput-method) | | |
| [addTimeZonePicker(config)](#addtimezonepicker-method) | | |
| [addUnitPicker(config)](#addunitpicker-method) | | | | [addUnitPicker(config)](#addunitpicker-method) | | |
### addBooleanSwitch method ### addBooleanSwitch method
...@@ -118,6 +120,23 @@ addSelect<TOption, TSettings extends SelectFieldConfigSettings<TOption>>(config: ...@@ -118,6 +120,23 @@ addSelect<TOption, TSettings extends SelectFieldConfigSettings<TOption>>(config:
`this` `this`
### addStringArray method
<b>Signature</b>
```typescript
addStringArray<TSettings>(config: PanelOptionsEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string[]>): this;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| config | <code>PanelOptionsEditorConfig&lt;TOptions, TSettings &amp; StringFieldConfigSettings, string[]&gt;</code> | |
<b>Returns:</b>
`this`
### addTextInput method ### addTextInput method
<b>Signature</b> <b>Signature</b>
...@@ -135,6 +154,23 @@ addTextInput<TSettings>(config: PanelOptionsEditorConfig<TOptions, TSettings & S ...@@ -135,6 +154,23 @@ addTextInput<TSettings>(config: PanelOptionsEditorConfig<TOptions, TSettings & S
`this` `this`
### addTimeZonePicker method
<b>Signature</b>
```typescript
addTimeZonePicker<TSettings = any>(config: PanelOptionsEditorConfig<TOptions, TSettings, string>): this;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| config | <code>PanelOptionsEditorConfig&lt;TOptions, TSettings, string&gt;</code> | |
<b>Returns:</b>
`this`
### addUnitPicker method ### addUnitPicker method
<b>Signature</b> <b>Signature</b>
......
...@@ -50,7 +50,7 @@ import { PanelPlugin } from '@grafana/data'; ...@@ -50,7 +50,7 @@ import { PanelPlugin } from '@grafana/data';
| [setNoPadding()](#setnopadding-method) | | | | [setNoPadding()](#setnopadding-method) | | |
| [setPanelChangeHandler(handler)](#setpanelchangehandler-method) | | This function is called when the visualization was changed. This passes in the panel model for previous visualisation options inspection and panel model updates.<!-- -->This is useful for supporting PanelModel API updates when changing between Angular and React panels. | | [setPanelChangeHandler(handler)](#setpanelchangehandler-method) | | This function is called when the visualization was changed. This passes in the panel model for previous visualisation options inspection and panel model updates.<!-- -->This is useful for supporting PanelModel API updates when changing between Angular and React panels. |
| [setPanelOptions(builder)](#setpaneloptions-method) | | Enables panel options editor creation | | [setPanelOptions(builder)](#setpaneloptions-method) | | Enables panel options editor creation |
| [useFieldConfig(config)](#usefieldconfig-method) | | Allows specyfing which standard field config options panel should use and defining default values | | [useFieldConfig(config)](#usefieldconfig-method) | | Allows specifying which standard field config options panel should use and defining default values |
### constructor(panel) ### constructor(panel)
...@@ -285,7 +285,7 @@ export const plugin = new PanelPlugin<ShapePanelOptions>(ShapePanel) ...@@ -285,7 +285,7 @@ export const plugin = new PanelPlugin<ShapePanelOptions>(ShapePanel)
### useFieldConfig method ### useFieldConfig method
Allows specyfing which standard field config options panel should use and defining default values Allows specifying which standard field config options panel should use and defining default values
<b>Signature</b> <b>Signature</b>
......
...@@ -34,7 +34,7 @@ import { PanelProps } from '@grafana/data'; ...@@ -34,7 +34,7 @@ import { PanelProps } from '@grafana/data';
| [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | Template variables interpolation function | | [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | Template variables interpolation function |
| [timeRange](#timerange-property) | <code>TimeRange</code> | Time range of the current dashboard | | [timeRange](#timerange-property) | <code>TimeRange</code> | Time range of the current dashboard |
| [timeZone](#timezone-property) | <code>TimeZone</code> | Time zone of the current dashboard | | [timeZone](#timezone-property) | <code>TimeZone</code> | Time zone of the current dashboard |
| [transparent](#transparent-property) | <code>boolean</code> | Indicathes whether or not panel should be rendered transparent | | [transparent](#transparent-property) | <code>boolean</code> | Indicates whether or not panel should be rendered transparent |
| [width](#width-property) | <code>number</code> | Current width of the panel | | [width](#width-property) | <code>number</code> | Current width of the panel |
### data property ### data property
...@@ -149,7 +149,7 @@ timeZone: TimeZone; ...@@ -149,7 +149,7 @@ timeZone: TimeZone;
### transparent property ### transparent property
Indicathes whether or not panel should be rendered transparent Indicates whether or not panel should be rendered transparent
<b>Signature</b> <b>Signature</b>
......
...@@ -25,13 +25,12 @@ import { QueryResultMeta } from '@grafana/data'; ...@@ -25,13 +25,12 @@ import { QueryResultMeta } from '@grafana/data';
| --- | --- | --- | | --- | --- | --- |
| [alignmentPeriod](#alignmentperiod-property) | <code>string</code> | | | [alignmentPeriod](#alignmentperiod-property) | <code>string</code> | |
| [custom](#custom-property) | <code>Record&lt;string, any&gt;</code> | DatasSource Specific Values | | [custom](#custom-property) | <code>Record&lt;string, any&gt;</code> | DatasSource Specific Values |
| [executedQueryString](#executedquerystring-property) | <code>string</code> | This is the raw query sent to the underlying system. All macros and templating as been applied. When metadata contains this value, it will be shown in the query inspector |
| [gmdMeta](#gmdmeta-property) | <code>any[]</code> | Legacy data source specific, should be moved to custom | | [gmdMeta](#gmdmeta-property) | <code>any[]</code> | Legacy data source specific, should be moved to custom |
| [json](#json-property) | <code>boolean</code> | | | [json](#json-property) | <code>boolean</code> | |
| [limit](#limit-property) | <code>number</code> | | | [limit](#limit-property) | <code>number</code> | |
| [notices](#notices-property) | <code>QueryResultMetaNotice[]</code> | Meta Notices | | [notices](#notices-property) | <code>QueryResultMetaNotice[]</code> | Meta Notices |
| [preferredVisualisationType](#preferredvisualisationtype-property) | <code>PreferredVisualisationType</code> | Currently used to show results in Explore only in preferred visualisation option | | [preferredVisualisationType](#preferredvisualisationtype-property) | <code>PreferredVisualisationType</code> | Currently used to show results in Explore only in preferred visualisation option |
| [query](#query-property) | <code>string</code> | |
| [rawQuery](#rawquery-property) | <code>string</code> | |
| [searchWords](#searchwords-property) | <code>string[]</code> | | | [searchWords](#searchwords-property) | <code>string[]</code> | |
| [stats](#stats-property) | <code>QueryResultMetaStat[]</code> | Stats | | [stats](#stats-property) | <code>QueryResultMetaStat[]</code> | Stats |
| [transformations](#transformations-property) | <code>string[]</code> | Used to track transformation ids that where part of the processing | | [transformations](#transformations-property) | <code>string[]</code> | Used to track transformation ids that where part of the processing |
...@@ -54,6 +53,16 @@ DatasSource Specific Values ...@@ -54,6 +53,16 @@ DatasSource Specific Values
custom?: Record<string, any>; custom?: Record<string, any>;
``` ```
### executedQueryString property
This is the raw query sent to the underlying system. All macros and templating as been applied. When metadata contains this value, it will be shown in the query inspector
<b>Signature</b>
```typescript
executedQueryString?: string;
```
### gmdMeta property ### gmdMeta property
Legacy data source specific, should be moved to custom Legacy data source specific, should be moved to custom
...@@ -100,22 +109,6 @@ Currently used to show results in Explore only in preferred visualisation option ...@@ -100,22 +109,6 @@ Currently used to show results in Explore only in preferred visualisation option
preferredVisualisationType?: PreferredVisualisationType; preferredVisualisationType?: PreferredVisualisationType;
``` ```
### query property
<b>Signature</b>
```typescript
query?: string;
```
### rawQuery property
<b>Signature</b>
```typescript
rawQuery?: string;
```
### searchWords property ### searchWords property
<b>Signature</b> <b>Signature</b>
......
...@@ -26,6 +26,7 @@ import { ReduceDataOptions } from '@grafana/data'; ...@@ -26,6 +26,7 @@ import { ReduceDataOptions } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [calcs](#calcs-property) | <code>string[]</code> | When !values, pick one value for the whole field | | [calcs](#calcs-property) | <code>string[]</code> | When !values, pick one value for the whole field |
| [fields](#fields-property) | <code>string</code> | Which fields to show. By default this is only numeric fields |
| [limit](#limit-property) | <code>number</code> | if showing all values limit | | [limit](#limit-property) | <code>number</code> | if showing all values limit |
| [values](#values-property) | <code>boolean</code> | | | [values](#values-property) | <code>boolean</code> | |
...@@ -39,6 +40,16 @@ When !values, pick one value for the whole field ...@@ -39,6 +40,16 @@ When !values, pick one value for the whole field
calcs: string[]; calcs: string[];
``` ```
### fields property
Which fields to show. By default this is only numeric fields
<b>Signature</b>
```typescript
fields?: string;
```
### limit property ### limit property
if showing all values limit if showing all values limit
......
...@@ -23,10 +23,32 @@ import { SelectFieldConfigSettings } from '@grafana/data'; ...@@ -23,10 +23,32 @@ import { SelectFieldConfigSettings } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [options](#options-property) | <code>Array&lt;SelectableValue&lt;T&gt;&gt;</code> | | | [allowCustomValue](#allowcustomvalue-property) | <code>boolean</code> | |
| [getOptions](#getoptions-property) | <code>(context: FieldOverrideContext) =&gt; Promise&lt;Array&lt;SelectableValue&lt;T&gt;&gt;&gt;</code> | Optionally use the context to define the options |
| [options](#options-property) | <code>Array&lt;SelectableValue&lt;T&gt;&gt;</code> | The default options |
### allowCustomValue property
<b>Signature</b>
```typescript
allowCustomValue?: boolean;
```
### getOptions property
Optionally use the context to define the options
<b>Signature</b>
```typescript
getOptions?: (context: FieldOverrideContext) => Promise<Array<SelectableValue<T>>>;
```
### options property ### options property
The default options
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "StandardEditorContext"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## StandardEditorContext interface
<b>Signature</b>
```typescript
export interface StandardEditorContext<TOptions>
```
<b>Import</b>
```typescript
import { StandardEditorContext } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [data](#data-property) | <code>DataFrame[]</code> | |
| [getSuggestions](#getsuggestions-property) | <code>(scope?: VariableSuggestionsScope) =&gt; VariableSuggestion[]</code> | |
| [options](#options-property) | <code>TOptions</code> | |
| [replaceVariables](#replacevariables-property) | <code>InterpolateFunction</code> | |
### data property
<b>Signature</b>
```typescript
data?: DataFrame[];
```
### getSuggestions property
<b>Signature</b>
```typescript
getSuggestions?: (scope?: VariableSuggestionsScope) => VariableSuggestion[];
```
### options property
<b>Signature</b>
```typescript
options?: TOptions;
```
### replaceVariables property
<b>Signature</b>
```typescript
replaceVariables?: InterpolateFunction;
```
...@@ -12,7 +12,7 @@ type = "docs" ...@@ -12,7 +12,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export interface StandardEditorProps<TValue = any, TSettings = any> export interface StandardEditorProps<TValue = any, TSettings = any, TOptions = any>
``` ```
<b>Import</b> <b>Import</b>
...@@ -23,10 +23,19 @@ import { StandardEditorProps } from '@grafana/data'; ...@@ -23,10 +23,19 @@ import { StandardEditorProps } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [context](#context-property) | <code>StandardEditorContext&lt;TOptions&gt;</code> | |
| [item](#item-property) | <code>StandardEditorsRegistryItem&lt;TValue, TSettings&gt;</code> | | | [item](#item-property) | <code>StandardEditorsRegistryItem&lt;TValue, TSettings&gt;</code> | |
| [onChange](#onchange-property) | <code>(value?: TValue) =&gt; void</code> | | | [onChange](#onchange-property) | <code>(value?: TValue) =&gt; void</code> | |
| [value](#value-property) | <code>TValue</code> | | | [value](#value-property) | <code>TValue</code> | |
### context property
<b>Signature</b>
```typescript
context: StandardEditorContext<TOptions>;
```
### item property ### item property
<b>Signature</b> <b>Signature</b>
......
...@@ -29,6 +29,7 @@ standardTransformers: { ...@@ -29,6 +29,7 @@ standardTransformers: {
renameFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/rename").RenameFieldsTransformerOptions>; renameFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/rename").RenameFieldsTransformerOptions>;
labelsToFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/labelsToFields").LabelsToFieldsOptions>; labelsToFieldsTransformer: import("..").DataTransformerInfo<import("./transformers/labelsToFields").LabelsToFieldsOptions>;
ensureColumnsTransformer: import("..").DataTransformerInfo<any>; ensureColumnsTransformer: import("..").DataTransformerInfo<any>;
mergeTransformer: import("..").DataTransformerInfo<import("./transformers/merge/merge").MergeTransformerOptions>;
} }
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TimeZoneCountry"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TimeZoneCountry interface
<b>Signature</b>
```typescript
export interface TimeZoneCountry
```
<b>Import</b>
```typescript
import { TimeZoneCountry } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [code](#code-property) | <code>string</code> | |
| [name](#name-property) | <code>string</code> | |
### code property
<b>Signature</b>
```typescript
code: string;
```
### name property
<b>Signature</b>
```typescript
name: string;
```
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
timeZoneFormatUserFriendly: (timeZone: string | undefined) => string | undefined timeZoneFormatUserFriendly: (timeZone: TimeZone | undefined) => string | undefined
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TimeZoneInfo"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TimeZoneInfo interface
<b>Signature</b>
```typescript
export interface TimeZoneInfo
```
<b>Import</b>
```typescript
import { TimeZoneInfo } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [abbreviation](#abbreviation-property) | <code>string</code> | |
| [countries](#countries-property) | <code>TimeZoneCountry[]</code> | |
| [name](#name-property) | <code>string</code> | |
| [offsetInMins](#offsetinmins-property) | <code>number</code> | |
| [zone](#zone-property) | <code>string</code> | |
### abbreviation property
<b>Signature</b>
```typescript
abbreviation: string;
```
### countries property
<b>Signature</b>
```typescript
countries: TimeZoneCountry[];
```
### name property
<b>Signature</b>
```typescript
name: string;
```
### offsetInMins property
<b>Signature</b>
```typescript
offsetInMins: number;
```
### zone property
<b>Signature</b>
```typescript
zone: string;
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "Trace"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## Trace type
### Trace type
<b>Signature</b>
```typescript
export declare type Trace = TraceData & {
duration: number;
endTime: number;
spans: TraceSpan[];
startTime: number;
traceName: string;
services: Array<{
name: string;
numberOfSpans: number;
}>;
};
```
<b>Import</b>
```typescript
import { Trace } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceData"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceData type
### TraceData type
<b>Signature</b>
```typescript
export declare type TraceData = {
processes: Record<string, TraceProcess>;
traceID: string;
warnings?: string[] | null;
};
```
<b>Import</b>
```typescript
import { TraceData } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceKeyValuePair"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceKeyValuePair type
### TraceKeyValuePair type
All timestamps are in microseconds
<b>Signature</b>
```typescript
export declare type TraceKeyValuePair = {
key: string;
type?: string;
value: any;
};
```
<b>Import</b>
```typescript
import { TraceKeyValuePair } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceLink"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceLink type
### TraceLink type
<b>Signature</b>
```typescript
export declare type TraceLink = {
url: string;
text: string;
};
```
<b>Import</b>
```typescript
import { TraceLink } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceLog"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceLog type
### TraceLog type
<b>Signature</b>
```typescript
export declare type TraceLog = {
timestamp: number;
fields: TraceKeyValuePair[];
};
```
<b>Import</b>
```typescript
import { TraceLog } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceProcess"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceProcess type
### TraceProcess type
<b>Signature</b>
```typescript
export declare type TraceProcess = {
serviceName: string;
tags: TraceKeyValuePair[];
};
```
<b>Import</b>
```typescript
import { TraceProcess } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceSpan"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceSpan type
### TraceSpan type
<b>Signature</b>
```typescript
export declare type TraceSpan = TraceSpanData & {
depth: number;
hasChildren: boolean;
process: TraceProcess;
relativeStartTime: number;
tags: NonNullable<TraceSpanData['tags']>;
references: NonNullable<TraceSpanData['references']>;
warnings: NonNullable<TraceSpanData['warnings']>;
subsidiarilyReferencedBy: TraceSpanReference[];
};
```
<b>Import</b>
```typescript
import { TraceSpan } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceSpanData"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceSpanData type
### TraceSpanData type
<b>Signature</b>
```typescript
export declare type TraceSpanData = {
spanID: string;
traceID: string;
processID: string;
operationName: string;
startTime: number;
duration: number;
logs: TraceLog[];
tags?: TraceKeyValuePair[];
references?: TraceSpanReference[];
warnings?: string[] | null;
flags: number;
};
```
<b>Import</b>
```typescript
import { TraceSpanData } from '@grafana/data';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TraceSpanReference"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## TraceSpanReference type
### TraceSpanReference type
<b>Signature</b>
```typescript
export declare type TraceSpanReference = {
refType: 'CHILD_OF' | 'FOLLOWS_FROM';
span?: TraceSpan | null | undefined;
spanID: string;
traceID: string;
};
```
<b>Import</b>
```typescript
import { TraceSpanReference } from '@grafana/data';
```
...@@ -23,13 +23,13 @@ import { TransformerUIProps } from '@grafana/data'; ...@@ -23,13 +23,13 @@ import { TransformerUIProps } from '@grafana/data';
| Property | Type | Description | | Property | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| [input](#input-property) | <code>DataFrame[]</code> | Pre-transform data rames | | [input](#input-property) | <code>DataFrame[]</code> | Pre-transform data frames |
| [onChange](#onchange-property) | <code>(options: T) =&gt; void</code> | | | [onChange](#onchange-property) | <code>(options: T) =&gt; void</code> | |
| [options](#options-property) | <code>T</code> | Transformer configuration, persisted on panel's model | | [options](#options-property) | <code>T</code> | Transformer configuration, persisted on panel's model |
### input property ### input property
Pre-transform data rames Pre-transform data frames
<b>Signature</b> <b>Signature</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
updateDatasourcePluginResetOption: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps<import("../types").DataSourceJsonData, {}>, key: string) => void updateDatasourcePluginResetOption: <J, S extends {} = KeyValue<any>>(props: DataSourcePluginOptionsEditorProps, key: string) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export declare type VariableType = 'query' | 'adhoc' | 'constant' | 'datasource' | 'interval' | 'textbox' | 'custom'; export declare type VariableType = 'query' | 'adhoc' | 'constant' | 'datasource' | 'interval' | 'textbox' | 'custom' | 'system';
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -30,7 +30,7 @@ import { Vector } from '@grafana/data'; ...@@ -30,7 +30,7 @@ import { Vector } from '@grafana/data';
| Method | Description | | Method | Description |
| --- | --- | | --- | --- |
| [get(index)](#get-method) | Access the value by index (Like an array) | | [get(index)](#get-method) | Access the value by index (Like an array) |
| [toArray()](#toarray-method) | Get the resutls as an array. | | [toArray()](#toarray-method) | Get the results as an array. |
### length property ### length property
...@@ -61,7 +61,7 @@ get(index: number): T; ...@@ -61,7 +61,7 @@ get(index: number): T;
### toArray method ### toArray method
Get the resutls as an array. Get the results as an array.
<b>Signature</b> <b>Signature</b>
......
...@@ -23,7 +23,7 @@ A library containing services, configurations etc. used to interact with the Gra ...@@ -23,7 +23,7 @@ A library containing services, configurations etc. used to interact with the Gra
| Enumeration | Description | | Enumeration | Description |
| --- | --- | | --- | --- |
| [EchoEventType](./echoeventtype/) | Supported echo event types that can be sent via the [EchoSrv](./runtime/echosrv.md)<!-- -->. | | [EchoEventType](./echoeventtype/) | Supported echo event types that can be sent via the [EchoSrv](./runtime/echosrv.md)<!-- -->. |
| [HealthStatus](./healthstatus/) | Describes the current healt status of a data source plugin. | | [HealthStatus](./healthstatus/) | Describes the current health status of a data source plugin. |
| [MetaAnalyticsEventName](./metaanalyticseventname/) | The meta analytics events that can be added to the echo service. | | [MetaAnalyticsEventName](./metaanalyticseventname/) | The meta analytics events that can be added to the echo service. |
## Functions ## Functions
...@@ -35,7 +35,7 @@ A library containing services, configurations etc. used to interact with the Gra ...@@ -35,7 +35,7 @@ A library containing services, configurations etc. used to interact with the Gra
| [getEchoSrv()](./getechosrv/) | Used to retrieve the [EchoSrv](./runtime/echosrv.md) that can be used to report events to registered echo backends. | | [getEchoSrv()](./getechosrv/) | Used to retrieve the [EchoSrv](./runtime/echosrv.md) that can be used to report events to registered echo backends. |
| [getLocationSrv()](./getlocationsrv/) | Used to retrieve the [LocationSrv](./runtime/locationsrv.md) that can be used to automatically navigate the user to a new place in Grafana. | | [getLocationSrv()](./getlocationsrv/) | Used to retrieve the [LocationSrv](./runtime/locationsrv.md) that can be used to automatically navigate the user to a new place in Grafana. |
| [loadPluginCss(options)](./loadplugincss/) | Use this to load css for a Grafana plugin by specifying a [PluginCssOptions](./runtime/plugincssoptions.md) containing styling for the dark and the light theme. | | [loadPluginCss(options)](./loadplugincss/) | Use this to load css for a Grafana plugin by specifying a [PluginCssOptions](./runtime/plugincssoptions.md) containing styling for the dark and the light theme. |
| [toDataQueryError(err)](./todataqueryerror/) | Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds | | [toDataQueryError(err)](./todataqueryerror/) | Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error field |
| [toDataQueryResponse(res)](./todataqueryresponse/) | Parse the results from \`<!-- -->/api/ds/query | | [toDataQueryResponse(res)](./todataqueryresponse/) | Parse the results from \`<!-- -->/api/ds/query |
## Interfaces ## Interfaces
......
...@@ -33,13 +33,13 @@ import { DataSourceSrv } from '@grafana/runtime'; ...@@ -33,13 +33,13 @@ import { DataSourceSrv } from '@grafana/runtime';
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
get(name?: string, scopedVars?: ScopedVars): Promise<DataSourceApi>; get(name?: string | null, scopedVars?: ScopedVars): Promise<DataSourceApi>;
``` ```
<b>Parameters</b> <b>Parameters</b>
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| name | <code>string</code> | name of the datasource plugin you want to use. | | name | <code>string &#124; null</code> | name of the datasource plugin you want to use. |
| scopedVars | <code>ScopedVars</code> | variables used to interpolate a templated passed as name. | | scopedVars | <code>ScopedVars</code> | variables used to interpolate a templated passed as name. |
<b>Returns:</b> <b>Returns:</b>
......
...@@ -31,10 +31,12 @@ import { DataSourceWithBackend } from '@grafana/runtime'; ...@@ -31,10 +31,12 @@ import { DataSourceWithBackend } from '@grafana/runtime';
| Method | Modifiers | Description | | Method | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [applyTemplateVariables(query)](#applytemplatevariables-method) | | Override to apply template variables | | [applyTemplateVariables(query, scopedVars)](#applytemplatevariables-method) | | Override to apply template variables. The result is usually also <code>TQuery</code>, but sometimes this can be used to modify the query structure before sending to the backend.<!-- -->NOTE: if you do modify the structure or use template variables, alerting queries may not work as expected |
| [callHealthCheck()](#callhealthcheck-method) | | Run the datasource healthcheck | | [callHealthCheck()](#callhealthcheck-method) | | Run the datasource healthcheck |
| [filterQuery(query)](#filterquery-method) | | Override to skip executing a query |
| [getResource(path, params)](#getresource-method) | | Make a GET request to the datasource resource path | | [getResource(path, params)](#getresource-method) | | Make a GET request to the datasource resource path |
| [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path | | [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path |
| [processResponse(res)](#processresponse-method) | | Optionally augment the response before returning the results to the |
| [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected | | [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected |
| [testDatasource()](#testdatasource-method) | | Checks the plugin health | | [testDatasource()](#testdatasource-method) | | Checks the plugin health |
...@@ -55,23 +57,26 @@ constructor(instanceSettings: DataSourceInstanceSettings<TOptions>); ...@@ -55,23 +57,26 @@ constructor(instanceSettings: DataSourceInstanceSettings<TOptions>);
### applyTemplateVariables method ### applyTemplateVariables method
Override to apply template variables Override to apply template variables. The result is usually also `TQuery`<!-- -->, but sometimes this can be used to modify the query structure before sending to the backend.
NOTE: if you do modify the structure or use template variables, alerting queries may not work as expected
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
/** @virtual */ /** @virtual */
applyTemplateVariables(query: DataQuery): DataQuery; applyTemplateVariables(query: TQuery, scopedVars: ScopedVars): Record<string, any>;
``` ```
<b>Parameters</b> <b>Parameters</b>
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| query | <code>DataQuery</code> | | | query | <code>TQuery</code> | |
| scopedVars | <code>ScopedVars</code> | |
<b>Returns:</b> <b>Returns:</b>
`DataQuery` `Record<string, any>`
### callHealthCheck method ### callHealthCheck method
...@@ -86,6 +91,26 @@ callHealthCheck(): Promise<HealthCheckResult>; ...@@ -86,6 +91,26 @@ callHealthCheck(): Promise<HealthCheckResult>;
`Promise<HealthCheckResult>` `Promise<HealthCheckResult>`
### filterQuery method
Override to skip executing a query
<b>Signature</b>
```typescript
/** @virtual */
filterQuery?(query: TQuery): boolean;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| query | <code>TQuery</code> | |
<b>Returns:</b>
`boolean`
### getResource method ### getResource method
Make a GET request to the datasource resource path Make a GET request to the datasource resource path
...@@ -126,6 +151,25 @@ postResource(path: string, body?: any): Promise<any>; ...@@ -126,6 +151,25 @@ postResource(path: string, body?: any): Promise<any>;
`Promise<any>` `Promise<any>`
### processResponse method
Optionally augment the response before returning the results to the
<b>Signature</b>
```typescript
processResponse?(res: DataQueryResponse): Promise<DataQueryResponse>;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| res | <code>DataQueryResponse</code> | |
<b>Returns:</b>
`Promise<DataQueryResponse>`
### query method ### query method
Ideally final -- any other implementation may not work as expected Ideally final -- any other implementation may not work as expected
...@@ -133,13 +177,13 @@ Ideally final -- any other implementation may not work as expected ...@@ -133,13 +177,13 @@ Ideally final -- any other implementation may not work as expected
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
query(request: DataQueryRequest): Observable<DataQueryResponse>; query(request: DataQueryRequest<TQuery>): Observable<DataQueryResponse>;
``` ```
<b>Parameters</b> <b>Parameters</b>
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| request | <code>DataQueryRequest</code> | | | request | <code>DataQueryRequest&lt;TQuery&gt;</code> | |
<b>Returns:</b> <b>Returns:</b>
......
...@@ -35,6 +35,7 @@ import { GrafanaBootConfig } from '@grafana/runtime'; ...@@ -35,6 +35,7 @@ import { GrafanaBootConfig } from '@grafana/runtime';
| [alertingNoDataOrNullValues](#alertingnodataornullvalues-property) | | <code>string</code> | | | [alertingNoDataOrNullValues](#alertingnodataornullvalues-property) | | <code>string</code> | |
| [allowOrgCreate](#alloworgcreate-property) | | <code>boolean</code> | | | [allowOrgCreate](#alloworgcreate-property) | | <code>boolean</code> | |
| [appSubUrl](#appsuburl-property) | | <code>string</code> | | | [appSubUrl](#appsuburl-property) | | <code>string</code> | |
| [appUrl](#appurl-property) | | <code>string</code> | |
| [authProxyEnabled](#authproxyenabled-property) | | <code>boolean</code> | | | [authProxyEnabled](#authproxyenabled-property) | | <code>boolean</code> | |
| [autoAssignOrg](#autoassignorg-property) | | <code>boolean</code> | | | [autoAssignOrg](#autoassignorg-property) | | <code>boolean</code> | |
| [bootData](#bootdata-property) | | <code>any</code> | | | [bootData](#bootdata-property) | | <code>any</code> | |
...@@ -131,6 +132,14 @@ allowOrgCreate: boolean; ...@@ -131,6 +132,14 @@ allowOrgCreate: boolean;
appSubUrl: string; appSubUrl: string;
``` ```
### appUrl property
<b>Signature</b>
```typescript
appUrl: string;
```
### authProxyEnabled property ### authProxyEnabled property
<b>Signature</b> <b>Signature</b>
......
...@@ -11,7 +11,7 @@ type = "docs" ...@@ -11,7 +11,7 @@ type = "docs"
### HealthStatus enum ### HealthStatus enum
Describes the current healt status of a data source plugin. Describes the current health status of a data source plugin.
<b>Signature</b> <b>Signature</b>
......
...@@ -16,7 +16,7 @@ Used to register echo backends that will receive Grafana echo events during appl ...@@ -16,7 +16,7 @@ Used to register echo backends that will receive Grafana echo events during appl
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
registerEchoBackend: (backend: EchoBackend<any, any>) => void registerEchoBackend: (backend: EchoBackend) => void
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -11,7 +11,7 @@ type = "docs" ...@@ -11,7 +11,7 @@ type = "docs"
### toDataQueryError() function ### toDataQueryError() function
Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error field
<b>Signature</b> <b>Signature</b>
......
...@@ -36,8 +36,10 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -36,8 +36,10 @@ A library containing the different design components of the Grafana ecosystem.
| [PopoverController](./popovercontroller/) | | | [PopoverController](./popovercontroller/) | |
| [Portal](./portal/) | | | [Portal](./portal/) | |
| [QueryField](./queryfield/) | Renders an editor field. Pass initial value as initialQuery and listen to changes in props.onValueChanged. This component can only process strings. Internally it uses Slate Value. Implement props.onTypeahead to use suggestions, see PromQueryField.tsx as an example. | | [QueryField](./queryfield/) | Renders an editor field. Pass initial value as initialQuery and listen to changes in props.onValueChanged. This component can only process strings. Internally it uses Slate Value. Implement props.onTypeahead to use suggestions, see PromQueryField.tsx as an example. |
| [SelectValueEditor](./selectvalueeditor/) | |
| [SetInterval](./setinterval/) | | | [SetInterval](./setinterval/) | |
| [StatsPicker](./statspicker/) | | | [StatsPicker](./statspicker/) | |
| [StringArrayEditor](./stringarrayeditor/) | |
| [TableInputCSV](./tableinputcsv/) | Expects the container div to have size set and will fill it 100% | | [TableInputCSV](./tableinputcsv/) | Expects the container div to have size set and will fill it 100% |
| [TagsInput](./tagsinput/) | | | [TagsInput](./tagsinput/) | |
| [ToggleButtonGroup](./togglebuttongroup/) | | | [ToggleButtonGroup](./togglebuttongroup/) | |
...@@ -73,6 +75,7 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -73,6 +75,7 @@ A library containing the different design components of the Grafana ecosystem.
| [convertOldAngularValueMapping(panel)](./convertoldangularvaluemapping/) | Convert the angular single stat mapping to new react style | | [convertOldAngularValueMapping(panel)](./convertoldangularvaluemapping/) | Convert the angular single stat mapping to new react style |
| [FadeTransition(props)](./fadetransition/) | | | [FadeTransition(props)](./fadetransition/) | |
| [Form({ defaultValues, onSubmit, validateOnMount, validateFieldsOnMount, children, validateOn, maxWidth, })](./form/) | | | [Form({ defaultValues, onSubmit, validateOnMount, validateFieldsOnMount, children, validateOn, maxWidth, })](./form/) | |
| [getScrollbarWidth()](./getscrollbarwidth/) | |
| [getTagColor(index)](./gettagcolor/) | | | [getTagColor(index)](./gettagcolor/) | |
| [getTagColorsFromName(name)](./gettagcolorsfromname/) | Returns tag badge background and border colors based on hashed tag name. | | [getTagColorsFromName(name)](./gettagcolorsfromname/) | Returns tag badge background and border colors based on hashed tag name. |
| [IndentationPlugin()](./indentationplugin/) | | | [IndentationPlugin()](./indentationplugin/) | |
...@@ -89,7 +92,6 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -89,7 +92,6 @@ A library containing the different design components of the Grafana ecosystem.
| [SegmentSelect({ value, options, onChange, onClickOutside, width, noOptionsMessage, allowCustomValue, })](./segmentselect/) | | | [SegmentSelect({ value, options, onChange, onClickOutside, width, noOptionsMessage, allowCustomValue, })](./segmentselect/) | |
| [Select(props)](./select/) | | | [Select(props)](./select/) | |
| [SelectionShortcutsPlugin()](./selectionshortcutsplugin/) | | | [SelectionShortcutsPlugin()](./selectionshortcutsplugin/) | |
| [SelectValueEditor({ value, onChange, item, })](./selectvalueeditor/) | |
| [sharedSingleStatMigrationHandler(panel)](./sharedsinglestatmigrationhandler/) | | | [sharedSingleStatMigrationHandler(panel)](./sharedsinglestatmigrationhandler/) | |
| [sharedSingleStatPanelChangedHandler(panel, prevPluginId, prevOptions)](./sharedsinglestatpanelchangedhandler/) | | | [sharedSingleStatPanelChangedHandler(panel, prevPluginId, prevOptions)](./sharedsinglestatpanelchangedhandler/) | |
| [SlatePrism(optsParam)](./slateprism/) | A Slate plugin to highlight code syntax. | | [SlatePrism(optsParam)](./slateprism/) | A Slate plugin to highlight code syntax. |
...@@ -120,6 +122,7 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -120,6 +122,7 @@ A library containing the different design components of the Grafana ecosystem.
| [SingleStatBaseOptions](./singlestatbaseoptions/) | | | [SingleStatBaseOptions](./singlestatbaseoptions/) | |
| [StyleProps](./styleprops/) | | | [StyleProps](./styleprops/) | |
| [SuggestionsState](./suggestionsstate/) | | | [SuggestionsState](./suggestionsstate/) | |
| [TableSortByFieldState](./tablesortbyfieldstate/) | |
| [Themeable](./themeable/) | | | [Themeable](./themeable/) | |
| [Token](./token/) | | | [Token](./token/) | |
| [TypeaheadInput](./typeaheadinput/) | | | [TypeaheadInput](./typeaheadinput/) | |
...@@ -149,6 +152,7 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -149,6 +152,7 @@ A library containing the different design components of the Grafana ecosystem.
| [CallToActionCard](./calltoactioncard/) | | | [CallToActionCard](./calltoactioncard/) | |
| [Chart](./chart/) | | | [Chart](./chart/) | |
| [Checkbox](./checkbox/) | | | [Checkbox](./checkbox/) | |
| [CodeEditor](./codeeditor/) | |
| [Collapse](./collapse/) | | | [Collapse](./collapse/) | |
| [ColorPicker](./colorpicker/) | | | [ColorPicker](./colorpicker/) | |
| [colors](./colors/) | | | [colors](./colors/) | |
...@@ -171,6 +175,8 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -171,6 +175,8 @@ A library containing the different design components of the Grafana ecosystem.
| [Field](./field/) | | | [Field](./field/) | |
| [FieldConfigItemHeaderTitle](./fieldconfigitemheadertitle/) | | | [FieldConfigItemHeaderTitle](./fieldconfigitemheadertitle/) | |
| [fieldMatchersUI](./fieldmatchersui/) | | | [fieldMatchersUI](./fieldmatchersui/) | |
| [FieldSet](./fieldset/) | |
| [FileUpload](./fileupload/) | |
| [FilterPill](./filterpill/) | | | [FilterPill](./filterpill/) | |
| [FullWidthButtonContainer](./fullwidthbuttoncontainer/) | | | [FullWidthButtonContainer](./fullwidthbuttoncontainer/) | |
| [getAvailableIcons](./getavailableicons/) | | | [getAvailableIcons](./getavailableicons/) | |
...@@ -244,6 +250,7 @@ A library containing the different design components of the Grafana ecosystem. ...@@ -244,6 +250,7 @@ A library containing the different design components of the Grafana ecosystem.
| [ThemeContext](./themecontext/) | | | [ThemeContext](./themecontext/) | |
| [TimeOfDayPicker](./timeofdaypicker/) | | | [TimeOfDayPicker](./timeofdaypicker/) | |
| [TimeRangePicker](./timerangepicker/) | | | [TimeRangePicker](./timerangepicker/) | |
| [TimeZonePicker](./timezonepicker/) | |
| [ToggleButton](./togglebutton/) | | | [ToggleButton](./togglebutton/) | |
| [Tooltip](./tooltip/) | | | [Tooltip](./tooltip/) | |
| [useStyles](./usestyles/) | Hook for using memoized styles with access to the theme. | | [useStyles](./usestyles/) | Hook for using memoized styles with access to the theme. |
......
...@@ -23,6 +23,7 @@ import { ClickOutsideWrapper } from '@grafana/ui'; ...@@ -23,6 +23,7 @@ import { ClickOutsideWrapper } from '@grafana/ui';
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [defaultProps](#defaultprops-property) | <code>static</code> | <code>{</code><br/><code> includeButtonPress: boolean;</code><br/><code> }</code> | |
| [onOutsideClick](#onoutsideclick-property) | | <code>(event: any) =&gt; void</code> | | | [onOutsideClick](#onoutsideclick-property) | | <code>(event: any) =&gt; void</code> | |
| [state](#state-property) | | <code>{</code><br/><code> hasEventListener: boolean;</code><br/><code> }</code> | | | [state](#state-property) | | <code>{</code><br/><code> hasEventListener: boolean;</code><br/><code> }</code> | |
...@@ -34,6 +35,16 @@ import { ClickOutsideWrapper } from '@grafana/ui'; ...@@ -34,6 +35,16 @@ import { ClickOutsideWrapper } from '@grafana/ui';
| [componentWillUnmount()](#componentwillunmount-method) | | | | [componentWillUnmount()](#componentwillunmount-method) | | |
| [render()](#render-method) | | | | [render()](#render-method) | | |
### defaultProps property
<b>Signature</b>
```typescript
static defaultProps: {
includeButtonPress: boolean;
};
```
### onOutsideClick property ### onOutsideClick property
<b>Signature</b> <b>Signature</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "CodeEditor"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## CodeEditor variable
### CodeEditor variable
<b>Signature</b>
```typescript
CodeEditor: React.FC<CodeEditorProps>
```
<b>Import</b>
```typescript
import { CodeEditor } from '@grafana/ui';
```
...@@ -16,7 +16,7 @@ type = "docs" ...@@ -16,7 +16,7 @@ type = "docs"
```typescript ```typescript
ColorPicker: React.FunctionComponent<Pick<import("./ColorPickerPopover").Props<import("./ColorPickerPopover").CustomPickersDescriptor> & { ColorPicker: React.FunctionComponent<Pick<import("./ColorPickerPopover").Props<import("./ColorPickerPopover").CustomPickersDescriptor> & {
children?: ColorPickerTriggerRenderer | undefined; children?: ColorPickerTriggerRenderer | undefined;
}, "onChange" | "color" | "children" | "onColorChange" | "enableNamedColors" | "customPickers" | "updatePopperPosition">> }, "color" | "onChange" | "children" | "onColorChange" | "enableNamedColors" | "customPickers" | "updatePopperPosition">>
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -32,10 +32,10 @@ import { CustomScrollbar } from '@grafana/ui'; ...@@ -32,10 +32,10 @@ import { CustomScrollbar } from '@grafana/ui';
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [defaultProps](#defaultprops-property) | <code>static</code> | <code>Partial&lt;Props&gt;</code> | | | [defaultProps](#defaultprops-property) | <code>static</code> | <code>Partial&lt;Props&gt;</code> | |
| [renderThumb](#renderthumb-property) | | <code>(thumb: &quot;thumb-horizontal&quot; &#124; &quot;thumb-vertical&quot;, passedProps: any) =&gt; JSX.Element</code> | | | [renderThumb](#renderthumb-property) | | <code>(thumb: 'thumb-horizontal' &#124; 'thumb-vertical', passedProps: any) =&gt; JSX.Element</code> | |
| [renderThumbHorizontal](#renderthumbhorizontal-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | | | [renderThumbHorizontal](#renderthumbhorizontal-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | |
| [renderThumbVertical](#renderthumbvertical-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | | | [renderThumbVertical](#renderthumbvertical-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | |
| [renderTrack](#rendertrack-property) | | <code>(track: &quot;track-vertical&quot; &#124; &quot;track-horizontal&quot;, hideTrack: boolean &#124; undefined, passedProps: any) =&gt; JSX.Element</code> | | | [renderTrack](#rendertrack-property) | | <code>(track: 'track-vertical' &#124; 'track-horizontal', hideTrack: boolean &#124; undefined, passedProps: any) =&gt; JSX.Element</code> | |
| [renderTrackHorizontal](#rendertrackhorizontal-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | | | [renderTrackHorizontal](#rendertrackhorizontal-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | |
| [renderTrackVertical](#rendertrackvertical-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | | | [renderTrackVertical](#rendertrackvertical-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | |
| [renderView](#renderview-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | | | [renderView](#renderview-property) | | <code>(passedProps: any) =&gt; JSX.Element</code> | |
...@@ -78,7 +78,7 @@ static defaultProps: Partial<Props>; ...@@ -78,7 +78,7 @@ static defaultProps: Partial<Props>;
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
renderThumb: (thumb: "thumb-horizontal" | "thumb-vertical", passedProps: any) => JSX.Element; renderThumb: (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element;
``` ```
### renderThumbHorizontal property ### renderThumbHorizontal property
...@@ -102,7 +102,7 @@ renderThumbVertical: (passedProps: any) => JSX.Element; ...@@ -102,7 +102,7 @@ renderThumbVertical: (passedProps: any) => JSX.Element;
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
renderTrack: (track: "track-vertical" | "track-horizontal", hideTrack: boolean | undefined, passedProps: any) => JSX.Element; renderTrack: (track: 'track-vertical' | 'track-horizontal', hideTrack: boolean | undefined, passedProps: any) => JSX.Element;
``` ```
### renderTrackHorizontal property ### renderTrackHorizontal property
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FieldSet"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## FieldSet variable
### FieldSet variable
<b>Signature</b>
```typescript
FieldSet: FC<Props>
```
<b>Import</b>
```typescript
import { FieldSet } from '@grafana/ui';
```
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "FileUpload"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## FileUpload variable
### FileUpload variable
<b>Signature</b>
```typescript
FileUpload: FC<Props>
```
<b>Import</b>
```typescript
import { FileUpload } from '@grafana/ui';
```
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export declare type FormAPI<T> = Pick<FormContextValues<T>, 'register' | 'errors' | 'control' | 'formState' | 'getValues'>; export declare type FormAPI<T> = Pick<FormContextValues<T>, 'register' | 'errors' | 'control' | 'formState' | 'getValues' | 'watch'>;
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "getScrollbarWidth"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## getScrollbarWidth() function
### getScrollbarWidth() function
<b>Signature</b>
```typescript
export declare function getScrollbarWidth(): number;
```
<b>Import</b>
```typescript
import { getScrollbarWidth } from '@grafana/ui';
```
<b>Returns:</b>
`number`
...@@ -16,7 +16,7 @@ Returns collection of common field config properties definitions ...@@ -16,7 +16,7 @@ Returns collection of common field config properties definitions
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getStandardFieldConfigs: () => (FieldConfigPropertyItem<any, string, StringFieldConfigSettings> | FieldConfigPropertyItem<any, number, NumberFieldConfigSettings> | FieldConfigPropertyItem<any, ThresholdsConfig, ThresholdsFieldConfigSettings> | FieldConfigPropertyItem<any, ValueMapping[], ValueMappingFieldConfigSettings> | FieldConfigPropertyItem<any, DataLink[], StringFieldConfigSettings>)[] getStandardFieldConfigs: () => (FieldConfigPropertyItem<any, string, StringFieldConfigSettings> | FieldConfigPropertyItem<any, number, NumberFieldConfigSettings> | FieldConfigPropertyItem<any, ThresholdsConfig, ThresholdsFieldConfigSettings> | FieldConfigPropertyItem<any, ValueMapping[], ValueMappingFieldConfigSettings> | FieldConfigPropertyItem<any, DataLink<any>[], StringFieldConfigSettings>)[]
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -16,7 +16,7 @@ Returns collection of standard option editors definitions ...@@ -16,7 +16,7 @@ Returns collection of standard option editors definitions
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
getStandardOptionEditors: () => (StandardEditorsRegistryItem<any, any> | StandardEditorsRegistryItem<string, any> | StandardEditorsRegistryItem<number, any> | StandardEditorsRegistryItem<boolean, any> | StandardEditorsRegistryItem<ValueMapping[], any> | StandardEditorsRegistryItem<ThresholdsConfig, any> | StandardEditorsRegistryItem<DataLink[], any> | StandardEditorsRegistryItem<string[], any>)[] getStandardOptionEditors: () => (StandardEditorsRegistryItem<any, any> | StandardEditorsRegistryItem<string, any> | StandardEditorsRegistryItem<number, any> | StandardEditorsRegistryItem<boolean, any> | StandardEditorsRegistryItem<ValueMapping[], any> | StandardEditorsRegistryItem<ThresholdsConfig, any> | StandardEditorsRegistryItem<DataLink<any>[], any> | StandardEditorsRegistryItem<string[], any>)[]
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
LogRows: React.FunctionComponent<Pick<Props, "timeZone" | "getRowContext" | "onClickFilterLabel" | "onClickFilterOutLabel" | "getFieldLinks" | "highlighterExpressions" | "wrapLogMessage" | "showContextToggle" | "showLabels" | "showTime" | "allowDetails" | "logRows" | "deduplicatedRows" | "dedupStrategy" | "rowLimit" | "previewLimit">> LogRows: React.FunctionComponent<Pick<Props, "timeZone" | "getRowContext" | "onClickFilterLabel" | "onClickFilterOutLabel" | "getFieldLinks" | "highlighterExpressions" | "wrapLogMessage" | "showContextToggle" | "showLabels" | "showTime" | "allowDetails" | "logRows" | "deduplicatedRows" | "dedupStrategy" | "rowLimit" | "previewLimit" | "disableCustomHorizontalScroll">>
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -19,40 +19,19 @@ declare class PopoverController extends React.Component<Props, State> ...@@ -19,40 +19,19 @@ declare class PopoverController extends React.Component<Props, State>
```typescript ```typescript
import { PopoverController } from '@grafana/ui'; import { PopoverController } from '@grafana/ui';
``` ```
<b>Constructors</b>
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(props)](#constructor-props) | | Constructs a new instance of the <code>PopoverController</code> class |
<b>Properties</b> <b>Properties</b>
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [hidePopper](#hidepopper-property) | | <code>() =&gt; void</code> | | | [hidePopper](#hidepopper-property) | | <code>() =&gt; void</code> | |
| [showPopper](#showpopper-property) | | <code>() =&gt; void</code> | | | [showPopper](#showpopper-property) | | <code>() =&gt; void</code> | |
| [state](#state-property) | | <code>{</code><br/><code> show: boolean;</code><br/><code> }</code> | |
<b>Methods</b> <b>Methods</b>
| Method | Modifiers | Description | | Method | Modifiers | Description |
| --- | --- | --- | | --- | --- | --- |
| [render()](#render-method) | | | | [render()](#render-method) | | |
| [UNSAFE\_componentWillReceiveProps(nextProps)](#unsafe_componentwillreceiveprops-method) | | |
### constructor(props)
Constructs a new instance of the `PopoverController` class
<b>Signature</b>
```typescript
constructor(props: Props);
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| props | <code>Props</code> | |
### hidePopper property ### hidePopper property
...@@ -70,31 +49,24 @@ hidePopper: () => void; ...@@ -70,31 +49,24 @@ hidePopper: () => void;
showPopper: () => void; showPopper: () => void;
``` ```
### render method ### state property
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
render(): JSX.Element; state: {
show: boolean;
};
``` ```
<b>Returns:</b>
`JSX.Element` ### render method
### UNSAFE\_componentWillReceiveProps method
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
UNSAFE_componentWillReceiveProps(nextProps: Props): void; render(): JSX.Element;
``` ```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| nextProps | <code>Props</code> | |
<b>Returns:</b> <b>Returns:</b>
`void` `JSX.Element`
...@@ -15,15 +15,9 @@ type = "docs" ...@@ -15,15 +15,9 @@ type = "docs"
```typescript ```typescript
RefreshPicker: React.FunctionComponent<Pick<Props, "value" | "tooltip" | "intervals" | "onRefresh" | "onIntervalChanged" | "hasLiveOption" | "refreshButton" | "buttonSelectClassName">> & { RefreshPicker: React.FunctionComponent<Pick<Props, "value" | "tooltip" | "intervals" | "onRefresh" | "onIntervalChanged" | "hasLiveOption" | "refreshButton" | "buttonSelectClassName">> & {
offOption: { offOption: typeof RefreshPickerBase.offOption;
label: string; liveOption: typeof RefreshPickerBase.liveOption;
value: string; isLive: typeof RefreshPickerBase.isLive;
};
liveOption: {
label: string;
value: string;
};
isLive: (refreshInterval?: string | undefined) => boolean;
} }
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -7,26 +7,84 @@ keywords = ["grafana","documentation","sdk","@grafana/ui"] ...@@ -7,26 +7,84 @@ keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs" type = "docs"
+++ +++
## SelectValueEditor() function ## SelectValueEditor class
### SelectValueEditor() function
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
export declare function SelectValueEditor<T>({ value, onChange, item, }: FieldConfigEditorProps<T, SelectFieldConfigSettings<T>>): JSX.Element; export declare class SelectValueEditor<T> extends React.PureComponent<Props<T>, State<T>>
``` ```
<b>Import</b> <b>Import</b>
```typescript ```typescript
import { SelectValueEditor } from '@grafana/ui'; import { SelectValueEditor } from '@grafana/ui';
``` ```
<b>Properties</b>
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [state](#state-property) | | <code>State&lt;T&gt;</code> | |
| [updateOptions](#updateoptions-property) | | <code>() =&gt; Promise&lt;void&gt;</code> | |
<b>Methods</b>
| Method | Modifiers | Description |
| --- | --- | --- |
| [componentDidMount()](#componentdidmount-method) | | |
| [componentDidUpdate(oldProps)](#componentdidupdate-method) | | |
| [render()](#render-method) | | |
### state property
<b>Signature</b>
```typescript
state: State<T>;
```
### updateOptions property
<b>Signature</b>
```typescript
updateOptions: () => Promise<void>;
```
### componentDidMount method
<b>Signature</b>
```typescript
componentDidMount(): void;
```
<b>Returns:</b>
`void`
### componentDidUpdate method
<b>Signature</b>
```typescript
componentDidUpdate(oldProps: Props<T>): void;
```
<b>Parameters</b> <b>Parameters</b>
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| { value, onChange, item, } | <code>FieldConfigEditorProps&lt;T, SelectFieldConfigSettings&lt;T&gt;&gt;</code> | | | oldProps | <code>Props&lt;T&gt;</code> | |
<b>Returns:</b>
`void`
### render method
<b>Signature</b>
```typescript
render(): JSX.Element;
```
<b>Returns:</b> <b>Returns:</b>
`JSX.Element` `JSX.Element`
......
...@@ -16,7 +16,7 @@ type = "docs" ...@@ -16,7 +16,7 @@ type = "docs"
```typescript ```typescript
SeriesColorPicker: React.FunctionComponent<Pick<import("./SeriesColorPickerPopover").SeriesColorPickerPopoverProps & { SeriesColorPicker: React.FunctionComponent<Pick<import("./SeriesColorPickerPopover").SeriesColorPickerPopoverProps & {
children?: ColorPickerTriggerRenderer | undefined; children?: ColorPickerTriggerRenderer | undefined;
}, "onChange" | "color" | "children" | "onColorChange" | "enableNamedColors" | "updatePopperPosition" | "yaxis" | "onToggleAxis">> }, "color" | "onChange" | "children" | "onColorChange" | "enableNamedColors" | "updatePopperPosition" | "yaxis" | "onToggleAxis">>
``` ```
<b>Import</b> <b>Import</b>
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
SeriesColorPickerPopoverWithTheme: React.FunctionComponent<Pick<SeriesColorPickerPopoverProps, "onChange" | "color" | "onColorChange" | "enableNamedColors" | "updatePopperPosition" | "yaxis" | "onToggleAxis">> SeriesColorPickerPopoverWithTheme: React.FunctionComponent<Pick<SeriesColorPickerPopoverProps, "color" | "onChange" | "onColorChange" | "enableNamedColors" | "updatePopperPosition" | "yaxis" | "onToggleAxis">>
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "StringArrayEditor"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## StringArrayEditor class
<b>Signature</b>
```typescript
export declare class StringArrayEditor extends React.PureComponent<Props, State>
```
<b>Import</b>
```typescript
import { StringArrayEditor } from '@grafana/ui';
```
<b>Properties</b>
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [onRemoveString](#onremovestring-property) | | <code>(index: number) =&gt; void</code> | |
| [onValueChange](#onvaluechange-property) | | <code>(e: React.SyntheticEvent, idx: number) =&gt; void</code> | |
| [state](#state-property) | | <code>{</code><br/><code> showAdd: boolean;</code><br/><code> }</code> | |
<b>Methods</b>
| Method | Modifiers | Description |
| --- | --- | --- |
| [render()](#render-method) | | |
### onRemoveString property
<b>Signature</b>
```typescript
onRemoveString: (index: number) => void;
```
### onValueChange property
<b>Signature</b>
```typescript
onValueChange: (e: React.SyntheticEvent, idx: number) => void;
```
### state property
<b>Signature</b>
```typescript
state: {
showAdd: boolean;
};
```
### render method
<b>Signature</b>
```typescript
render(): JSX.Element;
```
<b>Returns:</b>
`JSX.Element`
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TableSortByFieldState"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## TableSortByFieldState interface
<b>Signature</b>
```typescript
export interface TableSortByFieldState
```
<b>Import</b>
```typescript
import { TableSortByFieldState } from '@grafana/ui';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [desc](#desc-property) | <code>boolean</code> | |
| [displayName](#displayname-property) | <code>string</code> | |
### desc property
<b>Signature</b>
```typescript
desc?: boolean;
```
### displayName property
<b>Signature</b>
```typescript
displayName: string;
```
...@@ -29,10 +29,10 @@ import { TagsInput } from '@grafana/ui'; ...@@ -29,10 +29,10 @@ import { TagsInput } from '@grafana/ui';
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [onAdd](#onadd-property) | | <code>(event: React.MouseEvent&lt;Element, MouseEvent&gt;) =&gt; void</code> | | | [onAdd](#onadd-property) | | <code>(event: React.MouseEvent) =&gt; void</code> | |
| [onChange](#onchange-property) | | <code>() =&gt; void</code> | | | [onChange](#onchange-property) | | <code>() =&gt; void</code> | |
| [onKeyboardAdd](#onkeyboardadd-property) | | <code>(event: React.KeyboardEvent&lt;Element&gt;) =&gt; void</code> | | | [onKeyboardAdd](#onkeyboardadd-property) | | <code>(event: KeyboardEvent) =&gt; void</code> | |
| [onNameChange](#onnamechange-property) | | <code>(event: React.ChangeEvent&lt;HTMLInputElement&gt;) =&gt; void</code> | | | [onNameChange](#onnamechange-property) | | <code>(event: ChangeEvent&lt;HTMLInputElement&gt;) =&gt; void</code> | |
| [onRemove](#onremove-property) | | <code>(tagToRemove: string) =&gt; void</code> | | | [onRemove](#onremove-property) | | <code>(tagToRemove: string) =&gt; void</code> | |
| [setNewTags](#setnewtags-property) | | <code>() =&gt; void</code> | | | [setNewTags](#setnewtags-property) | | <code>() =&gt; void</code> | |
...@@ -62,7 +62,7 @@ constructor(props: Props); ...@@ -62,7 +62,7 @@ constructor(props: Props);
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onAdd: (event: React.MouseEvent<Element, MouseEvent>) => void; onAdd: (event: React.MouseEvent) => void;
``` ```
### onChange property ### onChange property
...@@ -78,7 +78,7 @@ onChange: () => void; ...@@ -78,7 +78,7 @@ onChange: () => void;
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onKeyboardAdd: (event: React.KeyboardEvent<Element>) => void; onKeyboardAdd: (event: KeyboardEvent) => void;
``` ```
### onNameChange property ### onNameChange property
...@@ -86,7 +86,7 @@ onKeyboardAdd: (event: React.KeyboardEvent<Element>) => void; ...@@ -86,7 +86,7 @@ onKeyboardAdd: (event: React.KeyboardEvent<Element>) => void;
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
onNameChange: (event: React.ChangeEvent<HTMLInputElement>) => void; onNameChange: (event: ChangeEvent<HTMLInputElement>) => void;
``` ```
### onRemove property ### onRemove property
......
...@@ -14,7 +14,7 @@ type = "docs" ...@@ -14,7 +14,7 @@ type = "docs"
<b>Signature</b> <b>Signature</b>
```typescript ```typescript
TimeRangePicker: React.FunctionComponent<Pick<Props, "onChange" | "history" | "timeZone" | "value" | "hideText" | "timeSyncButton" | "isSynced" | "onMoveBackward" | "onMoveForward" | "onZoom">> TimeRangePicker: React.FunctionComponent<Pick<Props, "timeZone" | "value" | "onChange" | "history" | "onChangeTimeZone" | "hideText" | "timeSyncButton" | "isSynced" | "onMoveBackward" | "onMoveForward" | "onZoom">>
``` ```
<b>Import</b> <b>Import</b>
......
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "TimeZonePicker"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## TimeZonePicker variable
### TimeZonePicker variable
<b>Signature</b>
```typescript
TimeZonePicker: React.FC<Props>
```
<b>Import</b>
```typescript
import { TimeZonePicker } from '@grafana/ui';
```
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