dao-treasury 0.0.71__cp311-cp311-win_amd64.whl → 0.1.2__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.

Files changed (40) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +89 -73
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +86 -68
  3. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +5 -12
  4. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +5 -6
  5. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +220 -195
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +61 -71
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +43 -50
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +50 -90
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +1403 -532
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +31 -36
  12. dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
  13. dao_treasury/__init__.py +0 -4
  14. dao_treasury/_docker.cp311-win_amd64.pyd +0 -0
  15. dao_treasury/_docker.py +6 -2
  16. dao_treasury/_nicknames.cp311-win_amd64.pyd +0 -0
  17. dao_treasury/_nicknames.py +3 -2
  18. dao_treasury/_wallet.cp311-win_amd64.pyd +0 -0
  19. dao_treasury/constants.cp311-win_amd64.pyd +0 -0
  20. dao_treasury/db.py +353 -120
  21. dao_treasury/docker-compose.yaml +18 -2
  22. dao_treasury/main.py +5 -2
  23. dao_treasury/sorting/__init__.cp311-win_amd64.pyd +0 -0
  24. dao_treasury/sorting/__init__.py +38 -21
  25. dao_treasury/sorting/_matchers.cp311-win_amd64.pyd +0 -0
  26. dao_treasury/sorting/_rules.cp311-win_amd64.pyd +0 -0
  27. dao_treasury/sorting/factory.cp311-win_amd64.pyd +0 -0
  28. dao_treasury/sorting/rule.cp311-win_amd64.pyd +0 -0
  29. dao_treasury/sorting/rules/__init__.cp311-win_amd64.pyd +0 -0
  30. dao_treasury/sorting/rules/ignore/__init__.cp311-win_amd64.pyd +0 -0
  31. dao_treasury/sorting/rules/ignore/llamapay.cp311-win_amd64.pyd +0 -0
  32. dao_treasury/types.cp311-win_amd64.pyd +0 -0
  33. {dao_treasury-0.0.71.dist-info → dao_treasury-0.1.2.dist-info}/METADATA +3 -2
  34. dao_treasury-0.1.2.dist-info/RECORD +53 -0
  35. dao_treasury__mypyc.cp311-win_amd64.pyd +0 -0
  36. dao_treasury/streams/__init__.cp311-win_amd64.pyd +0 -0
  37. dao_treasury/streams/llamapay.cp311-win_amd64.pyd +0 -0
  38. dao_treasury-0.0.71.dist-info/RECORD +0 -54
  39. {dao_treasury-0.0.71.dist-info → dao_treasury-0.1.2.dist-info}/WHEEL +0 -0
  40. {dao_treasury-0.0.71.dist-info → dao_treasury-0.1.2.dist-info}/top_level.txt +0 -0
@@ -15,19 +15,21 @@
15
15
  }
16
16
  ]
17
17
  },
18
- "description": "Provides a detailed breakdown of DAO expenses over time, including totals and averages by period and transaction group. Intended for monitoring spending trends, identifying cost drivers, and supporting financial reporting. Use the 'Tx Group' filter to view specific categories (e.g., Expenses, Cost of Revenue, Other Expense) or all groups. Data Links in panels allow quick navigation to filtered transaction details.",
18
+ "description": "Provides a detailed breakdown of DAO expenses over time, including totals and averages by period and transaction group. Intended for monitoring spending trends, identifying cost drivers, and supporting financial reporting. Use the 'Top Level' and 'Tx Group' filters to view specific expense categories. Data Links in panels allow quick navigation to filtered transaction details.",
19
19
  "editable": true,
20
20
  "fiscalYearStartMonth": 0,
21
21
  "graphTooltip": 1,
22
- "id": 5,
22
+ "id": 1,
23
23
  "links": [],
