C# 클래스 GrafanaAdapters.AnnotationExtensions

Grafana Annotation extensions class.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
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