mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* fixes so we match the transformer based on name properly. * changed the signature on the FieldMatcher. * introduced a names option so you can filter in name specificly. * changed so the matcher UI uses the new options format. * moved the exported functions together. * changing editors a bit. * made the filter by name work with both regex and name filtering. * fixed failing tests and make sure we always parse regex the same way. * removed unused code. * simplified to make the existing field overrides still working. * fixed issue reported by hugo. * added tests for the name matcher. * added tests for filter by name. * added more tests. * generated new version of the packages docs. * fixed spelling error. * regenerated the docs.
3.5 KiB
3.5 KiB
+++
-----------------------------------------------------------------------
Do not edit this file. It is automatically generated by API Documenter.
-----------------------------------------------------------------------
title = "FieldCache" keywords = ["grafana","documentation","sdk","@grafana/data"] type = "docs" +++
FieldCache class
Signature
export declare class FieldCache
Import
import { FieldCache } from '@grafana/data';
Constructors
Constructor | Modifiers | Description |
---|---|---|
constructor(data) | Constructs a new instance of the FieldCache class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
fields | FieldWithIndex[] |
Methods
Method | Modifiers | Description |
---|---|---|
getFieldByName(name) | Returns the first field with the given name. | |
getFields(type) | ||
getFirstFieldOfType(type, includeHidden) | ||
hasFieldNamed(name) | ||
hasFieldOfType(type) | ||
hasFieldWithNameAndType(name, type) |
constructor(data)
Constructs a new instance of the FieldCache
class
Signature
constructor(data: DataFrame);
Parameters
Parameter | Type | Description |
---|---|---|
data | DataFrame |
fields property
Signature
fields: FieldWithIndex[];
getFieldByName method
Returns the first field with the given name.
Signature
getFieldByName(name: string): FieldWithIndex | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Returns:
FieldWithIndex | undefined
getFields method
Signature
getFields(type?: FieldType): FieldWithIndex[];
Parameters
Parameter | Type | Description |
---|---|---|
type | FieldType |
Returns:
FieldWithIndex[]
getFirstFieldOfType method
Signature
getFirstFieldOfType(type: FieldType, includeHidden?: boolean): FieldWithIndex | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
type | FieldType |
|
includeHidden | boolean |
Returns:
FieldWithIndex | undefined
hasFieldNamed method
Signature
hasFieldNamed(name: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Returns:
boolean
hasFieldOfType method
Signature
hasFieldOfType(type: FieldType): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
type | FieldType |
Returns:
boolean
hasFieldWithNameAndType method
Signature
hasFieldWithNameAndType(name: string, type: FieldType): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
|
type | FieldType |
Returns:
boolean