Commit 0aeec99
committed
resolves #4191 ([FR-1412](https://lablup.atlassian.net/browse/FR-1412))
## Summary
Fixes pagination issue in the Resource Summary tab (AgentSummaryList component) where pagination would be stuck at 1 when selecting small page sizes like 10 or 20. This was caused by incorrect client-side filtering that affected the pagination total count.
## Changes Made
1. **Moved sFTP resource group filtering from client-side to server-side**:
- Added `mergeFilterValues` import from `backend.ai-ui`
- Created `sftpExclusionFilter` using `!(scaling_group in ["group1", "group2"])` syntax
- Updated GraphQL query to merge user filter with sFTP exclusion filter
2. **Removed inefficient client-side filtering logic**:
- Removed `filteredAgentSummaryList` that was filtering after data fetch
- Updated table `dataSource` to use `agent_summary_list?.items` directly
3. **Fixed pagination total count**:
- Changed pagination total from `filteredAgentSummaryList?.length` to `agent_summary_list?.total_count`
- This ensures pagination uses the correct server-side filtered count
## Impact
- ✅ Fixes pagination issue where list wouldn't appear with small page sizes
- ✅ Improves performance by filtering on server-side instead of client-side
- ✅ Reduces data transfer by excluding sFTP agents at query level
- ✅ Maintains existing filtering functionality
## Testing
- Verify pagination works correctly with different page sizes (10, 20, 50, etc.)
- Confirm sFTP resource groups are still properly excluded from the list
- Check that user filters (ID, schedulable status) still work as expected
**Checklist:**
- [x] Fix addresses the root cause of pagination issue
- [x] Server-side filtering implementation follows existing patterns
- [x] No breaking changes to existing functionality
- [x] Performance improvement through reduced client-side processing
[FR-1412]: https://lablup.atlassian.net/browse/FR-1412?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent b3b520b commit 0aeec99
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
117 | | - | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| |||
0 commit comments