dao-treasury 0.0.60__cp312-cp312-win32.whl → 0.1.6__cp312-cp312-win32.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.

Files changed (42) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +195 -154
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +192 -149
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -81
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +10 -22
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +283 -23
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +49 -39
  7. dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +109 -187
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +77 -127
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +509 -105
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3856 -2924
  12. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +57 -97
  13. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
  14. dao_treasury/__init__.py +0 -4
  15. dao_treasury/_docker.cp312-win32.pyd +0 -0
  16. dao_treasury/_docker.py +30 -22
  17. dao_treasury/_nicknames.cp312-win32.pyd +0 -0
  18. dao_treasury/_nicknames.py +3 -2
  19. dao_treasury/_wallet.cp312-win32.pyd +0 -0
  20. dao_treasury/constants.cp312-win32.pyd +0 -0
  21. dao_treasury/db.py +383 -131
  22. dao_treasury/docker-compose.yaml +19 -3
  23. dao_treasury/main.py +42 -4
  24. dao_treasury/sorting/__init__.cp312-win32.pyd +0 -0
  25. dao_treasury/sorting/__init__.py +38 -21
  26. dao_treasury/sorting/_matchers.cp312-win32.pyd +0 -0
  27. dao_treasury/sorting/_rules.cp312-win32.pyd +0 -0
  28. dao_treasury/sorting/factory.cp312-win32.pyd +0 -0
  29. dao_treasury/sorting/rule.cp312-win32.pyd +0 -0
  30. dao_treasury/sorting/rules/__init__.cp312-win32.pyd +0 -0
  31. dao_treasury/sorting/rules/ignore/__init__.cp312-win32.pyd +0 -0
  32. dao_treasury/sorting/rules/ignore/llamapay.cp312-win32.pyd +0 -0
  33. dao_treasury/treasury.py +4 -2
  34. dao_treasury/types.cp312-win32.pyd +0 -0
  35. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/METADATA +18 -4
  36. dao_treasury-0.1.6.dist-info/RECORD +53 -0
  37. dao_treasury__mypyc.cp312-win32.pyd +0 -0
  38. dao_treasury/streams/__init__.cp312-win32.pyd +0 -0
  39. dao_treasury/streams/llamapay.cp312-win32.pyd +0 -0
  40. dao_treasury-0.0.60.dist-info/RECORD +0 -54
  41. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/WHEEL +0 -0
  42. {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/top_level.txt +0 -0
@@ -22,9 +22,8 @@
22
22
  "links": [],
23
23
  "panels": [
24
24
  {
25
- "datasource": "SQLite",
25
+ "datasource": "PostgreSQL",
26
26
  "fieldConfig": {
27
- "unit": "currencyUSD",
28
27
  "defaults": {
29
28
  "color": {
30
29
  "mode": "thresholds"
@@ -42,7 +41,8 @@
42
41
  "value": 80
43
42
  }
44
43
  ]
45
- }
44
+ },
45
+ "unit": "currencyUSD"
46
46
  },
47
47
  "overrides": []
48
48
  },
@@ -60,9 +60,7 @@
60
60
  "orientation": "auto",
61
61
  "percentChangeColorMode": "standard",
62
62
  "reduceOptions": {
63
- "calcs": [
64
- "lastNotNull"
65
- ],
63
+ "calcs": ["lastNotNull"],
66
64
  "fields": "",
67
65
  "values": false
68
66
  },
@@ -73,24 +71,20 @@
73
71
  "pluginVersion": "12.1.1",
74
72
  "targets": [
75
73
  {
76
- "datasource": "SQLite",
77
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
78
- "queryType": "table",
79
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
74
+ "datasource": "PostgreSQL",
75
+ "format": "table",
76
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
80
77
  "refId": "A",
81
- "timeColumns": [
82
- "time",
83
- "ts"
84
- ]
78
+ "timeColumns": ["time", "ts"]
85
79
  }
86
80
  ],
