Skip to content

Commit b46b062

Browse files
Fix timeseries name and adhoc AND
1 parent 057d637 commit b46b062

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/backend_wasm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func applyAdhocFiltersWasm(this js.Value, args []js.Value) interface{} {
176176
// Replace $adhoc macro
177177
renderedCondition := "1"
178178
if len(adhocConditions) > 0 {
179-
renderedCondition = fmt.Sprintf("(%s)", strings.Join(adhocConditions, " AND "))
179+
renderedCondition = fmt.Sprintf("AND (%s)", strings.Join(adhocConditions, " AND "))
180180
}
181181

182182
query = strings.ReplaceAll(query, "$adhoc", renderedCondition)

pkg/response.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (r *Response) createFrameIfNotExistsAndAddPoint(query *Query, framesMap map
178178
timeStampDataFieldMap[frameName] = data.NewField(timestampFieldName, nil, []time.Time{})
179179
valueDataFieldMap[frameName] = NewDataFieldByType(frameName, fieldType)
180180
framesMap[frameName] = data.NewFrame(
181-
frameName,
181+
"",
182182
timeStampDataFieldMap[frameName],
183183
valueDataFieldMap[frameName],
184184
)

0 commit comments

Comments
 (0)