Update home dashboard

This commit is contained in:
xbgmsharp
2023-10-06 00:05:37 +02:00
parent 01c20651a4
commit f7724db62a

View File

@@ -24,8 +24,21 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": 7, "id": 5,
"links": [], "links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": true,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "New link",
"tooltip": "",
"type": "dashboards",
"url": ""
}
],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
@@ -53,7 +66,7 @@
"showStarred": true, "showStarred": true,
"tags": [] "tags": []
}, },
"pluginVersion": "10.1.0", "pluginVersion": "10.1.4",
"tags": [], "tags": [],
"targets": [ "targets": [
{ {
@@ -68,12 +81,39 @@
"type": "dashlist" "type": "dashlist"
}, },
{ {
"autoZoom": true,
"datasource": { "datasource": {
"type": "postgres", "type": "postgres",
"uid": "PCC52D03280B7034C" "uid": "PCC52D03280B7034C"
}, },
"defaultLayer": "OpenStreetMap", "fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": { "gridPos": {
"h": 13, "h": 13,
"w": 12, "w": 12,
@@ -81,11 +121,80 @@
"y": 0 "y": 0
}, },
"id": 5, "id": 5,
"lineColor": "red",
"maxDataPoints": 500, "maxDataPoints": 500,
"pointColor": "royalblue", "options": {
"scrollWheelZoom": false, "basemap": {
"showLayerChanger": true, "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": {
"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/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"filterData": {
"id": "byRefId",
"options": "A"
},
"location": {
"latitude": "value",
"longitude": "value",
"mode": "auto"
},
"name": "Boat",
"tooltip": true,
"type": "markers"
}
],
"tooltip": {
"mode": "details"
},
"view": {
"allLayers": true,
"id": "fit",
"lat": 0,
"lon": 0,
"zoom": 5
}
},
"pluginVersion": "10.1.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -95,7 +204,7 @@
"editorMode": "code", "editorMode": "code",
"format": "table", "format": "table",
"rawQuery": true, "rawQuery": true,
"rawSql": "SELECT \"latitude\" as value, $__time(time) FROM api.metrics WHERE $__timeFilter(time) ORDER BY time ASC;", "rawSql": "SELECT latitude, longitude FROM api.metrics WHERE vessel_id = '${boat}' ORDER BY time ASC LIMIT 1;",
"refId": "A", "refId": "A",
"sql": { "sql": {
"columns": [ "columns": [
@@ -114,39 +223,10 @@
], ],
"limit": 50 "limit": 50
} }
},
{
"datasource": {
"type": "postgres",
"uid": "PCC52D03280B7034C"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT \"longitude\" as value, $__time(time) FROM api.metrics WHERE $__timeFilter(time) ORDER BY time ASC;",
"refId": "B",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
} }
], ],
"title": "Location", "title": "Location",
"type": "pr0ps-trackmap-panel" "type": "geomap"
} }
], ],
"refresh": "", "refresh": "",
@@ -155,10 +235,27 @@
"style": "dark", "style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
"list": [] "list": [
{
"definition": "SET \"user.email\" = '${__user.email}';\nSET vessel.id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.vessel_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"description": "Vessel Name",
"hide": 0,
"includeAll": false,
"label": "Boat",
"multi": false,
"name": "boat",
"options": [],
"query": "SET \"user.email\" = '${__user.email}';\nSET vessel.id = '${__user.login}';\nSELECT\n v.name AS __text,\n m.vessel_id AS __value\n FROM auth.vessels v\n JOIN api.metadata m ON v.owner_email = '${__user.email}' and m.vessel_id = v.vessel_id;",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
}, },
"time": { "time": {
"from": "now-6h", "from": "now-90d",
"to": "now" "to": "now"
}, },
"timepicker": { "timepicker": {