87
81
  "title": "Revenue",
88
- "type": "stat"
82
+ "type": "stat",
83
+ "description": "Displays the total value of all transactions sorted as revenue for the selected period."
89
84
  },
90
85
  {
91
- "datasource": "SQLite",
86
+ "datasource": "PostgreSQL",
92
87
  "fieldConfig": {
93
- "unit": "currencyUSD",
94
88
  "defaults": {
95
89
  "color": {
96
90
  "mode": "thresholds"
@@ -108,7 +102,8 @@
108
102
  "value": 80
109
103
  }
110
104
  ]
111
- }
105
+ },
106
+ "unit": "currencyUSD"
112
107
  },
113
108
  "overrides": []
114
109
  },
@@ -126,9 +121,7 @@
126
121
  "orientation": "auto",
127
122
  "percentChangeColorMode": "standard",
128
123
  "reduceOptions": {
129
- "calcs": [
130
- "lastNotNull"
131
- ],
124
+ "calcs": ["lastNotNull"],
132
125
  "fields": "",
133
126
  "values": false
134
127
  },
@@ -139,24 +132,20 @@
139
132
  "pluginVersion": "12.1.1",
140
133
  "targets": [
141
134
  {
142
- "datasource": "SQLite",
143
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
144
- "queryType": "table",
145
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
135
+ "datasource": "PostgreSQL",
136
+ "format": "table",
137
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
146
138
  "refId": "A",
147
- "timeColumns": [
148
- "time",
149
- "ts"
150
- ]
139
+ "timeColumns": ["time", "ts"]
151
140
  }
152
141
  ],
153
142
  "title": "Expenses",
154
- "type": "stat"
143
+ "type": "stat",
144
+ "description": "Displays the total value of all transactions sorted as expenses for the selected period."
155
145
  },
156
146
  {
157
- "datasource": "SQLite",
147
+ "datasource": "PostgreSQL",
158
148
  "fieldConfig": {
159
- "unit": "currencyUSD",
160
149
  "defaults": {
161
150
  "color": {
162
151
  "mode": "thresholds"
@@ -174,7 +163,8 @@
174
163
  "value": 80
175
164
  }
176
165
  ]
177
- }
166
+ },
167
+ "unit": "currencyUSD"
178
168
  },
179
169
  "overrides": []
180
170
  },
@@ -192,9 +182,7 @@
192
182
  "orientation": "auto",
193
183
  "percentChangeColorMode": "standard",
194
184
  "reduceOptions": {
195
- "calcs": [
196
- "lastNotNull"
197
- ],
185
+ "calcs": ["lastNotNull"],
198
186
  "fields": "",
199
187
  "values": false
200
188
  },
@@ -205,24 +193,20 @@
205
193
  "pluginVersion": "12.1.1",
206
194
  "targets": [
207
195
  {
208
- "datasource": "SQLite",
209
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
210
- "queryType": "table",
211
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
196
+ "datasource": "PostgreSQL",
197
+ "format": "table",
198
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Cost of Revenue' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
212
199
  "refId": "A",
213
- "timeColumns": [
214
- "time",
215
- "ts"
216
- ]
200
+ "timeColumns": ["time", "ts"]
217
201
  }
218
202
  ],
219
203
  "title": "Cost of Revenue",
220
- "type": "stat"
204
+ "type": "stat",
205
+ "description": "Displays the total value of all transactions sorted as cost of revenue for the selected period."
221
206
  },
222
207
  {
223
- "datasource": "SQLite",
208
+ "datasource": "PostgreSQL",
224
209
  "fieldConfig": {
225
- "unit": "currencyUSD",
226
210
  "defaults": {
227
211
  "color": {
228
212
  "mode": "thresholds"
@@ -240,7 +224,8 @@
240
224
  "value": 80
241
225
  }
242
226
  ]
243
- }
227
+ },
228
+ "unit": "currencyUSD"
244
229
  },
