Commit 6ce8654
authored
fix(calm-hub): display control/config titles and use slug-based URLs (finos#2751)
* feat(calm-hub): display control/config titles and use slug-based URLs
Extract title from the latest version JSON in MongoControlStore and
NitriteControlStore into ControlDetail and ControlConfigDetail DTOs.
Rewire ControlResource.getConfigurationsForControl to return details
(id, name, title) instead of bare ids. UI renders title ?? name ??
fallback and navigates to controls via name slug instead of numeric id,
matching existing slug-routing patterns for other resource types.
* fix(calm-hub): address code-review findings on control title and slug routing
- Add controlTitle to ControlData; breadcrumbs now show title ?? name
- Add numeric-id fallback in deep-link handlers (TreeNavigation,
MobileNavMenu) so legacy /controls/1/detail URLs still resolve
- Extract latestVersionKey to VersionKeySelector shared util, removing
duplicate implementations from both store backends
- Eliminate duplicate configs.find() calls in ControlDetailSection
breadcrumbs by computing selectedCfgLabel once before render
- Add tests for title display, numeric-id fallback, and title/name/id
config label fallback chain
* test(calm-hub): add unit tests for VersionKeySelector to satisfy JaCoCo coverage gate
* test(calm-hub): update integration test assertion for ControlConfigDetail response shape1 parent 9393ebb commit 6ce8654
20 files changed
Lines changed: 312 additions & 73 deletions
File tree
- calm-hub-ui/src
- hub/components
- control-detail-section
- model
- service
- calm-hub/src
- integration-test/java/integration
- main/java/org/finos/calm
- domain/controls
- resources
- store
- mongo
- nitrite
- util
- test/java/org/finos/calm
- resources
- store/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
Lines changed: 43 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| |||
135 | 146 | | |
136 | 147 | | |
137 | 148 | | |
138 | | - | |
| 149 | + | |
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
| |||
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
272 | 298 | | |
273 | | - | |
| 299 | + | |
274 | 300 | | |
275 | 301 | | |
276 | 302 | | |
| |||
280 | 306 | | |
281 | 307 | | |
282 | 308 | | |
283 | | - | |
| 309 | + | |
284 | 310 | | |
285 | 311 | | |
286 | 312 | | |
| |||
294 | 320 | | |
295 | 321 | | |
296 | 322 | | |
297 | | - | |
| 323 | + | |
298 | 324 | | |
299 | 325 | | |
300 | 326 | | |
| |||
305 | 331 | | |
306 | 332 | | |
307 | 333 | | |
308 | | - | |
| 334 | + | |
309 | 335 | | |
310 | 336 | | |
311 | 337 | | |
| |||
316 | 342 | | |
317 | 343 | | |
318 | 344 | | |
319 | | - | |
| 345 | + | |
320 | 346 | | |
321 | 347 | | |
322 | 348 | | |
| |||
329 | 355 | | |
330 | 356 | | |
331 | 357 | | |
332 | | - | |
| 358 | + | |
333 | 359 | | |
334 | 360 | | |
335 | 361 | | |
| |||
350 | 376 | | |
351 | 377 | | |
352 | 378 | | |
353 | | - | |
| 379 | + | |
354 | 380 | | |
355 | 381 | | |
356 | 382 | | |
| |||
366 | 392 | | |
367 | 393 | | |
368 | 394 | | |
369 | | - | |
| 395 | + | |
370 | 396 | | |
371 | 397 | | |
372 | 398 | | |
| |||
381 | 407 | | |
382 | 408 | | |
383 | 409 | | |
384 | | - | |
| 410 | + | |
385 | 411 | | |
386 | 412 | | |
387 | 413 | | |
| |||
425 | 451 | | |
426 | 452 | | |
427 | 453 | | |
428 | | - | |
| 454 | + | |
429 | 455 | | |
430 | 456 | | |
431 | 457 | | |
| |||
507 | 533 | | |
508 | 534 | | |
509 | 535 | | |
510 | | - | |
| 536 | + | |
511 | 537 | | |
512 | 538 | | |
513 | 539 | | |
| |||
517 | 543 | | |
518 | 544 | | |
519 | 545 | | |
520 | | - | |
| 546 | + | |
521 | 547 | | |
522 | 548 | | |
523 | 549 | | |
| |||
Lines changed: 23 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
174 | | - | |
| 180 | + | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| |||
180 | 186 | | |
181 | 187 | | |
182 | 188 | | |
183 | | - | |
| 189 | + | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
| |||
230 | 236 | | |
231 | 237 | | |
232 | 238 | | |
233 | | - | |
| 239 | + | |
234 | 240 | | |
235 | 241 | | |
236 | 242 | | |
| |||
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
271 | | - | |
| 277 | + | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
| |||
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
301 | | - | |
| 307 | + | |
302 | 308 | | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
307 | | - | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | | - | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | | - | |
| 319 | + | |
314 | 320 | | |
315 | 321 | | |
316 | 322 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
193 | | - | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
0 commit comments