From 83df83fa42cdee3e30d9e300f62868691c9f80e5 Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Wed, 1 Jul 2020 09:12:35 +0200 Subject: [PATCH] Docs: updated packages reference docs for 7.1.0-beta1. (#25958) --- docs/sources/packages_api/data/_index.md | 23 +++- .../data/applyfieldoverrideoptions.md | 9 ++ docs/sources/packages_api/data/buildinfo.md | 9 ++ .../packages_api/data/circularvector.md | 2 +- .../data/colorfieldconfigsettings.md | 24 +++- .../packages_api/data/createdimension.md | 2 +- docs/sources/packages_api/data/datalink.md | 15 ++- .../data/datalinksoverrideprocessor.md | 2 +- .../data/datasourceinstancesettings.md | 4 +- .../packages_api/data/datatransformerid.md | 1 + .../packages_api/data/featuretoggles.md | 15 ++- .../packages_api/data/fieldoverridecontext.md | 20 +--- .../packages_api/data/formattedvector.md | 104 ++++++++++++++++++ .../data/getallvaluesfromdimension.md | 2 +- .../sources/packages_api/data/getcolorname.md | 2 +- .../data/getcolumnfromdimension.md | 2 +- .../data/getcolumnsfromdimension.md | 2 +- .../packages_api/data/getdimensionbyname.md | 2 +- .../packages_api/data/getseriestimestep.md | 2 +- .../sources/packages_api/data/gettimefield.md | 4 +- .../packages_api/data/gettimezonegroups.md | 5 +- .../packages_api/data/gettimezoneinfo.md | 23 ++++ .../sources/packages_api/data/gettimezones.md | 23 ++++ .../data/getvaluefromdimension.md | 2 +- .../data/grafanadataframetoarrowtable.md | 3 +- .../packages_api/data/groupedtimezones.md | 43 ++++++++ .../packages_api/data/hasmsresolution.md | 2 +- .../packages_api/data/internaltimezones.md | 32 ++++++ docs/sources/packages_api/data/linktarget.md | 2 +- docs/sources/packages_api/data/logsmodel.md | 9 ++ .../data/onupdatedatasourcejsondataoption.md | 2 +- ...onupdatedatasourcejsondataoptionchecked.md | 2 +- .../onupdatedatasourcejsondataoptionselect.md | 2 +- .../data/onupdatedatasourceoption.md | 2 +- .../data/onupdatedatasourceresetoption.md | 2 +- .../onupdatedatasourcesecurejsondataoption.md | 2 +- ...atedatasourcesecurejsondataoptionselect.md | 2 +- .../data/paneloptionseditorbuilder.md | 36 ++++++ docs/sources/packages_api/data/panelplugin.md | 4 +- docs/sources/packages_api/data/panelprops.md | 4 +- .../packages_api/data/queryresultmeta.md | 29 ++--- .../data/rangeutil/getrelativetimeslist.md | 90 +++++++++++---- .../packages_api/data/reducedataoptions.md | 11 ++ .../data/selectfieldconfigsettings.md | 24 +++- .../data/standardeditorcontext.md | 61 ++++++++++ .../packages_api/data/standardeditorprops.md | 11 +- .../packages_api/data/standardtransformers.md | 1 + .../packages_api/data/timezonecountry.md | 43 ++++++++ .../data/timezoneformatuserfriendly.md | 2 +- .../sources/packages_api/data/timezoneinfo.md | 70 ++++++++++++ docs/sources/packages_api/data/trace.md | 33 ++++++ docs/sources/packages_api/data/tracedata.md | 27 +++++ .../packages_api/data/tracekeyvaluepair.md | 29 +++++ docs/sources/packages_api/data/tracelink.md | 26 +++++ docs/sources/packages_api/data/tracelog.md | 26 +++++ .../sources/packages_api/data/traceprocess.md | 26 +++++ docs/sources/packages_api/data/tracespan.md | 32 ++++++ .../packages_api/data/tracespandata.md | 35 ++++++ .../packages_api/data/tracespanreference.md | 28 +++++ .../packages_api/data/transformeruiprops.md | 4 +- .../data/updatedatasourcepluginresetoption.md | 2 +- .../sources/packages_api/data/variabletype.md | 2 +- docs/sources/packages_api/data/vector.md | 4 +- docs/sources/packages_api/runtime/_index.md | 4 +- .../packages_api/runtime/datasourcesrv.md | 4 +- .../runtime/datasourcewithbackend.md | 58 ++++++++-- .../packages_api/runtime/grafanabootconfig.md | 9 ++ .../packages_api/runtime/healthstatus.md | 2 +- .../runtime/registerechobackend.md | 2 +- .../packages_api/runtime/todataqueryerror.md | 2 +- docs/sources/packages_api/ui/_index.md | 9 +- docs/sources/packages_api/ui/checkbox.md | 2 +- .../packages_api/ui/clickoutsidewrapper.md | 11 ++ docs/sources/packages_api/ui/codeeditor.md | 23 ++++ docs/sources/packages_api/ui/colorpicker.md | 2 +- .../packages_api/ui/customscrollbar.md | 8 +- docs/sources/packages_api/ui/fieldset.md | 23 ++++ docs/sources/packages_api/ui/fileupload.md | 23 ++++ docs/sources/packages_api/ui/formapi.md | 2 +- .../packages_api/ui/getscrollbarwidth.md | 27 +++++ .../ui/getstandardfieldconfigs.md | 2 +- .../ui/getstandardoptioneditors.md | 2 +- docs/sources/packages_api/ui/input.md | 2 +- docs/sources/packages_api/ui/logrows.md | 2 +- .../packages_api/ui/popovercontroller.md | 50 ++------- docs/sources/packages_api/ui/refreshpicker.md | 12 +- .../packages_api/ui/selectvalueeditor.md | 68 +++++++++++- .../packages_api/ui/seriescolorpicker.md | 2 +- .../ui/seriescolorpickerpopoverwiththeme.md | 2 +- .../packages_api/ui/stringarrayeditor.md | 72 ++++++++++++ docs/sources/packages_api/ui/switch.md | 2 +- docs/sources/packages_api/ui/tab.md | 2 +- .../packages_api/ui/tablesortbyfieldstate.md | 43 ++++++++ docs/sources/packages_api/ui/tagsinput.md | 12 +- docs/sources/packages_api/ui/textarea.md | 2 +- .../packages_api/ui/timerangepicker.md | 2 +- .../sources/packages_api/ui/timezonepicker.md | 23 ++++ 97 files changed, 1369 insertions(+), 206 deletions(-) create mode 100644 docs/sources/packages_api/data/formattedvector.md create mode 100644 docs/sources/packages_api/data/gettimezoneinfo.md create mode 100644 docs/sources/packages_api/data/gettimezones.md create mode 100644 docs/sources/packages_api/data/groupedtimezones.md create mode 100644 docs/sources/packages_api/data/internaltimezones.md create mode 100644 docs/sources/packages_api/data/standardeditorcontext.md create mode 100644 docs/sources/packages_api/data/timezonecountry.md create mode 100644 docs/sources/packages_api/data/timezoneinfo.md create mode 100644 docs/sources/packages_api/data/trace.md create mode 100644 docs/sources/packages_api/data/tracedata.md create mode 100644 docs/sources/packages_api/data/tracekeyvaluepair.md create mode 100644 docs/sources/packages_api/data/tracelink.md create mode 100644 docs/sources/packages_api/data/tracelog.md create mode 100644 docs/sources/packages_api/data/traceprocess.md create mode 100644 docs/sources/packages_api/data/tracespan.md create mode 100644 docs/sources/packages_api/data/tracespandata.md create mode 100644 docs/sources/packages_api/data/tracespanreference.md create mode 100644 docs/sources/packages_api/ui/codeeditor.md create mode 100644 docs/sources/packages_api/ui/fieldset.md create mode 100644 docs/sources/packages_api/ui/fileupload.md create mode 100644 docs/sources/packages_api/ui/getscrollbarwidth.md create mode 100644 docs/sources/packages_api/ui/stringarrayeditor.md create mode 100644 docs/sources/packages_api/ui/tablesortbyfieldstate.md create mode 100644 docs/sources/packages_api/ui/timezonepicker.md diff --git a/docs/sources/packages_api/data/_index.md b/docs/sources/packages_api/data/_index.md index 8218e07608f..12b06a2dd97 100644 --- a/docs/sources/packages_api/data/_index.md +++ b/docs/sources/packages_api/data/_index.md @@ -20,7 +20,7 @@ A library containing most of the core functionality and data types used in Grafa | [ArrayVector](./arrayvector/) | | | [BinaryOperationVector](./binaryoperationvector/) | | | [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/) | | | [CSVReader](./csvreader/) | | | [DataFrameView](./dataframeview/) | (BETA) 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 | [FieldCache](./fieldcache/) | | | [FieldConfigEditorBuilder](./fieldconfigeditorbuilder/) | Fluent API for declarative creation of field config option editors | | [FieldConfigOptionsRegistry](./fieldconfigoptionsregistry/) | | +| [FormattedVector](./formattedvector/) | | | [GrafanaPlugin](./grafanaplugin/) | | | [LanguageProvider](./languageprovider/) | | | [MutableDataFrame](./mutabledataframe/) | | @@ -54,6 +55,7 @@ A library containing most of the core functionality and data types used in Grafa | [FieldType](./fieldtype/) | | | [FrameMatcherID](./framematcherid/) | Field name matchers | | [GrafanaThemeType](./grafanathemetype/) | | +| [InternalTimeZones](./internaltimezones/) | | | [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. | | [LogsDedupDescription](./logsdedupdescription/) | | @@ -110,7 +112,7 @@ A library containing most of the core functionality and data types used in Grafa | [getValueFormat(id)](./getvalueformat/) | | | [getValueFormats()](./getvalueformats/) | | | [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 | | [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 typeTODO: 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 | [DataConfigSource](./dataconfigsource/) | Describes and API for exposing panel specific data configurations. | | [DataFrame](./dataframe/) | | | [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: <T extends DataQuery> 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 | | [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 | @@ -224,6 +226,7 @@ A library containing most of the core functionality and data types used in Grafa | [GrafanaTheme](./grafanatheme/) | | | [GrafanaThemeCommons](./grafanathemecommons/) | | | [GraphSeriesXY](./graphseriesxy/) | View model projection of a series | +| [GroupedTimeZones](./groupedtimezones/) | | | [HistoryItem](./historyitem/) | | | [IntervalValues](./intervalvalues/) | | | [Labels](./labels/) | | @@ -280,6 +283,7 @@ A library containing most of the core functionality and data types used in Grafa | [ScreenshotInfo](./screenshotinfo/) | | | [SelectableValue](./selectablevalue/) | Used in select elements | | [SelectFieldConfigSettings](./selectfieldconfigsettings/) | | +| [StandardEditorContext](./standardeditorcontext/) | | | [StandardEditorProps](./standardeditorprops/) | | | [StandardEditorsRegistryItem](./standardeditorsregistryitem/) | | | [StringFieldConfigSettings](./stringfieldconfigsettings/) | | @@ -292,6 +296,8 @@ A library containing most of the core functionality and data types used in Grafa | [TimeOptions](./timeoptions/) | | | [TimeRange](./timerange/) | | | [TimeSeries](./timeseries/) | | +| [TimeZoneCountry](./timezonecountry/) | | +| [TimeZoneInfo](./timezoneinfo/) | | | [TransformerRegistyItem](./transformerregistyitem/) | | | [TransformerUIProps](./transformeruiprops/) | | | [UnitFieldConfigSettings](./unitfieldconfigsettings/) | | @@ -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 | | [getTimeField](./gettimefield/) | | | [getTimeZoneGroups](./gettimezonegroups/) | | +| [getTimeZoneInfo](./gettimezoneinfo/) | | +| [getTimeZones](./gettimezones/) | | | [getValueFromDimension](./getvaluefromdimension/) | | | [guessFieldTypes](./guessfieldtypes/) | | | [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 | [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. | | [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. | | [UrlQueryValue](./urlqueryvalue/) | Type to represent the value of a single query variable. | | [ValueConverter](./valueconverter/) | | diff --git a/docs/sources/packages_api/data/applyfieldoverrideoptions.md b/docs/sources/packages_api/data/applyfieldoverrideoptions.md index 299692ff9e8..b5a92b7b438 100644 --- a/docs/sources/packages_api/data/applyfieldoverrideoptions.md +++ b/docs/sources/packages_api/data/applyfieldoverrideoptions.md @@ -27,6 +27,7 @@ import { ApplyFieldOverrideOptions } from '@grafana/data'; | [data](#data-property) | DataFrame[] | | | [fieldConfig](#fieldconfig-property) | FieldConfigSource | | | [fieldConfigRegistry](#fieldconfigregistry-property) | FieldConfigOptionsRegistry | | +| [getDataSourceSettingsByUid](#getdatasourcesettingsbyuid-property) | (uid: string) => DataSourceInstanceSettings | undefined | | | [replaceVariables](#replacevariables-property) | InterpolateFunction | | | [theme](#theme-property) | GrafanaTheme | | | [timeZone](#timezone-property) | TimeZone | | @@ -63,6 +64,14 @@ fieldConfig: FieldConfigSource; fieldConfigRegistry?: FieldConfigOptionsRegistry; ``` +### getDataSourceSettingsByUid property + +Signature + +```typescript +getDataSourceSettingsByUid: (uid: string) => DataSourceInstanceSettings | undefined; +``` + ### replaceVariables property Signature diff --git a/docs/sources/packages_api/data/buildinfo.md b/docs/sources/packages_api/data/buildinfo.md index 0a061f48673..aadb55b321d 100644 --- a/docs/sources/packages_api/data/buildinfo.md +++ b/docs/sources/packages_api/data/buildinfo.md @@ -29,6 +29,7 @@ import { BuildInfo } from '@grafana/data'; | [edition](#edition-property) | string | | | [env](#env-property) | string | | | [hasUpdate](#hasupdate-property) | boolean | | +| [hideVersion](#hideversion-property) | boolean | | | [isEnterprise](#isenterprise-property) | boolean | Is set to true when running Grafana Enterprise edition. | | [latestVersion](#latestversion-property) | string | | | [version](#version-property) | string | | @@ -65,6 +66,14 @@ env: string; hasUpdate: boolean; ``` +### hideVersion property + +Signature + +```typescript +hideVersion: boolean; +``` + ### isEnterprise property Is set to true when running Grafana Enterprise edition. diff --git a/docs/sources/packages_api/data/circularvector.md b/docs/sources/packages_api/data/circularvector.md index 38f62216188..c6954596c6c 100644 --- a/docs/sources/packages_api/data/circularvector.md +++ b/docs/sources/packages_api/data/circularvector.md @@ -11,7 +11,7 @@ type = "docs" 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. Signature diff --git a/docs/sources/packages_api/data/colorfieldconfigsettings.md b/docs/sources/packages_api/data/colorfieldconfigsettings.md index 6382f5154a4..a64174c8891 100644 --- a/docs/sources/packages_api/data/colorfieldconfigsettings.md +++ b/docs/sources/packages_api/data/colorfieldconfigsettings.md @@ -23,12 +23,30 @@ import { ColorFieldConfigSettings } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | -| [enableNamedColors](#enablenamedcolors-property) | boolean | | +| [allowUndefined](#allowundefined-property) | boolean | | +| [disableNamedColors](#disablenamedcolors-property) | boolean | | +| [textWhenUndefined](#textwhenundefined-property) | string | | -### enableNamedColors property +### allowUndefined property Signature ```typescript -enableNamedColors?: boolean; +allowUndefined?: boolean; +``` + +### disableNamedColors property + +Signature + +```typescript +disableNamedColors?: boolean; +``` + +### textWhenUndefined property + +Signature + +```typescript +textWhenUndefined?: string; ``` diff --git a/docs/sources/packages_api/data/createdimension.md b/docs/sources/packages_api/data/createdimension.md index 189cef5840e..5b7a6d8cfb9 100644 --- a/docs/sources/packages_api/data/createdimension.md +++ b/docs/sources/packages_api/data/createdimension.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -createDimension: (name: string, columns: Field>[]) => Dimension +createDimension: (name: string, columns: Field[]) => Dimension ``` Import diff --git a/docs/sources/packages_api/data/datalink.md b/docs/sources/packages_api/data/datalink.md index 3e851deb0e3..f1ce2dac3c8 100644 --- a/docs/sources/packages_api/data/datalink.md +++ b/docs/sources/packages_api/data/datalink.md @@ -9,12 +9,14 @@ type = "docs" ## 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: <T extends DataQuery> 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. Signature ```typescript -export interface DataLink +export interface DataLink ``` Import @@ -25,20 +27,21 @@ import { DataLink } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | -| [meta](#meta-property) | {
datasourceUid?: string;
} | | +| [internal](#internal-property) | {
query: T;
datasourceUid: string;
} | | | [onBuildUrl](#onbuildurl-property) | (event: DataLinkClickEvent) => string | | | [onClick](#onclick-property) | (event: DataLinkClickEvent) => void | | | [targetBlank](#targetblank-property) | boolean | | | [title](#title-property) | string | | | [url](#url-property) | string | | -### meta property +### internal property Signature ```typescript -meta?: { - datasourceUid?: string; +internal?: { + query: T; + datasourceUid: string; }; ``` diff --git a/docs/sources/packages_api/data/datalinksoverrideprocessor.md b/docs/sources/packages_api/data/datalinksoverrideprocessor.md index 77c9438f3a1..933cc69918d 100644 --- a/docs/sources/packages_api/data/datalinksoverrideprocessor.md +++ b/docs/sources/packages_api/data/datalinksoverrideprocessor.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -dataLinksOverrideProcessor: (value: any, _context: FieldOverrideContext, _settings?: DataLinksFieldConfigSettings | undefined) => DataLink[] +dataLinksOverrideProcessor: (value: any, _context: FieldOverrideContext, _settings?: DataLinksFieldConfigSettings | undefined) => DataLink[] ``` Import diff --git a/docs/sources/packages_api/data/datasourceinstancesettings.md b/docs/sources/packages_api/data/datasourceinstancesettings.md index f04a8f312d2..7fc2951f0d1 100644 --- a/docs/sources/packages_api/data/datasourceinstancesettings.md +++ b/docs/sources/packages_api/data/datasourceinstancesettings.md @@ -25,7 +25,7 @@ import { DataSourceInstanceSettings } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | -| [basicAuth](#basicauth-property) | string | 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 & password is never exposted to browser/Frontend so this will be empty then. | +| [basicAuth](#basicauth-property) | string | 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 & password is never exposed to browser/Frontend so this will be empty then. | | [database](#database-property) | string | | | [id](#id-property) | number | | | [jsonData](#jsondata-property) | T | | @@ -40,7 +40,7 @@ import { DataSourceInstanceSettings } from '@grafana/data'; ### 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 & 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 & password is never exposed to browser/Frontend so this will be empty then. Signature diff --git a/docs/sources/packages_api/data/datatransformerid.md b/docs/sources/packages_api/data/datatransformerid.md index d19d007e29e..d56527babb1 100644 --- a/docs/sources/packages_api/data/datatransformerid.md +++ b/docs/sources/packages_api/data/datatransformerid.md @@ -34,6 +34,7 @@ import { DataTransformerID } from '@grafana/data'; | filterFieldsByName | "filterFieldsByName" | | | filterFrames | "filterFrames" | | | labelsToFields | "labelsToFields" | | +| merge | "merge" | | | noop | "noop" | | | order | "order" | | | organize | "organize" | | diff --git a/docs/sources/packages_api/data/featuretoggles.md b/docs/sources/packages_api/data/featuretoggles.md index 40521f2bb1d..f3885f734fb 100644 --- a/docs/sources/packages_api/data/featuretoggles.md +++ b/docs/sources/packages_api/data/featuretoggles.md @@ -25,12 +25,21 @@ import { FeatureToggles } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | +| [datasourceInsights](#datasourceinsights-property) | boolean | | | [expressions](#expressions-property) | boolean | | | [meta](#meta-property) | boolean | | | [newEdit](#newedit-property) | boolean | | -| [newVariables](#newvariables-property) | boolean | | +| [reportGrid](#reportgrid-property) | boolean | | | [transformations](#transformations-property) | boolean | | +### datasourceInsights property + +Signature + +```typescript +datasourceInsights: boolean; +``` + ### expressions property Signature @@ -59,12 +68,12 @@ Available only in Grafana Enterprise newEdit: boolean; ``` -### newVariables property +### reportGrid property Signature ```typescript -newVariables: boolean; +reportGrid: boolean; ``` ### transformations property diff --git a/docs/sources/packages_api/data/fieldoverridecontext.md b/docs/sources/packages_api/data/fieldoverridecontext.md index 3853f45d48f..79be218d7ad 100644 --- a/docs/sources/packages_api/data/fieldoverridecontext.md +++ b/docs/sources/packages_api/data/fieldoverridecontext.md @@ -12,7 +12,7 @@ type = "docs" Signature ```typescript -export interface FieldOverrideContext +export interface FieldOverrideContext extends StandardEditorContext ``` Import @@ -26,8 +26,6 @@ import { FieldOverrideContext } from '@grafana/data'; | [data](#data-property) | DataFrame[] | | | [dataFrameIndex](#dataframeindex-property) | number | | | [field](#field-property) | Field | | -| [getSuggestions](#getsuggestions-property) | (scope?: VariableSuggestionsScope) => VariableSuggestion[] | | -| [replaceVariables](#replacevariables-property) | InterpolateFunction | | ### data property @@ -52,19 +50,3 @@ dataFrameIndex?: number; ```typescript field?: Field; ``` - -### getSuggestions property - -Signature - -```typescript -getSuggestions?: (scope?: VariableSuggestionsScope) => VariableSuggestion[]; -``` - -### replaceVariables property - -Signature - -```typescript -replaceVariables?: InterpolateFunction; -``` diff --git a/docs/sources/packages_api/data/formattedvector.md b/docs/sources/packages_api/data/formattedvector.md new file mode 100644 index 00000000000..02e676c3978 --- /dev/null +++ b/docs/sources/packages_api/data/formattedvector.md @@ -0,0 +1,104 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "FormattedVector" +keywords = ["grafana","documentation","sdk","@grafana/data"] +type = "docs" ++++ + +## FormattedVector class + +Signature + +```typescript +export declare class FormattedVector implements Vector +``` +Import + +```typescript +import { FormattedVector } from '@grafana/data'; +``` +Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [constructor(source, formatter)](#constructor-sourceformatter) | | Constructs a new instance of the FormattedVector class | + +Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [length](#length-property) | | number | | + +Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [get(index)](#get-method) | | | +| [toArray()](#toarray-method) | | | +| [toJSON()](#tojson-method) | | | + +### constructor(source, formatter) + +Constructs a new instance of the `FormattedVector` class + +Signature + +```typescript +constructor(source: Vector, formatter: DisplayProcessor); +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| source | Vector<T> | | +| formatter | DisplayProcessor | | + +### length property + +Signature + +```typescript +get length(): number; +``` + +### get method + +Signature + +```typescript +get(index: number): string; +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| index | number | | + +Returns: + +`string` + +### toArray method + +Signature + +```typescript +toArray(): string[]; +``` +Returns: + +`string[]` + +### toJSON method + +Signature + +```typescript +toJSON(): string[]; +``` +Returns: + +`string[]` + diff --git a/docs/sources/packages_api/data/getallvaluesfromdimension.md b/docs/sources/packages_api/data/getallvaluesfromdimension.md index 090e4406e50..49188e71765 100644 --- a/docs/sources/packages_api/data/getallvaluesfromdimension.md +++ b/docs/sources/packages_api/data/getallvaluesfromdimension.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -getAllValuesFromDimension: (dimension: Dimension, column: number, row: number) => any[] +getAllValuesFromDimension: (dimension: Dimension, column: number, row: number) => any[] ``` Import diff --git a/docs/sources/packages_api/data/getcolorname.md b/docs/sources/packages_api/data/getcolorname.md index cc056827d53..81376e104ee 100644 --- a/docs/sources/packages_api/data/getcolorname.md +++ b/docs/sources/packages_api/data/getcolorname.md @@ -14,7 +14,7 @@ type = "docs" Signature ```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 ``` Import diff --git a/docs/sources/packages_api/data/getcolumnfromdimension.md b/docs/sources/packages_api/data/getcolumnfromdimension.md index 7e95ae4cdf2..2a7c4f6c8f9 100644 --- a/docs/sources/packages_api/data/getcolumnfromdimension.md +++ b/docs/sources/packages_api/data/getcolumnfromdimension.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -getColumnFromDimension: (dimension: Dimension, column: number) => Field> +getColumnFromDimension: (dimension: Dimension, column: number) => Field> ``` Import diff --git a/docs/sources/packages_api/data/getcolumnsfromdimension.md b/docs/sources/packages_api/data/getcolumnsfromdimension.md index c7313054861..7ce62d1893c 100644 --- a/docs/sources/packages_api/data/getcolumnsfromdimension.md +++ b/docs/sources/packages_api/data/getcolumnsfromdimension.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -getColumnsFromDimension: (dimension: Dimension) => Field>[] +getColumnsFromDimension: (dimension: Dimension) => Field>[] ``` Import diff --git a/docs/sources/packages_api/data/getdimensionbyname.md b/docs/sources/packages_api/data/getdimensionbyname.md index 0616e448ce4..42b4d3e565d 100644 --- a/docs/sources/packages_api/data/getdimensionbyname.md +++ b/docs/sources/packages_api/data/getdimensionbyname.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -getDimensionByName: (dimensions: KeyValue>, name: string) => Dimension +getDimensionByName: (dimensions: Dimensions, name: string) => Dimension ``` Import diff --git a/docs/sources/packages_api/data/getseriestimestep.md b/docs/sources/packages_api/data/getseriestimestep.md index 2e491b8538f..ed59bb87733 100644 --- a/docs/sources/packages_api/data/getseriestimestep.md +++ b/docs/sources/packages_api/data/getseriestimestep.md @@ -16,7 +16,7 @@ Returns minimal time step from series time field Signature ```typescript -getSeriesTimeStep: (timeField: Field>) => number +getSeriesTimeStep: (timeField: Field) => number ``` Import diff --git a/docs/sources/packages_api/data/gettimefield.md b/docs/sources/packages_api/data/gettimefield.md index c9d64f5f30f..e13e41b8b2c 100644 --- a/docs/sources/packages_api/data/gettimefield.md +++ b/docs/sources/packages_api/data/gettimefield.md @@ -15,8 +15,8 @@ type = "docs" ```typescript getTimeField: (series: DataFrame) => { - timeField?: Field> | undefined; - timeIndex?: number | undefined; + timeField?: Field; + timeIndex?: number; } ``` Import diff --git a/docs/sources/packages_api/data/gettimezonegroups.md b/docs/sources/packages_api/data/gettimezonegroups.md index 791ab38625b..fc6bca2c5ba 100644 --- a/docs/sources/packages_api/data/gettimezonegroups.md +++ b/docs/sources/packages_api/data/gettimezonegroups.md @@ -14,10 +14,7 @@ type = "docs" Signature ```typescript -getTimeZoneGroups: () => { - label: string; - options: string[]; -}[] +getTimeZoneGroups: ((includeInternal?: any) => GroupedTimeZones[]) & import("lodash").MemoizedFunction ``` Import diff --git a/docs/sources/packages_api/data/gettimezoneinfo.md b/docs/sources/packages_api/data/gettimezoneinfo.md new file mode 100644 index 00000000000..ef11199d61b --- /dev/null +++ b/docs/sources/packages_api/data/gettimezoneinfo.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +getTimeZoneInfo: (zone: string, timestamp: number) => TimeZoneInfo | undefined +``` +Import + +```typescript +import { getTimeZoneInfo } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/gettimezones.md b/docs/sources/packages_api/data/gettimezones.md new file mode 100644 index 00000000000..245064d9df3 --- /dev/null +++ b/docs/sources/packages_api/data/gettimezones.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +getTimeZones: ((includeInternal?: any) => TimeZone[]) & import("lodash").MemoizedFunction +``` +Import + +```typescript +import { getTimeZones } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/getvaluefromdimension.md b/docs/sources/packages_api/data/getvaluefromdimension.md index a4a84ab5eee..21086486272 100644 --- a/docs/sources/packages_api/data/getvaluefromdimension.md +++ b/docs/sources/packages_api/data/getvaluefromdimension.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -getValueFromDimension: (dimension: Dimension, column: number, row: number) => any +getValueFromDimension: (dimension: Dimension, column: number, row: number) => any ``` Import diff --git a/docs/sources/packages_api/data/grafanadataframetoarrowtable.md b/docs/sources/packages_api/data/grafanadataframetoarrowtable.md index 626dda0d7c1..26bbbf1e494 100644 --- a/docs/sources/packages_api/data/grafanadataframetoarrowtable.md +++ b/docs/sources/packages_api/data/grafanadataframetoarrowtable.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -export declare function grafanaDataFrameToArrowTable(data: DataFrame): Table; +export declare function grafanaDataFrameToArrowTable(data: DataFrame, keepOriginalNames?: boolean): Table; ``` Import @@ -26,6 +26,7 @@ import { grafanaDataFrameToArrowTable } from '@grafana/data'; | Parameter | Type | Description | | --- | --- | --- | | data | DataFrame | | +| keepOriginalNames | boolean | 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 keepOriginalNames=true | Returns: diff --git a/docs/sources/packages_api/data/groupedtimezones.md b/docs/sources/packages_api/data/groupedtimezones.md new file mode 100644 index 00000000000..12d7c266c94 --- /dev/null +++ b/docs/sources/packages_api/data/groupedtimezones.md @@ -0,0 +1,43 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "GroupedTimeZones" +keywords = ["grafana","documentation","sdk","@grafana/data"] +type = "docs" ++++ + +## GroupedTimeZones interface + +Signature + +```typescript +export interface GroupedTimeZones +``` +Import + +```typescript +import { GroupedTimeZones } from '@grafana/data'; +``` +Properties + +| Property | Type | Description | +| --- | --- | --- | +| [name](#name-property) | string | | +| [zones](#zones-property) | TimeZone[] | | + +### name property + +Signature + +```typescript +name: string; +``` + +### zones property + +Signature + +```typescript +zones: TimeZone[]; +``` diff --git a/docs/sources/packages_api/data/hasmsresolution.md b/docs/sources/packages_api/data/hasmsresolution.md index ce19c27cf53..5f55de033d0 100644 --- a/docs/sources/packages_api/data/hasmsresolution.md +++ b/docs/sources/packages_api/data/hasmsresolution.md @@ -16,7 +16,7 @@ Checks if series time field has ms resolution Signature ```typescript -hasMsResolution: (timeField: Field>) => boolean +hasMsResolution: (timeField: Field) => boolean ``` Import diff --git a/docs/sources/packages_api/data/internaltimezones.md b/docs/sources/packages_api/data/internaltimezones.md new file mode 100644 index 00000000000..bd21873e994 --- /dev/null +++ b/docs/sources/packages_api/data/internaltimezones.md @@ -0,0 +1,32 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare enum InternalTimeZones +``` +Import + +```typescript +import { InternalTimeZones } from '@grafana/data'; +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| default | "" | | +| localBrowserTime | "browser" | | +| utc | "utc" | | + diff --git a/docs/sources/packages_api/data/linktarget.md b/docs/sources/packages_api/data/linktarget.md index e0c30a1edcb..365dbbabb43 100644 --- a/docs/sources/packages_api/data/linktarget.md +++ b/docs/sources/packages_api/data/linktarget.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -export declare type LinkTarget = '_blank' | '_self'; +export declare type LinkTarget = '_blank' | '_self' | undefined; ``` Import diff --git a/docs/sources/packages_api/data/logsmodel.md b/docs/sources/packages_api/data/logsmodel.md index 743107391c4..98cb96ef808 100644 --- a/docs/sources/packages_api/data/logsmodel.md +++ b/docs/sources/packages_api/data/logsmodel.md @@ -27,6 +27,7 @@ import { LogsModel } from '@grafana/data'; | [meta](#meta-property) | LogsMetaItem[] | | | [rows](#rows-property) | LogRowModel[] | | | [series](#series-property) | GraphSeriesXY[] | | +| [visibleRange](#visiblerange-property) | AbsoluteTimeRange | | ### hasUniqueLabels property @@ -59,3 +60,11 @@ rows: LogRowModel[]; ```typescript series?: GraphSeriesXY[]; ``` + +### visibleRange property + +Signature + +```typescript +visibleRange?: AbsoluteTimeRange; +``` diff --git a/docs/sources/packages_api/data/onupdatedatasourcejsondataoption.md b/docs/sources/packages_api/data/onupdatedatasourcejsondataoption.md index 2ae07f35f63..d0d78830a67 100644 --- a/docs/sources/packages_api/data/onupdatedatasourcejsondataoption.md +++ b/docs/sources/packages_api/data/onupdatedatasourcejsondataoption.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceJsonDataOption: (props: DataSourcePluginOptionsEditorProps, key: K) => (event: import("react").SyntheticEvent) => void +onUpdateDatasourceJsonDataOption: (props: DataSourcePluginOptionsEditorProps, key: K) => (event: React.SyntheticEvent) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionchecked.md b/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionchecked.md index afca30f6644..58999aa9700 100644 --- a/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionchecked.md +++ b/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionchecked.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceJsonDataOptionChecked: (props: DataSourcePluginOptionsEditorProps, key: K) => (event: import("react").SyntheticEvent) => void +onUpdateDatasourceJsonDataOptionChecked: (props: DataSourcePluginOptionsEditorProps, key: K) => (event: React.SyntheticEvent) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionselect.md b/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionselect.md index abc95486c4d..e75a340d0d4 100644 --- a/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionselect.md +++ b/docs/sources/packages_api/data/onupdatedatasourcejsondataoptionselect.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceJsonDataOptionSelect: (props: DataSourcePluginOptionsEditorProps, key: K) => (selected: SelectableValue) => void +onUpdateDatasourceJsonDataOptionSelect: (props: DataSourcePluginOptionsEditorProps, key: K) => (selected: SelectableValue) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourceoption.md b/docs/sources/packages_api/data/onupdatedatasourceoption.md index 1b402b84768..fbc35f4789b 100644 --- a/docs/sources/packages_api/data/onupdatedatasourceoption.md +++ b/docs/sources/packages_api/data/onupdatedatasourceoption.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceOption: (props: DataSourcePluginOptionsEditorProps, 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) => void +onUpdateDatasourceOption: (props: DataSourcePluginOptionsEditorProps, key: keyof DataSourceSettings) => (event: React.SyntheticEvent) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourceresetoption.md b/docs/sources/packages_api/data/onupdatedatasourceresetoption.md index 32eb0d3440f..fb403ea02d1 100644 --- a/docs/sources/packages_api/data/onupdatedatasourceresetoption.md +++ b/docs/sources/packages_api/data/onupdatedatasourceresetoption.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceResetOption: (props: DataSourcePluginOptionsEditorProps, key: string) => (event: import("react").MouseEvent) => void +onUpdateDatasourceResetOption: (props: DataSourcePluginOptionsEditorProps, key: string) => (event: React.MouseEvent) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoption.md b/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoption.md index 8e5ad97f1be..13fcdb0c069 100644 --- a/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoption.md +++ b/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoption.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceSecureJsonDataOption: >(props: DataSourcePluginOptionsEditorProps, key: string) => (event: import("react").SyntheticEvent) => void +onUpdateDatasourceSecureJsonDataOption: >(props: DataSourcePluginOptionsEditorProps, key: string) => (event: React.SyntheticEvent) => void ``` Import diff --git a/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoptionselect.md b/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoptionselect.md index a85d7fb2e25..c5d87a4427c 100644 --- a/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoptionselect.md +++ b/docs/sources/packages_api/data/onupdatedatasourcesecurejsondataoptionselect.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -onUpdateDatasourceSecureJsonDataOptionSelect: >(props: DataSourcePluginOptionsEditorProps, key: string) => (selected: SelectableValue) => void +onUpdateDatasourceSecureJsonDataOptionSelect: >(props: DataSourcePluginOptionsEditorProps, key: string) => (selected: SelectableValue) => void ``` Import diff --git a/docs/sources/packages_api/data/paneloptionseditorbuilder.md b/docs/sources/packages_api/data/paneloptionseditorbuilder.md index 31e9a2d404b..b91afac6f5a 100644 --- a/docs/sources/packages_api/data/paneloptionseditorbuilder.md +++ b/docs/sources/packages_api/data/paneloptionseditorbuilder.md @@ -30,7 +30,9 @@ import { PanelOptionsEditorBuilder } from '@grafana/data'; | [addNumberInput(config)](#addnumberinput-method) | | | | [addRadio(config)](#addradio-method) | | | | [addSelect(config)](#addselect-method) | | | +| [addStringArray(config)](#addstringarray-method) | | | | [addTextInput(config)](#addtextinput-method) | | | +| [addTimeZonePicker(config)](#addtimezonepicker-method) | | | | [addUnitPicker(config)](#addunitpicker-method) | | | ### addBooleanSwitch method @@ -118,6 +120,23 @@ addSelect>(config: `this` +### addStringArray method + +Signature + +```typescript +addStringArray(config: PanelOptionsEditorConfig): this; +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| config | PanelOptionsEditorConfig<TOptions, TSettings & StringFieldConfigSettings, string[]> | | + +Returns: + +`this` + ### addTextInput method Signature @@ -135,6 +154,23 @@ addTextInput(config: PanelOptionsEditorConfigSignature + +```typescript +addTimeZonePicker(config: PanelOptionsEditorConfig): this; +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| config | PanelOptionsEditorConfig<TOptions, TSettings, string> | | + +Returns: + +`this` + ### addUnitPicker method Signature diff --git a/docs/sources/packages_api/data/panelplugin.md b/docs/sources/packages_api/data/panelplugin.md index 046830f9031..4baeca560e8 100644 --- a/docs/sources/packages_api/data/panelplugin.md +++ b/docs/sources/packages_api/data/panelplugin.md @@ -50,7 +50,7 @@ import { PanelPlugin } from '@grafana/data'; | [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. | | [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) @@ -285,7 +285,7 @@ export const plugin = new PanelPlugin(ShapePanel) ### 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 Signature diff --git a/docs/sources/packages_api/data/panelprops.md b/docs/sources/packages_api/data/panelprops.md index 7d194d37eba..b73974d0d8e 100644 --- a/docs/sources/packages_api/data/panelprops.md +++ b/docs/sources/packages_api/data/panelprops.md @@ -34,7 +34,7 @@ import { PanelProps } from '@grafana/data'; | [replaceVariables](#replacevariables-property) | InterpolateFunction | Template variables interpolation function | | [timeRange](#timerange-property) | TimeRange | Time range of the current dashboard | | [timeZone](#timezone-property) | TimeZone | Time zone of the current dashboard | -| [transparent](#transparent-property) | boolean | Indicathes whether or not panel should be rendered transparent | +| [transparent](#transparent-property) | boolean | Indicates whether or not panel should be rendered transparent | | [width](#width-property) | number | Current width of the panel | ### data property @@ -149,7 +149,7 @@ timeZone: TimeZone; ### transparent property -Indicathes whether or not panel should be rendered transparent +Indicates whether or not panel should be rendered transparent Signature diff --git a/docs/sources/packages_api/data/queryresultmeta.md b/docs/sources/packages_api/data/queryresultmeta.md index 679052d0191..88c3e1e649a 100644 --- a/docs/sources/packages_api/data/queryresultmeta.md +++ b/docs/sources/packages_api/data/queryresultmeta.md @@ -25,13 +25,12 @@ import { QueryResultMeta } from '@grafana/data'; | --- | --- | --- | | [alignmentPeriod](#alignmentperiod-property) | string | | | [custom](#custom-property) | Record<string, any> | DatasSource Specific Values | +| [executedQueryString](#executedquerystring-property) | string | 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) | any[] | Legacy data source specific, should be moved to custom | | [json](#json-property) | boolean | | | [limit](#limit-property) | number | | | [notices](#notices-property) | QueryResultMetaNotice[] | Meta Notices | | [preferredVisualisationType](#preferredvisualisationtype-property) | PreferredVisualisationType | Currently used to show results in Explore only in preferred visualisation option | -| [query](#query-property) | string | | -| [rawQuery](#rawquery-property) | string | | | [searchWords](#searchwords-property) | string[] | | | [stats](#stats-property) | QueryResultMetaStat[] | Stats | | [transformations](#transformations-property) | string[] | Used to track transformation ids that where part of the processing | @@ -54,6 +53,16 @@ DatasSource Specific Values custom?: Record; ``` +### 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 + +Signature + +```typescript +executedQueryString?: string; +``` + ### gmdMeta property 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 preferredVisualisationType?: PreferredVisualisationType; ``` -### query property - -Signature - -```typescript -query?: string; -``` - -### rawQuery property - -Signature - -```typescript -rawQuery?: string; -``` - ### searchWords property Signature diff --git a/docs/sources/packages_api/data/rangeutil/getrelativetimeslist.md b/docs/sources/packages_api/data/rangeutil/getrelativetimeslist.md index 3d6b7dc0572..e60e701da1a 100644 --- a/docs/sources/packages_api/data/rangeutil/getrelativetimeslist.md +++ b/docs/sources/packages_api/data/rangeutil/getrelativetimeslist.md @@ -414,17 +414,40 @@ export declare function getRelativeTimesList(timepickerSettings: any, currentDis to: string; display: string; section: number; -}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | { - (this: U_4[][][][][][][][], depth: 7): U_4[]; - (this: U_5[][][][][][][], depth: 6): U_5[]; - (this: U_6[][][][][][], depth: 5): U_6[]; - (this: U_7[][][][][], depth: 4): U_7[]; - (this: U_8[][][][], depth: 3): U_8[]; - (this: U_9[][][], depth: 2): U_9[]; - (this: U_10[][], depth?: 1 | undefined): U_10[]; - (this: U_11[], depth: 0): U_11[]; - (depth?: number | undefined): any[]; -})[]>; +}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | ((this: A, depth?: D | undefined) => { + done: A; + recur: A extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? any[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D] extends -1 ? "done" : "recur"] : A; +}[D extends -1 ? "done" : "recur"][]))[]>; ``` Import @@ -841,15 +864,38 @@ const { getRelativeTimesList } = rangeUtil; to: string; display: string; section: number; -}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | { - (this: U_4[][][][][][][][], depth: 7): U_4[]; - (this: U_5[][][][][][][], depth: 6): U_5[]; - (this: U_6[][][][][][], depth: 5): U_6[]; - (this: U_7[][][][][], depth: 4): U_7[]; - (this: U_8[][][][], depth: 3): U_8[]; - (this: U_9[][][], depth: 2): U_9[]; - (this: U_10[][], depth?: 1 | undefined): U_10[]; - (this: U_11[], depth: 0): U_11[]; - (depth?: number | undefined): any[]; -})[]>` +}[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | ((this: A, depth?: D | undefined) => { + done: A; + recur: A extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? { + done: InnerArr; + recur: InnerArr extends readonly (infer InnerArr)[] ? any[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D]] extends -1 ? "done" : "recur"] : InnerArr; + }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D] extends -1 ? "done" : "recur"] : A; +}[D extends -1 ? "done" : "recur"][]))[]>` diff --git a/docs/sources/packages_api/data/reducedataoptions.md b/docs/sources/packages_api/data/reducedataoptions.md index 697b0c56b66..b418ef69243 100644 --- a/docs/sources/packages_api/data/reducedataoptions.md +++ b/docs/sources/packages_api/data/reducedataoptions.md @@ -26,6 +26,7 @@ import { ReduceDataOptions } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | | [calcs](#calcs-property) | string[] | When !values, pick one value for the whole field | +| [fields](#fields-property) | string | Which fields to show. By default this is only numeric fields | | [limit](#limit-property) | number | if showing all values limit | | [values](#values-property) | boolean | | @@ -39,6 +40,16 @@ When !values, pick one value for the whole field calcs: string[]; ``` +### fields property + +Which fields to show. By default this is only numeric fields + +Signature + +```typescript +fields?: string; +``` + ### limit property if showing all values limit diff --git a/docs/sources/packages_api/data/selectfieldconfigsettings.md b/docs/sources/packages_api/data/selectfieldconfigsettings.md index 44947e9b14d..b1adc5f9c0c 100644 --- a/docs/sources/packages_api/data/selectfieldconfigsettings.md +++ b/docs/sources/packages_api/data/selectfieldconfigsettings.md @@ -23,10 +23,32 @@ import { SelectFieldConfigSettings } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | -| [options](#options-property) | Array<SelectableValue<T>> | | +| [allowCustomValue](#allowcustomvalue-property) | boolean | | +| [getOptions](#getoptions-property) | (context: FieldOverrideContext) => Promise<Array<SelectableValue<T>>> | Optionally use the context to define the options | +| [options](#options-property) | Array<SelectableValue<T>> | The default options | + +### allowCustomValue property + +Signature + +```typescript +allowCustomValue?: boolean; +``` + +### getOptions property + +Optionally use the context to define the options + +Signature + +```typescript +getOptions?: (context: FieldOverrideContext) => Promise>>; +``` ### options property +The default options + Signature ```typescript diff --git a/docs/sources/packages_api/data/standardeditorcontext.md b/docs/sources/packages_api/data/standardeditorcontext.md new file mode 100644 index 00000000000..7eb6d232a67 --- /dev/null +++ b/docs/sources/packages_api/data/standardeditorcontext.md @@ -0,0 +1,61 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "StandardEditorContext" +keywords = ["grafana","documentation","sdk","@grafana/data"] +type = "docs" ++++ + +## StandardEditorContext interface + +Signature + +```typescript +export interface StandardEditorContext +``` +Import + +```typescript +import { StandardEditorContext } from '@grafana/data'; +``` +Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data](#data-property) | DataFrame[] | | +| [getSuggestions](#getsuggestions-property) | (scope?: VariableSuggestionsScope) => VariableSuggestion[] | | +| [options](#options-property) | TOptions | | +| [replaceVariables](#replacevariables-property) | InterpolateFunction | | + +### data property + +Signature + +```typescript +data?: DataFrame[]; +``` + +### getSuggestions property + +Signature + +```typescript +getSuggestions?: (scope?: VariableSuggestionsScope) => VariableSuggestion[]; +``` + +### options property + +Signature + +```typescript +options?: TOptions; +``` + +### replaceVariables property + +Signature + +```typescript +replaceVariables?: InterpolateFunction; +``` diff --git a/docs/sources/packages_api/data/standardeditorprops.md b/docs/sources/packages_api/data/standardeditorprops.md index 4d45451e84e..2af4f7c8a38 100644 --- a/docs/sources/packages_api/data/standardeditorprops.md +++ b/docs/sources/packages_api/data/standardeditorprops.md @@ -12,7 +12,7 @@ type = "docs" Signature ```typescript -export interface StandardEditorProps +export interface StandardEditorProps ``` Import @@ -23,10 +23,19 @@ import { StandardEditorProps } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | +| [context](#context-property) | StandardEditorContext<TOptions> | | | [item](#item-property) | StandardEditorsRegistryItem<TValue, TSettings> | | | [onChange](#onchange-property) | (value?: TValue) => void | | | [value](#value-property) | TValue | | +### context property + +Signature + +```typescript +context: StandardEditorContext; +``` + ### item property Signature diff --git a/docs/sources/packages_api/data/standardtransformers.md b/docs/sources/packages_api/data/standardtransformers.md index e2ed27bbc82..791bfbf3fc7 100644 --- a/docs/sources/packages_api/data/standardtransformers.md +++ b/docs/sources/packages_api/data/standardtransformers.md @@ -29,6 +29,7 @@ standardTransformers: { renameFieldsTransformer: import("..").DataTransformerInfo; labelsToFieldsTransformer: import("..").DataTransformerInfo; ensureColumnsTransformer: import("..").DataTransformerInfo; + mergeTransformer: import("..").DataTransformerInfo; } ``` Import diff --git a/docs/sources/packages_api/data/timezonecountry.md b/docs/sources/packages_api/data/timezonecountry.md new file mode 100644 index 00000000000..aa7997b1b24 --- /dev/null +++ b/docs/sources/packages_api/data/timezonecountry.md @@ -0,0 +1,43 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "TimeZoneCountry" +keywords = ["grafana","documentation","sdk","@grafana/data"] +type = "docs" ++++ + +## TimeZoneCountry interface + +Signature + +```typescript +export interface TimeZoneCountry +``` +Import + +```typescript +import { TimeZoneCountry } from '@grafana/data'; +``` +Properties + +| Property | Type | Description | +| --- | --- | --- | +| [code](#code-property) | string | | +| [name](#name-property) | string | | + +### code property + +Signature + +```typescript +code: string; +``` + +### name property + +Signature + +```typescript +name: string; +``` diff --git a/docs/sources/packages_api/data/timezoneformatuserfriendly.md b/docs/sources/packages_api/data/timezoneformatuserfriendly.md index 31bfe82d0a1..c86c28f638a 100644 --- a/docs/sources/packages_api/data/timezoneformatuserfriendly.md +++ b/docs/sources/packages_api/data/timezoneformatuserfriendly.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -timeZoneFormatUserFriendly: (timeZone: string | undefined) => string | undefined +timeZoneFormatUserFriendly: (timeZone: TimeZone | undefined) => string | undefined ``` Import diff --git a/docs/sources/packages_api/data/timezoneinfo.md b/docs/sources/packages_api/data/timezoneinfo.md new file mode 100644 index 00000000000..fee7ff81e79 --- /dev/null +++ b/docs/sources/packages_api/data/timezoneinfo.md @@ -0,0 +1,70 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "TimeZoneInfo" +keywords = ["grafana","documentation","sdk","@grafana/data"] +type = "docs" ++++ + +## TimeZoneInfo interface + +Signature + +```typescript +export interface TimeZoneInfo +``` +Import + +```typescript +import { TimeZoneInfo } from '@grafana/data'; +``` +Properties + +| Property | Type | Description | +| --- | --- | --- | +| [abbreviation](#abbreviation-property) | string | | +| [countries](#countries-property) | TimeZoneCountry[] | | +| [name](#name-property) | string | | +| [offsetInMins](#offsetinmins-property) | number | | +| [zone](#zone-property) | string | | + +### abbreviation property + +Signature + +```typescript +abbreviation: string; +``` + +### countries property + +Signature + +```typescript +countries: TimeZoneCountry[]; +``` + +### name property + +Signature + +```typescript +name: string; +``` + +### offsetInMins property + +Signature + +```typescript +offsetInMins: number; +``` + +### zone property + +Signature + +```typescript +zone: string; +``` diff --git a/docs/sources/packages_api/data/trace.md b/docs/sources/packages_api/data/trace.md new file mode 100644 index 00000000000..40b4dd48d0f --- /dev/null +++ b/docs/sources/packages_api/data/trace.md @@ -0,0 +1,33 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type Trace = TraceData & { + duration: number; + endTime: number; + spans: TraceSpan[]; + startTime: number; + traceName: string; + services: Array<{ + name: string; + numberOfSpans: number; + }>; +}; +``` +Import + +```typescript +import { Trace } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracedata.md b/docs/sources/packages_api/data/tracedata.md new file mode 100644 index 00000000000..092d14a03d3 --- /dev/null +++ b/docs/sources/packages_api/data/tracedata.md @@ -0,0 +1,27 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceData = { + processes: Record; + traceID: string; + warnings?: string[] | null; +}; +``` +Import + +```typescript +import { TraceData } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracekeyvaluepair.md b/docs/sources/packages_api/data/tracekeyvaluepair.md new file mode 100644 index 00000000000..a3d66594b6c --- /dev/null +++ b/docs/sources/packages_api/data/tracekeyvaluepair.md @@ -0,0 +1,29 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceKeyValuePair = { + key: string; + type?: string; + value: any; +}; +``` +Import + +```typescript +import { TraceKeyValuePair } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracelink.md b/docs/sources/packages_api/data/tracelink.md new file mode 100644 index 00000000000..e97bf982131 --- /dev/null +++ b/docs/sources/packages_api/data/tracelink.md @@ -0,0 +1,26 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceLink = { + url: string; + text: string; +}; +``` +Import + +```typescript +import { TraceLink } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracelog.md b/docs/sources/packages_api/data/tracelog.md new file mode 100644 index 00000000000..1e955d4674f --- /dev/null +++ b/docs/sources/packages_api/data/tracelog.md @@ -0,0 +1,26 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceLog = { + timestamp: number; + fields: TraceKeyValuePair[]; +}; +``` +Import + +```typescript +import { TraceLog } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/traceprocess.md b/docs/sources/packages_api/data/traceprocess.md new file mode 100644 index 00000000000..3155d6d7416 --- /dev/null +++ b/docs/sources/packages_api/data/traceprocess.md @@ -0,0 +1,26 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceProcess = { + serviceName: string; + tags: TraceKeyValuePair[]; +}; +``` +Import + +```typescript +import { TraceProcess } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracespan.md b/docs/sources/packages_api/data/tracespan.md new file mode 100644 index 00000000000..5f22ce028d6 --- /dev/null +++ b/docs/sources/packages_api/data/tracespan.md @@ -0,0 +1,32 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceSpan = TraceSpanData & { + depth: number; + hasChildren: boolean; + process: TraceProcess; + relativeStartTime: number; + tags: NonNullable; + references: NonNullable; + warnings: NonNullable; + subsidiarilyReferencedBy: TraceSpanReference[]; +}; +``` +Import + +```typescript +import { TraceSpan } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracespandata.md b/docs/sources/packages_api/data/tracespandata.md new file mode 100644 index 00000000000..63d76300f65 --- /dev/null +++ b/docs/sources/packages_api/data/tracespandata.md @@ -0,0 +1,35 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```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; +}; +``` +Import + +```typescript +import { TraceSpanData } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/tracespanreference.md b/docs/sources/packages_api/data/tracespanreference.md new file mode 100644 index 00000000000..051ed72843c --- /dev/null +++ b/docs/sources/packages_api/data/tracespanreference.md @@ -0,0 +1,28 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare type TraceSpanReference = { + refType: 'CHILD_OF' | 'FOLLOWS_FROM'; + span?: TraceSpan | null | undefined; + spanID: string; + traceID: string; +}; +``` +Import + +```typescript +import { TraceSpanReference } from '@grafana/data'; +``` diff --git a/docs/sources/packages_api/data/transformeruiprops.md b/docs/sources/packages_api/data/transformeruiprops.md index cf8677eda11..352e3a72d1e 100644 --- a/docs/sources/packages_api/data/transformeruiprops.md +++ b/docs/sources/packages_api/data/transformeruiprops.md @@ -23,13 +23,13 @@ import { TransformerUIProps } from '@grafana/data'; | Property | Type | Description | | --- | --- | --- | -| [input](#input-property) | DataFrame[] | Pre-transform data rames | +| [input](#input-property) | DataFrame[] | Pre-transform data frames | | [onChange](#onchange-property) | (options: T) => void | | | [options](#options-property) | T | Transformer configuration, persisted on panel's model | ### input property -Pre-transform data rames +Pre-transform data frames Signature diff --git a/docs/sources/packages_api/data/updatedatasourcepluginresetoption.md b/docs/sources/packages_api/data/updatedatasourcepluginresetoption.md index f35a2407911..5f80d8f0409 100644 --- a/docs/sources/packages_api/data/updatedatasourcepluginresetoption.md +++ b/docs/sources/packages_api/data/updatedatasourcepluginresetoption.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -updateDatasourcePluginResetOption: >(props: DataSourcePluginOptionsEditorProps, key: string) => void +updateDatasourcePluginResetOption: >(props: DataSourcePluginOptionsEditorProps, key: string) => void ``` Import diff --git a/docs/sources/packages_api/data/variabletype.md b/docs/sources/packages_api/data/variabletype.md index a2261972edd..e6cbc3c4030 100644 --- a/docs/sources/packages_api/data/variabletype.md +++ b/docs/sources/packages_api/data/variabletype.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -export declare type VariableType = 'query' | 'adhoc' | 'constant' | 'datasource' | 'interval' | 'textbox' | 'custom'; +export declare type VariableType = 'query' | 'adhoc' | 'constant' | 'datasource' | 'interval' | 'textbox' | 'custom' | 'system'; ``` Import diff --git a/docs/sources/packages_api/data/vector.md b/docs/sources/packages_api/data/vector.md index ae93c3568e4..0fba4209715 100644 --- a/docs/sources/packages_api/data/vector.md +++ b/docs/sources/packages_api/data/vector.md @@ -30,7 +30,7 @@ import { Vector } from '@grafana/data'; | Method | Description | | --- | --- | | [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 @@ -61,7 +61,7 @@ get(index: number): T; ### toArray method -Get the resutls as an array. +Get the results as an array. Signature diff --git a/docs/sources/packages_api/runtime/_index.md b/docs/sources/packages_api/runtime/_index.md index a8f4270ae32..3b6bbc3bff9 100644 --- a/docs/sources/packages_api/runtime/_index.md +++ b/docs/sources/packages_api/runtime/_index.md @@ -23,7 +23,7 @@ A library containing services, configurations etc. used to interact with the Gra | Enumeration | Description | | --- | --- | | [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. | ## Functions @@ -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. | | [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. | -| [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 | ## Interfaces diff --git a/docs/sources/packages_api/runtime/datasourcesrv.md b/docs/sources/packages_api/runtime/datasourcesrv.md index dab0abdd0db..2eccafdc135 100644 --- a/docs/sources/packages_api/runtime/datasourcesrv.md +++ b/docs/sources/packages_api/runtime/datasourcesrv.md @@ -33,13 +33,13 @@ import { DataSourceSrv } from '@grafana/runtime'; Signature ```typescript -get(name?: string, scopedVars?: ScopedVars): Promise; +get(name?: string | null, scopedVars?: ScopedVars): Promise; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | -| name | string | name of the datasource plugin you want to use. | +| name | string | null | name of the datasource plugin you want to use. | | scopedVars | ScopedVars | variables used to interpolate a templated passed as name. | Returns: diff --git a/docs/sources/packages_api/runtime/datasourcewithbackend.md b/docs/sources/packages_api/runtime/datasourcewithbackend.md index 87abff58264..118082cba70 100644 --- a/docs/sources/packages_api/runtime/datasourcewithbackend.md +++ b/docs/sources/packages_api/runtime/datasourcewithbackend.md @@ -31,10 +31,12 @@ import { DataSourceWithBackend } from '@grafana/runtime'; | 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 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 | | [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 | | [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 | | [testDatasource()](#testdatasource-method) | | Checks the plugin health | @@ -55,23 +57,26 @@ constructor(instanceSettings: DataSourceInstanceSettings); ### 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 Signature ```typescript /** @virtual */ -applyTemplateVariables(query: DataQuery): DataQuery; +applyTemplateVariables(query: TQuery, scopedVars: ScopedVars): Record; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | -| query | DataQuery | | +| query | TQuery | | +| scopedVars | ScopedVars | | Returns: -`DataQuery` +`Record` ### callHealthCheck method @@ -86,6 +91,26 @@ callHealthCheck(): Promise; `Promise` +### filterQuery method + +Override to skip executing a query + +Signature + +```typescript +/** @virtual */ +filterQuery?(query: TQuery): boolean; +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | TQuery | | + +Returns: + +`boolean` + ### getResource method Make a GET request to the datasource resource path @@ -126,6 +151,25 @@ postResource(path: string, body?: any): Promise; `Promise` +### processResponse method + +Optionally augment the response before returning the results to the + +Signature + +```typescript +processResponse?(res: DataQueryResponse): Promise; +``` +Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| res | DataQueryResponse | | + +Returns: + +`Promise` + ### query method Ideally final -- any other implementation may not work as expected @@ -133,13 +177,13 @@ Ideally final -- any other implementation may not work as expected Signature ```typescript -query(request: DataQueryRequest): Observable; +query(request: DataQueryRequest): Observable; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | -| request | DataQueryRequest | | +| request | DataQueryRequest<TQuery> | | Returns: diff --git a/docs/sources/packages_api/runtime/grafanabootconfig.md b/docs/sources/packages_api/runtime/grafanabootconfig.md index 7df0626ab7e..07bbfa65752 100644 --- a/docs/sources/packages_api/runtime/grafanabootconfig.md +++ b/docs/sources/packages_api/runtime/grafanabootconfig.md @@ -35,6 +35,7 @@ import { GrafanaBootConfig } from '@grafana/runtime'; | [alertingNoDataOrNullValues](#alertingnodataornullvalues-property) | | string | | | [allowOrgCreate](#alloworgcreate-property) | | boolean | | | [appSubUrl](#appsuburl-property) | | string | | +| [appUrl](#appurl-property) | | string | | | [authProxyEnabled](#authproxyenabled-property) | | boolean | | | [autoAssignOrg](#autoassignorg-property) | | boolean | | | [bootData](#bootdata-property) | | any | | @@ -131,6 +132,14 @@ allowOrgCreate: boolean; appSubUrl: string; ``` +### appUrl property + +Signature + +```typescript +appUrl: string; +``` + ### authProxyEnabled property Signature diff --git a/docs/sources/packages_api/runtime/healthstatus.md b/docs/sources/packages_api/runtime/healthstatus.md index ac5d81eaa46..ddcf4647022 100644 --- a/docs/sources/packages_api/runtime/healthstatus.md +++ b/docs/sources/packages_api/runtime/healthstatus.md @@ -11,7 +11,7 @@ type = "docs" ### HealthStatus enum -Describes the current healt status of a data source plugin. +Describes the current health status of a data source plugin. Signature diff --git a/docs/sources/packages_api/runtime/registerechobackend.md b/docs/sources/packages_api/runtime/registerechobackend.md index 237737290c9..b4844cb7bd2 100644 --- a/docs/sources/packages_api/runtime/registerechobackend.md +++ b/docs/sources/packages_api/runtime/registerechobackend.md @@ -16,7 +16,7 @@ Used to register echo backends that will receive Grafana echo events during appl Signature ```typescript -registerEchoBackend: (backend: EchoBackend) => void +registerEchoBackend: (backend: EchoBackend) => void ``` Import diff --git a/docs/sources/packages_api/runtime/todataqueryerror.md b/docs/sources/packages_api/runtime/todataqueryerror.md index c815098d8ce..a890441cba2 100644 --- a/docs/sources/packages_api/runtime/todataqueryerror.md +++ b/docs/sources/packages_api/runtime/todataqueryerror.md @@ -11,7 +11,7 @@ type = "docs" ### 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 Signature diff --git a/docs/sources/packages_api/ui/_index.md b/docs/sources/packages_api/ui/_index.md index 62163dac3ee..b055871a978 100644 --- a/docs/sources/packages_api/ui/_index.md +++ b/docs/sources/packages_api/ui/_index.md @@ -36,8 +36,10 @@ A library containing the different design components of the Grafana ecosystem. | [PopoverController](./popovercontroller/) | | | [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. | +| [SelectValueEditor](./selectvalueeditor/) | | | [SetInterval](./setinterval/) | | | [StatsPicker](./statspicker/) | | +| [StringArrayEditor](./stringarrayeditor/) | | | [TableInputCSV](./tableinputcsv/) | Expects the container div to have size set and will fill it 100% | | [TagsInput](./tagsinput/) | | | [ToggleButtonGroup](./togglebuttongroup/) | | @@ -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 | | [FadeTransition(props)](./fadetransition/) | | | [Form({ defaultValues, onSubmit, validateOnMount, validateFieldsOnMount, children, validateOn, maxWidth, })](./form/) | | +| [getScrollbarWidth()](./getscrollbarwidth/) | | | [getTagColor(index)](./gettagcolor/) | | | [getTagColorsFromName(name)](./gettagcolorsfromname/) | Returns tag badge background and border colors based on hashed tag name. | | [IndentationPlugin()](./indentationplugin/) | | @@ -89,7 +92,6 @@ A library containing the different design components of the Grafana ecosystem. | [SegmentSelect({ value, options, onChange, onClickOutside, width, noOptionsMessage, allowCustomValue, })](./segmentselect/) | | | [Select(props)](./select/) | | | [SelectionShortcutsPlugin()](./selectionshortcutsplugin/) | | -| [SelectValueEditor({ value, onChange, item, })](./selectvalueeditor/) | | | [sharedSingleStatMigrationHandler(panel)](./sharedsinglestatmigrationhandler/) | | | [sharedSingleStatPanelChangedHandler(panel, prevPluginId, prevOptions)](./sharedsinglestatpanelchangedhandler/) | | | [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. | [SingleStatBaseOptions](./singlestatbaseoptions/) | | | [StyleProps](./styleprops/) | | | [SuggestionsState](./suggestionsstate/) | | +| [TableSortByFieldState](./tablesortbyfieldstate/) | | | [Themeable](./themeable/) | | | [Token](./token/) | | | [TypeaheadInput](./typeaheadinput/) | | @@ -149,6 +152,7 @@ A library containing the different design components of the Grafana ecosystem. | [CallToActionCard](./calltoactioncard/) | | | [Chart](./chart/) | | | [Checkbox](./checkbox/) | | +| [CodeEditor](./codeeditor/) | | | [Collapse](./collapse/) | | | [ColorPicker](./colorpicker/) | | | [colors](./colors/) | | @@ -171,6 +175,8 @@ A library containing the different design components of the Grafana ecosystem. | [Field](./field/) | | | [FieldConfigItemHeaderTitle](./fieldconfigitemheadertitle/) | | | [fieldMatchersUI](./fieldmatchersui/) | | +| [FieldSet](./fieldset/) | | +| [FileUpload](./fileupload/) | | | [FilterPill](./filterpill/) | | | [FullWidthButtonContainer](./fullwidthbuttoncontainer/) | | | [getAvailableIcons](./getavailableicons/) | | @@ -244,6 +250,7 @@ A library containing the different design components of the Grafana ecosystem. | [ThemeContext](./themecontext/) | | | [TimeOfDayPicker](./timeofdaypicker/) | | | [TimeRangePicker](./timerangepicker/) | | +| [TimeZonePicker](./timezonepicker/) | | | [ToggleButton](./togglebutton/) | | | [Tooltip](./tooltip/) | | | [useStyles](./usestyles/) | Hook for using memoized styles with access to the theme. | diff --git a/docs/sources/packages_api/ui/checkbox.md b/docs/sources/packages_api/ui/checkbox.md index 76f675e765d..3dd8fd24fae 100644 --- a/docs/sources/packages_api/ui/checkbox.md +++ b/docs/sources/packages_api/ui/checkbox.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -Checkbox: React.ForwardRefExoticComponent & React.RefAttributes> +Checkbox: React.ForwardRefExoticComponent & React.RefAttributes> ``` Import diff --git a/docs/sources/packages_api/ui/clickoutsidewrapper.md b/docs/sources/packages_api/ui/clickoutsidewrapper.md index da268a99249..74630f958b4 100644 --- a/docs/sources/packages_api/ui/clickoutsidewrapper.md +++ b/docs/sources/packages_api/ui/clickoutsidewrapper.md @@ -23,6 +23,7 @@ import { ClickOutsideWrapper } from '@grafana/ui'; | Property | Modifiers | Type | Description | | --- | --- | --- | --- | +| [defaultProps](#defaultprops-property) | static | {
includeButtonPress: boolean;
} | | | [onOutsideClick](#onoutsideclick-property) | | (event: any) => void | | | [state](#state-property) | | {
hasEventListener: boolean;
} | | @@ -34,6 +35,16 @@ import { ClickOutsideWrapper } from '@grafana/ui'; | [componentWillUnmount()](#componentwillunmount-method) | | | | [render()](#render-method) | | | +### defaultProps property + +Signature + +```typescript +static defaultProps: { + includeButtonPress: boolean; + }; +``` + ### onOutsideClick property Signature diff --git a/docs/sources/packages_api/ui/codeeditor.md b/docs/sources/packages_api/ui/codeeditor.md new file mode 100644 index 00000000000..7efd1c8f599 --- /dev/null +++ b/docs/sources/packages_api/ui/codeeditor.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +CodeEditor: React.FC +``` +Import + +```typescript +import { CodeEditor } from '@grafana/ui'; +``` diff --git a/docs/sources/packages_api/ui/colorpicker.md b/docs/sources/packages_api/ui/colorpicker.md index ef75ae68161..9db04b5efbb 100644 --- a/docs/sources/packages_api/ui/colorpicker.md +++ b/docs/sources/packages_api/ui/colorpicker.md @@ -16,7 +16,7 @@ type = "docs" ```typescript ColorPicker: React.FunctionComponent & { children?: ColorPickerTriggerRenderer | undefined; -}, "onChange" | "color" | "children" | "onColorChange" | "enableNamedColors" | "customPickers" | "updatePopperPosition">> +}, "color" | "onChange" | "children" | "onColorChange" | "enableNamedColors" | "customPickers" | "updatePopperPosition">> ``` Import diff --git a/docs/sources/packages_api/ui/customscrollbar.md b/docs/sources/packages_api/ui/customscrollbar.md index b8df0424ab2..7120d343257 100644 --- a/docs/sources/packages_api/ui/customscrollbar.md +++ b/docs/sources/packages_api/ui/customscrollbar.md @@ -32,10 +32,10 @@ import { CustomScrollbar } from '@grafana/ui'; | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [defaultProps](#defaultprops-property) | static | Partial<Props> | | -| [renderThumb](#renderthumb-property) | | (thumb: "thumb-horizontal" | "thumb-vertical", passedProps: any) => JSX.Element | | +| [renderThumb](#renderthumb-property) | | (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element | | | [renderThumbHorizontal](#renderthumbhorizontal-property) | | (passedProps: any) => JSX.Element | | | [renderThumbVertical](#renderthumbvertical-property) | | (passedProps: any) => JSX.Element | | -| [renderTrack](#rendertrack-property) | | (track: "track-vertical" | "track-horizontal", hideTrack: boolean | undefined, passedProps: any) => JSX.Element | | +| [renderTrack](#rendertrack-property) | | (track: 'track-vertical' | 'track-horizontal', hideTrack: boolean | undefined, passedProps: any) => JSX.Element | | | [renderTrackHorizontal](#rendertrackhorizontal-property) | | (passedProps: any) => JSX.Element | | | [renderTrackVertical](#rendertrackvertical-property) | | (passedProps: any) => JSX.Element | | | [renderView](#renderview-property) | | (passedProps: any) => JSX.Element | | @@ -78,7 +78,7 @@ static defaultProps: Partial; Signature ```typescript -renderThumb: (thumb: "thumb-horizontal" | "thumb-vertical", passedProps: any) => JSX.Element; +renderThumb: (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element; ``` ### renderThumbHorizontal property @@ -102,7 +102,7 @@ renderThumbVertical: (passedProps: any) => JSX.Element; Signature ```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 diff --git a/docs/sources/packages_api/ui/fieldset.md b/docs/sources/packages_api/ui/fieldset.md new file mode 100644 index 00000000000..3f7353a4bc8 --- /dev/null +++ b/docs/sources/packages_api/ui/fieldset.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +FieldSet: FC +``` +Import + +```typescript +import { FieldSet } from '@grafana/ui'; +``` diff --git a/docs/sources/packages_api/ui/fileupload.md b/docs/sources/packages_api/ui/fileupload.md new file mode 100644 index 00000000000..6d558f77aef --- /dev/null +++ b/docs/sources/packages_api/ui/fileupload.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +FileUpload: FC +``` +Import + +```typescript +import { FileUpload } from '@grafana/ui'; +``` diff --git a/docs/sources/packages_api/ui/formapi.md b/docs/sources/packages_api/ui/formapi.md index 6acb3d9070b..e77e58470f0 100644 --- a/docs/sources/packages_api/ui/formapi.md +++ b/docs/sources/packages_api/ui/formapi.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -export declare type FormAPI = Pick, 'register' | 'errors' | 'control' | 'formState' | 'getValues'>; +export declare type FormAPI = Pick, 'register' | 'errors' | 'control' | 'formState' | 'getValues' | 'watch'>; ``` Import diff --git a/docs/sources/packages_api/ui/getscrollbarwidth.md b/docs/sources/packages_api/ui/getscrollbarwidth.md new file mode 100644 index 00000000000..5cd181acae8 --- /dev/null +++ b/docs/sources/packages_api/ui/getscrollbarwidth.md @@ -0,0 +1,27 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +export declare function getScrollbarWidth(): number; +``` +Import + +```typescript +import { getScrollbarWidth } from '@grafana/ui'; +``` +Returns: + +`number` + diff --git a/docs/sources/packages_api/ui/getstandardfieldconfigs.md b/docs/sources/packages_api/ui/getstandardfieldconfigs.md index f2c5b19eada..0c596738799 100644 --- a/docs/sources/packages_api/ui/getstandardfieldconfigs.md +++ b/docs/sources/packages_api/ui/getstandardfieldconfigs.md @@ -16,7 +16,7 @@ Returns collection of common field config properties definitions Signature ```typescript -getStandardFieldConfigs: () => (FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem)[] +getStandardFieldConfigs: () => (FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem | FieldConfigPropertyItem[], StringFieldConfigSettings>)[] ``` Import diff --git a/docs/sources/packages_api/ui/getstandardoptioneditors.md b/docs/sources/packages_api/ui/getstandardoptioneditors.md index 4de4fe67224..5911af675d6 100644 --- a/docs/sources/packages_api/ui/getstandardoptioneditors.md +++ b/docs/sources/packages_api/ui/getstandardoptioneditors.md @@ -16,7 +16,7 @@ Returns collection of standard option editors definitions Signature ```typescript -getStandardOptionEditors: () => (StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem)[] +getStandardOptionEditors: () => (StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem | StandardEditorsRegistryItem[], any> | StandardEditorsRegistryItem)[] ``` Import diff --git a/docs/sources/packages_api/ui/input.md b/docs/sources/packages_api/ui/input.md index 969fd5f556d..f26f731b1ff 100644 --- a/docs/sources/packages_api/ui/input.md +++ b/docs/sources/packages_api/ui/input.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -Input: React.ForwardRefExoticComponent & React.RefAttributes> +Input: React.ForwardRefExoticComponent & React.RefAttributes> ``` Import diff --git a/docs/sources/packages_api/ui/logrows.md b/docs/sources/packages_api/ui/logrows.md index 6a4b862d843..e5dc2eef371 100644 --- a/docs/sources/packages_api/ui/logrows.md +++ b/docs/sources/packages_api/ui/logrows.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -LogRows: React.FunctionComponent> +LogRows: React.FunctionComponent> ``` Import diff --git a/docs/sources/packages_api/ui/popovercontroller.md b/docs/sources/packages_api/ui/popovercontroller.md index 0e433fe891e..9d31c4a43c8 100644 --- a/docs/sources/packages_api/ui/popovercontroller.md +++ b/docs/sources/packages_api/ui/popovercontroller.md @@ -19,40 +19,19 @@ declare class PopoverController extends React.Component ```typescript import { PopoverController } from '@grafana/ui'; ``` -Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [constructor(props)](#constructor-props) | | Constructs a new instance of the PopoverController class | - Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [hidePopper](#hidepopper-property) | | () => void | | | [showPopper](#showpopper-property) | | () => void | | +| [state](#state-property) | | {
show: boolean;
} | | Methods | Method | Modifiers | Description | | --- | --- | --- | | [render()](#render-method) | | | -| [UNSAFE\_componentWillReceiveProps(nextProps)](#unsafe_componentwillreceiveprops-method) | | | - -### constructor(props) - -Constructs a new instance of the `PopoverController` class - -Signature - -```typescript -constructor(props: Props); -``` -Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| props | Props | | ### hidePopper property @@ -70,6 +49,16 @@ hidePopper: () => void; showPopper: () => void; ``` +### state property + +Signature + +```typescript +state: { + show: boolean; + }; +``` + ### render method Signature @@ -81,20 +70,3 @@ render(): JSX.Element; `JSX.Element` -### UNSAFE\_componentWillReceiveProps method - -Signature - -```typescript -UNSAFE_componentWillReceiveProps(nextProps: Props): void; -``` -Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| nextProps | Props | | - -Returns: - -`void` - diff --git a/docs/sources/packages_api/ui/refreshpicker.md b/docs/sources/packages_api/ui/refreshpicker.md index 600d4f0b17b..a5dd63aa3bb 100644 --- a/docs/sources/packages_api/ui/refreshpicker.md +++ b/docs/sources/packages_api/ui/refreshpicker.md @@ -15,15 +15,9 @@ type = "docs" ```typescript RefreshPicker: React.FunctionComponent> & { - offOption: { - label: string; - value: string; - }; - liveOption: { - label: string; - value: string; - }; - isLive: (refreshInterval?: string | undefined) => boolean; + offOption: typeof RefreshPickerBase.offOption; + liveOption: typeof RefreshPickerBase.liveOption; + isLive: typeof RefreshPickerBase.isLive; } ``` Import diff --git a/docs/sources/packages_api/ui/selectvalueeditor.md b/docs/sources/packages_api/ui/selectvalueeditor.md index e3b79736bb5..b0c6767e0da 100644 --- a/docs/sources/packages_api/ui/selectvalueeditor.md +++ b/docs/sources/packages_api/ui/selectvalueeditor.md @@ -7,27 +7,85 @@ keywords = ["grafana","documentation","sdk","@grafana/ui"] type = "docs" +++ -## SelectValueEditor() function - -### SelectValueEditor() function +## SelectValueEditor class Signature ```typescript -export declare function SelectValueEditor({ value, onChange, item, }: FieldConfigEditorProps>): JSX.Element; +export declare class SelectValueEditor extends React.PureComponent, State> ``` Import ```typescript import { SelectValueEditor } from '@grafana/ui'; ``` +Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [state](#state-property) | | State<T> | | +| [updateOptions](#updateoptions-property) | | () => Promise<void> | | + +Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [componentDidMount()](#componentdidmount-method) | | | +| [componentDidUpdate(oldProps)](#componentdidupdate-method) | | | +| [render()](#render-method) | | | + +### state property + +Signature + +```typescript +state: State; +``` + +### updateOptions property + +Signature + +```typescript +updateOptions: () => Promise; +``` + +### componentDidMount method + +Signature + +```typescript +componentDidMount(): void; +``` +Returns: + +`void` + +### componentDidUpdate method + +Signature + +```typescript +componentDidUpdate(oldProps: Props): void; +``` Parameters | Parameter | Type | Description | | --- | --- | --- | -| { value, onChange, item, } | FieldConfigEditorProps<T, SelectFieldConfigSettings<T>> | | +| oldProps | Props<T> | | Returns: +`void` + +### render method + +Signature + +```typescript +render(): JSX.Element; +``` +Returns: + `JSX.Element` diff --git a/docs/sources/packages_api/ui/seriescolorpicker.md b/docs/sources/packages_api/ui/seriescolorpicker.md index 19396c9dcf4..825a365c37f 100644 --- a/docs/sources/packages_api/ui/seriescolorpicker.md +++ b/docs/sources/packages_api/ui/seriescolorpicker.md @@ -16,7 +16,7 @@ type = "docs" ```typescript SeriesColorPicker: React.FunctionComponent> +}, "color" | "onChange" | "children" | "onColorChange" | "enableNamedColors" | "updatePopperPosition" | "yaxis" | "onToggleAxis">> ``` Import diff --git a/docs/sources/packages_api/ui/seriescolorpickerpopoverwiththeme.md b/docs/sources/packages_api/ui/seriescolorpickerpopoverwiththeme.md index bd2380f31f5..9e3372e00ea 100644 --- a/docs/sources/packages_api/ui/seriescolorpickerpopoverwiththeme.md +++ b/docs/sources/packages_api/ui/seriescolorpickerpopoverwiththeme.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -SeriesColorPickerPopoverWithTheme: React.FunctionComponent> +SeriesColorPickerPopoverWithTheme: React.FunctionComponent> ``` Import diff --git a/docs/sources/packages_api/ui/stringarrayeditor.md b/docs/sources/packages_api/ui/stringarrayeditor.md new file mode 100644 index 00000000000..97018859abe --- /dev/null +++ b/docs/sources/packages_api/ui/stringarrayeditor.md @@ -0,0 +1,72 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "StringArrayEditor" +keywords = ["grafana","documentation","sdk","@grafana/ui"] +type = "docs" ++++ + +## StringArrayEditor class + +Signature + +```typescript +export declare class StringArrayEditor extends React.PureComponent +``` +Import + +```typescript +import { StringArrayEditor } from '@grafana/ui'; +``` +Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [onRemoveString](#onremovestring-property) | | (index: number) => void | | +| [onValueChange](#onvaluechange-property) | | (e: React.SyntheticEvent, idx: number) => void | | +| [state](#state-property) | | {
showAdd: boolean;
} | | + +Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [render()](#render-method) | | | + +### onRemoveString property + +Signature + +```typescript +onRemoveString: (index: number) => void; +``` + +### onValueChange property + +Signature + +```typescript +onValueChange: (e: React.SyntheticEvent, idx: number) => void; +``` + +### state property + +Signature + +```typescript +state: { + showAdd: boolean; + }; +``` + +### render method + +Signature + +```typescript +render(): JSX.Element; +``` +Returns: + +`JSX.Element` + diff --git a/docs/sources/packages_api/ui/switch.md b/docs/sources/packages_api/ui/switch.md index d19f1817407..70937589a34 100644 --- a/docs/sources/packages_api/ui/switch.md +++ b/docs/sources/packages_api/ui/switch.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -Switch: React.ForwardRefExoticComponent & React.RefAttributes> +Switch: React.ForwardRefExoticComponent & React.RefAttributes> ``` Import diff --git a/docs/sources/packages_api/ui/tab.md b/docs/sources/packages_api/ui/tab.md index cf08e158839..e348be982ce 100644 --- a/docs/sources/packages_api/ui/tab.md +++ b/docs/sources/packages_api/ui/tab.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -Tab: React.ForwardRefExoticComponent & React.RefAttributes> +Tab: React.ForwardRefExoticComponent & React.RefAttributes> ``` Import diff --git a/docs/sources/packages_api/ui/tablesortbyfieldstate.md b/docs/sources/packages_api/ui/tablesortbyfieldstate.md new file mode 100644 index 00000000000..b832b5f7e3e --- /dev/null +++ b/docs/sources/packages_api/ui/tablesortbyfieldstate.md @@ -0,0 +1,43 @@ ++++ +# ----------------------------------------------------------------------- +# Do not edit this file. It is automatically generated by API Documenter. +# ----------------------------------------------------------------------- +title = "TableSortByFieldState" +keywords = ["grafana","documentation","sdk","@grafana/ui"] +type = "docs" ++++ + +## TableSortByFieldState interface + +Signature + +```typescript +export interface TableSortByFieldState +``` +Import + +```typescript +import { TableSortByFieldState } from '@grafana/ui'; +``` +Properties + +| Property | Type | Description | +| --- | --- | --- | +| [desc](#desc-property) | boolean | | +| [displayName](#displayname-property) | string | | + +### desc property + +Signature + +```typescript +desc?: boolean; +``` + +### displayName property + +Signature + +```typescript +displayName: string; +``` diff --git a/docs/sources/packages_api/ui/tagsinput.md b/docs/sources/packages_api/ui/tagsinput.md index 608792b603f..9895d836263 100644 --- a/docs/sources/packages_api/ui/tagsinput.md +++ b/docs/sources/packages_api/ui/tagsinput.md @@ -29,10 +29,10 @@ import { TagsInput } from '@grafana/ui'; | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [onAdd](#onadd-property) | | (event: React.MouseEvent<Element, MouseEvent>) => void | | +| [onAdd](#onadd-property) | | (event: React.MouseEvent) => void | | | [onChange](#onchange-property) | | () => void | | -| [onKeyboardAdd](#onkeyboardadd-property) | | (event: React.KeyboardEvent<Element>) => void | | -| [onNameChange](#onnamechange-property) | | (event: React.ChangeEvent<HTMLInputElement>) => void | | +| [onKeyboardAdd](#onkeyboardadd-property) | | (event: KeyboardEvent) => void | | +| [onNameChange](#onnamechange-property) | | (event: ChangeEvent<HTMLInputElement>) => void | | | [onRemove](#onremove-property) | | (tagToRemove: string) => void | | | [setNewTags](#setnewtags-property) | | () => void | | @@ -62,7 +62,7 @@ constructor(props: Props); Signature ```typescript -onAdd: (event: React.MouseEvent) => void; +onAdd: (event: React.MouseEvent) => void; ``` ### onChange property @@ -78,7 +78,7 @@ onChange: () => void; Signature ```typescript -onKeyboardAdd: (event: React.KeyboardEvent) => void; +onKeyboardAdd: (event: KeyboardEvent) => void; ``` ### onNameChange property @@ -86,7 +86,7 @@ onKeyboardAdd: (event: React.KeyboardEvent) => void; Signature ```typescript -onNameChange: (event: React.ChangeEvent) => void; +onNameChange: (event: ChangeEvent) => void; ``` ### onRemove property diff --git a/docs/sources/packages_api/ui/textarea.md b/docs/sources/packages_api/ui/textarea.md index 931664116fa..ae9f05934b2 100644 --- a/docs/sources/packages_api/ui/textarea.md +++ b/docs/sources/packages_api/ui/textarea.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -TextArea: React.ForwardRefExoticComponent & React.RefAttributes> +TextArea: React.ForwardRefExoticComponent & React.RefAttributes> ``` Import diff --git a/docs/sources/packages_api/ui/timerangepicker.md b/docs/sources/packages_api/ui/timerangepicker.md index f1dfc61ab29..7168d1f64bd 100644 --- a/docs/sources/packages_api/ui/timerangepicker.md +++ b/docs/sources/packages_api/ui/timerangepicker.md @@ -14,7 +14,7 @@ type = "docs" Signature ```typescript -TimeRangePicker: React.FunctionComponent> +TimeRangePicker: React.FunctionComponent> ``` Import diff --git a/docs/sources/packages_api/ui/timezonepicker.md b/docs/sources/packages_api/ui/timezonepicker.md new file mode 100644 index 00000000000..eb5ef9ad286 --- /dev/null +++ b/docs/sources/packages_api/ui/timezonepicker.md @@ -0,0 +1,23 @@ ++++ +# ----------------------------------------------------------------------- +# 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 + +Signature + +```typescript +TimeZonePicker: React.FC +``` +Import + +```typescript +import { TimeZonePicker } from '@grafana/ui'; +```