Commit 7883127
committed
Dashboard: Add caching to analytics charts (#7804)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the analytics functionality across various components by adding an `authToken` parameter to API calls, ensuring secure access to analytics data.
### Detailed summary
- Added `authToken` prop to multiple components for secure API access.
- Updated API functions to accept `authToken` for authentication.
- Modified analytics data fetching methods to include `authToken`.
- Changed default values and parameters in several functions for consistency.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Analytics data fetching now uses caching for improved performance.
* Authentication is enforced for all analytics-related pages and components, with users redirected to login if not authenticated.
* **Refactor**
* All analytics API calls and related components now require an explicit authentication token, improving security and consistency.
* Parameters for analytics functions and components are more consistently structured, often grouped into objects for clarity.
* **Style**
* Default chart display updated from "totalVolume" to "activeUsers" in highlights cards for a more relevant initial view.
* **Bug Fixes**
* Standardized error handling across analytics data requests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 53d0d74 commit 7883127
File tree
24 files changed
+1230
-699
lines changed- apps/dashboard/src
- @/api
- app/(app)/team/[team_slug]
- (team)
- ~
- analytics
- ecosystem/[slug]/(active)/analytics
- components
- [project_slug]/(sidebar)
- account-abstraction
- AccountAbstractionAnalytics
- components
- EngineCloudChartCard
- RpcMethodBarChartCard
- Transactions
- insight
- components
- overview
- payments
- analytics
- components
- rpc
- components
- wallets
- analytics/chart
- webhooks
- analytics
24 files changed
+1230
-699
lines changedLarge diffs are not rendered by default.
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
Lines changed: 94 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| 102 | + | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
| |||
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| 134 | + | |
121 | 135 | | |
122 | 136 | | |
123 | 137 | | |
| |||
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
| 150 | + | |
136 | 151 | | |
137 | 152 | | |
138 | 153 | | |
| |||
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
| 167 | + | |
152 | 168 | | |
153 | 169 | | |
154 | 170 | | |
| |||
173 | 189 | | |
174 | 190 | | |
175 | 191 | | |
| 192 | + | |
176 | 193 | | |
177 | 194 | | |
178 | 195 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
191 | 214 | | |
192 | 215 | | |
193 | 216 | | |
| |||
216 | 239 | | |
217 | 240 | | |
218 | 241 | | |
| 242 | + | |
219 | 243 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
226 | 253 | | |
227 | 254 | | |
228 | 255 | | |
| |||
237 | 264 | | |
238 | 265 | | |
239 | 266 | | |
| 267 | + | |
240 | 268 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
247 | 278 | | |
248 | 279 | | |
249 | 280 | | |
| |||
261 | 292 | | |
262 | 293 | | |
263 | 294 | | |
| 295 | + | |
264 | 296 | | |
265 | 297 | | |
266 | 298 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
279 | 317 | | |
280 | 318 | | |
281 | 319 | | |
| |||
301 | 339 | | |
302 | 340 | | |
303 | 341 | | |
| 342 | + | |
304 | 343 | | |
305 | 344 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
318 | 363 | | |
319 | 364 | | |
320 | 365 | | |
| |||
0 commit comments