24
24
  "panels": [
25
25
  {
26
- "datasource": "SQLite",
26
+ "datasource": "PostgreSQL",
27
+ "description": "Displays the total expenses for the selected period, aggregated across all expense transaction groups. Useful for understanding overall spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
27
28
  "fieldConfig": {
28
29
  "defaults": {
29
30
  "color": {
30
- "mode": "thresholds"
31
+ "fixedColor": "dark-red",
32
+ "mode": "fixed"
31
33
  },
32
34
  "mappings": [],
33
35
  "thresholds": {
@@ -56,9 +58,9 @@
56
58
  "id": "links",
57
59
  "value": [
58
60
  {
61
+ "targetBlank": true,
59
62
  "title": "View Expense Transactions For This Period",
60
- "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to",
61
- "targetBlank": true
63
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
62
64
  }
63
65
  ]
64
66
  }
@@ -74,7 +76,7 @@
74
76
  },
75
77
  "id": 1,
76
78
  "options": {
77
- "colorMode": "value",
79
+ "colorMode": "background",
78
80
  "graphMode": "area",
79
81
  "justifyMode": "auto",
80
82
  "orientation": "auto",
@@ -88,27 +90,27 @@
88
90
  "textMode": "auto",
89
91
  "wideLayout": true
90
92
  },
91
- "pluginVersion": "12.2.0",
93
+ "pluginVersion": "12.2.1",
92
94
  "targets": [
93
95
  {
94
- "datasource": "SQLite",
95
- "queryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
96
- "queryType": "table",
97
- "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
96
+ "datasource": "PostgreSQL",
97
+ "format": "table",
98
+ "rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
98
99
  "refId": "A",
99
100
  "timeColumns": ["time", "ts"]
100
101
  }
101
102
  ],
102
103
  "title": "Expenses",
103
- "type": "stat",
104
- "description": "Displays the total expenses for the selected period, aggregated across all expense transaction groups. Useful for understanding overall spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group."
104
+ "type": "stat"
105
105
  },
106
106
  {
107
- "datasource": "SQLite",
107
+ "datasource": "PostgreSQL",
108
+ "description": "Shows the average expenses per month for the selected period. Useful for tracking monthly spending trends.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
108
109
  "fieldConfig": {
109
110
  "defaults": {
110
111
  "color": {
111
- "mode": "thresholds"
112
+ "fixedColor": "dark-red",
113
+ "mode": "fixed"
112
114
  },
113
115
  "mappings": [],
114
116
  "thresholds": {
@@ -137,9 +139,9 @@
137
139
  "id": "links",
138
140
  "value": [
139
141
  {
142
+ "targetBlank": true,
140
143
  "title": "View Expense Transactions For This Period",
141
- "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to",
142
- "targetBlank": true
144
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
143
145
  }
144
146
  ]
145
147
  }
@@ -155,7 +157,7 @@
155
157
  },
156
158
  "id": 4,
157
159
  "options": {
158
- "colorMode": "value",
160
+ "colorMode": "background",
159
161
  "graphMode": "area",
160
162
  "justifyMode": "auto",
161
163
  "orientation": "auto",
@@ -169,27 +171,27 @@
169
171
  "textMode": "auto",
170
172
  "wideLayout": true
171
173
  },
172
- "pluginVersion": "12.2.0",
174
+ "pluginVersion": "12.2.1",
173
175
  "targets": [
174
176
  {
175
- "datasource": "SQLite",
176
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
177
- "queryType": "table",
178
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 30.436875)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
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_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
179
180
  "refId": "A",
180
181
  "timeColumns": ["time", "ts"]
181
182
  }
182
183
  ],
183
184
  "title": "Monthly Expenses",
184
- "type": "stat",
185
- "description": "Shows the average expenses per month for the selected period. Useful for tracking monthly spending trends.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group."
185
+ "type": "stat"
186
186
  },
187
187
  {
188
- "datasource": "SQLite",
188
+ "datasource": "PostgreSQL",
189
+ "description": "Shows the average expenses per week for the selected period. Useful for monitoring short-term spending changes.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
189
190
  "fieldConfig": {
190
191
  "defaults": {
191
192
  "color": {
192
- "mode": "thresholds"
193
+ "fixedColor": "dark-red",
194
+ "mode": "fixed"
193
195
  },
194
196
  "mappings": [],
195
197
  "thresholds": {
@@ -218,9 +220,9 @@
218
220
  "id": "links",
219
221
  "value": [
220
222
  {
223
+ "targetBlank": true,
221
224
  "title": "View Expense Transactions For This Period",
222
- "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to",
223
- "targetBlank": true
225
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
224
226
  }
225
227
  ]
226
228
  }
@@ -236,7 +238,7 @@
236
238
  },
237
239
  "id": 2,
238
240
  "options": {
239
- "colorMode": "value",
241
+ "colorMode": "background",
240
242
  "graphMode": "area",
241
243
  "justifyMode": "auto",
242
244
  "orientation": "auto",
@@ -250,27 +252,27 @@
250
252
  "textMode": "auto",
251
253
  "wideLayout": true
252
254
  },
253
- "pluginVersion": "12.2.0",
255
+ "pluginVersion": "12.2.1",
254
256
  "targets": [
255
257
  {
256
- "datasource": "SQLite",
257
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
258
- "queryType": "table",
259
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24 / 7)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
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_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
260
261
  "refId": "A",
261
262
  "timeColumns": ["time", "ts"]
262
263
  }
263
264
  ],
264
265
  "title": "Weekly Expenses",
265
- "type": "stat",
266
- "description": "Shows the average expenses per week for the selected period. Useful for monitoring short-term spending changes.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group."
266
+ "type": "stat"
267
267
  },
268
268
  {
269
- "datasource": "SQLite",
269
+ "datasource": "PostgreSQL",
270
+ "description": "Shows the average expenses per day for the selected period. Useful for fine-grained monitoring of spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group.",
270
271
  "fieldConfig": {
271
272
  "defaults": {
272
273
  "color": {
273
- "mode": "thresholds"
274
+ "fixedColor": "dark-red",
275
+ "mode": "fixed"
274
276
  },
275
277
  "mappings": [],
276
278
  "thresholds": {
@@ -299,9 +301,9 @@
299
301
  "id": "links",
300
302
  "value": [
301
303
  {
304
+ "targetBlank": true,
302
305
  "title": "View Expense Transactions For This Period",
303
- "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to",
304
- "targetBlank": true
306
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
305
307
  }
306
308
  ]
307
309
  }
@@ -317,7 +319,7 @@
317
319
  },
318
320
  "id": 3,
319
321
  "options": {
320
- "colorMode": "value",
322
+ "colorMode": "background",
321
323
  "graphMode": "area",
322
324
  "justifyMode": "auto",
323
325
  "orientation": "auto",
@@ -331,28 +333,28 @@
331
333
  "textMode": "auto",
332
334
  "wideLayout": true
333
335
  },
334
- "pluginVersion": "12.2.0",
336
+ "pluginVersion": "12.2.1",
335
337
  "targets": [
336
338
  {
337
- "datasource": "SQLite",
338
- "queryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
339
- "queryType": "table",
340
- "rawQueryText": "SELECT SUM(t.value_usd) / ((($__to - $__from) / 1000.0 / 60 / 60 / 24)) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) inner join txgroups g USING (txgroup_id) WHERE gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring})",
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_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
341
342
  "refId": "A",
342
343
  "timeColumns": ["time", "ts"]
343
344
  }
344
345
  ],
345
346
  "title": "Daily Expenses",
346
- "type": "stat",
347
- "description": "Shows the average expenses per day for the selected period. Useful for fine-grained monitoring of spending.\n\nData Link: Clicking the value opens a filtered transactions dashboard for this period and group."
347
+ "type": "stat"
348
348
  },
349
349
  {
350
- "datasource": "SQLite",
350
+ "datasource": "PostgreSQL",
351
351
  "description": "Time series chart of expenses by transaction group, aggregated weekly for the selected period. Useful for visualizing spending trends and identifying cost drivers.\n\nData Link: Clicking a group name opens a filtered transactions dashboard for that group and period.",
352
352
  "fieldConfig": {
353
353
  "defaults": {
354
354
  "color": {
355
- "mode": "palette-classic"
355
+ "fixedColor": "dark-red",
356
+ "mode": "continuous-YlRd",
357
+ "seriesBy": "max"
356
358
  },
357
359
  "custom": {
358
360
  "axisBorderShow": false,
@@ -395,10 +397,6 @@
395
397
  {
396
398
  "color": "green",
397
399
  "value": 0
398
- },
399
- {
400
- "color": "red",
401
- "value": 80
402
400
  }
403
401
  ]
404
402
  },
@@ -415,9 +413,9 @@
415
413
  "id": "links",
416
414
  "value": [
417
415
  {
416
+ "targetBlank": true,
418
417
  "title": "View ${__series.name} Transactions",
419
- "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to",
420
- "targetBlank": true
418
+ "url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to"
421
419
  }
422
420
  ]
423
421
  }
@@ -432,7 +430,6 @@
432
430
  "y": 4
433
431
  },
434
432
  "id": 11,
435
- "type": "timeseries",
436
433
  "options": {
437
434
  "legend": {
438
435
  "calcs": ["sum"],
@@ -446,13 +443,12 @@
446
443
  "sort": "none"
447
444
  }
448
445
  },
449
- "pluginVersion": "12.2.0",
446
+ "pluginVersion": "12.2.1",
450
447
  "targets": [
451
448
  {
452
- "datasource": "SQLite",
453
- "queryText": "SELECT t.timestamp, g.name AS \"TxGroup\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring}) GROUP BY t.timestamp, g.name ORDER BY t.timestamp;",
454
- "queryType": "table",
455
- "rawQueryText": "SELECT t.timestamp, g.name AS \"TxGroup\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Expenses\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id INNER JOIN txgroups g USING (txgroup_id) WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND g.name IN (${Txgroup:sqlstring}) GROUP BY t.timestamp, g.name ORDER BY t.timestamp;",
449
+ "datasource": "PostgreSQL",
450
+ "format": "table",
451
+ "rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", txgroup_name AS \"TxGroup\", SUM(value_usd) AS \"Expenses\" FROM usdvalue_presum_expenses 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;",
456
452
  "refId": "A",
457
453
  "timeColumns": ["timestamp"]
458
454
  }
@@ -485,14 +481,14 @@
485
481
  "id": "groupBy",
486
482
  "options": {
487
483
  "fields": {
488
- "TxGroup": {
489
- "aggregations": [],
490
- "operation": "groupby"
491
- },
492
484
  "Expenses": {
493
485
  "aggregations": ["sum"],
494
486
  "operation": "aggregate"
495
487
  },
488
+ "TxGroup": {
489
+ "aggregations": [],
490
+ "operation": "groupby"
491
+ },
496
492
  "timestamp": {
497
493
  "aggregations": [],
498
494
  "operation": "groupby"
@@ -510,7 +506,8 @@
510
506
  }
511
507
  }
512
508
  }
513
- ]
509
+ ],
510
+ "type": "timeseries"
514
511
  }
515
512
  ],
