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
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"editable": true,
|
|
19
19
|
"fiscalYearStartMonth": 0,
|
|
20
20
|
"graphTooltip": 1,
|
|
21
|
+
"id": 4,
|
|
21
22
|
"links": [],
|
|
22
|
-
"liveNow": false,
|
|
23
23
|
"panels": [
|
|
24
24
|
{
|
|
25
|
-
"datasource": "
|
|
25
|
+
"datasource": "PostgreSQL",
|
|
26
26
|
"fieldConfig": {
|
|
27
27
|
"defaults": {
|
|
28
28
|
"color": {
|
|
@@ -34,14 +34,15 @@
|
|
|
34
34
|
"steps": [
|
|
35
35
|
{
|
|
36
36
|
"color": "green",
|
|
37
|
-
"value":
|
|
37
|
+
"value": 0
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"color": "red",
|
|
41
41
|
"value": 80
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"unit": "currencyUSD"
|
|
45
46
|
},
|
|
46
47
|
"overrides": []
|
|
47
48
|
},
|
|
@@ -57,34 +58,32 @@
|
|
|
57
58
|
"graphMode": "area",
|
|
58
59
|
"justifyMode": "auto",
|
|
59
60
|
"orientation": "auto",
|
|
61
|
+
"percentChangeColorMode": "standard",
|
|
60
62
|
"reduceOptions": {
|
|
61
|
-
"calcs": [
|
|
62
|
-
"lastNotNull"
|
|
63
|
-
],
|
|
63
|
+
"calcs": ["lastNotNull"],
|
|
64
64
|
"fields": "",
|
|
65
65
|
"values": false
|
|
66
66
|
},
|
|
67
|
-
"
|
|
67
|
+
"showPercentChange": false,
|
|
68
|
+
"textMode": "auto",
|
|
69
|
+
"wideLayout": true
|
|
68
70
|
},
|
|
69
|
-
"pluginVersion": "
|
|
71
|
+
"pluginVersion": "12.1.1",
|
|
70
72
|
"targets": [
|
|
71
73
|
{
|
|
72
|
-
"datasource": "
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
76
77
|
"refId": "A",
|
|
77
|
-
"timeColumns": [
|
|
78
|
-
"time",
|
|
79
|
-
"ts"
|
|
80
|
-
]
|
|
78
|
+
"timeColumns": ["time", "ts"]
|
|
81
79
|
}
|
|
82
80
|
],
|
|
83
81
|
"title": "Revenue",
|
|
84
|
-
"type": "stat"
|
|
82
|
+
"type": "stat",
|
|
83
|
+
"description": "Displays the total value of all transactions sorted as revenue for the selected period."
|
|
85
84
|
},
|
|
86
85
|
{
|
|
87
|
-
"datasource": "
|
|
86
|
+
"datasource": "PostgreSQL",
|
|
88
87
|
"fieldConfig": {
|
|
89
88
|
"defaults": {
|
|
90
89
|
"color": {
|
|
@@ -96,14 +95,15 @@
|
|
|
96
95
|
"steps": [
|
|
97
96
|
{
|
|
98
97
|
"color": "green",
|
|
99
|
-
"value":
|
|
98
|
+
"value": 0
|
|
100
99
|
},
|
|
101
100
|
{
|
|
102
101
|
"color": "red",
|
|
103
102
|
"value": 80
|
|
104
103
|
}
|
|
105
104
|
]
|
|
106
|
-
}
|
|
105
|
+
},
|
|
106
|
+
"unit": "currencyUSD"
|
|
107
107
|
},
|
|
108
108
|
"overrides": []
|
|
109
109
|
},
|
|
@@ -119,34 +119,32 @@
|
|
|
119
119
|
"graphMode": "area",
|
|
120
120
|
"justifyMode": "auto",
|
|
121
121
|
"orientation": "auto",
|
|
122
|
+
"percentChangeColorMode": "standard",
|
|
122
123
|
"reduceOptions": {
|
|
123
|
-
"calcs": [
|
|
124
|
-
"lastNotNull"
|
|
125
|
-
],
|
|
124
|
+
"calcs": ["lastNotNull"],
|
|
126
125
|
"fields": "",
|
|
127
126
|
"values": false
|
|
128
127
|
},
|
|
129
|
-
"
|
|
128
|
+
"showPercentChange": false,
|
|
129
|
+
"textMode": "auto",
|
|
130
|
+
"wideLayout": true
|
|
130
131
|
},
|
|
131
|
-
"pluginVersion": "
|
|
132
|
+
"pluginVersion": "12.1.1",
|
|
132
133
|
"targets": [
|
|
133
134
|
{
|
|
134
|
-
"datasource": "
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
138
138
|
"refId": "A",
|
|
139
|
-
"timeColumns": [
|
|
140
|
-
"time",
|
|
141
|
-
"ts"
|
|
142
|
-
]
|
|
139
|
+
"timeColumns": ["time", "ts"]
|
|
143
140
|
}
|
|
144
141
|
],
|
|
145
142
|
"title": "Expenses",
|
|
146
|
-
"type": "stat"
|
|
143
|
+
"type": "stat",
|
|
144
|
+
"description": "Displays the total value of all transactions sorted as expenses for the selected period."
|
|
147
145
|
},
|
|
148
146
|
{
|
|
149
|
-
"datasource": "
|
|
147
|
+
"datasource": "PostgreSQL",
|
|
150
148
|
"fieldConfig": {
|
|
151
149
|
"defaults": {
|
|
152
150
|
"color": {
|
|
@@ -158,14 +156,15 @@
|
|
|
158
156
|
"steps": [
|
|
159
157
|
{
|
|
160
158
|
"color": "green",
|
|
161
|
-
"value":
|
|
159
|
+
"value": 0
|
|
162
160
|
},
|
|
163
161
|
{
|
|
164
162
|
"color": "red",
|
|
165
163
|
"value": 80
|
|
166
164
|
}
|
|
167
165
|
]
|
|
168
|
-
}
|
|
166
|
+
},
|
|
167
|
+
"unit": "currencyUSD"
|
|
169
168
|
},
|
|
170
169
|
"overrides": []
|
|
171
170
|
},
|
|
@@ -181,34 +180,32 @@
|
|
|
181
180
|
"graphMode": "area",
|
|
182
181
|
"justifyMode": "auto",
|
|
183
182
|
"orientation": "auto",
|
|
183
|
+
"percentChangeColorMode": "standard",
|
|
184
184
|
"reduceOptions": {
|
|
185
|
-
"calcs": [
|
|
186
|
-
"lastNotNull"
|
|
187
|
-
],
|
|
185
|
+
"calcs": ["lastNotNull"],
|
|
188
186
|
"fields": "",
|
|
189
187
|
"values": false
|
|
190
188
|
},
|
|
191
|
-
"
|
|
189
|
+
"showPercentChange": false,
|
|
190
|
+
"textMode": "auto",
|
|
191
|
+
"wideLayout": true
|
|
192
192
|
},
|
|
193
|
-
"pluginVersion": "
|
|
193
|
+
"pluginVersion": "12.1.1",
|
|
194
194
|
"targets": [
|
|
195
195
|
{
|
|
196
|
-
"datasource": "
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
200
199
|
"refId": "A",
|
|
201
|
-
"timeColumns": [
|
|
202
|
-
"time",
|
|
203
|
-
"ts"
|
|
204
|
-
]
|
|
200
|
+
"timeColumns": ["time", "ts"]
|
|
205
201
|
}
|
|
206
202
|
],
|
|
207
203
|
"title": "Cost of Revenue",
|
|
208
|
-
"type": "stat"
|
|
204
|
+
"type": "stat",
|
|
205
|
+
"description": "Displays the total value of all transactions sorted as cost of revenue for the selected period."
|
|
209
206
|
},
|
|
210
207
|
{
|
|
211
|
-
"datasource": "
|
|
208
|
+
"datasource": "PostgreSQL",
|
|
212
209
|
"fieldConfig": {
|
|
213
210
|
"defaults": {
|
|
214
211
|
"color": {
|
|
@@ -220,14 +217,15 @@
|
|
|
220
217
|
"steps": [
|
|
221
218
|
{
|
|
222
219
|
"color": "green",
|
|
223
|
-
"value":
|
|
220
|
+
"value": 0
|
|
224
221
|
},
|
|
225
222
|
{
|
|
226
223
|
"color": "red",
|
|
227
224
|
"value": 80
|
|
228
225
|
}
|
|
229
226
|
]
|
|
230
|
-
}
|
|
227
|
+
},
|
|
228
|
+
"unit": "currencyUSD"
|
|
231
229
|
},
|
|
232
230
|
"overrides": []
|
|
233
231
|
},
|
|
@@ -243,34 +241,32 @@
|
|
|
243
241
|
"graphMode": "area",
|
|
244
242
|
"justifyMode": "auto",
|
|
245
243
|
"orientation": "auto",
|
|
244
|
+
"percentChangeColorMode": "standard",
|
|
246
245
|
"reduceOptions": {
|
|
247
|
-
"calcs": [
|
|
248
|
-
"lastNotNull"
|
|
249
|
-
],
|
|
246
|
+
"calcs": ["lastNotNull"],
|
|
250
247
|
"fields": "",
|
|
251
248
|
"values": false
|
|
252
249
|
},
|
|
253
|
-
"
|
|
250
|
+
"showPercentChange": false,
|
|
251
|
+
"textMode": "auto",
|
|
252
|
+
"wideLayout": true
|
|
254
253
|
},
|
|
255
|
-
"pluginVersion": "
|
|
254
|
+
"pluginVersion": "12.1.1",
|
|
256
255
|
"targets": [
|
|
257
256
|
{
|
|
258
|
-
"datasource": "
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
262
260
|
"refId": "A",
|
|
263
|
-
"timeColumns": [
|
|
264
|
-
"time",
|
|
265
|
-
"ts"
|
|
266
|
-
]
|
|
261
|
+
"timeColumns": ["time", "ts"]
|
|
267
262
|
}
|
|
268
263
|
],
|
|
269
264
|
"title": "Other Income",
|
|
270
|
-
"type": "stat"
|
|
265
|
+
"type": "stat",
|
|
266
|
+
"description": "Displays the total value of all transactions sorted as other income for the selected period."
|
|
271
267
|
},
|
|
272
268
|
{
|
|
273
|
-
"datasource": "
|
|
269
|
+
"datasource": "PostgreSQL",
|
|
274
270
|
"fieldConfig": {
|
|
275
271
|
"defaults": {
|
|
276
272
|
"color": {
|
|
@@ -282,14 +278,15 @@
|
|
|
282
278
|
"steps": [
|
|
283
279
|
{
|
|
284
280
|
"color": "green",
|
|
285
|
-
"value":
|
|
281
|
+
"value": 0
|
|
286
282
|
},
|
|
287
283
|
{
|
|
288
284
|
"color": "red",
|
|
289
285
|
"value": 80
|
|
290
286
|
}
|
|
291
287
|
]
|
|
292
|
-
}
|
|
288
|
+
},
|
|
289
|
+
"unit": "currencyUSD"
|
|
293
290
|
},
|
|
294
291
|
"overrides": []
|
|
295
292
|
},
|
|
@@ -305,35 +302,33 @@
|
|
|
305
302
|
"graphMode": "area",
|
|
306
303
|
"justifyMode": "auto",
|
|
307
304
|
"orientation": "auto",
|
|
305
|
+
"percentChangeColorMode": "standard",
|
|
308
306
|
"reduceOptions": {
|
|
309
|
-
"calcs": [
|
|
310
|
-
"lastNotNull"
|
|
311
|
-
],
|
|
307
|
+
"calcs": ["lastNotNull"],
|
|
312
308
|
"fields": "",
|
|
313
309
|
"values": false
|
|
314
310
|
},
|
|
315
|
-
"
|
|
311
|
+
"showPercentChange": false,
|
|
312
|
+
"textMode": "auto",
|
|
313
|
+
"wideLayout": true
|
|
316
314
|
},
|
|
317
|
-
"pluginVersion": "
|
|
315
|
+
"pluginVersion": "12.1.1",
|
|
318
316
|
"targets": [
|
|
319
317
|
{
|
|
320
|
-
"datasource": "
|
|
321
|
-
"
|
|
322
|
-
"
|
|
323
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
324
321
|
"refId": "A",
|
|
325
|
-
"timeColumns": [
|
|
326
|
-
"time",
|
|
327
|
-
"ts"
|
|
328
|
-
]
|
|
322
|
+
"timeColumns": ["time", "ts"]
|
|
329
323
|
}
|
|
330
324
|
],
|
|
331
325
|
"title": "Other Expenses",
|
|
332
|
-
"type": "stat"
|
|
326
|
+
"type": "stat",
|
|
327
|
+
"description": "Displays the total value of all transactions sorted as other expenses for the selected period."
|
|
333
328
|
},
|
|
334
329
|
{
|
|
335
|
-
"datasource": "
|
|
336
|
-
"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.",
|
|
337
332
|
"fieldConfig": {
|
|
338
333
|
"defaults": {
|
|
339
334
|
"color": {
|
|
@@ -345,14 +340,15 @@
|
|
|
345
340
|
"steps": [
|
|
346
341
|
{
|
|
347
342
|
"color": "green",
|
|
348
|
-
"value":
|
|
343
|
+
"value": 0
|
|
349
344
|
},
|
|
350
345
|
{
|
|
351
346
|
"color": "red",
|
|
352
347
|
"value": 80
|
|
353
348
|
}
|
|
354
349
|
]
|
|
355
|
-
}
|
|
350
|
+
},
|
|
351
|
+
"unit": "currencyUSD"
|
|
356
352
|
},
|
|
357
353
|
"overrides": []
|
|
358
354
|
},
|
|
@@ -368,35 +364,32 @@
|
|
|
368
364
|
"graphMode": "area",
|
|
369
365
|
"justifyMode": "auto",
|
|
370
366
|
"orientation": "auto",
|
|
367
|
+
"percentChangeColorMode": "standard",
|
|
371
368
|
"reduceOptions": {
|
|
372
|
-
"calcs": [
|
|
373
|
-
"lastNotNull"
|
|
374
|
-
],
|
|
369
|
+
"calcs": ["lastNotNull"],
|
|
375
370
|
"fields": "",
|
|
376
371
|
"values": false
|
|
377
372
|
},
|
|
378
|
-
"
|
|
373
|
+
"showPercentChange": false,
|
|
374
|
+
"textMode": "auto",
|
|
375
|
+
"wideLayout": true
|
|
379
376
|
},
|
|
380
|
-
"pluginVersion": "
|
|
377
|
+
"pluginVersion": "12.1.1",
|
|
381
378
|
"targets": [
|
|
382
379
|
{
|
|
383
|
-
"datasource": "
|
|
384
|
-
"
|
|
385
|
-
"
|
|
386
|
-
"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 gh.top_category = 'Revenue' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN p.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN p.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN p.value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum p\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
387
383
|
"refId": "A",
|
|
388
|
-
"timeColumns": [
|
|
389
|
-
"time",
|
|
390
|
-
"ts"
|
|
391
|
-
]
|
|
384
|
+
"timeColumns": ["time", "ts"]
|
|
392
385
|
}
|
|
393
386
|
],
|
|
394
387
|
"title": "Sorted Total",
|
|
395
388
|
"type": "stat"
|
|
396
389
|
},
|
|
397
390
|
{
|
|
398
|
-
"datasource": "
|
|
399
|
-
"description": "",
|
|
391
|
+
"datasource": "PostgreSQL",
|
|
392
|
+
"description": "Time series chart of all cashflows (including unsorted), grouped by category, for the selected period.",
|
|
400
393
|
"fieldConfig": {
|
|
401
394
|
"defaults": {
|
|
402
395
|
"color": {
|
|
@@ -409,6 +402,7 @@
|
|
|
409
402
|
"axisLabel": "",
|
|
410
403
|
"axisPlacement": "auto",
|
|
411
404
|
"barAlignment": 0,
|
|
405
|
+
"barWidthFactor": 0.6,
|
|
412
406
|
"drawStyle": "bars",
|
|
413
407
|
"fillOpacity": 70,
|
|
414
408
|
"gradientMode": "none",
|
|
@@ -440,14 +434,15 @@
|
|
|
440
434
|
"steps": [
|
|
441
435
|
{
|
|
442
436
|
"color": "green",
|
|
443
|
-
"value":
|
|
437
|
+
"value": 0
|
|
444
438
|
},
|
|
445
439
|
{
|
|
446
440
|
"color": "red",
|
|
447
441
|
"value": 80
|
|
448
442
|
}
|
|
449
443
|
]
|
|
450
|
-
}
|
|
444
|
+
},
|
|
445
|
+
"unit": "currencyUSD"
|
|
451
446
|
},
|
|
452
447
|
"overrides": [
|
|
453
448
|
{
|
|
@@ -490,20 +485,19 @@
|
|
|
490
485
|
"showLegend": true
|
|
491
486
|
},
|
|
492
487
|
"tooltip": {
|
|
488
|
+
"hideZeros": false,
|
|
493
489
|
"mode": "single",
|
|
494
490
|
"sort": "none"
|
|
495
491
|
}
|
|
496
492
|
},
|
|
493
|
+
"pluginVersion": "12.1.1",
|
|
497
494
|
"targets": [
|
|
498
495
|
{
|
|
499
|
-
"datasource": "
|
|
500
|
-
"
|
|
501
|
-
"
|
|
502
|
-
"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(p.timestamp) AS \"timestamp\",\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN p.value_usd ELSE 0 END) AS \"Total Received\",\n SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN p.value_usd ELSE 0 END) * -1 AS \"Total Sent\",\n SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income','Sort Me (Inbound)') THEN p.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses','Sort Me (Outbound)') THEN p.value_usd ELSE 0 END) AS \"Net\"\nFROM usdvalue_presum AS p\nJOIN txgroup_hierarchy gh ON p.txgroup_id = gh.txgroup_id\nWHERE p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000\nGROUP BY timestamp\nORDER BY timestamp;",
|
|
503
499
|
"refId": "A",
|
|
504
|
-
"timeColumns": [
|
|
505
|
-
"timestamp"
|
|
506
|
-
]
|
|
500
|
+
"timeColumns": ["timestamp"]
|
|
507
501
|
}
|
|
508
502
|
],
|
|
509
503
|
"title": "Weekly Cashflow",
|
|
@@ -535,45 +529,31 @@
|
|
|
535
529
|
"options": {
|
|
536
530
|
"fields": {
|
|
537
531
|
"Cost of Revenue": {
|
|
538
|
-
"aggregations": [
|
|
539
|
-
"sum"
|
|
540
|
-
],
|
|
532
|
+
"aggregations": ["sum"],
|
|
541
533
|
"operation": "aggregate"
|
|
542
534
|
},
|
|
543
535
|
"Expenses": {
|
|
544
|
-
"aggregations": [
|
|
545
|
-
"sum"
|
|
546
|
-
],
|
|
536
|
+
"aggregations": ["sum"],
|
|
547
537
|
"operation": "aggregate"
|
|
548
538
|
},
|
|
549
539
|
"Net": {
|
|
550
|
-
"aggregations": [
|
|
551
|
-
"sum"
|
|
552
|
-
],
|
|
540
|
+
"aggregations": ["sum"],
|
|
553
541
|
"operation": "aggregate"
|
|
554
542
|
},
|
|
555
543
|
"Net (Including Unsorted)": {
|
|
556
|
-
"aggregations": [
|
|
557
|
-
"sum"
|
|
558
|
-
],
|
|
544
|
+
"aggregations": ["sum"],
|
|
559
545
|
"operation": "aggregate"
|
|
560
546
|
},
|
|
561
547
|
"Other Expenses": {
|
|
562
|
-
"aggregations": [
|
|
563
|
-
"sum"
|
|
564
|
-
],
|
|
548
|
+
"aggregations": ["sum"],
|
|
565
549
|
"operation": "aggregate"
|
|
566
550
|
},
|
|
567
551
|
"Other Income": {
|
|
568
|
-
"aggregations": [
|
|
569
|
-
"sum"
|
|
570
|
-
],
|
|
552
|
+
"aggregations": ["sum"],
|
|
571
553
|
"operation": "aggregate"
|
|
572
554
|
},
|
|
573
555
|
"Revenue": {
|
|
574
|
-
"aggregations": [
|
|
575
|
-
"sum"
|
|
576
|
-
],
|
|
556
|
+
"aggregations": ["sum"],
|
|
577
557
|
"operation": "aggregate"
|
|
578
558
|
},
|
|
579
559
|
"Timestamp": {
|
|
@@ -581,39 +561,27 @@
|
|
|
581
561
|
"operation": "groupby"
|
|
582
562
|
},
|
|
583
563
|
"Total Expenses": {
|
|
584
|
-
"aggregations": [
|
|
585
|
-
"sum"
|
|
586
|
-
],
|
|
564
|
+
"aggregations": ["sum"],
|
|
587
565
|
"operation": "aggregate"
|
|
588
566
|
},
|
|
589
567
|
"Total Expenses (Including Unsorted)": {
|
|
590
|
-
"aggregations": [
|
|
591
|
-
"sum"
|
|
592
|
-
],
|
|
568
|
+
"aggregations": ["sum"],
|
|
593
569
|
"operation": "aggregate"
|
|
594
570
|
},
|
|
595
571
|
"Total Received": {
|
|
596
|
-
"aggregations": [
|
|
597
|
-
"sum"
|
|
598
|
-
],
|
|
572
|
+
"aggregations": ["sum"],
|
|
599
573
|
"operation": "aggregate"
|
|
600
574
|
},
|
|
601
575
|
"Total Revenue": {
|
|
602
|
-
"aggregations": [
|
|
603
|
-
"sum"
|
|
604
|
-
],
|
|
576
|
+
"aggregations": ["sum"],
|
|
605
577
|
"operation": "aggregate"
|
|
606
578
|
},
|
|
607
579
|
"Total Revenue (Including Unsorted)": {
|
|
608
|
-
"aggregations": [
|
|
609
|
-
"sum"
|
|
610
|
-
],
|
|
580
|
+
"aggregations": ["sum"],
|
|
611
581
|
"operation": "aggregate"
|
|
612
582
|
},
|
|
613
583
|
"Total Sent": {
|
|
614
|
-
"aggregations": [
|
|
615
|
-
"sum"
|
|
616
|
-
],
|
|
584
|
+
"aggregations": ["sum"],
|
|
617
585
|
"operation": "aggregate"
|
|
618
586
|
},
|
|
619
587
|
"timestamp": {
|
|
@@ -627,8 +595,8 @@
|
|
|
627
595
|
"type": "timeseries"
|
|
628
596
|
},
|
|
629
597
|
{
|
|
630
|
-
"datasource": "
|
|
631
|
-
"description": "",
|
|
598
|
+
"datasource": "PostgreSQL",
|
|
599
|
+
"description": "Displays the total value of inbound transactions pending categorization for the selected period.",
|
|
632
600
|
"fieldConfig": {
|
|
633
601
|
"defaults": {
|
|
634
602
|
"color": {
|
|
@@ -640,14 +608,15 @@
|
|
|
640
608
|
"steps": [
|
|
641
609
|
{
|
|
642
610
|
"color": "green",
|
|
643
|
-
"value":
|
|
611
|
+
"value": 0
|
|
644
612
|
},
|
|
645
613
|
{
|
|
646
614
|
"color": "red",
|
|
647
615
|
"value": 80
|
|
648
616
|
}
|
|
649
617
|
]
|
|
650
|
-
}
|
|
618
|
+
},
|
|
619
|
+
"unit": "currencyUSD"
|
|
651
620
|
},
|
|
652
621
|
"overrides": []
|
|
653
622
|
},
|
|
@@ -663,35 +632,32 @@
|
|
|
663
632
|
"graphMode": "area",
|
|
664
633
|
"justifyMode": "auto",
|
|
665
634
|
"orientation": "auto",
|
|
635
|
+
"percentChangeColorMode": "standard",
|
|
666
636
|
"reduceOptions": {
|
|
667
|
-
"calcs": [
|
|
668
|
-
"lastNotNull"
|
|
669
|
-
],
|
|
637
|
+
"calcs": ["lastNotNull"],
|
|
670
638
|
"fields": "",
|
|
671
639
|
"values": false
|
|
672
640
|
},
|
|
673
|
-
"
|
|
641
|
+
"showPercentChange": false,
|
|
642
|
+
"textMode": "auto",
|
|
643
|
+
"wideLayout": true
|
|
674
644
|
},
|
|
675
|
-
"pluginVersion": "
|
|
645
|
+
"pluginVersion": "12.1.1",
|
|
676
646
|
"targets": [
|
|
677
647
|
{
|
|
678
|
-
"datasource": "
|
|
679
|
-
"
|
|
680
|
-
"
|
|
681
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Inbound)' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
682
651
|
"refId": "A",
|
|
683
|
-
"timeColumns": [
|
|
684
|
-
"time",
|
|
685
|
-
"ts"
|
|
686
|
-
]
|
|
652
|
+
"timeColumns": ["time", "ts"]
|
|
687
653
|
}
|
|
688
654
|
],
|
|
689
655
|
"title": "Unsorted (Inbound)",
|
|
690
656
|
"type": "stat"
|
|
691
657
|
},
|
|
692
658
|
{
|
|
693
|
-
"datasource": "
|
|
694
|
-
"description": "",
|
|
659
|
+
"datasource": "PostgreSQL",
|
|
660
|
+
"description": "Displays the total value of outbound transactions pending categorization for the selected period.",
|
|
695
661
|
"fieldConfig": {
|
|
696
662
|
"defaults": {
|
|
697
663
|
"color": {
|
|
@@ -703,14 +669,15 @@
|
|
|
703
669
|
"steps": [
|
|
704
670
|
{
|
|
705
671
|
"color": "green",
|
|
706
|
-
"value":
|
|
672
|
+
"value": 0
|
|
707
673
|
},
|
|
708
674
|
{
|
|
709
675
|
"color": "red",
|
|
710
676
|
"value": 80
|
|
711
677
|
}
|
|
712
678
|
]
|
|
713
|
-
}
|
|
679
|
+
},
|
|
680
|
+
"unit": "currencyUSD"
|
|
714
681
|
},
|
|
715
682
|
"overrides": []
|
|
716
683
|
},
|
|
@@ -726,35 +693,32 @@
|
|
|
726
693
|
"graphMode": "area",
|
|
727
694
|
"justifyMode": "auto",
|
|
728
695
|
"orientation": "auto",
|
|
696
|
+
"percentChangeColorMode": "standard",
|
|
729
697
|
"reduceOptions": {
|
|
730
|
-
"calcs": [
|
|
731
|
-
"lastNotNull"
|
|
732
|
-
],
|
|
698
|
+
"calcs": ["lastNotNull"],
|
|
733
699
|
"fields": "",
|
|
734
700
|
"values": false
|
|
735
701
|
},
|
|
736
|
-
"
|
|
702
|
+
"showPercentChange": false,
|
|
703
|
+
"textMode": "auto",
|
|
704
|
+
"wideLayout": true
|
|
737
705
|
},
|
|
738
|
-
"pluginVersion": "
|
|
706
|
+
"pluginVersion": "12.1.1",
|
|
739
707
|
"targets": [
|
|
740
708
|
{
|
|
741
|
-
"datasource": "
|
|
742
|
-
"
|
|
743
|
-
"
|
|
744
|
-
"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(p.value_usd) AS total_revenue FROM usdvalue_presum p JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Sort Me (Outbound)' AND p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
745
712
|
"refId": "A",
|
|
746
|
-
"timeColumns": [
|
|
747
|
-
"time",
|
|
748
|
-
"ts"
|
|
749
|
-
]
|
|
713
|
+
"timeColumns": ["time", "ts"]
|
|
750
714
|
}
|
|
751
715
|
],
|
|
752
716
|
"title": "Unsorted (Outbound)",
|
|
753
717
|
"type": "stat"
|
|
754
718
|
},
|
|
755
719
|
{
|
|
756
|
-
"datasource": "
|
|
757
|
-
"description": "",
|
|
720
|
+
"datasource": "PostgreSQL",
|
|
721
|
+
"description": "Shows the overall net cashflow (including unsorted) for the selected period.",
|
|
758
722
|
"fieldConfig": {
|
|
759
723
|
"defaults": {
|
|
760
724
|
"color": {
|
|
@@ -766,14 +730,15 @@
|
|
|
766
730
|
"steps": [
|
|
767
731
|
{
|
|
768
732
|
"color": "green",
|
|
769
|
-
"value":
|
|
733
|
+
"value": 0
|
|
770
734
|
},
|
|
771
735
|
{
|
|
772
736
|
"color": "red",
|
|
773
737
|
"value": 80
|
|
774
738
|
}
|
|
775
739
|
]
|
|
776
|
-
}
|
|
740
|
+
},
|
|
741
|
+
"unit": "currencyUSD"
|
|
777
742
|
},
|
|
778
743
|
"overrides": []
|
|
779
744
|
},
|
|
@@ -789,36 +754,34 @@
|
|
|
789
754
|
"graphMode": "area",
|
|
790
755
|
"justifyMode": "auto",
|
|
791
756
|
"orientation": "auto",
|
|
757
|
+
"percentChangeColorMode": "standard",
|
|
792
758
|
"reduceOptions": {
|
|
793
|
-
"calcs": [
|
|
794
|
-
"lastNotNull"
|
|
795
|
-
],
|
|
759
|
+
"calcs": ["lastNotNull"],
|
|
796
760
|
"fields": "",
|
|
797
761
|
"values": false
|
|
798
762
|
},
|
|
799
|
-
"
|
|
763
|
+
"showPercentChange": false,
|
|
764
|
+
"textMode": "auto",
|
|
765
|
+
"wideLayout": true
|
|
800
766
|
},
|
|
801
|
-
"pluginVersion": "
|
|
767
|
+
"pluginVersion": "12.1.1",
|
|
802
768
|
"targets": [
|
|
803
769
|
{
|
|
804
|
-
"datasource": "
|
|
805
|
-
"
|
|
806
|
-
"
|
|
807
|
-
"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 gh.top_category = 'Revenue' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN p.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN p.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Sort Me (Inbound)' THEN p.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Sort Me (Outbound)' THEN p.value_usd ELSE 0 END)\n) AS total_net\nFROM usdvalue_presum p\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE p.timestamp >= $__from/1000 AND p.timestamp <= $__to/1000",
|
|
808
773
|
"refId": "A",
|
|
809
|
-
"timeColumns": [
|
|
810
|
-
"time",
|
|
811
|
-
"ts"
|
|
812
|
-
]
|
|
774
|
+
"timeColumns": ["time", "ts"]
|
|
813
775
|
}
|
|
814
776
|
],
|
|
815
777
|
"title": "Total",
|
|
816
778
|
"type": "stat"
|
|
817
779
|
}
|
|
818
780
|
],
|
|
819
|
-
"
|
|
820
|
-
"
|
|
821
|
-
"
|
|
781
|
+
"preload": false,
|
|
782
|
+
"refresh": "",
|
|
783
|
+
"schemaVersion": 41,
|
|
784
|
+
"tags": ["cashflow", "unsorted"],
|
|
822
785
|
"templating": {
|
|
823
786
|
"list": []
|
|
824
787
|
},
|
|
@@ -829,7 +792,7 @@
|
|
|
829
792
|
"timepicker": {},
|
|
830
793
|
"timezone": "",
|
|
831
794
|
"title": "Total Cashflow Summary (Including Unsorted)",
|
|
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.",
|
|
832
796
|
"uid": "2b6e7c1d-8f4a-4e3b-9b2a-1c7d8e9f0a2b",
|
|
833
|
-
"version":
|
|
834
|
-
"weekStart": ""
|
|
797
|
+
"version": 105
|
|
835
798
|
}
|