Skip to content

Commit 20d4c41

Browse files
committed
updated carsharing
1 parent b54ccaf commit 20d4c41

File tree

1 file changed

+114
-19
lines changed

1 file changed

+114
-19
lines changed

provisioning/dashboards/carsharing.json

+114-19
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,70 @@
2222
"links": [],
2323
"liveNow": false,
2424
"panels": [
25+
{
26+
"datasource": {
27+
"default": true,
28+
"type": "timeplus-proton-datasource",
29+
"uid": "proton-ds"
30+
},
31+
"fieldConfig": {
32+
"defaults": {
33+
"color": {
34+
"mode": "thresholds"
35+
},
36+
"mappings": [],
37+
"thresholds": {
38+
"mode": "absolute",
39+
"steps": [
40+
{
41+
"color": "green",
42+
"value": null
43+
},
44+
{
45+
"color": "red",
46+
"value": 80
47+
}
48+
]
49+
}
50+
},
51+
"overrides": []
52+
},
53+
"gridPos": {
54+
"h": 8,
55+
"w": 24,
56+
"x": 0,
57+
"y": 0
58+
},
59+
"id": 5,
60+
"options": {
61+
"colorMode": "value",
62+
"graphMode": "area",
63+
"justifyMode": "auto",
64+
"orientation": "auto",
65+
"percentChangeColorMode": "standard",
66+
"reduceOptions": {
67+
"calcs": ["lastNotNull"],
68+
"fields": "",
69+
"values": false
70+
},
71+
"showPercentChange": false,
72+
"textMode": "auto",
73+
"wideLayout": true
74+
},
75+
"pluginVersion": "11.2.2",
76+
"targets": [
77+
{
78+
"datasource": {
79+
"type": "timeplus-proton-datasource",
80+
"uid": "proton-ds"
81+
},
82+
"refId": "A",
83+
"sql": "select count(*) from table(bookings) where _tp_time < to_datetime($__to/1000) and _tp_time > to_datetime($__from/1000) and cid='$cid'"
84+
}
85+
],
86+
"title": "Total bookings for car $cid between $__from and $__to",
87+
"type": "stat"
88+
},
2589
{
2690
"datasource": {
2791
"type": "timeplus-proton-datasource",
@@ -57,7 +121,7 @@
57121
"h": 6,
58122
"w": 3,
59123
"x": 0,
60-
"y": 0
124+
"y": 8
61125
},
62126
"id": 1,
63127
"options": {
@@ -70,16 +134,16 @@
70134
},
71135
"showHeader": true
72136
},
73-
"pluginVersion": "10.2.3",
137+
"pluginVersion": "11.2.2",
74138
"targets": [
75139
{
76140
"addNow": false,
77141
"datasource": {
78142
"type": "timeplus-proton-datasource",
79143
"uid": "proton-ds"
80144
},
81-
"sql": "select now()",
82-
"refId": "A"
145+
"refId": "A",
146+
"sql": "select now()"
83147
}
84148
],
85149
"title": "select now()",
@@ -112,32 +176,34 @@
112176
"h": 6,
113177
"w": 7,
114178
"x": 3,
115-
"y": 0
179+
"y": 8
116180
},
117181
"id": 2,
118182
"options": {
119183
"colorMode": "value",
120184
"graphMode": "area",
121185
"justifyMode": "auto",
122186
"orientation": "auto",
187+
"percentChangeColorMode": "standard",
123188
"reduceOptions": {
124189
"calcs": ["lastNotNull"],
125190
"fields": "",
126191
"values": false
127192
},
193+
"showPercentChange": false,
128194
"textMode": "auto",
129195
"wideLayout": true
130196
},
131-
"pluginVersion": "10.2.3",
197+
"pluginVersion": "11.2.2",
132198
"targets": [
133199
{
134200
"addNow": false,
135201
"datasource": {
136202
"type": "timeplus-proton-datasource",
137203
"uid": "proton-ds"
138204
},
139-
"sql": "select count() from car_live_data",
140-
"refId": "A"
205+
"refId": "A",
206+
"sql": "select count() from car_live_data"
141207
}
142208
],
143209
"title": "select count() from car_live_data",
@@ -170,32 +236,34 @@
170236
"h": 6,
171237
"w": 14,
172238
"x": 10,
173-
"y": 0
239+
"y": 8
174240
},
175241
"id": 3,
176242
"options": {
177243
"colorMode": "value",
178244
"graphMode": "area",
179245
"justifyMode": "auto",
180246
"orientation": "auto",
247+
"percentChangeColorMode": "standard",
181248
"reduceOptions": {
182249
"calcs": ["lastNotNull"],
183250
"fields": "",
184251
"values": false
185252
},
253+
"showPercentChange": false,
186254
"textMode": "auto",
187255
"wideLayout": true
188256
},
189-
"pluginVersion": "10.2.3",
257+
"pluginVersion": "11.2.2",
190258
"targets": [
191259
{
192260
"addNow": false,
193261
"datasource": {
194262
"type": "timeplus-proton-datasource",
195263
"uid": "proton-ds"
196264
},
197-
"sql": "select count() from car_live_data where _tp_time>earliest_ts()",
198-
"refId": "A"
265+
"refId": "A",
266+
"sql": "select count() from car_live_data where _tp_time>earliest_ts()"
199267
}
200268
],
201269
"title": "select count() from car_live_data where _tp_time>earliest_ts()",
@@ -239,7 +307,7 @@
239307
"h": 9,
240308
"w": 24,
241309
"x": 0,
242-
"y": 6
310+
"y": 14
243311
},
244312
"id": 4,
245313
"options": {
@@ -307,16 +375,16 @@
307375
"zoom": 12
308376
}
309377
},
310-
"pluginVersion": "10.2.3",
378+
"pluginVersion": "11.2.2",
311379
"targets": [
312380
{
313381
"addNow": false,
314382
"datasource": {
315383
"type": "timeplus-proton-datasource",
316384
"uid": "proton-ds"
317385
},
318-
"sql": "select longitude, latitude,speed_kmh,cid from car_live_data where cid like '%1'",
319-
"refId": "A"
386+
"refId": "A",
387+
"sql": "select longitude, latitude,speed_kmh,cid from car_live_data where cid like '%1'"
320388
}
321389
],
322390
"title": "Panel Title",
@@ -327,16 +395,43 @@
327395
"schemaVersion": 39,
328396
"tags": [],
329397
"templating": {
330-
"list": []
398+
"list": [
399+
{
400+
"current": {
401+
"selected": true,
402+
"text": "c00013",
403+
"value": "c00013"
404+
},
405+
"datasource": {
406+
"type": "timeplus-proton-datasource",
407+
"uid": "proton-ds"
408+
},
409+
"definition": "select cid from table(car_live_data)",
410+
"hide": 0,
411+
"includeAll": false,
412+
"label": "Car ID",
413+
"multi": false,
414+
"name": "cid",
415+
"options": [],
416+
"query": {
417+
"query": "select cid from table(car_live_data)"
418+
},
419+
"refresh": 1,
420+
"regex": "",
421+
"skipUrlSync": false,
422+
"sort": 0,
423+
"type": "query"
424+
}
425+
]
331426
},
332427
"time": {
333-
"from": "now-6h",
428+
"from": "now-1h",
334429
"to": "now"
335430
},
336431
"timepicker": {},
337432
"timezone": "",
338433
"title": "Carsharing Demo Dashboard",
339434
"uid": "dd9e271d-7225-47d4-9e57-62133db0df62",
340-
"version": 4,
435+
"version": 13,
341436
"weekStart": ""
342437
}

0 commit comments

Comments
 (0)