Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Registry class
Signature
export declare class Registry<T extends RegistryItem>
Import
import { Registry } from '@grafana/data';
Constructors
Properties
Methods
constructor(init)
Constructs a new instance of the Registry
class
Signature
constructor(init?: (() => T[]) | undefined);
Parameters
setInit property
Signature
setInit: (init: () => T[]) => void;
get method
Signature
get(id: string): T;
Parameters
Returns:
T
getIfExists method
Signature
getIfExists(id: string | undefined): T | undefined;
Parameters
Returns:
T | undefined
isEmpty method
Signature
isEmpty(): boolean;
Returns:
boolean
list method
Return a list of values by ID, or all values if not specified
Signature
list(ids?: any[]): T[];
Parameters
Returns:
T[]
register method
Signature
register(ext: T): void;
Parameters
Returns:
void
selectOptions method
Signature
selectOptions(current?: string[], filter?: (ext: T) => boolean): RegistrySelectInfo;
Parameters
Returns:
RegistrySelectInfo