QueryService: Use types from sdk (#84029)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"description": "self dependencies",
|
||||
"input": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"expression": "$B",
|
||||
"type": "math"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {
|
||||
"type": "",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"type": "math",
|
||||
"expression": "$A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {},
|
||||
"error": "cyclic references in query"
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"input": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "plugin-x",
|
||||
"uid": "123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {
|
||||
"type": "plugin-x",
|
||||
"uid": "456"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"requests": [
|
||||
{
|
||||
"pluginId": "plugin-x",
|
||||
"uid": "123",
|
||||
"request": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "plugin-x",
|
||||
"uid": "123"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"pluginId": "plugin-x",
|
||||
"uid": "456",
|
||||
"request": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {
|
||||
"type": "plugin-x",
|
||||
"uid": "456"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"description": "self dependencies",
|
||||
"input": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"type": "math",
|
||||
"expression": "$A"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {},
|
||||
"error": "expression [A] can not depend on itself"
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"description": "one hidden query with two expressions that start out-of-order",
|
||||
"input": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "C",
|
||||
"datasource": {
|
||||
"type": "",
|
||||
"uid": "__expr__"
|
||||
},
|
||||
"type": "reduce",
|
||||
"expression": "$B",
|
||||
"reducer": "last"
|
||||
},
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "sql",
|
||||
"uid": "123"
|
||||
},
|
||||
"hide": true
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {
|
||||
"type": "",
|
||||
"uid": "-100"
|
||||
},
|
||||
"type": "math",
|
||||
"expression": "$A + 10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"requests": [
|
||||
{
|
||||
"pluginId": "sql",
|
||||
"uid": "123",
|
||||
"request": {
|
||||
"from": "now-6",
|
||||
"to": "now",
|
||||
"queries": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {
|
||||
"type": "sql",
|
||||
"uid": "123"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"expressions": [
|
||||
{
|
||||
"id": 2,
|
||||
"refId": "B",
|
||||
"type": "math",
|
||||
"properties": {
|
||||
"expression": "$A + 10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"refId": "C",
|
||||
"type": "reduce",
|
||||
"properties": {
|
||||
"expression": "$B",
|
||||
"reducer": "last"
|
||||
}
|
||||
}
|
||||
],
|
||||
"hide": [
|
||||
"A"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user