516
513
  "preload": false,
@@ -519,19 +516,38 @@
519
516
  "tags": ["breakdown", "expenses"],
520
517
  "templating": {
521
518
  "list": [
519
+ {
520
+ "name": "TopLevel",
521
+ "label": "Top Level",
522
+ "type": "query",
523
+ "query": "SELECT DISTINCT top_category FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
524
+ "definition": "SELECT DISTINCT top_category FROM usdvalue_presum_expenses WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
525
+ "description": "Filter the dashboard by top-level expense category.",
526
+ "includeAll": true,
527
+ "multi": true,
528
+ "current": {
529
+ "text": "All",
530
+ "value": "$__all"
531
+ },
532
+ "options": [],
533
+ "refresh": 2,
534
+ "regex": "",
535
+ "sort": 5
536
+ },
522
537
  {
523
538
  "allowCustomValue": true,
524
539
  "current": {
525
540
  "text": "All",
526
541
  "value": "$__all"
527
542
  },
528
- "definition": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id WHERE (gh.top_category = 'Expenses' OR gh.top_category = 'Cost of Revenue' OR gh.top_category = 'Other Expense') AND a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
529
- "description": "Filter the dashboard by transaction group.\n\nSelect one or more groups to view expenses for specific categories, or 'All' to include every group.",
543
+ "definition": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_expenses WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
544
+ "description": "Filter the dashboard by transaction group within the selected top-level categories.",
530
545
  "includeAll": true,
546
+ "multi": true,
531
547
  "label": "Tx Group",
532
548
  "name": "Txgroup",
533
549
  "options": [],
534
- "query": "SELECT DISTINCT t.name FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id LEFT JOIN txgroups t ON gh.txgroup_id = t.txgroup_id WHERE (gh.top_category = 'Expenses' OR gh.top_category = 'Cost of Revenue' OR gh.top_category = 'Other Expense') AND a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
550
+ "query": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_expenses WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
535
551
  "refresh": 2,
536
552
  "regex": "",
537
553
  "sort": 5,
@@ -547,5 +563,5 @@
547
563
  "timezone": "",
548
564
  "title": "Expenses Over Time",
549
565
  "uid": "62bccd38-918c-4395-9180-8f7f911e9ddf",
550
- "version": 14
566
+ "version": 22
551
567
  }