mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: Add unwrap with conversion function to builder (#52639)
* Loki: Add unwrap with conversion operator to builder * Update explain section * Update test
This commit is contained in:
@@ -323,16 +323,21 @@ function handleUnwrapExpr(
|
||||
}
|
||||
|
||||
if (unwrapChild) {
|
||||
if (unwrapChild?.nextSibling?.type.name === 'ConvOp') {
|
||||
if (unwrapChild.nextSibling?.type.name === 'ConvOp') {
|
||||
const convOp = unwrapChild.nextSibling;
|
||||
const identifier = convOp.nextSibling;
|
||||
return {
|
||||
error: 'Unwrap with conversion operator not supported in query builder',
|
||||
operation: {
|
||||
id: 'unwrap',
|
||||
params: [getString(expr, identifier), getString(expr, convOp)],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
operation: {
|
||||
id: 'unwrap',
|
||||
params: [getString(expr, unwrapChild?.nextSibling)],
|
||||
params: [getString(expr, unwrapChild?.nextSibling), ''],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user