-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #568 from Altinity/issue-486
Fix display of complex ( object, map ) types
- Loading branch information
Showing
4 changed files
with
317 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
260 changes: 260 additions & 0 deletions
260
docker/grafana/dashboards/json_data_issues_486_189.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": { | ||
"type": "grafana", | ||
"uid": "-- Grafana --" | ||
}, | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"description": "JSON data display issue #486 #189", | ||
"editable": true, | ||
"fiscalYearStartMonth": 0, | ||
"graphTooltip": 0, | ||
"id": 40, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"datasource": { | ||
"type": "vertamedia-clickhouse-datasource", | ||
"uid": "P7E099F39B84EA795" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"axisBorderShow": false, | ||
"axisCenteredZero": false, | ||
"axisColorMode": "text", | ||
"axisLabel": "", | ||
"axisPlacement": "auto", | ||
"barAlignment": 0, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"insertNulls": false, | ||
"lineInterpolation": "linear", | ||
"lineWidth": 1, | ||
"pointSize": 5, | ||
"scaleDistribution": { | ||
"type": "linear" | ||
}, | ||
"showPoints": "auto", | ||
"spanNulls": false, | ||
"stacking": { | ||
"group": "A", | ||
"mode": "none" | ||
}, | ||
"thresholdsStyle": { | ||
"mode": "off" | ||
} | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"__systemRef": "hideSeriesFrom", | ||
"matcher": { | ||
"id": "byNames", | ||
"options": { | ||
"mode": "exclude", | ||
"names": [ | ||
"id1, {\"key1\":\"value1\",\"key2\":\"value2\"}" | ||
], | ||
"prefix": "All except:", | ||
"readOnly": true | ||
} | ||
}, | ||
"properties": [ | ||
{ | ||
"id": "custom.hideFrom", | ||
"value": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": true | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 12, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 1, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom", | ||
"showLegend": true | ||
}, | ||
"tooltip": { | ||
"maxHeight": 600, | ||
"mode": "single", | ||
"sort": "none" | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"add_metadata": true, | ||
"database": "test", | ||
"datasource": { | ||
"type": "vertamedia-clickhouse-datasource", | ||
"uid": "P7E099F39B84EA795" | ||
}, | ||
"dateTimeColDataType": "time", | ||
"dateTimeType": "DATETIME", | ||
"editorMode": "builder", | ||
"extrapolate": true, | ||
"format": "time_series", | ||
"formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", | ||
"interval": "", | ||
"intervalFactor": 1, | ||
"query": "SELECT\n $timeSeries as t,\n count(),\n id,\n attributes\nFROM $table\nWHERE $timeFilter\nGROUP BY\n t,\n id,\n attributes\nORDER BY t", | ||
"rawQuery": "/* grafana dashboard=New dashboard, user=0 */\nSELECT\n (intDiv(toUInt32(time), 20) * 20) * 1000 as t,\n count(),\n id,\n attributes\nFROM test.map_table\nWHERE time >= toDateTime(1718003664) AND time <= toDateTime(1718025264)\nGROUP BY\n t,\n id,\n attributes\nORDER BY t", | ||
"refId": "A", | ||
"round": "0s", | ||
"skip_comments": true, | ||
"table": "map_table" | ||
} | ||
], | ||
"title": "Issue #486 JSON data display", | ||
"type": "timeseries" | ||
}, | ||
{ | ||
"datasource": { | ||
"type": "vertamedia-clickhouse-datasource", | ||
"uid": "P7E099F39B84EA795" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "thresholds" | ||
}, | ||
"custom": { | ||
"align": "auto", | ||
"cellOptions": { | ||
"type": "json-view" | ||
}, | ||
"inspect": true | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 12, | ||
"x": 12, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"options": { | ||
"cellHeight": "sm", | ||
"footer": { | ||
"countRows": false, | ||
"fields": "", | ||
"reducer": [ | ||
"sum" | ||
], | ||
"show": false | ||
}, | ||
"showHeader": true, | ||
"sortBy": [ | ||
{ | ||
"desc": true, | ||
"displayName": "attributes" | ||
} | ||
] | ||
}, | ||
"pluginVersion": "11.0.0", | ||
"targets": [ | ||
{ | ||
"add_metadata": true, | ||
"database": "test", | ||
"datasource": { | ||
"type": "vertamedia-clickhouse-datasource", | ||
"uid": "P7E099F39B84EA795" | ||
}, | ||
"dateTimeColDataType": "time", | ||
"dateTimeType": "DATETIME", | ||
"editorMode": "builder", | ||
"extrapolate": true, | ||
"format": "table", | ||
"formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", | ||
"interval": "", | ||
"intervalFactor": 1, | ||
"query": "SELECT\n $timeSeries as t,\n count(),\n id,\n attributes\nFROM $table\nWHERE $timeFilter\nGROUP BY\n t,\n id,\n attributes\nORDER BY t", | ||
"rawQuery": "/* grafana dashboard=New dashboard, user=0 */\nSELECT\n (intDiv(toUInt32(time), 30) * 30) * 1000 as t,\n count(),\n id,\n attributes\nFROM test.map_table\nWHERE time >= toDateTime(1718003713) AND time <= toDateTime(1718025313)\nGROUP BY\n t,\n id,\n attributes\nORDER BY t", | ||
"refId": "A", | ||
"round": "0s", | ||
"skip_comments": true, | ||
"table": "map_table" | ||
} | ||
], | ||
"title": "Issue #189 JSON data display", | ||
"type": "table" | ||
} | ||
], | ||
"schemaVersion": 39, | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timeRangeUpdatedDuringEditOrView": false, | ||
"timepicker": {}, | ||
"timezone": "browser", | ||
"title": "JSON data display issue #486 #189", | ||
"uid": "ddod1z3iogbuof", | ||
"version": 1, | ||
"weekStart": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters