dao-treasury 0.0.35__cp311-cp311-win_amd64.whl → 0.1.1__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dao-treasury might be problematic. Click here for more details.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +567 -0
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +569 -0
- dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -57
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +15 -27
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +286 -25
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +54 -71
- dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +172 -209
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +122 -142
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +941 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3931 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +89 -108
- dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
- dao_treasury/ENVIRONMENT_VARIABLES.py +12 -0
- dao_treasury/__init__.py +14 -4
- dao_treasury/_docker.cp311-win_amd64.pyd +0 -0
- dao_treasury/_docker.py +44 -23
- dao_treasury/_nicknames.cp311-win_amd64.pyd +0 -0
- dao_treasury/_nicknames.py +18 -2
- dao_treasury/_wallet.cp311-win_amd64.pyd +0 -0
- dao_treasury/constants.cp311-win_amd64.pyd +0 -0
- dao_treasury/constants.py +24 -0
- dao_treasury/db.py +409 -119
- dao_treasury/docker-compose.yaml +19 -3
- dao_treasury/main.py +44 -3
- dao_treasury/sorting/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/__init__.py +38 -21
- dao_treasury/sorting/_matchers.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/factory.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.py +8 -10
- dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.py +14 -2
- dao_treasury/treasury.py +37 -16
- dao_treasury/types.cp311-win_amd64.pyd +0 -0
- {dao_treasury-0.0.35.dist-info → dao_treasury-0.1.1.dist-info}/METADATA +19 -3
- dao_treasury-0.1.1.dist-info/RECORD +53 -0
- dao_treasury-0.1.1.dist-info/top_level.txt +2 -0
- dao_treasury__mypyc.cp311-win_amd64.pyd +0 -0
- bf2b4fe1f86ad2ea158b__mypyc.cp311-win_amd64.pyd +0 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -2018
- dao_treasury/streams/__init__.cp311-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.cp311-win_amd64.pyd +0 -0
- dao_treasury-0.0.35.dist-info/RECORD +0 -51
- dao_treasury-0.0.35.dist-info/top_level.txt +0 -2
- {dao_treasury-0.0.35.dist-info → dao_treasury-0.1.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": {
|
|
3
|
+
"list": [
|
|
4
|
+
{
|
|
5
|
+
"builtIn": 1,
|
|
6
|
+
"datasource": {
|
|
7
|
+
"type": "grafana",
|
|
8
|
+
"uid": "-- Grafana --"
|
|
9
|
+
},
|
|
10
|
+
"enable": true,
|
|
11
|
+
"hide": true,
|
|
12
|
+
"iconColor": "rgba(0, 211, 255, 1)",
|
|
13
|
+
"name": "Annotations & Alerts",
|
|
14
|
+
"type": "dashboard"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"description": "Provides a detailed breakdown of DAO revenue over time, including totals and averages by period and transaction group. Intended for monitoring income streams, identifying trends, and supporting financial reporting. Use the 'Top Level' and 'Tx Group' filters to view specific revenue categories. Data Links in panels allow quick navigation to filtered transaction details.",
|
|
19
|
+
"editable": true,
|
|
20
|
+
"fiscalYearStartMonth": 0,
|
|
21
|
+
"graphTooltip": 1,
|
|
22
|
+
"id": 9,
|
|
23
|
+
"links": [],
|
|
24
|
+
"panels": [
|
|
25
|
+
{
|
|
26
|
+
"datasource": "PostgreSQL",
|
|
27
|
+
"description": "Displays the total revenue for the selected period, aggregated across all revenue transaction groups.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
28
|
+
"fieldConfig": {
|
|
29
|
+
"defaults": {
|
|
30
|
+
"color": {
|
|
31
|
+
"fixedColor": "semi-dark-green",
|
|
32
|
+
"mode": "fixed"
|
|
33
|
+
},
|
|
34
|
+
"mappings": [],
|
|
35
|
+
"thresholds": {
|
|
36
|
+
"mode": "absolute",
|
|
37
|
+
"steps": [
|
|
38
|
+
{
|
|
39
|
+
"color": "green",
|
|
40
|
+
"value": 0
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"color": "red",
|
|
44
|
+
"value": 80
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"unit": "currencyUSD"
|
|
49
|
+
},
|
|
50
|
+
"overrides": [
|
|
51
|
+
{
|
|
52
|
+
"matcher": {
|
|
53
|
+
"id": "byName",
|
|
54
|
+
"options": "total_revenue"
|
|
55
|
+
},
|
|
56
|
+
"properties": [
|
|
57
|
+
{
|
|
58
|
+
"id": "links",
|
|
59
|
+
"value": [
|
|
60
|
+
{
|
|
61
|
+
"targetBlank": true,
|
|
62
|
+
"title": "View Revenue Transactions For This Period",
|
|
63
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"gridPos": {
|
|
72
|
+
"h": 4,
|
|
73
|
+
"w": 6,
|
|
74
|
+
"x": 0,
|
|
75
|
+
"y": 0
|
|
76
|
+
},
|
|
77
|
+
"id": 1,
|
|
78
|
+
"options": {
|
|
79
|
+
"colorMode": "background",
|
|
80
|
+
"graphMode": "area",
|
|
81
|
+
"justifyMode": "auto",
|
|
82
|
+
"orientation": "auto",
|
|
83
|
+
"percentChangeColorMode": "standard",
|
|
84
|
+
"reduceOptions": {
|
|
85
|
+
"calcs": ["lastNotNull"],
|
|
86
|
+
"fields": "",
|
|
87
|
+
"values": false
|
|
88
|
+
},
|
|
89
|
+
"showPercentChange": false,
|
|
90
|
+
"textMode": "auto",
|
|
91
|
+
"wideLayout": true
|
|
92
|
+
},
|
|
93
|
+
"pluginVersion": "12.2.1",
|
|
94
|
+
"targets": [
|
|
95
|
+
{
|
|
96
|
+
"datasource": "PostgreSQL",
|
|
97
|
+
"format": "table",
|
|
98
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
|
|
99
|
+
"refId": "A",
|
|
100
|
+
"timeColumns": ["time", "ts"]
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"title": "Revenue",
|
|
104
|
+
"type": "stat"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"datasource": "PostgreSQL",
|
|
108
|
+
"description": "Shows the average revenue per month for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
109
|
+
"fieldConfig": {
|
|
110
|
+
"defaults": {
|
|
111
|
+
"color": {
|
|
112
|
+
"fixedColor": "semi-dark-green",
|
|
113
|
+
"mode": "fixed"
|
|
114
|
+
},
|
|
115
|
+
"mappings": [],
|
|
116
|
+
"thresholds": {
|
|
117
|
+
"mode": "absolute",
|
|
118
|
+
"steps": [
|
|
119
|
+
{
|
|
120
|
+
"color": "green",
|
|
121
|
+
"value": 0
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"color": "red",
|
|
125
|
+
"value": 80
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"unit": "currencyUSD"
|
|
130
|
+
},
|
|
131
|
+
"overrides": [
|
|
132
|
+
{
|
|
133
|
+
"matcher": {
|
|
134
|
+
"id": "byName",
|
|
135
|
+
"options": "total_revenue"
|
|
136
|
+
},
|
|
137
|
+
"properties": [
|
|
138
|
+
{
|
|
139
|
+
"id": "links",
|
|
140
|
+
"value": [
|
|
141
|
+
{
|
|
142
|
+
"targetBlank": true,
|
|
143
|
+
"title": "View Revenue Transactions For This Period",
|
|
144
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"gridPos": {
|
|
153
|
+
"h": 4,
|
|
154
|
+
"w": 6,
|
|
155
|
+
"x": 6,
|
|
156
|
+
"y": 0
|
|
157
|
+
},
|
|
158
|
+
"id": 4,
|
|
159
|
+
"options": {
|
|
160
|
+
"colorMode": "background",
|
|
161
|
+
"graphMode": "area",
|
|
162
|
+
"justifyMode": "auto",
|
|
163
|
+
"orientation": "auto",
|
|
164
|
+
"percentChangeColorMode": "standard",
|
|
165
|
+
"reduceOptions": {
|
|
166
|
+
"calcs": ["lastNotNull"],
|
|
167
|
+
"fields": "",
|
|
168
|
+
"values": false
|
|
169
|
+
},
|
|
170
|
+
"showPercentChange": false,
|
|
171
|
+
"textMode": "auto",
|
|
172
|
+
"wideLayout": true
|
|
173
|
+
},
|
|
174
|
+
"pluginVersion": "12.2.1",
|
|
175
|
+
"targets": [
|
|
176
|
+
{
|
|
177
|
+
"datasource": "PostgreSQL",
|
|
178
|
+
"format": "table",
|
|
179
|
+
"rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
|
|
180
|
+
"refId": "A",
|
|
181
|
+
"timeColumns": ["time", "ts"]
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"title": "Monthly Revenue",
|
|
185
|
+
"type": "stat"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"datasource": "PostgreSQL",
|
|
189
|
+
"description": "Shows the average revenue per week for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
190
|
+
"fieldConfig": {
|
|
191
|
+
"defaults": {
|
|
192
|
+
"color": {
|
|
193
|
+
"fixedColor": "semi-dark-green",
|
|
194
|
+
"mode": "fixed"
|
|
195
|
+
},
|
|
196
|
+
"mappings": [],
|
|
197
|
+
"thresholds": {
|
|
198
|
+
"mode": "absolute",
|
|
199
|
+
"steps": [
|
|
200
|
+
{
|
|
201
|
+
"color": "green",
|
|
202
|
+
"value": 0
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"color": "red",
|
|
206
|
+
"value": 80
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"unit": "currencyUSD"
|
|
211
|
+
},
|
|
212
|
+
"overrides": [
|
|
213
|
+
{
|
|
214
|
+
"matcher": {
|
|
215
|
+
"id": "byName",
|
|
216
|
+
"options": "total_revenue"
|
|
217
|
+
},
|
|
218
|
+
"properties": [
|
|
219
|
+
{
|
|
220
|
+
"id": "links",
|
|
221
|
+
"value": [
|
|
222
|
+
{
|
|
223
|
+
"targetBlank": true,
|
|
224
|
+
"title": "View Revenue Transactions For This Period",
|
|
225
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"gridPos": {
|
|
234
|
+
"h": 4,
|
|
235
|
+
"w": 6,
|
|
236
|
+
"x": 12,
|
|
237
|
+
"y": 0
|
|
238
|
+
},
|
|
239
|
+
"id": 2,
|
|
240
|
+
"options": {
|
|
241
|
+
"colorMode": "background",
|
|
242
|
+
"graphMode": "area",
|
|
243
|
+
"justifyMode": "auto",
|
|
244
|
+
"orientation": "auto",
|
|
245
|
+
"percentChangeColorMode": "standard",
|
|
246
|
+
"reduceOptions": {
|
|
247
|
+
"calcs": ["lastNotNull"],
|
|
248
|
+
"fields": "",
|
|
249
|
+
"values": false
|
|
250
|
+
},
|
|
251
|
+
"showPercentChange": false,
|
|
252
|
+
"textMode": "auto",
|
|
253
|
+
"wideLayout": true
|
|
254
|
+
},
|
|
255
|
+
"pluginVersion": "12.2.1",
|
|
256
|
+
"targets": [
|
|
257
|
+
{
|
|
258
|
+
"datasource": "PostgreSQL",
|
|
259
|
+
"format": "table",
|
|
260
|
+
"rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
|
|
261
|
+
"refId": "A",
|
|
262
|
+
"timeColumns": ["time", "ts"]
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"title": "Weekly Revenue",
|
|
266
|
+
"type": "stat"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"datasource": "PostgreSQL",
|
|
270
|
+
"description": "Shows the average revenue per day for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
271
|
+
"fieldConfig": {
|
|
272
|
+
"defaults": {
|
|
273
|
+
"color": {
|
|
274
|
+
"fixedColor": "semi-dark-green",
|
|
275
|
+
"mode": "fixed"
|
|
276
|
+
},
|
|
277
|
+
"mappings": [],
|
|
278
|
+
"thresholds": {
|
|
279
|
+
"mode": "absolute",
|
|
280
|
+
"steps": [
|
|
281
|
+
{
|
|
282
|
+
"color": "green",
|
|
283
|
+
"value": 0
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"color": "red",
|
|
287
|
+
"value": 80
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"unit": "currencyUSD"
|
|
292
|
+
},
|
|
293
|
+
"overrides": [
|
|
294
|
+
{
|
|
295
|
+
"matcher": {
|
|
296
|
+
"id": "byName",
|
|
297
|
+
"options": "total_revenue"
|
|
298
|
+
},
|
|
299
|
+
"properties": [
|
|
300
|
+
{
|
|
301
|
+
"id": "links",
|
|
302
|
+
"value": [
|
|
303
|
+
{
|
|
304
|
+
"targetBlank": true,
|
|
305
|
+
"title": "View Revenue Transactions For This Period",
|
|
306
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
"gridPos": {
|
|
315
|
+
"h": 4,
|
|
316
|
+
"w": 6,
|
|
317
|
+
"x": 18,
|
|
318
|
+
"y": 0
|
|
319
|
+
},
|
|
320
|
+
"id": 3,
|
|
321
|
+
"options": {
|
|
322
|
+
"colorMode": "background",
|
|
323
|
+
"graphMode": "area",
|
|
324
|
+
"justifyMode": "auto",
|
|
325
|
+
"orientation": "auto",
|
|
326
|
+
"percentChangeColorMode": "standard",
|
|
327
|
+
"reduceOptions": {
|
|
328
|
+
"calcs": ["lastNotNull"],
|
|
329
|
+
"fields": "",
|
|
330
|
+
"values": false
|
|
331
|
+
},
|
|
332
|
+
"showPercentChange": false,
|
|
333
|
+
"textMode": "auto",
|
|
334
|
+
"wideLayout": true
|
|
335
|
+
},
|
|
336
|
+
"pluginVersion": "12.2.1",
|
|
337
|
+
"targets": [
|
|
338
|
+
{
|
|
339
|
+
"datasource": "PostgreSQL",
|
|
340
|
+
"format": "table",
|
|
341
|
+
"rawSql": "SELECT SUM(value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
|
|
342
|
+
"refId": "A",
|
|
343
|
+
"timeColumns": ["time", "ts"]
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
"title": "Daily Revenue",
|
|
347
|
+
"type": "stat"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"datasource": "PostgreSQL",
|
|
351
|
+
"description": "Time series chart of revenue by transaction group, aggregated weekly for the selected period.\n\nClicking a group name opens a filtered transactions dashboard for that group and period.",
|
|
352
|
+
"fieldConfig": {
|
|
353
|
+
"defaults": {
|
|
354
|
+
"color": {
|
|
355
|
+
"mode": "palette-classic"
|
|
356
|
+
},
|
|
357
|
+
"custom": {
|
|
358
|
+
"axisBorderShow": false,
|
|
359
|
+
"axisCenteredZero": false,
|
|
360
|
+
"axisColorMode": "text",
|
|
361
|
+
"axisLabel": "",
|
|
362
|
+
"axisPlacement": "auto",
|
|
363
|
+
"barAlignment": 0,
|
|
364
|
+
"barWidthFactor": 0.6,
|
|
365
|
+
"drawStyle": "bars",
|
|
366
|
+
"fillOpacity": 70,
|
|
367
|
+
"gradientMode": "none",
|
|
368
|
+
"hideFrom": {
|
|
369
|
+
"legend": false,
|
|
370
|
+
"tooltip": false,
|
|
371
|
+
"viz": false
|
|
372
|
+
},
|
|
373
|
+
"insertNulls": false,
|
|
374
|
+
"lineInterpolation": "linear",
|
|
375
|
+
"lineWidth": 1,
|
|
376
|
+
"pointSize": 5,
|
|
377
|
+
"scaleDistribution": {
|
|
378
|
+
"type": "linear"
|
|
379
|
+
},
|
|
380
|
+
"showPoints": "auto",
|
|
381
|
+
"showValues": false,
|
|
382
|
+
"spanNulls": false,
|
|
383
|
+
"stacking": {
|
|
384
|
+
"group": "A",
|
|
385
|
+
"mode": "normal"
|
|
386
|
+
},
|
|
387
|
+
"thresholdsStyle": {
|
|
388
|
+
"mode": "off"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"mappings": [],
|
|
392
|
+
"thresholds": {
|
|
393
|
+
"mode": "absolute",
|
|
394
|
+
"steps": [
|
|
395
|
+
{
|
|
396
|
+
"color": "green",
|
|
397
|
+
"value": 0
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"color": "red",
|
|
401
|
+
"value": 80
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
"unit": "currencyUSD"
|
|
406
|
+
},
|
|
407
|
+
"overrides": [
|
|
408
|
+
{
|
|
409
|
+
"matcher": {
|
|
410
|
+
"id": "byName",
|
|
411
|
+
"options": "Revenue (sum)"
|
|
412
|
+
},
|
|
413
|
+
"properties": [
|
|
414
|
+
{
|
|
415
|
+
"id": "links",
|
|
416
|
+
"value": [
|
|
417
|
+
{
|
|
418
|
+
"targetBlank": true,
|
|
419
|
+
"title": "View ${__series.name} Transactions",
|
|
420
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
"gridPos": {
|
|
429
|
+
"h": 12,
|
|
430
|
+
"w": 24,
|
|
431
|
+
"x": 0,
|
|
432
|
+
"y": 4
|
|
433
|
+
},
|
|
434
|
+
"id": 11,
|
|
435
|
+
"options": {
|
|
436
|
+
"legend": {
|
|
437
|
+
"calcs": ["sum"],
|
|
438
|
+
"displayMode": "list",
|
|
439
|
+
"placement": "bottom",
|
|
440
|
+
"showLegend": true
|
|
441
|
+
},
|
|
442
|
+
"tooltip": {
|
|
443
|
+
"hideZeros": false,
|
|
444
|
+
"mode": "multi",
|
|
445
|
+
"sort": "none"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"pluginVersion": "12.2.1",
|
|
449
|
+
"targets": [
|
|
450
|
+
{
|
|
451
|
+
"datasource": "PostgreSQL",
|
|
452
|
+
"format": "table",
|
|
453
|
+
"rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", txgroup_name AS \"TxGroup\", SUM(value_usd) AS \"Revenue\" FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring}) GROUP BY timestamp, txgroup_name ORDER BY timestamp;",
|
|
454
|
+
"refId": "A",
|
|
455
|
+
"timeColumns": ["timestamp"]
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"title": "Weekly Cashflow",
|
|
459
|
+
"transformations": [
|
|
460
|
+
{
|
|
461
|
+
"id": "formatTime",
|
|
462
|
+
"options": {
|
|
463
|
+
"outputFormat": "YYYY-WW",
|
|
464
|
+
"timeField": "timestamp",
|
|
465
|
+
"timezone": "browser",
|
|
466
|
+
"useTimezone": true
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"id": "convertFieldType",
|
|
471
|
+
"options": {
|
|
472
|
+
"conversions": [
|
|
473
|
+
{
|
|
474
|
+
"dateFormat": "YYYY-WW",
|
|
475
|
+
"destinationType": "time",
|
|
476
|
+
"targetField": "timestamp"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"fields": {}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"id": "groupBy",
|
|
484
|
+
"options": {
|
|
485
|
+
"fields": {
|
|
486
|
+
"Revenue": {
|
|
487
|
+
"aggregations": ["sum"],
|
|
488
|
+
"operation": "aggregate"
|
|
489
|
+
},
|
|
490
|
+
"TxGroup": {
|
|
491
|
+
"aggregations": [],
|
|
492
|
+
"operation": "groupby"
|
|
493
|
+
},
|
|
494
|
+
"timestamp": {
|
|
495
|
+
"aggregations": [],
|
|
496
|
+
"operation": "groupby"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"id": "partitionByValues",
|
|
503
|
+
"options": {
|
|
504
|
+
"fields": ["TxGroup"],
|
|
505
|
+
"keepFields": false,
|
|
506
|
+
"naming": {
|
|
507
|
+
"asLabels": false
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"type": "timeseries"
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"preload": false,
|
|
516
|
+
"refresh": "",
|
|
517
|
+
"schemaVersion": 42,
|
|
518
|
+
"tags": ["breakdown", "revenue"],
|
|
519
|
+
"templating": {
|
|
520
|
+
"list": [
|
|
521
|
+
{
|
|
522
|
+
"name": "TopLevel",
|
|
523
|
+
"label": "Top Level",
|
|
524
|
+
"type": "query",
|
|
525
|
+
"query": "SELECT DISTINCT top_category FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
526
|
+
"definition": "SELECT DISTINCT top_category FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
527
|
+
"description": "Filter the dashboard by top-level revenue category.",
|
|
528
|
+
"includeAll": true,
|
|
529
|
+
"multi": true,
|
|
530
|
+
"current": {
|
|
531
|
+
"text": "All",
|
|
532
|
+
"value": "$__all"
|
|
533
|
+
},
|
|
534
|
+
"options": [],
|
|
535
|
+
"refresh": 2,
|
|
536
|
+
"regex": "",
|
|
537
|
+
"sort": 5
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"allowCustomValue": true,
|
|
541
|
+
"current": {
|
|
542
|
+
"text": "All",
|
|
543
|
+
"value": "$__all"
|
|
544
|
+
},
|
|
545
|
+
"definition": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_revenue WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
546
|
+
"description": "Filter the dashboard by transaction group within the selected top-level categories.",
|
|
547
|
+
"includeAll": true,
|
|
548
|
+
"multi": true,
|
|
549
|
+
"label": "Tx Group",
|
|
550
|
+
"name": "Txgroup",
|
|
551
|
+
"options": [],
|
|
552
|
+
"query": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_revenue WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
553
|
+
"refresh": 2,
|
|
554
|
+
"regex": "",
|
|
555
|
+
"sort": 5,
|
|
556
|
+
"type": "query"
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
"time": {
|
|
561
|
+
"from": "now-6M",
|
|
562
|
+
"to": "now"
|
|
563
|
+
},
|
|
564
|
+
"timepicker": {},
|
|
565
|
+
"timezone": "",
|
|
566
|
+
"title": "Revenue Over Time",
|
|
567
|
+
"uid": "5284bb56-b9fb-4f36-b971-eb125bfdac7d",
|
|
568
|
+
"version": 19
|
|
569
|
+
}
|
|
@@ -1,60 +1,10 @@
|
|
|
1
1
|
apiVersion: 1
|
|
2
2
|
|
|
3
3
|
providers:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
path: /etc/grafana/provisioning/dashboards/summary
|
|
12
|
-
|
|
13
|
-
# Dashboards
|
|
14
|
-
- name: 'Treasury'
|
|
15
|
-
folder: 'Treasury'
|
|
16
|
-
type: file
|
|
17
|
-
disableDeletion: true
|
|
18
|
-
editable: false
|
|
19
|
-
options:
|
|
20
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
21
|
-
|
|
22
|
-
- name: 'Operating Cashflow Summary'
|
|
23
|
-
folder: 'Treasury'
|
|
24
|
-
type: file
|
|
25
|
-
disableDeletion: true
|
|
26
|
-
editable: false
|
|
27
|
-
options:
|
|
28
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
29
|
-
|
|
30
|
-
- name: 'Total Cashflow Summary'
|
|
31
|
-
folder: 'Treasury'
|
|
32
|
-
type: file
|
|
33
|
-
disableDeletion: true
|
|
34
|
-
editable: false
|
|
35
|
-
options:
|
|
36
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
37
|
-
|
|
38
|
-
- name: 'Total Cashflow Summary (Including Unsorted)'
|
|
39
|
-
folder: 'Treasury'
|
|
40
|
-
type: file
|
|
41
|
-
disableDeletion: true
|
|
42
|
-
editable: false
|
|
43
|
-
options:
|
|
44
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
45
|
-
|
|
46
|
-
- name: 'Treasury Transactions'
|
|
47
|
-
folder: 'Transactions'
|
|
48
|
-
type: file
|
|
49
|
-
disableDeletion: true
|
|
50
|
-
editable: false
|
|
51
|
-
options:
|
|
52
|
-
path: /etc/grafana/provisioning/dashboards/transactions
|
|
53
|
-
|
|
54
|
-
- name: 'LlamaPay Streams'
|
|
55
|
-
folder: 'Streams'
|
|
56
|
-
type: file
|
|
57
|
-
disableDeletion: true
|
|
58
|
-
editable: false
|
|
59
|
-
options:
|
|
60
|
-
path: /etc/grafana/provisioning/dashboards/streams
|
|
4
|
+
- name: 'All Dashboards'
|
|
5
|
+
folder: ''
|
|
6
|
+
type: file
|
|
7
|
+
disableDeletion: false
|
|
8
|
+
editable: true
|
|
9
|
+
options:
|
|
10
|
+
path: /etc/grafana/provisioning/dashboards
|