diff --git a/Owntracks-1700830419043.json b/Owntracks-1700830419043.json new file mode 100644 index 0000000..875f996 --- /dev/null +++ b/Owntracks-1700830419043.json @@ -0,0 +1,281 @@ +{ + "__inputs": [ + { + "name": "DS_MYSQL_- OWNTRACKS", + "label": "MySQL - owntracks", + "description": "", + "type": "datasource", + "pluginId": "mysql", + "pluginName": "MySQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "geomap", + "name": "Geomap", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.2" + }, + { + "type": "datasource", + "id": "mysql", + "name": "MySQL", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL_- OWNTRACKS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 30 + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "green", + "value": 70 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true + }, + "layers": [ + { + "config": { + "showLegend": true, + "style": { + "color": { + "field": "batt", + "fixed": "dark-green" + }, + "opacity": 0.4, + "rotation": { + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "fixed": 5, + "max": 15, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/cross.svg", + "mode": "fixed" + }, + "symbolAlign": { + "horizontal": "center", + "vertical": "center" + }, + "text": { + "field": "batt", + "fixed": "", + "mode": "field" + }, + "textConfig": { + "fontSize": 12, + "offsetX": 0, + "offsetY": 0, + "textAlign": "right", + "textBaseline": "bottom" + } + } + }, + "location": { + "mode": "auto" + }, + "name": "Layer 1", + "tooltip": true, + "type": "markers" + } + ], + "tooltip": { + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "fit", + "lat": 52.2013, + "lon": 10.114725, + "zoom": 15 + } + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "dataset": "owntracks", + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL_- OWNTRACKS}" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT\n dt AS \"time\",\n lat,\n lon,\n batt\nFROM owntracks.locations\nWHERE\n $__timeFilter(dt) AND\n user = $user AND\n device = $device\nORDER BY dt", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "lat", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "recordings" + } + ], + "title": "Geräte", + "type": "geomap" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL_- OWNTRACKS}" + }, + "definition": "SELECT\n device\nFROM\n owntracks.locations", + "hide": 0, + "includeAll": false, + "label": "Gerät", + "multi": true, + "name": "device", + "options": [], + "query": "SELECT\n device\nFROM\n owntracks.locations", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "mysql", + "uid": "${DS_MYSQL_- OWNTRACKS}" + }, + "definition": "SELECT\n user\nFROM\n owntracks.locations", + "description": "", + "hide": 0, + "includeAll": false, + "label": "Benutzer", + "multi": true, + "name": "user", + "options": [], + "query": "SELECT\n user\nFROM\n owntracks.locations", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Owntracks", + "uid": "dbb80681-ef8e-4ce9-a47c-3c1fb432f4e9", + "version": 14, + "weekStart": "" +} \ No newline at end of file