245
230
  "overrides": []
246
231
  },
@@ -258,9 +243,7 @@
258
243
  "orientation": "auto",
259
244
  "percentChangeColorMode": "standard",
260
245
  "reduceOptions": {
261
- "calcs": [
262
- "lastNotNull"
263
- ],
246
+ "calcs": ["lastNotNull"],
264
247
  "fields": "",
265
248
  "values": false
266
249
  },
@@ -271,24 +254,20 @@
271
254
  "pluginVersion": "12.1.1",
272
255
  "targets": [
273
256
  {
274
- "datasource": "SQLite",
275
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
276
- "queryType": "table",
277
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
257
+ "datasource": "PostgreSQL",
258
+ "format": "table",
259
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Income' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
278
260
  "refId": "A",
279
- "timeColumns": [
280
- "time",
281
- "ts"
282
- ]
261
+ "timeColumns": ["time", "ts"]
283
262
  }
284
263
  ],
285
264
  "title": "Other Income",
286
- "type": "stat"
265
+ "type": "stat",
266
+ "description": "Displays the total value of all transactions sorted as other income for the selected period."
287
267
  },
288
268
  {
289
- "datasource": "SQLite",
269
+ "datasource": "PostgreSQL",
290
270
  "fieldConfig": {
291
- "unit": "currencyUSD",
292
271
  "defaults": {
293
272
  "color": {
294
273
  "mode": "thresholds"
@@ -306,7 +285,8 @@
306
285
  "value": 80
307
286
  }
308
287
  ]
309
- }
288
+ },
289
+ "unit": "currencyUSD"
310
290
  },
311
291
  "overrides": []
312
292
  },
@@ -324,9 +304,7 @@
324
304
  "orientation": "auto",
325
305
  "percentChangeColorMode": "standard",
326
306
  "reduceOptions": {
327
- "calcs": [
328
- "lastNotNull"
329
- ],
307
+ "calcs": ["lastNotNull"],
330
308
  "fields": "",
331
309
  "values": false
332
310
  },
@@ -337,25 +315,21 @@
337
315
  "pluginVersion": "12.1.1",
338
316
  "targets": [
339
317
  {
340
- "datasource": "SQLite",
341
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
342
- "queryType": "table",
343
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
318
+ "datasource": "PostgreSQL",
319
+ "format": "table",
320
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Other Expenses' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
344
321
  "refId": "A",
345
- "timeColumns": [
346
- "time",
347
- "ts"
348
- ]
322
+ "timeColumns": ["time", "ts"]
349
323
  }
350
324
  ],
351
325
  "title": "Other Expenses",
352
- "type": "stat"
326
+ "type": "stat",
327
+ "description": "Displays the total value of all transactions sorted as other expenses for the selected period."
353
328
  },
354
329
  {
355
- "datasource": "SQLite",
356
- "description": "",
330
+ "datasource": "PostgreSQL",
331
+ "description": "Shows the net total cashflow (all revenue minus all expenses) for the selected period, including both sorted and unsorted transactions.",
357
332
  "fieldConfig": {
358
- "unit": "currencyUSD",
359
333
  "defaults": {
360
334
  "color": {
361
335
  "mode": "thresholds"
@@ -373,7 +347,8 @@
373
347
  "value": 80
374
348
  }
375
349
  ]
376
- }
350
+ },
351
+ "unit": "currencyUSD"
377
352
  },
378
353
  "overrides": []
379
354
  },
@@ -391,9 +366,7 @@
391
366
  "orientation": "auto",
392
367
  "percentChangeColorMode": "standard",
393
368
  "reduceOptions": {
394
- "calcs": [
395
- "lastNotNull"
396
- ],
369
+ "calcs": ["lastNotNull"],
397
370
  "fields": "",
398
371
  "values": false
399
372
  },
@@ -404,25 +377,20 @@
404
377
  "pluginVersion": "12.1.1",
