|
1 | 1 | import { jsonFetcher } from './src/data/json-fetcher.js' |
2 | 2 | import { getDateXDaysAgo } from './src/utils/date-utils.js' |
3 | 3 |
|
4 | | -const start = '2024-04-07' |
| 4 | +const startProviders = '2024-04-07' |
| 5 | +const startClients = '2025-02-25' |
5 | 6 | const end = getDateXDaysAgo(1) |
6 | 7 |
|
7 | | -const result = await jsonFetcher( |
8 | | - `https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${start}&to=${end}`, |
| 8 | +const providersSummary = await jsonFetcher( |
| 9 | + `https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${startProviders}&to=${end}`, |
9 | 10 | ) |
10 | | -const providerPaths = result.map((provider) => `/provider/${provider.miner_id}`) |
11 | | - |
| 11 | +const clientsSummary= await jsonFetcher( |
| 12 | + `https://stats.filspark.com/clients/retrieval-success-rate/summary?from=${startClients}&to=${end}`, |
| 13 | +) |
| 14 | +const providerPaths = providersSummary.map((provider) => `/provider/${provider.miner_id}`) |
| 15 | +const clientPaths = clientsSummary.map((client) => `/client/${client.client_id}`) |
12 | 16 | // See https://observablehq.com/framework/config for documentation. |
13 | 17 | export default { |
14 | 18 | // The app’s title; used in the sidebar and webpage titles. |
@@ -45,5 +49,5 @@ export default { |
45 | 49 | // linkify: true, // convert URLs in Markdown to links |
46 | 50 | // typographer: false, // smart quotes and other typographic improvements |
47 | 51 | // cleanUrls: true, // drop .html from URLs |
48 | | - dynamicPaths: providerPaths, |
| 52 | + dynamicPaths: [...providerPaths, ...clientPaths], |
49 | 53 | } |
0 commit comments