Skip to content

Commit

Permalink
tested textbox variables with ${variable:sqlstring} format, fix #225
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed May 31, 2022
1 parent 9ab9d40 commit 45cd6fa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* remove INFORMATION_SCHEMA from adhoc control, fix https://github.com/Altinity/clickhouse-grafana/issues/426
* legacy binaries in dist folder after 2.4.4 release plugin name changed, fix https://github.com/Altinity/clickhouse-grafana/issues/419
* resolve corner case for `SELECT x IN (SELECT ...)`, fix https://github.com/Altinity/clickhouse-grafana/issues/421
* tested textbox variables with `${variable:sqlstring}` format, fix https://github.com/Altinity/clickhouse-grafana/issues/225

# 2.4.4 (2022-04-01)

Expand Down
38 changes: 33 additions & 5 deletions docker/grafana/dashboards/test_logs_support.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"iteration": 1654018129313,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": "clickhouse",
"description": "",
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "P7E099F39B84EA795"
},
"description": "reproduce https://github.com/Altinity/clickhouse-grafana/issues/125 and https://github.com/Altinity/clickhouse-grafana/issues/331",
"gridPos": {
"h": 9,
"w": 12,
Expand All @@ -47,6 +51,10 @@
"targets": [
{
"database": "default",
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "P7E099F39B84EA795"
},
"dateColDataType": "",
"dateLoading": false,
"dateTimeColDataType": "event_time",
Expand All @@ -55,9 +63,10 @@
"extrapolate": true,
"format": "logs",
"formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
"interval": "",
"intervalFactor": 1,
"query": "SELECT *\nFROM $table\nWHERE $timeFilter",
"rawQuery": "SELECT *\nFROM default.test_logs\nWHERE event_time >= toDateTime(1652167981) AND event_time <= toDateTime(1652189581)",
"query": "SELECT *\nFROM $table\n\nWHERE $timeFilter AND $adhoc\n$conditionalTest(AND content ILIKE ${filter:sqlstring},$filter)",
"rawQuery": "SELECT *\nFROM default.test_logs\n\nWHERE event_time >= toDateTime(1653997717) AND event_time <= toDateTime(1654019317) AND 1\n AND content ILIKE '%Info%line 11%' ",
"refId": "A",
"round": "0s",
"skip_comments": true,
Expand All @@ -81,9 +90,28 @@
},
"filters": [],
"hide": 0,
"name": "adhoc",
"name": "adhoc_variable",
"skipUrlSync": false,
"type": "adhoc"
},
{
"current": {
"selected": false,
"text": "%Info%line 11%",
"value": "%Info%line 11%"
},
"hide": 0,
"name": "filter",
"options": [
{
"selected": true,
"text": "%Info%line 11%",
"value": "%Info%line 11%"
}
],
"query": "%Info%line 11%",
"skipUrlSync": false,
"type": "textbox"
}
]
},
Expand Down

0 comments on commit 45cd6fa

Please sign in to comment.