Sc 115 add pagination to all tables that do not have it#873
Open
nbeatty-gpa wants to merge 52 commits into
Open
Sc 115 add pagination to all tables that do not have it#873nbeatty-gpa wants to merge 52 commits into
nbeatty-gpa wants to merge 52 commits into
Conversation
9b18228 to
de09c01
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds pagination support across multiple SystemCenter UI tables (especially “info”/detail tabs) by wiring table views to paged search endpoints and introducing/using paged APIs on the backend where needed.
Changes:
- Add
<Paging />controls to many TSX table views and update sorting/page state handling. - Introduce/extend paged API endpoints for several resources (e.g., security group users, asset group members, asset connections/channels, location images).
- Extend Redux/EventChannel slice state to support paged results and update store typing setup.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/ValueListGroup/ValueListGroupItem.tsx | Adds paging and server-side sort/page flow for value list items. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/User/UserGroup/GroupUsers.tsx | Switches group user listing to a paged backend endpoint and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/User/UserGroup/ByUserGroup.tsx | Refactors to GenericController paged search and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/User/User/ByUser.tsx | Refactors to GenericController paged search and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/Store.ts | Updates store typing and reducer composition structure. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Store/EventChannelSlice.ts | Adds paged-search thunk/state/selectors for event channels. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/RemoteXDA/RemoteMeterTab.tsx | Adds paging support to remote meter table search results. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/RemoteXDA/RemoteAssetTab.tsx | Adds paging support to remote asset table search results. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Meter/MeterTrendChannel.tsx | Adds paging to trend channel table. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Meter/MeterEventChannel.tsx | Adds paging to event channel table using new paged slice data. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Meter/ChannelScaling/ChannelScalingForm.tsx | Adds client-side paging for scaling wrappers table. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Location/LocationImages.tsx | Adds paging UI for location image lists and updates API call shape. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/ExternalDB/ExternalDBTables.tsx | Adds paging UI and paged search for external DB tables listing. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/ExternalDB/ExternalDBTableFields.tsx | Moves additional-field table to paged backend query and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerMeter.tsx | Switches customer meter listing to paged search and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Customer/CustomerAsset.tsx | Switches customer asset listing to paged search and adds paging UI. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/CommonComponents/ExternalDBUpdate.tsx | Updates UI message strings during external DB updates. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/ChannelGroup/ChannelGroupItem.tsx | Adds paging and server-side sort/page flow for channel group details. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/AssetGroups/MeterAssetGroup.tsx | Adds paging UI and paged backend calls for meters in an asset group. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/AssetGroups/ByAssetGroup.tsx | Adds paging UI and paged searching for asset group listing. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/AssetGroups/AssetGroupAssetGroup.tsx | Adds paging UI and paged backend calls for subgroups in an asset group. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/AssetGroups/AssetAssetGroup.tsx | Adds paging UI and paged backend calls for assets in an asset group. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Asset/AssetMeter.tsx | Adds paging UI and paged backend calls for meters tied to an asset. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Asset/AssetLocation.tsx | Adds paging UI and paged backend calls for locations tied to an asset. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Asset/AssetConnection.tsx | Adds paging UI and paged backend calls for asset connections. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Asset/AssetChannel.tsx | Adds paging UI and paged backend calls for connected channels. |
| Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/AdditionalFields/ByAdditionalField.tsx | Uses paged status/results and adds paging-aware sorting. |
| Source/Applications/SystemCenter/Model/Security/SecurityGroup.cs | Adds paged users endpoint for security groups. |
| Source/Applications/SystemCenter/Controllers/OpenXDA/OpenXDALocationController.cs | Adds paged location images endpoint and paging helper. |
| Source/Applications/SystemCenter/Controllers/OpenXDA/Assets/OpenXDAAssetController.cs | Adds paged endpoints for asset locations/meters/connections/channels. |
| Source/Applications/SystemCenter/Controllers/OpenXDA/AssetGroups/OpenXDAAssetGroupsController.cs | Adds paged endpoints for asset group members and subgroups. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
71
to
74
| React.useEffect(() => { | ||
| if (status == 'uninitiated' || status == 'changed' || parentID != props.Record.ID) | ||
| dispatch(ValueListSlice.Fetch(props.Record.ID)); | ||
| if (status == 'uninitiated' || status == 'changed') | ||
| dispatch(ValueListSlice.PagedSearch({ filter: [], sortField: 'SortOrder', ascending: true, page: 0 })); | ||
| }, [status, parentID, props.Record.ID]); |
Comment on lines
69
to
+72
| React.useEffect(() => { | ||
| let handle = getAssetConnections(); | ||
| return () => { if (handle != null || handle.abort != null) handle.abort();} | ||
| }, [props.ID, trigger]) | ||
| }, [props.ID, trigger, page, sortKey, ascending]) |
Comment on lines
+55
to
+57
| const getData = React.useCallback(() => { | ||
| dispatch(CustomerAssetSlice.PagedSearch({ filter: [], sortField, ascending, page })) | ||
| }, [sortField, ascending, page, CustomerAssetSlice.PagedSearch]) |
Comment on lines
+146
to
+148
| HAVING AssetAssetGroup.AssetGroupID = {{0}} | ||
| ORDER BY {postData.OrderBy} {(postData.Ascending ? "ASC" : "DESC")} | ||
| "; |
Comment on lines
+251
to
+254
| WHERE | ||
| ParentID = {{0}} OR ChildID = {{0}} | ||
| ORDER BY {postData.OrderBy} {(postData.Ascending ? "ASC" : "DESC")} | ||
| ", assetID); |
Comment on lines
+86
to
+89
| if (postData.Ascending) | ||
| records = records.OrderBy(record => record.GetType().GetProperty(postData.OrderBy).GetValue(record)); | ||
| else | ||
| records = records.OrderByDescending(record => record.GetType().GetProperty(postData.OrderBy).GetValue(record)); |
Comment on lines
+308
to
+310
| HAVING MeterAssetGroup.AssetGroupID = {{0}} | ||
| ORDER BY {postData.OrderBy} {(postData.Ascending ? "ASC" : "DESC")} | ||
| "; |
73a24e6 to
3d7977f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds pagination to tables, especially in "info" tabs
Jira Work Item(s)