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.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +195 -154
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +192 -149
- dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -81
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +10 -22
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +283 -23
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +49 -39
- dao_treasury/.grafana/provisioning/dashboards/transactions/Unsorted Transactions.json +367 -0
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +109 -187
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +77 -127
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +509 -105
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +3856 -2924
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +57 -97
- dao_treasury/.grafana/provisioning/datasources/datasources.yaml +9 -4
- dao_treasury/__init__.py +0 -4
- dao_treasury/_docker.cp312-win32.pyd +0 -0
- dao_treasury/_docker.py +30 -22
- dao_treasury/_nicknames.cp312-win32.pyd +0 -0
- dao_treasury/_nicknames.py +3 -2
- dao_treasury/_wallet.cp312-win32.pyd +0 -0
- dao_treasury/constants.cp312-win32.pyd +0 -0
- dao_treasury/db.py +383 -131
- dao_treasury/docker-compose.yaml +19 -3
- dao_treasury/main.py +42 -4
- dao_treasury/sorting/__init__.cp312-win32.pyd +0 -0
- dao_treasury/sorting/__init__.py +38 -21
- dao_treasury/sorting/_matchers.cp312-win32.pyd +0 -0
- dao_treasury/sorting/_rules.cp312-win32.pyd +0 -0
- dao_treasury/sorting/factory.cp312-win32.pyd +0 -0
- dao_treasury/sorting/rule.cp312-win32.pyd +0 -0
- dao_treasury/sorting/rules/__init__.cp312-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp312-win32.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp312-win32.pyd +0 -0
- dao_treasury/treasury.py +4 -2
- dao_treasury/types.cp312-win32.pyd +0 -0
- {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/METADATA +18 -4
- dao_treasury-0.1.6.dist-info/RECORD +53 -0
- dao_treasury__mypyc.cp312-win32.pyd +0 -0
- dao_treasury/streams/__init__.cp312-win32.pyd +0 -0
- dao_treasury/streams/llamapay.cp312-win32.pyd +0 -0
- dao_treasury-0.0.60.dist-info/RECORD +0 -54
- {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/WHEEL +0 -0
- {dao_treasury-0.0.60.dist-info → dao_treasury-0.1.6.dist-info}/top_level.txt +0 -0
|
@@ -15,19 +15,21 @@
|
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
"description": "
|
|
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":
|
|
22
|
+
"id": 1,
|
|
23
23
|
"links": [],
|
|
24
24
|
"panels": [
|
|
25
25
|
{
|
|
26
|
-
"datasource": "
|
|
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
|
-
"
|
|
31
|
+
"fixedColor": "dark-red",
|
|
32
|
+
"mode": "fixed"
|
|
31
33
|
},
|
|
32
34
|
"mappings": [],
|
|
33
35
|
"thresholds": {
|
|
@@ -42,9 +44,29 @@
|
|
|
42
44
|
"value": 80
|
|
43
45
|
}
|
|
44
46
|
]
|
|
45
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"unit": "currencyUSD"
|
|
46
49
|
},
|
|
47
|
-
"overrides": [
|
|
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 Expense Transactions For This Period",
|
|
63
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
48
70
|
},
|
|
49
71
|
"gridPos": {
|
|
50
72
|
"h": 4,
|
|
@@ -54,15 +76,13 @@
|
|
|
54
76
|
},
|
|
55
77
|
"id": 1,
|
|
56
78
|
"options": {
|
|
57
|
-
"colorMode": "
|
|
79
|
+
"colorMode": "background",
|
|
58
80
|
"graphMode": "area",
|
|
59
81
|
"justifyMode": "auto",
|
|
60
82
|
"orientation": "auto",
|
|
61
83
|
"percentChangeColorMode": "standard",
|
|
62
84
|
"reduceOptions": {
|
|
63
|
-
"calcs": [
|
|
64
|
-
"lastNotNull"
|
|
65
|
-
],
|
|
85
|
+
"calcs": ["lastNotNull"],
|
|
66
86
|
"fields": "",
|
|
67
87
|
"values": false
|
|
68
88
|
},
|
|
@@ -70,29 +90,27 @@
|
|
|
70
90
|
"textMode": "auto",
|
|
71
91
|
"wideLayout": true
|
|
72
92
|
},
|
|
73
|
-
"pluginVersion": "12.2.
|
|
93
|
+
"pluginVersion": "12.2.1",
|
|
74
94
|
"targets": [
|
|
75
95
|
{
|
|
76
|
-
"datasource": "
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"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 ('$Txgroup' like '{%' or g.name = '$Txgroup')",
|
|
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})",
|
|
80
99
|
"refId": "A",
|
|
81
|
-
"timeColumns": [
|
|
82
|
-
"time",
|
|
83
|
-
"ts"
|
|
84
|
-
]
|
|
100
|
+
"timeColumns": ["time", "ts"]
|
|
85
101
|
}
|
|
86
102
|
],
|
|
87
|
-
"title": "
|
|
103
|
+
"title": "Expenses",
|
|
88
104
|
"type": "stat"
|
|
89
105
|
},
|
|
90
106
|
{
|
|
91
|
-
"datasource": "
|
|
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.",
|
|
92
109
|
"fieldConfig": {
|
|
93
110
|
"defaults": {
|
|
94
111
|
"color": {
|
|
95
|
-
"
|
|
112
|
+
"fixedColor": "dark-red",
|
|
113
|
+
"mode": "fixed"
|
|
96
114
|
},
|
|
97
115
|
"mappings": [],
|
|
98
116
|
"thresholds": {
|
|
@@ -107,9 +125,29 @@
|
|
|
107
125
|
"value": 80
|
|
108
126
|
}
|
|
109
127
|
]
|
|
110
|
-
}
|
|
128
|
+
},
|
|
129
|
+
"unit": "currencyUSD"
|
|
111
130
|
},
|
|
112
|
-
"overrides": [
|
|
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 Expense Transactions For This Period",
|
|
144
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
113
151
|
},
|
|
114
152
|
"gridPos": {
|
|
115
153
|
"h": 4,
|
|
@@ -119,15 +157,13 @@
|
|
|
119
157
|
},
|
|
120
158
|
"id": 4,
|
|
121
159
|
"options": {
|
|
122
|
-
"colorMode": "
|
|
160
|
+
"colorMode": "background",
|
|
123
161
|
"graphMode": "area",
|
|
124
162
|
"justifyMode": "auto",
|
|
125
163
|
"orientation": "auto",
|
|
126
164
|
"percentChangeColorMode": "standard",
|
|
127
165
|
"reduceOptions": {
|
|
128
|
-
"calcs": [
|
|
129
|
-
"lastNotNull"
|
|
130
|
-
],
|
|
166
|
+
"calcs": ["lastNotNull"],
|
|
131
167
|
"fields": "",
|
|
132
168
|
"values": false
|
|
133
169
|
},
|
|
@@ -135,29 +171,27 @@
|
|
|
135
171
|
"textMode": "auto",
|
|
136
172
|
"wideLayout": true
|
|
137
173
|
},
|
|
138
|
-
"pluginVersion": "12.2.
|
|
174
|
+
"pluginVersion": "12.2.1",
|
|
139
175
|
"targets": [
|
|
140
176
|
{
|
|
141
|
-
"datasource": "
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"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 ('$Txgroup' like '{%' or g.name = '$Txgroup')",
|
|
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})",
|
|
145
180
|
"refId": "A",
|
|
146
|
-
"timeColumns": [
|
|
147
|
-
"time",
|
|
148
|
-
"ts"
|
|
149
|
-
]
|
|
181
|
+
"timeColumns": ["time", "ts"]
|
|
150
182
|
}
|
|
151
183
|
],
|
|
152
184
|
"title": "Monthly Expenses",
|
|
153
185
|
"type": "stat"
|
|
154
186
|
},
|
|
155
187
|
{
|
|
156
|
-
"datasource": "
|
|
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.",
|
|
157
190
|
"fieldConfig": {
|
|
158
191
|
"defaults": {
|
|
159
192
|
"color": {
|
|
160
|
-
"
|
|
193
|
+
"fixedColor": "dark-red",
|
|
194
|
+
"mode": "fixed"
|
|
161
195
|
},
|
|
162
196
|
"mappings": [],
|
|
163
197
|
"thresholds": {
|
|
@@ -172,9 +206,29 @@
|
|
|
172
206
|
"value": 80
|
|
173
207
|
}
|
|
174
208
|
]
|
|
175
|
-
}
|
|
209
|
+
},
|
|
210
|
+
"unit": "currencyUSD"
|
|
176
211
|
},
|
|
177
|
-
"overrides": [
|
|
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 Expense Transactions For This Period",
|
|
225
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
]
|
|
178
232
|
},
|
|
179
233
|
"gridPos": {
|
|
180
234
|
"h": 4,
|
|
@@ -184,15 +238,13 @@
|
|
|
184
238
|
},
|
|
185
239
|
"id": 2,
|
|
186
240
|
"options": {
|
|
187
|
-
"colorMode": "
|
|
241
|
+
"colorMode": "background",
|
|
188
242
|
"graphMode": "area",
|
|
189
243
|
"justifyMode": "auto",
|
|
190
244
|
"orientation": "auto",
|
|
191
245
|
"percentChangeColorMode": "standard",
|
|
192
246
|
"reduceOptions": {
|
|
193
|
-
"calcs": [
|
|
194
|
-
"lastNotNull"
|
|
195
|
-
],
|
|
247
|
+
"calcs": ["lastNotNull"],
|
|
196
248
|
"fields": "",
|
|
197
249
|
"values": false
|
|
198
250
|
},
|
|
@@ -200,29 +252,27 @@
|
|
|
200
252
|
"textMode": "auto",
|
|
201
253
|
"wideLayout": true
|
|
202
254
|
},
|
|
203
|
-
"pluginVersion": "12.2.
|
|
255
|
+
"pluginVersion": "12.2.1",
|
|
204
256
|
"targets": [
|
|
205
257
|
{
|
|
206
|
-
"datasource": "
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"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 ('$Txgroup' like '{%' or g.name = '$Txgroup')",
|
|
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})",
|
|
210
261
|
"refId": "A",
|
|
211
|
-
"timeColumns": [
|
|
212
|
-
"time",
|
|
213
|
-
"ts"
|
|
214
|
-
]
|
|
262
|
+
"timeColumns": ["time", "ts"]
|
|
215
263
|
}
|
|
216
264
|
],
|
|
217
265
|
"title": "Weekly Expenses",
|
|
218
266
|
"type": "stat"
|
|
219
267
|
},
|
|
220
268
|
{
|
|
221
|
-
"datasource": "
|
|
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.",
|
|
222
271
|
"fieldConfig": {
|
|
223
272
|
"defaults": {
|
|
224
273
|
"color": {
|
|
225
|
-
"
|
|
274
|
+
"fixedColor": "dark-red",
|
|
275
|
+
"mode": "fixed"
|
|
226
276
|
},
|
|
227
277
|
"mappings": [],
|
|
228
278
|
"thresholds": {
|
|
@@ -237,9 +287,29 @@
|
|
|
237
287
|
"value": 80
|
|
238
288
|
}
|
|
239
289
|
]
|
|
240
|
-
}
|
|
290
|
+
},
|
|
291
|
+
"unit": "currencyUSD"
|
|
241
292
|
},
|
|
242
|
-
"overrides": [
|
|
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 Expense Transactions For This Period",
|
|
306
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Expenses&from=$__from&to=$__to"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
]
|
|
243
313
|
},
|
|
244
314
|
"gridPos": {
|
|
245
315
|
"h": 4,
|
|
@@ -249,15 +319,13 @@
|
|
|
249
319
|
},
|
|
250
320
|
"id": 3,
|
|
251
321
|
"options": {
|
|
252
|
-
"colorMode": "
|
|
322
|
+
"colorMode": "background",
|
|
253
323
|
"graphMode": "area",
|
|
254
324
|
"justifyMode": "auto",
|
|
255
325
|
"orientation": "auto",
|
|
256
326
|
"percentChangeColorMode": "standard",
|
|
257
327
|
"reduceOptions": {
|
|
258
|
-
"calcs": [
|
|
259
|
-
"lastNotNull"
|
|
260
|
-
],
|
|
328
|
+
"calcs": ["lastNotNull"],
|
|
261
329
|
"fields": "",
|
|
262
330
|
"values": false
|
|
263
331
|
},
|
|
@@ -265,30 +333,28 @@
|
|
|
265
333
|
"textMode": "auto",
|
|
266
334
|
"wideLayout": true
|
|
267
335
|
},
|
|
268
|
-
"pluginVersion": "12.2.
|
|
336
|
+
"pluginVersion": "12.2.1",
|
|
269
337
|
"targets": [
|
|
270
338
|
{
|
|
271
|
-
"datasource": "
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"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 ('$Txgroup' like '{%' or g.name = '$Txgroup')",
|
|
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})",
|
|
275
342
|
"refId": "A",
|
|
276
|
-
"timeColumns": [
|
|
277
|
-
"time",
|
|
278
|
-
"ts"
|
|
279
|
-
]
|
|
343
|
+
"timeColumns": ["time", "ts"]
|
|
280
344
|
}
|
|
281
345
|
],
|
|
282
346
|
"title": "Daily Expenses",
|
|
283
347
|
"type": "stat"
|
|
284
348
|
},
|
|
285
349
|
{
|
|
286
|
-
"datasource": "
|
|
287
|
-
"description": "",
|
|
350
|
+
"datasource": "PostgreSQL",
|
|
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.",
|
|
288
352
|
"fieldConfig": {
|
|
289
353
|
"defaults": {
|
|
290
354
|
"color": {
|
|
291
|
-
"
|
|
355
|
+
"fixedColor": "dark-red",
|
|
356
|
+
"mode": "continuous-YlRd",
|
|
357
|
+
"seriesBy": "max"
|
|
292
358
|
},
|
|
293
359
|
"custom": {
|
|
294
360
|
"axisBorderShow": false,
|
|
@@ -331,35 +397,27 @@
|
|
|
331
397
|
{
|
|
332
398
|
"color": "green",
|
|
333
399
|
"value": 0
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"color": "red",
|
|
337
|
-
"value": 80
|
|
338
400
|
}
|
|
339
401
|
]
|
|
340
|
-
}
|
|
402
|
+
},
|
|
403
|
+
"unit": "currencyUSD"
|
|
341
404
|
},
|
|
342
405
|
"overrides": [
|
|
343
406
|
{
|
|
344
407
|
"matcher": {
|
|
345
408
|
"id": "byName",
|
|
346
|
-
"options": "
|
|
409
|
+
"options": "Expenses (sum)"
|
|
347
410
|
},
|
|
348
411
|
"properties": [
|
|
349
412
|
{
|
|
350
|
-
"id": "
|
|
351
|
-
"value":
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"id": "custom.fillOpacity",
|
|
362
|
-
"value": 19
|
|
413
|
+
"id": "links",
|
|
414
|
+
"value": [
|
|
415
|
+
{
|
|
416
|
+
"targetBlank": true,
|
|
417
|
+
"title": "View ${__series.name} Transactions",
|
|
418
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
363
421
|
}
|
|
364
422
|
]
|
|
365
423
|
}
|
|
@@ -374,28 +432,25 @@
|
|
|
374
432
|
"id": 11,
|
|
375
433
|
"options": {
|
|
376
434
|
"legend": {
|
|
377
|
-
"calcs": [],
|
|
435
|
+
"calcs": ["sum"],
|
|
378
436
|
"displayMode": "list",
|
|
379
437
|
"placement": "bottom",
|
|
380
438
|
"showLegend": true
|
|
381
439
|
},
|
|
382
440
|
"tooltip": {
|
|
383
441
|
"hideZeros": false,
|
|
384
|
-
"mode": "
|
|
442
|
+
"mode": "multi",
|
|
385
443
|
"sort": "none"
|
|
386
444
|
}
|
|
387
445
|
},
|
|
388
|
-
"pluginVersion": "12.2.
|
|
446
|
+
"pluginVersion": "12.2.1",
|
|
389
447
|
"targets": [
|
|
390
448
|
{
|
|
391
|
-
"datasource": "
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
"rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Cost of Revenue', 'Expenses', 'Other Expense') THEN t.value_usd ELSE 0 END) AS \"Total 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 ('$Txgroup' like '{%' or g.name = '$Txgroup') GROUP BY timestamp ORDER BY 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;",
|
|
395
452
|
"refId": "A",
|
|
396
|
-
"timeColumns": [
|
|
397
|
-
"timestamp"
|
|
398
|
-
]
|
|
453
|
+
"timeColumns": ["timestamp"]
|
|
399
454
|
}
|
|
400
455
|
],
|
|
401
456
|
"title": "Weekly Cashflow",
|
|
@@ -426,64 +481,30 @@
|
|
|
426
481
|
"id": "groupBy",
|
|
427
482
|
"options": {
|
|
428
483
|
"fields": {
|
|
429
|
-
"Cost of Revenue": {
|
|
430
|
-
"aggregations": [
|
|
431
|
-
"sum"
|
|
432
|
-
],
|
|
433
|
-
"operation": "aggregate"
|
|
434
|
-
},
|
|
435
484
|
"Expenses": {
|
|
436
|
-
"aggregations": [
|
|
437
|
-
"sum"
|
|
438
|
-
],
|
|
485
|
+
"aggregations": ["sum"],
|
|
439
486
|
"operation": "aggregate"
|
|
440
487
|
},
|
|
441
|
-
"
|
|
442
|
-
"aggregations": [
|
|
443
|
-
"sum"
|
|
444
|
-
],
|
|
445
|
-
"operation": "aggregate"
|
|
446
|
-
},
|
|
447
|
-
"Other Expenses": {
|
|
448
|
-
"aggregations": [
|
|
449
|
-
"sum"
|
|
450
|
-
],
|
|
451
|
-
"operation": "aggregate"
|
|
452
|
-
},
|
|
453
|
-
"Other Income": {
|
|
454
|
-
"aggregations": [
|
|
455
|
-
"sum"
|
|
456
|
-
],
|
|
457
|
-
"operation": "aggregate"
|
|
458
|
-
},
|
|
459
|
-
"Revenue": {
|
|
460
|
-
"aggregations": [
|
|
461
|
-
"sum"
|
|
462
|
-
],
|
|
463
|
-
"operation": "aggregate"
|
|
464
|
-
},
|
|
465
|
-
"Timestamp": {
|
|
488
|
+
"TxGroup": {
|
|
466
489
|
"aggregations": [],
|
|
467
490
|
"operation": "groupby"
|
|
468
491
|
},
|
|
469
|
-
"Total Expenses": {
|
|
470
|
-
"aggregations": [
|
|
471
|
-
"sum"
|
|
472
|
-
],
|
|
473
|
-
"operation": "aggregate"
|
|
474
|
-
},
|
|
475
|
-
"Total Revenue": {
|
|
476
|
-
"aggregations": [
|
|
477
|
-
"sum"
|
|
478
|
-
],
|
|
479
|
-
"operation": "aggregate"
|
|
480
|
-
},
|
|
481
492
|
"timestamp": {
|
|
482
493
|
"aggregations": [],
|
|
483
494
|
"operation": "groupby"
|
|
484
495
|
}
|
|
485
496
|
}
|
|
486
497
|
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"id": "partitionByValues",
|
|
501
|
+
"options": {
|
|
502
|
+
"fields": ["TxGroup"],
|
|
503
|
+
"keepFields": false,
|
|
504
|
+
"naming": {
|
|
505
|
+
"asLabels": false
|
|
506
|
+
}
|
|
507
|
+
}
|
|
487
508
|
}
|
|
488
509
|
],
|
|
489
510
|
"type": "timeseries"
|
|
@@ -492,21 +513,41 @@
|
|
|
492
513
|
"preload": false,
|
|
493
514
|
"refresh": "",
|
|
494
515
|
"schemaVersion": 42,
|
|
495
|
-
"tags": [],
|
|
516
|
+
"tags": ["breakdown", "expenses"],
|
|
496
517
|
"templating": {
|
|
497
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
|
+
},
|
|
498
537
|
{
|
|
499
538
|
"allowCustomValue": true,
|
|
500
539
|
"current": {
|
|
501
540
|
"text": "All",
|
|
502
541
|
"value": "$__all"
|
|
503
542
|
},
|
|
504
|
-
"definition": "SELECT DISTINCT
|
|
505
|
-
"description": "",
|
|
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.",
|
|
506
545
|
"includeAll": true,
|
|
546
|
+
"multi": true,
|
|
547
|
+
"label": "Tx Group",
|
|
507
548
|
"name": "Txgroup",
|
|
508
549
|
"options": [],
|
|
509
|
-
"query": "SELECT DISTINCT
|
|
550
|
+
"query": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_expenses WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
510
551
|
"refresh": 2,
|
|
511
552
|
"regex": "",
|
|
512
553
|
"sort": 5,
|
|
@@ -522,5 +563,5 @@
|
|
|
522
563
|
"timezone": "",
|
|
523
564
|
"title": "Expenses Over Time",
|
|
524
565
|
"uid": "62bccd38-918c-4395-9180-8f7f911e9ddf",
|
|
525
|
-
"version":
|
|
566
|
+
"version": 22
|
|
526
567
|
}
|