405
378
  "targets": [
406
379
  {
407
- "datasource": "SQLite",
408
- "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
409
- "queryType": "table",
410
- "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
380
+ "datasource": "PostgreSQL",
381
+ "format": "table",
382
+ "rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
411
383
  "refId": "A",
412
- "timeColumns": [
413
- "time",
414
- "ts"
415
- ]
384
+ "timeColumns": ["time", "ts"]
416
385
  }
417
386
  ],
418
387
  "title": "Sorted Total",
419
388
  "type": "stat"
420
389
  },
421
390
  {
422
- "datasource": "SQLite",
423
- "description": "",
391
+ "datasource": "PostgreSQL",
392
+ "description": "Time series chart of all cashflows (including unsorted), grouped by category, for the selected period.",
424
393
  "fieldConfig": {
425
- "unit": "currencyUSD",
426
394
  "defaults": {
427
395
  "color": {
428
396
  "mode": "palette-classic"
@@ -473,7 +441,8 @@
473
441
  "value": 80
474
442
  }
475
443
  ]
476
- }
444
+ },
445
+ "unit": "currencyUSD"
477
446
  },
478
447
  "overrides": [
479
448
  {
@@ -524,14 +493,11 @@
524
493
  "pluginVersion": "12.1.1",
525
494
  "targets": [
526
495
  {
527
- "datasource": "SQLite",
528
- "queryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\",\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
529
- "queryType": "table",
530
- "rawQueryText": "SELECT t.timestamp,\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) AS \"Total Received\",\r\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Sent\",\r\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN t.value_usd ELSE 0 END) AS \"Net\"\r\nFROM general_ledger AS t\r\nJOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id\r\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000\r\nGROUP BY timestamp\r\nORDER BY timestamp;",
496
+ "datasource": "PostgreSQL",
497
+ "format": "table",
498
+ "rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\",\n SUM(CASE WHEN top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN value_usd ELSE 0 END) AS \"Total Received\",\n SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN value_usd ELSE 0 END) * -1 AS \"Total Sent\",\n SUM(CASE WHEN top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN value_usd ELSE 0 END) - SUM(CASE WHEN top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN value_usd ELSE 0 END) AS \"Net\"\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000\nGROUP BY timestamp\nORDER BY timestamp;",
531
499
  "refId": "A",
532
- "timeColumns": [
533
- "timestamp"
534
- ]
500
+ "timeColumns": ["timestamp"]
535
501
  }
536
502
  ],
537
503
  "title": "Weekly Cashflow",
@@ -563,45 +529,31 @@
563
529
  "options": {
564
530
  "fields": {
565
531
  "Cost of Revenue": {
566
- "aggregations": [
567
- "sum"
568
- ],
532
+ "aggregations": ["sum"],
569
533
  "operation": "aggregate"
570
534
  },
571
535
  "Expenses": {
572
- "aggregations": [
573
- "sum"
574
- ],
536
+ "aggregations": ["sum"],
575
537
  "operation": "aggregate"
576
538
  },
577
539
  "Net": {
578
- "aggregations": [
579
- "sum"
580
- ],
540
+ "aggregations": ["sum"],
581
541
  "operation": "aggregate"
582
542
  },
583
543
  "Net (Including Unsorted)": {
584
- "aggregations": [
585
- "sum"
586
- ],
544
+ "aggregations": ["sum"],
587
545
  "operation": "aggregate"
588
546
  },
589
547
  "Other Expenses": {
590
- "aggregations": [
591
- "sum"
592
- ],
548
+ "aggregations": ["sum"],
593
549
  "operation": "aggregate"
594
550
  },
595
551
  "Other Income": {
596
- "aggregations": [
597
- "sum"
598
- ],
552
+ "aggregations": ["sum"],
599
553
  "operation": "aggregate"
600
554
  },
601
555
  "Revenue": {
602
- "aggregations": [
603
- "sum"
604
- ],
556
+ "aggregations": ["sum"],
605
557
  "operation": "aggregate"
606
558
  },
607
559
  "Timestamp": {
@@ -609,39 +561,27 @@
609
561
  "operation": "groupby"
610
562
  },
611
563
  "Total Expenses": {
612
- "aggregations": [
613
- "sum"
614
- ],
564
+ "aggregations": ["sum"],
615
565
  "operation": "aggregate"
616
566
  },
617
567
  "Total Expenses (Including Unsorted)": {
618
- "aggregations": [
619
- "sum"
620
- ],
568
+ "aggregations": ["sum"],
621
569
  "operation": "aggregate"
622
570
  },
623
571
  "Total Received": {
624
- "aggregations": [
625
- "sum"
626
- ],
572
+ "aggregations": ["sum"],
627
573
  "operation": "aggregate"
628
574
  },
629
575
  "Total Revenue": {
630
- "aggregations": [
631
- "sum"
632
- ],
576
+ "aggregations": ["sum"],
633
577
  "operation": "aggregate"
634
578
  },
635
579
  "Total Revenue (Including Unsorted)": {
636
- "aggregations": [
637
- "sum"
638
- ],
580
+ "aggregations": ["sum"],
639
581
  "operation": "aggregate"
640
582
  },
641
583
  "Total Sent": {
642
- "aggregations": [
643
- "sum"
644
- ],
584
+ "aggregations": ["sum"],
645
585
  "operation": "aggregate"
646
586
  },
647
587
  "timestamp": {
@@ -655,10 +595,9 @@
655
595
  "type": "timeseries"
656
596
  },
657
597
  {
658
- "datasource": "SQLite",
659
- "description": "",
598
+ "datasource": "PostgreSQL",
599
+ "description": "Displays the total value of inbound transactions pending categorization for the selected period.",
660
600
  "fieldConfig": {
661
- "unit": "currencyUSD",
662
601
  "defaults": {
663
602
  "color": {
664
603
  "mode": "thresholds"
@@ -676,7 +615,8 @@
676
615
  "value": 80
677
616
  }
678
617
  ]
679
- }
618
+ },
619
+ "unit": "currencyUSD"
680
620
  },
681
621
  "overrides": []
682
622
  },
@@ -694,9 +634,7 @@
694
634
  "orientation": "auto",
695
635
  "percentChangeColorMode": "standard",
696
636
  "reduceOptions": {
697
- "calcs": [
698
- "lastNotNull"
699
- ],
637
+ "calcs": ["lastNotNull"],
700
638
  "fields": "",
701
639
  "values": false
702
640
  },
@@ -707,25 +645,20 @@
707
645
  "pluginVersion": "12.1.1",
708
646
  "targets": [
709
647
  {
710
- "datasource": "SQLite",
711
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
712
- "queryType": "table",
713
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
648
+ "datasource": "PostgreSQL",
649
+ "format": "table",
650
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Sort Me (Inbound)' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
714
651
  "refId": "A",
715
- "timeColumns": [
716
- "time",
717
- "ts"
718
- ]
652
+ "timeColumns": ["time", "ts"]
719
653
  }
720
654
  ],
721
655
  "title": "Unsorted (Inbound)",
722
656
  "type": "stat"
723
657
  },
724
658
  {
725
- "datasource": "SQLite",
726
- "description": "",
659
+ "datasource": "PostgreSQL",
660
+ "description": "Displays the total value of outbound transactions pending categorization for the selected period.",
727
661
  "fieldConfig": {
728
- "unit": "currencyUSD",
729
662
  "defaults": {
730
663
  "color": {
731
664
  "mode": "thresholds"
@@ -743,7 +676,8 @@
743
676
  "value": 80
744
677
  }
745
678
  ]
746
- }
679
+ },
680
+ "unit": "currencyUSD"
747
681
  },
