C# Класс GrafanaAdapters.AnnotationExtensions

Grafana Annotation extensions class.
Показать файл Открыть проект

Открытые методы

Метод Описание
ExtractQueryRequest ( this request, IEnumerable targets, int maxDataPoints ) : GrafanaAdapters.QueryRequest

Extracts a Grafana QueryRequest from an AnnotationRequest.

IsApplicable ( this type, double datapoint ) : bool

Determines if the data point is applicable for specified annotation type.

ParseQueryType ( this annotation, bool &useFilterExpression ) : AnnotationType

Parses query expression from annotation for annotation type.

ParseSourceDefinitions ( this annotation, AnnotationType type, DataSet source, bool useFilterExpression ) : DataRow>.Dictionary

Parses source definitions for an annotation query.

PopulateResponse ( this type, GrafanaAdapters.AnnotationResponse response, string target, DataRow definition, double datapoint, DataSet source ) : void

Populates an annotation response title, text and tags for specified annotation type.

TableName ( this type ) : string

Gets table name for specified annotation type.

TargetFieldName ( this type ) : string

Gets the target field name for Guid based point IDs for table used with specified annotation type.

Приватные методы

Метод Описание
GetAlarmCondition ( DataRow defintion ) : string
GetMetaData ( DataSet source, string table, string expression ) : DataRow
GetTargetFromGuid ( string guidID ) : MeasurementKey
GetTargetMetaData ( DataSet source, object value ) : DataRow
KeyFromTag ( this pointTag, DataSet source ) : MeasurementKey

Looks up measurement key from point tag.

This function uses the DataTable.Select(string) function which uses a linear search algorithm that can be slow for large data sets, it is recommended that any results for calls to this function be cached to improve performance.

TagFromKey ( this key, DataSet source ) : string

Looks up point tag from measurement key value.

This function uses the DataTable.Select(string) function which uses a linear search algorithm that can be slow for large data sets, it is recommended that any results for calls to this function be cached to improve performance.

Translate ( this tableName ) : string

Описание методов

ExtractQueryRequest() публичный статический Метод

Extracts a Grafana QueryRequest from an AnnotationRequest.
public static ExtractQueryRequest ( this request, IEnumerable targets, int maxDataPoints ) : GrafanaAdapters.QueryRequest
request this Annotation request.
targets IEnumerable List of desired targets.
maxDataPoints int Maximum points to return.
Результат GrafanaAdapters.QueryRequest

IsApplicable() публичный статический Метод

Determines if the data point is applicable for specified annotation type.
public static IsApplicable ( this type, double datapoint ) : bool
type this Annotation type.
datapoint double Time series values data point.
Результат bool

ParseQueryType() публичный статический Метод

Parses query expression from annotation for annotation type.
public static ParseQueryType ( this annotation, bool &useFilterExpression ) : AnnotationType
annotation this Grafana annotation.
useFilterExpression bool Determines if query is using a filter expression.
Результат AnnotationType

ParseSourceDefinitions() публичный статический Метод

Parses source definitions for an annotation query.
public static ParseSourceDefinitions ( this annotation, AnnotationType type, DataSet source, bool useFilterExpression ) : DataRow>.Dictionary
annotation this Grafana annotation.
type AnnotationType Annotation type.
source System.Data.DataSet Metadata of source definitions.
useFilterExpression bool Determines if query is using a filter expression.
Результат DataRow>.Dictionary

PopulateResponse() публичный статический Метод

Populates an annotation response title, text and tags for specified annotation type.
public static PopulateResponse ( this type, GrafanaAdapters.AnnotationResponse response, string target, DataRow definition, double datapoint, DataSet source ) : void
type this Annotation type.
response GrafanaAdapters.AnnotationResponse Annotation response.
target string Target of annotation response.
definition System.Data.DataRow Associated metadata definition for response.
datapoint double Time series values data point for response.
source System.Data.DataSet Metadata of source definitions.
Результат void

TableName() публичный статический Метод

Gets table name for specified annotation type.
public static TableName ( this type ) : string
type this Annotation type.
Результат string

TargetFieldName() публичный статический Метод

Gets the target field name for Guid based point IDs for table used with specified annotation type.
public static TargetFieldName ( this type ) : string
type this Annotation type.
Результат string