Convert annotations to dataframes (#31400)

* Stop using transformation to tables

* Update datasource.ts to parse from dataframes

* Add test on transformToDataframe func

* Remove parseResponse and do the work inside parseToAnnotations method

* Name the dataframe after the RefID

* Small fix when mapping to annotation

* Add tests in annotation_query_test.go class

* Small fix in loop iteration

* Change for loop signature
This commit is contained in:
Dimitris Sotirakis
2021-02-25 18:29:17 +02:00
committed by GitHub
parent 27c143ef9b
commit 554055e39d
4 changed files with 77 additions and 30 deletions
@@ -28,6 +28,7 @@ func (e *CloudMonitoringExecutor) executeAnnotationQuery(ctx context.Context, ts
title := metricQuery.Get("title").MustString()
text := metricQuery.Get("text").MustString()
tags := metricQuery.Get("tags").MustString()
err = queries[0].parseToAnnotations(queryRes, resp, title, text, tags)
result.Results[firstQuery.RefId] = queryRes