748
682
  "overrides": []
749
683
  },
@@ -761,9 +695,7 @@
761
695
  "orientation": "auto",
762
696
  "percentChangeColorMode": "standard",
763
697
  "reduceOptions": {
764
- "calcs": [
765
- "lastNotNull"
766
- ],
698
+ "calcs": ["lastNotNull"],
767
699
  "fields": "",
768
700
  "values": false
769
701
  },
@@ -774,25 +706,20 @@
774
706
  "pluginVersion": "12.1.1",
775
707
  "targets": [
776
708
  {
777
- "datasource": "SQLite",
778
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
779
- "queryType": "table",
780
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
709
+ "datasource": "PostgreSQL",
710
+ "format": "table",
711
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum WHERE top_category = 'Sort Me (Outbound)' AND timestamp >= $__from/1000 AND timestamp <= $__to/1000",
781
712
  "refId": "A",
782
- "timeColumns": [
783
- "time",
784
- "ts"
785
- ]
713
+ "timeColumns": ["time", "ts"]
786
714
  }
787
715
  ],
788
716
  "title": "Unsorted (Outbound)",
789
717
  "type": "stat"
790
718
  },
791
719
  {
792
- "datasource": "SQLite",
793
- "description": "",
720
+ "datasource": "PostgreSQL",
721
+ "description": "Shows the overall net cashflow (including unsorted) for the selected period.",
794
722
  "fieldConfig": {
795
- "unit": "currencyUSD",
796
723
  "defaults": {
797
724
  "color": {
798
725
  "mode": "thresholds"
@@ -810,7 +737,8 @@
810
737
  "value": 80
811
738
  }
812
739
  ]
813
- }
740
+ },
741
+ "unit": "currencyUSD"
814
742
  },
