dao-treasury 0.0.65__cp310-cp310-win_amd64.whl → 0.0.68__cp310-cp310-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.
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +51 -125
- dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +51 -125
- dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +3 -8
- dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +1 -3
- dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +22 -25
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +32 -105
- dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +21 -69
- dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +463 -75
- dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2892 -2930
- dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +17 -55
- dao_treasury/_docker.cp310-win_amd64.pyd +0 -0
- dao_treasury/_nicknames.cp310-win_amd64.pyd +0 -0
- dao_treasury/_wallet.cp310-win_amd64.pyd +0 -0
- dao_treasury/constants.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/_matchers.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/_rules.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/factory.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rule.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/sorting/rules/ignore/llamapay.cp310-win_amd64.pyd +0 -0
- dao_treasury/streams/__init__.cp310-win_amd64.pyd +0 -0
- dao_treasury/streams/llamapay.cp310-win_amd64.pyd +0 -0
- dao_treasury/types.cp310-win_amd64.pyd +0 -0
- {dao_treasury-0.0.65.dist-info → dao_treasury-0.0.68.dist-info}/METADATA +2 -2
- {dao_treasury-0.0.65.dist-info → dao_treasury-0.0.68.dist-info}/RECORD +30 -30
- dao_treasury__mypyc.cp310-win_amd64.pyd +0 -0
- {dao_treasury-0.0.65.dist-info → dao_treasury-0.0.68.dist-info}/WHEEL +0 -0
- {dao_treasury-0.0.65.dist-info → dao_treasury-0.0.68.dist-info}/top_level.txt +0 -0
|
@@ -177,9 +177,7 @@
|
|
|
177
177
|
"footer": {
|
|
178
178
|
"countRows": false,
|
|
179
179
|
"fields": "",
|
|
180
|
-
"reducer": [
|
|
181
|
-
"sum"
|
|
182
|
-
],
|
|
180
|
+
"reducer": ["sum"],
|
|
183
181
|
"show": false
|
|
184
182
|
},
|
|
185
183
|
"showHeader": true
|
|
@@ -195,10 +193,7 @@
|
|
|
195
193
|
"queryType": "table",
|
|
196
194
|
"rawQueryText": "SELECT\n stream_id as \"Stream ID\",\n b.address as \"Factory\",\n start_block as \"Start Block\",\n end_block as \"End Block\",\n c.symbol as \"Token\",\n d.address as \"From\",\n e.address as \"To\",\n reason as \"Reason\",\n CASE\n WHEN reason LIKE 'gh-%' AND\n -- ensures all after \"gh-\" is digits\n REPLACE(SUBSTR(reason, 4), '0', '') >= '' AND\n CAST(SUBSTR(reason, 4) AS INTEGER) || '' = SUBSTR(reason, 4)\n THEN CAST(SUBSTR(reason, 4) AS INTEGER)\n ELSE NULL\n END AS \"Budget Request\",\n amount_per_second as \"Amount Per Second\",\n status as \"Status\",\n txgroup as \"TxGroup\"\n\nFROM streams a\nLEFT JOIN addresses b ON a.contract = b.address_id\nLEFT JOIN tokens c ON a.token = c.token_id\nLEFT JOIN addresses d ON a.from_address = d.address_id\nLEFT JOIN addresses e ON a.to_address = e.address_id",
|
|
197
195
|
"refId": "A",
|
|
198
|
-
"timeColumns": [
|
|
199
|
-
"time",
|
|
200
|
-
"ts"
|
|
201
|
-
]
|
|
196
|
+
"timeColumns": ["time", "ts"]
|
|
202
197
|
}
|
|
203
198
|
],
|
|
204
199
|
"title": "LlamaPay Streams",
|
|
@@ -222,4 +217,4 @@
|
|
|
222
217
|
"description": "A simple dashboard with a comprehensive view of all LlamaPay payment streams managed by the DAO, including stream status, participants, configuration, and transaction group.",
|
|
223
218
|
"uid": "aa4d62a2-9e52-4acc-8f38-a96c77810aca",
|
|
224
219
|
"version": 1
|
|
225
|
-
}
|
|
220
|
+
}
|
|
@@ -190,9 +190,7 @@
|
|
|
190
190
|
"footer": {
|
|
191
191
|
"countRows": false,
|
|
192
192
|
"fields": "",
|
|
193
|
-
"reducer": [
|
|
194
|
-
"sum"
|
|
195
|
-
],
|
|
193
|
+
"reducer": ["sum"],
|
|
196
194
|
"show": false
|
|
197
195
|
},
|
|
198
196
|
"showHeader": true,
|
|
@@ -207,14 +205,11 @@
|
|
|
207
205
|
"targets": [
|
|
208
206
|
{
|
|
209
207
|
"datasource": "SQLite",
|
|
210
|
-
"queryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and
|
|
208
|
+
"queryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and b.chain_name IN (${Chain:sqlstring}) and c.symbol IN (${Token:sqlstring}) and d.address IN (${From:sqlstring}) and e.address IN (${To:sqlstring}) and d.nickname IN (${FromNickname:sqlstring}) and e.nickname IN (${ToNickname:sqlstring}) ) a left join txgroup_hierarchy b on a.txgroup_id = b.txgroup_id WHERE b.top_category IN (${Top:sqlstring}) ORDER BY timestamp",
|
|
211
209
|
"queryType": "table",
|
|
212
|
-
"rawQueryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and
|
|
210
|
+
"rawQueryText": "select timestamp as \"Timestamp\", block as \"Block\", hash as \"Hash\", token as \"Token\", \"from\" as \"From\", from_nickname as \"From Nickname\", \"to\" as \"To\", to_nickname as \"To Nickname\", amount as \"Amount\", price as \"Price\", value_usd as \"Value USD\", txgroup as \"TxGroup\", a.parent_txgroup as \"Parent TxGroup\", log_index as \"Log Index\" from ( SELECT datetime(a.timestamp, 'unixepoch') AS timestamp, a.block, a.hash, c.symbol AS token, d.address AS \"from\", d.nickname as from_nickname, e.address AS \"to\", e.nickname as to_nickname, a.amount, a.price, a.value_usd, f.name AS txgroup, g.name AS parent_txgroup, f.txgroup_id, a.log_index FROM treasury_txs a LEFT JOIN chains b ON a.chain = b.chain_dbid LEFT JOIN tokens c ON a.token_id = c.token_id LEFT JOIN addresses d ON a.\"from\" = d.address_id LEFT JOIN addresses e ON a.\"to\" = e.address_id LEFT JOIN txgroups f ON a.txgroup_id = f.txgroup_id LEFT JOIN txgroups g ON f.parent_txgroup = g.txgroup_id WHERE a.timestamp >= $__from / 1000 and a.timestamp < $__to / 1000 and b.chain_name IN (${Chain:sqlstring}) and c.symbol IN (${Token:sqlstring}) and d.address IN (${From:sqlstring}) and e.address IN (${To:sqlstring}) and d.nickname IN (${FromNickname:sqlstring}) and e.nickname IN (${ToNickname:sqlstring}) ) a left join txgroup_hierarchy b on a.txgroup_id = b.txgroup_id WHERE b.top_category IN (${Top:sqlstring}) ORDER BY timestamp",
|
|
213
211
|
"refId": "A",
|
|
214
|
-
"timeColumns": [
|
|
215
|
-
"time",
|
|
216
|
-
"ts"
|
|
217
|
-
]
|
|
212
|
+
"timeColumns": ["time", "ts"]
|
|
218
213
|
}
|
|
219
214
|
],
|
|
220
215
|
"title": "Transactions",
|
|
@@ -233,12 +228,12 @@
|
|
|
233
228
|
"value": "$__all"
|
|
234
229
|
},
|
|
235
230
|
"datasource": "SQLite",
|
|
236
|
-
"definition": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id;",
|
|
231
|
+
"definition": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
|
|
237
232
|
"includeAll": true,
|
|
238
233
|
"label": "Top Level",
|
|
239
234
|
"name": "Top",
|
|
240
235
|
"options": [],
|
|
241
|
-
"query": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id;",
|
|
236
|
+
"query": "SELECT DISTINCT gh.top_category FROM treasury_txs a INNER JOIN txgroup_hierarchy gh ON a.txgroup_id = gh.txgroup_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000;",
|
|
242
237
|
"refresh": 2,
|
|
243
238
|
"regex": "",
|
|
244
239
|
"sort": 5,
|
|
@@ -250,12 +245,13 @@
|
|
|
250
245
|
"value": "$__all"
|
|
251
246
|
},
|
|
252
247
|
"datasource": "SQLite",
|
|
253
|
-
"definition": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid",
|
|
248
|
+
"definition": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
254
249
|
"description": "",
|
|
255
250
|
"includeAll": true,
|
|
251
|
+
"label": "Chain",
|
|
256
252
|
"name": "Chain",
|
|
257
253
|
"options": [],
|
|
258
|
-
"query": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid",
|
|
254
|
+
"query": "select distinct chain_name from treasury_txs a left join chains b on a.chain = b.chain_dbid WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
259
255
|
"refresh": 2,
|
|
260
256
|
"regex": "",
|
|
261
257
|
"sort": 5,
|
|
@@ -267,11 +263,12 @@
|
|
|
267
263
|
"value": "$__all"
|
|
268
264
|
},
|
|
269
265
|
"datasource": "SQLite",
|
|
270
|
-
"definition": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id",
|
|
266
|
+
"definition": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
271
267
|
"includeAll": true,
|
|
268
|
+
"label": "Token",
|
|
272
269
|
"name": "Token",
|
|
273
270
|
"options": [],
|
|
274
|
-
"query": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id",
|
|
271
|
+
"query": "select distinct symbol from treasury_txs a left join tokens b on a.token_id = b.token_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
275
272
|
"refresh": 2,
|
|
276
273
|
"regex": "",
|
|
277
274
|
"sort": 5,
|
|
@@ -283,12 +280,12 @@
|
|
|
283
280
|
"value": "$__all"
|
|
284
281
|
},
|
|
285
282
|
"datasource": "SQLite",
|
|
286
|
-
"definition": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id",
|
|
283
|
+
"definition": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
287
284
|
"includeAll": true,
|
|
288
285
|
"label": "From Address",
|
|
289
286
|
"name": "From",
|
|
290
287
|
"options": [],
|
|
291
|
-
"query": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id",
|
|
288
|
+
"query": "select distinct address from treasury_txs a left join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
292
289
|
"refresh": 2,
|
|
293
290
|
"regex": "",
|
|
294
291
|
"sort": 5,
|
|
@@ -300,12 +297,12 @@
|
|
|
300
297
|
"value": "$__all"
|
|
301
298
|
},
|
|
302
299
|
"datasource": "SQLite",
|
|
303
|
-
"definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id",
|
|
300
|
+
"definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
304
301
|
"includeAll": true,
|
|
305
302
|
"label": "From Nickname",
|
|
306
303
|
"name": "FromNickname",
|
|
307
304
|
"options": [],
|
|
308
|
-
"query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id",
|
|
305
|
+
"query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"from\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
309
306
|
"refresh": 2,
|
|
310
307
|
"regex": "",
|
|
311
308
|
"sort": 5,
|
|
@@ -317,12 +314,12 @@
|
|
|
317
314
|
"value": "$__all"
|
|
318
315
|
},
|
|
319
316
|
"datasource": "SQLite",
|
|
320
|
-
"definition": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id",
|
|
317
|
+
"definition": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
321
318
|
"includeAll": true,
|
|
322
319
|
"label": "To Address",
|
|
323
320
|
"name": "To",
|
|
324
321
|
"options": [],
|
|
325
|
-
"query": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id",
|
|
322
|
+
"query": "select distinct address from treasury_txs a left join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
326
323
|
"refresh": 2,
|
|
327
324
|
"regex": "",
|
|
328
325
|
"sort": 5,
|
|
@@ -334,12 +331,12 @@
|
|
|
334
331
|
"value": "$__all"
|
|
335
332
|
},
|
|
336
333
|
"datasource": "SQLite",
|
|
337
|
-
"definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id",
|
|
334
|
+
"definition": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
338
335
|
"includeAll": true,
|
|
339
336
|
"label": "To Nickname",
|
|
340
337
|
"name": "ToNickname",
|
|
341
338
|
"options": [],
|
|
342
|
-
"query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id",
|
|
339
|
+
"query": "select distinct nickname from treasury_txs a inner join addresses b on a.\"to\" = b.address_id WHERE a.timestamp >= $__from/1000 AND a.timestamp <= $__to/1000",
|
|
343
340
|
"refresh": 2,
|
|
344
341
|
"regex": "",
|
|
345
342
|
"sort": 5,
|
|
@@ -356,5 +353,5 @@
|
|
|
356
353
|
"title": "Treasury Transactions",
|
|
357
354
|
"description": "Provides a real-time, filterable table of all transactions in the DAO treasury database, including timestamp, block, hash, token, addresses, nicknames, amount, price, and value in USD. Enables detailed analysis and monitoring of all value transfers.",
|
|
358
355
|
"uid": "b21f1092-66a4-4fb0-90ef-ed77d2becaa4",
|
|
359
|
-
"version":
|
|
360
|
-
}
|
|
356
|
+
"version": 4
|
|
357
|
+
}
|
|
@@ -60,9 +60,7 @@
|
|
|
60
60
|
"orientation": "auto",
|
|
61
61
|
"percentChangeColorMode": "standard",
|
|
62
62
|
"reduceOptions": {
|
|
63
|
-
"calcs": [
|
|
64
|
-
"lastNotNull"
|
|
65
|
-
],
|
|
63
|
+
"calcs": ["lastNotNull"],
|
|
66
64
|
"fields": "",
|
|
67
65
|
"values": false
|
|
68
66
|
},
|
|
@@ -78,10 +76,7 @@
|
|
|
78
76
|
"queryType": "table",
|
|
79
77
|
"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",
|
|
80
78
|
"refId": "A",
|
|
81
|
-
"timeColumns": [
|
|
82
|
-
"time",
|
|
83
|
-
"ts"
|
|
84
|
-
]
|
|
79
|
+
"timeColumns": ["time", "ts"]
|
|
85
80
|
}
|
|
86
81
|
],
|
|
87
82
|
"title": "Revenue",
|
|
@@ -126,9 +121,7 @@
|
|
|
126
121
|
"orientation": "auto",
|
|
127
122
|
"percentChangeColorMode": "standard",
|
|
128
123
|
"reduceOptions": {
|
|
129
|
-
"calcs": [
|
|
130
|
-
"lastNotNull"
|
|
131
|
-
],
|
|
124
|
+
"calcs": ["lastNotNull"],
|
|
132
125
|
"fields": "",
|
|
133
126
|
"values": false
|
|
134
127
|
},
|
|
@@ -144,10 +137,7 @@
|
|
|
144
137
|
"queryType": "table",
|
|
145
138
|
"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",
|
|
146
139
|
"refId": "A",
|
|
147
|
-
"timeColumns": [
|
|
148
|
-
"time",
|
|
149
|
-
"ts"
|
|
150
|
-
]
|
|
140
|
+
"timeColumns": ["time", "ts"]
|
|
151
141
|
}
|
|
152
142
|
],
|
|
153
143
|
"title": "Expenses",
|
|
@@ -192,9 +182,7 @@
|
|
|
192
182
|
"orientation": "auto",
|
|
193
183
|
"percentChangeColorMode": "standard",
|
|
194
184
|
"reduceOptions": {
|
|
195
|
-
"calcs": [
|
|
196
|
-
"lastNotNull"
|
|
197
|
-
],
|
|
185
|
+
"calcs": ["lastNotNull"],
|
|
198
186
|
"fields": "",
|
|
199
187
|
"values": false
|
|
200
188
|
},
|
|
@@ -210,10 +198,7 @@
|
|
|
210
198
|
"queryType": "table",
|
|
211
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",
|
|
212
200
|
"refId": "A",
|
|
213
|
-
"timeColumns": [
|
|
214
|
-
"time",
|
|
215
|
-
"ts"
|
|
216
|
-
]
|
|
201
|
+
"timeColumns": ["time", "ts"]
|
|
217
202
|
}
|
|
218
203
|
],
|
|
219
204
|
"title": "Cost of Revenue",
|
|
@@ -258,9 +243,7 @@
|
|
|
258
243
|
"orientation": "auto",
|
|
259
244
|
"percentChangeColorMode": "standard",
|
|
260
245
|
"reduceOptions": {
|
|
261
|
-
"calcs": [
|
|
262
|
-
"lastNotNull"
|
|
263
|
-
],
|
|
246
|
+
"calcs": ["lastNotNull"],
|
|
264
247
|
"fields": "",
|
|
265
248
|
"values": false
|
|
266
249
|
},
|
|
@@ -276,10 +259,7 @@
|
|
|
276
259
|
"queryType": "table",
|
|
277
260
|
"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",
|
|
278
261
|
"refId": "A",
|
|
279
|
-
"timeColumns": [
|
|
280
|
-
"time",
|
|
281
|
-
"ts"
|
|
282
|
-
]
|
|
262
|
+
"timeColumns": ["time", "ts"]
|
|
283
263
|
}
|
|
284
264
|
],
|
|
285
265
|
"title": "Other Income",
|
|
@@ -324,9 +304,7 @@
|
|
|
324
304
|
"orientation": "auto",
|
|
325
305
|
"percentChangeColorMode": "standard",
|
|
326
306
|
"reduceOptions": {
|
|
327
|
-
"calcs": [
|
|
328
|
-
"lastNotNull"
|
|
329
|
-
],
|
|
307
|
+
"calcs": ["lastNotNull"],
|
|
330
308
|
"fields": "",
|
|
331
309
|
"values": false
|
|
332
310
|
},
|
|
@@ -342,10 +320,7 @@
|
|
|
342
320
|
"queryType": "table",
|
|
343
321
|
"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",
|
|
344
322
|
"refId": "A",
|
|
345
|
-
"timeColumns": [
|
|
346
|
-
"time",
|
|
347
|
-
"ts"
|
|
348
|
-
]
|
|
323
|
+
"timeColumns": ["time", "ts"]
|
|
349
324
|
}
|
|
350
325
|
],
|
|
351
326
|
"title": "Other Expenses",
|
|
@@ -391,9 +366,7 @@
|
|
|
391
366
|
"orientation": "auto",
|
|
392
367
|
"percentChangeColorMode": "standard",
|
|
393
368
|
"reduceOptions": {
|
|
394
|
-
"calcs": [
|
|
395
|
-
"lastNotNull"
|
|
396
|
-
],
|
|
369
|
+
"calcs": ["lastNotNull"],
|
|
397
370
|
"fields": "",
|
|
398
371
|
"values": false
|
|
399
372
|
},
|
|
@@ -409,10 +382,7 @@
|
|
|
409
382
|
"queryType": "table",
|
|
410
383
|
"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",
|
|
411
384
|
"refId": "A",
|
|
412
|
-
"timeColumns": [
|
|
413
|
-
"time",
|
|
414
|
-
"ts"
|
|
415
|
-
]
|
|
385
|
+
"timeColumns": ["time", "ts"]
|
|
416
386
|
}
|
|
417
387
|
],
|
|
418
388
|
"title": "Sorted Total",
|
|
@@ -529,9 +499,7 @@
|
|
|
529
499
|
"queryType": "table",
|
|
530
500
|
"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;",
|
|
531
501
|
"refId": "A",
|
|
532
|
-
"timeColumns": [
|
|
533
|
-
"timestamp"
|
|
534
|
-
]
|
|
502
|
+
"timeColumns": ["timestamp"]
|
|
535
503
|
}
|
|
536
504
|
],
|
|
537
505
|
"title": "Weekly Cashflow",
|
|
@@ -563,45 +531,31 @@
|
|
|
563
531
|
"options": {
|
|
564
532
|
"fields": {
|
|
565
533
|
"Cost of Revenue": {
|
|
566
|
-
"aggregations": [
|
|
567
|
-
"sum"
|
|
568
|
-
],
|
|
534
|
+
"aggregations": ["sum"],
|
|
569
535
|
"operation": "aggregate"
|
|
570
536
|
},
|
|
571
537
|
"Expenses": {
|
|
572
|
-
"aggregations": [
|
|
573
|
-
"sum"
|
|
574
|
-
],
|
|
538
|
+
"aggregations": ["sum"],
|
|
575
539
|
"operation": "aggregate"
|
|
576
540
|
},
|
|
577
541
|
"Net": {
|
|
578
|
-
"aggregations": [
|
|
579
|
-
"sum"
|
|
580
|
-
],
|
|
542
|
+
"aggregations": ["sum"],
|
|
581
543
|
"operation": "aggregate"
|
|
582
544
|
},
|
|
583
545
|
"Net (Including Unsorted)": {
|
|
584
|
-
"aggregations": [
|
|
585
|
-
"sum"
|
|
586
|
-
],
|
|
546
|
+
"aggregations": ["sum"],
|
|
587
547
|
"operation": "aggregate"
|
|
588
548
|
},
|
|
589
549
|
"Other Expenses": {
|
|
590
|
-
"aggregations": [
|
|
591
|
-
"sum"
|
|
592
|
-
],
|
|
550
|
+
"aggregations": ["sum"],
|
|
593
551
|
"operation": "aggregate"
|
|
594
552
|
},
|
|
595
553
|
"Other Income": {
|
|
596
|
-
"aggregations": [
|
|
597
|
-
"sum"
|
|
598
|
-
],
|
|
554
|
+
"aggregations": ["sum"],
|
|
599
555
|
"operation": "aggregate"
|
|
600
556
|
},
|
|
601
557
|
"Revenue": {
|
|
602
|
-
"aggregations": [
|
|
603
|
-
"sum"
|
|
604
|
-
],
|
|
558
|
+
"aggregations": ["sum"],
|
|
605
559
|
"operation": "aggregate"
|
|
606
560
|
},
|
|
607
561
|
"Timestamp": {
|
|
@@ -609,39 +563,27 @@
|
|
|
609
563
|
"operation": "groupby"
|
|
610
564
|
},
|
|
611
565
|
"Total Expenses": {
|
|
612
|
-
"aggregations": [
|
|
613
|
-
"sum"
|
|
614
|
-
],
|
|
566
|
+
"aggregations": ["sum"],
|
|
615
567
|
"operation": "aggregate"
|
|
616
568
|
},
|
|
617
569
|
"Total Expenses (Including Unsorted)": {
|
|
618
|
-
"aggregations": [
|
|
619
|
-
"sum"
|
|
620
|
-
],
|
|
570
|
+
"aggregations": ["sum"],
|
|
621
571
|
"operation": "aggregate"
|
|
622
572
|
},
|
|
623
573
|
"Total Received": {
|
|
624
|
-
"aggregations": [
|
|
625
|
-
"sum"
|
|
626
|
-
],
|
|
574
|
+
"aggregations": ["sum"],
|
|
627
575
|
"operation": "aggregate"
|
|
628
576
|
},
|
|
629
577
|
"Total Revenue": {
|
|
630
|
-
"aggregations": [
|
|
631
|
-
"sum"
|
|
632
|
-
],
|
|
578
|
+
"aggregations": ["sum"],
|
|
633
579
|
"operation": "aggregate"
|
|
634
580
|
},
|
|
635
581
|
"Total Revenue (Including Unsorted)": {
|
|
636
|
-
"aggregations": [
|
|
637
|
-
"sum"
|
|
638
|
-
],
|
|
582
|
+
"aggregations": ["sum"],
|
|
639
583
|
"operation": "aggregate"
|
|
640
584
|
},
|
|
641
585
|
"Total Sent": {
|
|
642
|
-
"aggregations": [
|
|
643
|
-
"sum"
|
|
644
|
-
],
|
|
586
|
+
"aggregations": ["sum"],
|
|
645
587
|
"operation": "aggregate"
|
|
646
588
|
},
|
|
647
589
|
"timestamp": {
|
|
@@ -694,9 +636,7 @@
|
|
|
694
636
|
"orientation": "auto",
|
|
695
637
|
"percentChangeColorMode": "standard",
|
|
696
638
|
"reduceOptions": {
|
|
697
|
-
"calcs": [
|
|
698
|
-
"lastNotNull"
|
|
699
|
-
],
|
|
639
|
+
"calcs": ["lastNotNull"],
|
|
700
640
|
"fields": "",
|
|
701
641
|
"values": false
|
|
702
642
|
},
|
|
@@ -712,10 +652,7 @@
|
|
|
712
652
|
"queryType": "table",
|
|
713
653
|
"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",
|
|
714
654
|
"refId": "A",
|
|
715
|
-
"timeColumns": [
|
|
716
|
-
"time",
|
|
717
|
-
"ts"
|
|
718
|
-
]
|
|
655
|
+
"timeColumns": ["time", "ts"]
|
|
719
656
|
}
|
|
720
657
|
],
|
|
721
658
|
"title": "Unsorted (Inbound)",
|
|
@@ -761,9 +698,7 @@
|
|
|
761
698
|
"orientation": "auto",
|
|
762
699
|
"percentChangeColorMode": "standard",
|
|
763
700
|
"reduceOptions": {
|
|
764
|
-
"calcs": [
|
|
765
|
-
"lastNotNull"
|
|
766
|
-
],
|
|
701
|
+
"calcs": ["lastNotNull"],
|
|
767
702
|
"fields": "",
|
|
768
703
|
"values": false
|
|
769
704
|
},
|
|
@@ -779,10 +714,7 @@
|
|
|
779
714
|
"queryType": "table",
|
|
780
715
|
"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",
|
|
781
716
|
"refId": "A",
|
|
782
|
-
"timeColumns": [
|
|
783
|
-
"time",
|
|
784
|
-
"ts"
|
|
785
|
-
]
|
|
717
|
+
"timeColumns": ["time", "ts"]
|
|
786
718
|
}
|
|
787
719
|
],
|
|
788
720
|
"title": "Unsorted (Outbound)",
|
|
@@ -828,9 +760,7 @@
|
|
|
828
760
|
"orientation": "auto",
|
|
829
761
|
"percentChangeColorMode": "standard",
|
|
830
762
|
"reduceOptions": {
|
|
831
|
-
"calcs": [
|
|
832
|
-
"lastNotNull"
|
|
833
|
-
],
|
|
763
|
+
"calcs": ["lastNotNull"],
|
|
834
764
|
"fields": "",
|
|
835
765
|
"values": false
|
|
836
766
|
},
|
|
@@ -846,10 +776,7 @@
|
|
|
846
776
|
"queryType": "table",
|
|
847
777
|
"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",
|
|
848
778
|
"refId": "A",
|
|
849
|
-
"timeColumns": [
|
|
850
|
-
"time",
|
|
851
|
-
"ts"
|
|
852
|
-
]
|
|
779
|
+
"timeColumns": ["time", "ts"]
|
|
853
780
|
}
|
|
854
781
|
],
|
|
855
782
|
"title": "Total",
|