Commit b548693
committed
Resolves #3437 (FR-750)
# Enhance Resource Slot Display in Session Slot Cell
This PR improves the display of resource slots in the SessionSlotCell component:
1. Replaces `deviceMetadata` with `mergedResourceSlots` from the `useResourceSlotsDetails` hook
2. Enhances memory display with fixed decimal precision (3 digits)
3. Filters out accelerators with zero or invalid values
4. Uses `display_unit` from resource slots data instead of `human_readable_name`
5. Modifies the `useResourceSlotsDetails` hook to:
- Accept empty resource group name to fetch all resource slots
- Handle URL parameter construction more robustly
- Return an empty object instead of undefined when manager version is incompatible
Before 1: New accelerator type and 0 accelerator type

After 1: New accelerator type and 0 accelerator type

Before 2:

After 2:

1 parent 116dc89 commit b548693
2 files changed
Lines changed: 18 additions & 13 deletions
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
45 | 52 | | |
46 | | - | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | | - | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 89 | + | |
| 90 | + | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | | - | |
| 95 | + | |
| 96 | + | |
100 | 97 | | |
101 | 98 | | |
102 | | - | |
| 99 | + | |
| 100 | + | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
| |||
0 commit comments