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 revenue over time, including totals and averages by period and transaction group. Intended for monitoring income streams, identifying trends, and supporting financial reporting. Use the 'Top Level' and 'Tx Group' filters to view specific revenue categories. Data Links in panels allow quick navigation to filtered transaction details.",
|
|
19
19
|
"editable": true,
|
|
20
20
|
"fiscalYearStartMonth": 0,
|
|
21
21
|
"graphTooltip": 1,
|
|
22
|
-
"id":
|
|
22
|
+
"id": 9,
|
|
23
23
|
"links": [],
|
|
24
24
|
"panels": [
|
|
25
25
|
{
|
|
26
|
-
"datasource": "
|
|
26
|
+
"datasource": "PostgreSQL",
|
|
27
|
+
"description": "Displays the total revenue for the selected period, aggregated across all revenue transaction groups.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
27
28
|
"fieldConfig": {
|
|
28
29
|
"defaults": {
|
|
29
30
|
"color": {
|
|
30
|
-
"
|
|
31
|
+
"fixedColor": "semi-dark-green",
|
|
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 Revenue Transactions For This Period",
|
|
63
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
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 t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.name = '$Txgroup')",
|
|
96
|
+
"datasource": "PostgreSQL",
|
|
97
|
+
"format": "table",
|
|
98
|
+
"rawSql": "SELECT SUM(value_usd) AS total_revenue FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring})",
|
|
80
99
|
"refId": "A",
|
|
81
|
-
"timeColumns": [
|
|
82
|
-
"time",
|
|
83
|
-
"ts"
|
|
84
|
-
]
|
|
100
|
+
"timeColumns": ["time", "ts"]
|
|
85
101
|
}
|
|
86
102
|
],
|
|
87
|
-
"title": "
|
|
103
|
+
"title": "Revenue",
|
|
88
104
|
"type": "stat"
|
|
89
105
|
},
|
|
90
106
|
{
|
|
91
|
-
"datasource": "
|
|
107
|
+
"datasource": "PostgreSQL",
|
|
108
|
+
"description": "Shows the average revenue per month for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
92
109
|
"fieldConfig": {
|
|
93
110
|
"defaults": {
|
|
94
111
|
"color": {
|
|
95
|
-
"
|
|
112
|
+
"fixedColor": "semi-dark-green",
|
|
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 Revenue Transactions For This Period",
|
|
144
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
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 t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.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_revenue 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 Revenue",
|
|
153
185
|
"type": "stat"
|
|
154
186
|
},
|
|
155
187
|
{
|
|
156
|
-
"datasource": "
|
|
188
|
+
"datasource": "PostgreSQL",
|
|
189
|
+
"description": "Shows the average revenue per week for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
157
190
|
"fieldConfig": {
|
|
158
191
|
"defaults": {
|
|
159
192
|
"color": {
|
|
160
|
-
"
|
|
193
|
+
"fixedColor": "semi-dark-green",
|
|
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 Revenue Transactions For This Period",
|
|
225
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
]
|
|
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 t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.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_revenue 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 Revenue",
|
|
218
266
|
"type": "stat"
|
|
219
267
|
},
|
|
220
268
|
{
|
|
221
|
-
"datasource": "
|
|
269
|
+
"datasource": "PostgreSQL",
|
|
270
|
+
"description": "Shows the average revenue per day for the selected period.\n\nClicking the value opens a filtered transactions dashboard for this period and group.",
|
|
222
271
|
"fieldConfig": {
|
|
223
272
|
"defaults": {
|
|
224
273
|
"color": {
|
|
225
|
-
"
|
|
274
|
+
"fixedColor": "semi-dark-green",
|
|
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 Revenue Transactions For This Period",
|
|
306
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=Revenue&from=$__from&to=$__to"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
]
|
|
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,26 +333,22 @@
|
|
|
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 t USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 AND ('$Txgroup' like '{%' or t.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_revenue 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 Revenue",
|
|
283
347
|
"type": "stat"
|
|
284
348
|
},
|
|
285
349
|
{
|
|
286
|
-
"datasource": "
|
|
287
|
-
"description": "",
|
|
350
|
+
"datasource": "PostgreSQL",
|
|
351
|
+
"description": "Time series chart of revenue by transaction group, aggregated weekly for the selected period.\n\nClicking a group name opens a filtered transactions dashboard for that group and period.",
|
|
288
352
|
"fieldConfig": {
|
|
289
353
|
"defaults": {
|
|
290
354
|
"color": {
|
|
@@ -337,29 +401,25 @@
|
|
|
337
401
|
"value": 80
|
|
338
402
|
}
|
|
339
403
|
]
|
|
340
|
-
}
|
|
404
|
+
},
|
|
405
|
+
"unit": "currencyUSD"
|
|
341
406
|
},
|
|
342
407
|
"overrides": [
|
|
343
408
|
{
|
|
344
409
|
"matcher": {
|
|
345
410
|
"id": "byName",
|
|
346
|
-
"options": "
|
|
411
|
+
"options": "Revenue (sum)"
|
|
347
412
|
},
|
|
348
413
|
"properties": [
|
|
349
414
|
{
|
|
350
|
-
"id": "
|
|
351
|
-
"value":
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"id": "custom.fillOpacity",
|
|
362
|
-
"value": 19
|
|
415
|
+
"id": "links",
|
|
416
|
+
"value": [
|
|
417
|
+
{
|
|
418
|
+
"targetBlank": true,
|
|
419
|
+
"title": "View ${__series.name} Transactions",
|
|
420
|
+
"url": "/d/b21f1092-66a4-4fb0-90ef-ed77d2becaa4?var-Top=${__series.name}&from=$__from&to=$__to"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
363
423
|
}
|
|
364
424
|
]
|
|
365
425
|
}
|
|
@@ -374,28 +434,25 @@
|
|
|
374
434
|
"id": 11,
|
|
375
435
|
"options": {
|
|
376
436
|
"legend": {
|
|
377
|
-
"calcs": [],
|
|
437
|
+
"calcs": ["sum"],
|
|
378
438
|
"displayMode": "list",
|
|
379
439
|
"placement": "bottom",
|
|
380
440
|
"showLegend": true
|
|
381
441
|
},
|
|
382
442
|
"tooltip": {
|
|
383
443
|
"hideZeros": false,
|
|
384
|
-
"mode": "
|
|
444
|
+
"mode": "multi",
|
|
385
445
|
"sort": "none"
|
|
386
446
|
}
|
|
387
447
|
},
|
|
388
|
-
"pluginVersion": "12.2.
|
|
448
|
+
"pluginVersion": "12.2.1",
|
|
389
449
|
"targets": [
|
|
390
450
|
{
|
|
391
|
-
"datasource": "
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
"rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\" 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;",
|
|
451
|
+
"datasource": "PostgreSQL",
|
|
452
|
+
"format": "table",
|
|
453
|
+
"rawSql": "SELECT to_timestamp(timestamp) AS \"timestamp\", txgroup_name AS \"TxGroup\", SUM(value_usd) AS \"Revenue\" FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000 AND top_category IN (${TopLevel:sqlstring}) AND txgroup_name IN (${Txgroup:sqlstring}) GROUP BY timestamp, txgroup_name ORDER BY timestamp;",
|
|
395
454
|
"refId": "A",
|
|
396
|
-
"timeColumns": [
|
|
397
|
-
"timestamp"
|
|
398
|
-
]
|
|
455
|
+
"timeColumns": ["timestamp"]
|
|
399
456
|
}
|
|
400
457
|
],
|
|
401
458
|
"title": "Weekly Cashflow",
|
|
@@ -426,64 +483,30 @@
|
|
|
426
483
|
"id": "groupBy",
|
|
427
484
|
"options": {
|
|
428
485
|
"fields": {
|
|
429
|
-
"Cost of Revenue": {
|
|
430
|
-
"aggregations": [
|
|
431
|
-
"sum"
|
|
432
|
-
],
|
|
433
|
-
"operation": "aggregate"
|
|
434
|
-
},
|
|
435
|
-
"Expenses": {
|
|
436
|
-
"aggregations": [
|
|
437
|
-
"sum"
|
|
438
|
-
],
|
|
439
|
-
"operation": "aggregate"
|
|
440
|
-
},
|
|
441
|
-
"Net": {
|
|
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
486
|
"Revenue": {
|
|
460
|
-
"aggregations": [
|
|
461
|
-
"sum"
|
|
462
|
-
],
|
|
487
|
+
"aggregations": ["sum"],
|
|
463
488
|
"operation": "aggregate"
|
|
464
489
|
},
|
|
465
|
-
"
|
|
490
|
+
"TxGroup": {
|
|
466
491
|
"aggregations": [],
|
|
467
492
|
"operation": "groupby"
|
|
468
493
|
},
|
|
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
494
|
"timestamp": {
|
|
482
495
|
"aggregations": [],
|
|
483
496
|
"operation": "groupby"
|
|
484
497
|
}
|
|
485
498
|
}
|
|
486
499
|
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"id": "partitionByValues",
|
|
503
|
+
"options": {
|
|
504
|
+
"fields": ["TxGroup"],
|
|
505
|
+
"keepFields": false,
|
|
506
|
+
"naming": {
|
|
507
|
+
"asLabels": false
|
|
508
|
+
}
|
|
509
|
+
}
|
|
487
510
|
}
|
|
488
511
|
],
|
|
489
512
|
"type": "timeseries"
|
|
@@ -492,21 +515,41 @@
|
|
|
492
515
|
"preload": false,
|
|
493
516
|
"refresh": "",
|
|
494
517
|
"schemaVersion": 42,
|
|
495
|
-
"tags": [],
|
|
518
|
+
"tags": ["breakdown", "revenue"],
|
|
496
519
|
"templating": {
|
|
497
520
|
"list": [
|
|
521
|
+
{
|
|
522
|
+
"name": "TopLevel",
|
|
523
|
+
"label": "Top Level",
|
|
524
|
+
"type": "query",
|
|
525
|
+
"query": "SELECT DISTINCT top_category FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
526
|
+
"definition": "SELECT DISTINCT top_category FROM usdvalue_presum_revenue WHERE timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
527
|
+
"description": "Filter the dashboard by top-level revenue category.",
|
|
528
|
+
"includeAll": true,
|
|
529
|
+
"multi": true,
|
|
530
|
+
"current": {
|
|
531
|
+
"text": "All",
|
|
532
|
+
"value": "$__all"
|
|
533
|
+
},
|
|
534
|
+
"options": [],
|
|
535
|
+
"refresh": 2,
|
|
536
|
+
"regex": "",
|
|
537
|
+
"sort": 5
|
|
538
|
+
},
|
|
498
539
|
{
|
|
499
540
|
"allowCustomValue": true,
|
|
500
541
|
"current": {
|
|
501
542
|
"text": "All",
|
|
502
543
|
"value": "$__all"
|
|
503
544
|
},
|
|
504
|
-
"definition": "SELECT DISTINCT
|
|
505
|
-
"description": "",
|
|
545
|
+
"definition": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_revenue WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
546
|
+
"description": "Filter the dashboard by transaction group within the selected top-level categories.",
|
|
506
547
|
"includeAll": true,
|
|
548
|
+
"multi": true,
|
|
549
|
+
"label": "Tx Group",
|
|
507
550
|
"name": "Txgroup",
|
|
508
551
|
"options": [],
|
|
509
|
-
"query": "SELECT DISTINCT
|
|
552
|
+
"query": "SELECT DISTINCT txgroup_name FROM usdvalue_presum_revenue WHERE top_category IN (${TopLevel:sqlstring}) AND timestamp >= $__from/1000 AND timestamp <= $__to/1000;",
|
|
510
553
|
"refresh": 2,
|
|
511
554
|
"regex": "",
|
|
512
555
|
"sort": 5,
|
|
@@ -522,5 +565,5 @@
|
|
|
522
565
|
"timezone": "",
|
|
523
566
|
"title": "Revenue Over Time",
|
|
524
567
|
"uid": "5284bb56-b9fb-4f36-b971-eb125bfdac7d",
|
|
525
|
-
"version":
|
|
568
|
+
"version": 19
|
|
526
569
|
}
|
|
@@ -1,84 +1,10 @@
|
|
|
1
1
|
apiVersion: 1
|
|
2
2
|
|
|
3
3
|
providers:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
path: /etc/grafana/provisioning/dashboards/summary
|
|
12
|
-
|
|
13
|
-
# Dashboards
|
|
14
|
-
- name: 'Current Treasury Assets'
|
|
15
|
-
folder: 'Treasury'
|
|
16
|
-
type: file
|
|
17
|
-
disableDeletion: true
|
|
18
|
-
editable: false
|
|
19
|
-
options:
|
|
20
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
21
|
-
|
|
22
|
-
- name: 'Operating Cashflow Summary'
|
|
23
|
-
folder: 'Treasury'
|
|
24
|
-
type: file
|
|
25
|
-
disableDeletion: true
|
|
26
|
-
editable: false
|
|
27
|
-
options:
|
|
28
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
29
|
-
|
|
30
|
-
- name: 'Total Cashflow Summary'
|
|
31
|
-
folder: 'Treasury'
|
|
32
|
-
type: file
|
|
33
|
-
disableDeletion: true
|
|
34
|
-
editable: false
|
|
35
|
-
options:
|
|
36
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
37
|
-
|
|
38
|
-
- name: 'Total Cashflow Summary (Including Unsorted)'
|
|
39
|
-
folder: 'Treasury'
|
|
40
|
-
type: file
|
|
41
|
-
disableDeletion: true
|
|
42
|
-
editable: false
|
|
43
|
-
options:
|
|
44
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
45
|
-
|
|
46
|
-
- name: 'Historical Treasury Balances'
|
|
47
|
-
folder: 'Treasury'
|
|
48
|
-
type: file
|
|
49
|
-
disableDeletion: true
|
|
50
|
-
editable: false
|
|
51
|
-
options:
|
|
52
|
-
path: /etc/grafana/provisioning/dashboards/treasury
|
|
53
|
-
|
|
54
|
-
- name: 'Treasury Transactions'
|
|
55
|
-
folder: 'Transactions'
|
|
56
|
-
type: file
|
|
57
|
-
disableDeletion: true
|
|
58
|
-
editable: false
|
|
59
|
-
options:
|
|
60
|
-
path: /etc/grafana/provisioning/dashboards/transactions
|
|
61
|
-
|
|
62
|
-
- name: 'LlamaPay Streams'
|
|
63
|
-
folder: 'Streams'
|
|
64
|
-
type: file
|
|
65
|
-
disableDeletion: true
|
|
66
|
-
editable: false
|
|
67
|
-
options:
|
|
68
|
-
path: /etc/grafana/provisioning/dashboards/streams
|
|
69
|
-
|
|
70
|
-
- name: 'Revenue Over Time'
|
|
71
|
-
folder: 'Breakdowns'
|
|
72
|
-
type: file
|
|
73
|
-
disableDeletion: true
|
|
74
|
-
editable: false
|
|
75
|
-
options:
|
|
76
|
-
path: /etc/grafana/provisioning/dashboards/breakdowns
|
|
77
|
-
|
|
78
|
-
- name: 'Expenses Over Time'
|
|
79
|
-
folder: 'Breakdowns'
|
|
80
|
-
type: file
|
|
81
|
-
disableDeletion: true
|
|
82
|
-
editable: false
|
|
83
|
-
options:
|
|
84
|
-
path: /etc/grafana/provisioning/dashboards/breakdowns
|
|
4
|
+
- name: 'All Dashboards'
|
|
5
|
+
folder: ''
|
|
6
|
+
type: file
|
|
7
|
+
disableDeletion: false
|
|
8
|
+
editable: true
|
|
9
|
+
options:
|
|
10
|
+
path: /etc/grafana/provisioning/dashboards
|