mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ElasticSearch: Neaten up vars/consts (#91989)
ElasticSearch: neaten up vars/consts
This commit is contained in:
@@ -46,6 +46,7 @@ const (
|
||||
)
|
||||
|
||||
var searchWordsRegex = regexp.MustCompile(regexp.QuoteMeta(es.HighlightPreTagsString) + `(.*?)` + regexp.QuoteMeta(es.HighlightPostTagsString))
|
||||
var aliasPatternRegex = regexp.MustCompile(`\{\{([\s\S]+?)\}\}`)
|
||||
|
||||
func parseResponse(ctx context.Context, responses []*es.SearchResponse, targets []*Query, configuredFields es.ConfiguredFields, keepLabelsInResponse bool, logger log.Logger) (*backend.QueryDataResponse, error) {
|
||||
result := backend.QueryDataResponse{
|
||||
@@ -923,8 +924,6 @@ func nameFields(queryResult backend.DataResponse, target *Query, keepLabelsInRes
|
||||
}
|
||||
}
|
||||
|
||||
var aliasPatternRegex = regexp.MustCompile(`\{\{([\s\S]+?)\}\}`)
|
||||
|
||||
func getFieldName(dataField data.Field, target *Query, metricTypeCount int) string {
|
||||
metricType := dataField.Labels["metric"]
|
||||
metricName := getMetricName(metricType)
|
||||
|
||||
Reference in New Issue
Block a user