815
743
  "overrides": []
816
744
  },
@@ -828,9 +756,7 @@
828
756
  "orientation": "auto",
829
757
  "percentChangeColorMode": "standard",
830
758
  "reduceOptions": {
831
- "calcs": [
832
- "lastNotNull"
833
- ],
759
+ "calcs": ["lastNotNull"],
834
760
  "fields": "",
835
761
  "values": false
836
762
  },
@@ -841,15 +767,11 @@
841
767
  "pluginVersion": "12.1.1",
842
768
  "targets": [
843
769
  {
844
- "datasource": "SQLite",
845
- "queryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
846
- "queryType": "table",
847
- "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
770
+ "datasource": "PostgreSQL",
771
+ "format": "table",
772
+ "rawSql": "SELECT (\n SUM(CASE WHEN top_category = 'Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Cost of Revenue' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Other Income' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Other Expenses' THEN value_usd ELSE 0 END)\n + SUM(CASE WHEN top_category = 'Sort Me (Inbound)' THEN value_usd ELSE 0 END)\n - SUM(CASE WHEN top_category = 'Sort Me (Outbound)' THEN value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum\nWHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000",
848
773
  "refId": "A",
849
- "timeColumns": [
850
- "time",
851
- "ts"
852
- ]
774
+ "timeColumns": ["time", "ts"]
853
775
  }
854
776
  ],
855
777
  "title": "Total",
@@ -859,7 +781,7 @@
859
781
  "preload": false,
860
782
  "refresh": "",
861
783
  "schemaVersion": 41,
862
- "tags": [],
784
+ "tags": ["cashflow", "unsorted"],
863
785
  "templating": {
864
786
  "list": []
865
787
  },
@@ -872,5 +794,5 @@
872
794
  "title": "Total Cashflow Summary (Including Unsorted)",
873
795
  "description": "Offers a complete picture of all DAO cashflows, including both sorted and unsorted transactions. This dashboard is ideal for tracking transactions still pending categorization and understanding their impact on overall cashflow.",
874
796
  "uid": "2b6e7c1d-8f4a-4e3b-9b2a-1c7d8e9f0a2b",
875
- "version": 5
797
+ "version": 106
876
798
  }