Skip to content

Commit

Permalink
Merge pull request #17849 from jeclrsg/hpcc-29723-grid-selection-count
Browse files Browse the repository at this point in the history
HPCC-29723 ECL Watch v9 show count of selected rows on list pages

Reviewed-by: Gordon Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Oct 4, 2023
2 parents cd7bc2f + 04b6ba3 commit c37a140
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions esp/src/src-react/components/DFUWorkunits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export const DFUWorkunits: React.FunctionComponent<DFUWorkunitsProps> = ({
footer={<FluentPagedFooter
persistID={"dfuworkunits"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/EventScheduler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export const EventScheduler: React.FunctionComponent<EventSchedulerProps> = ({
footer={<FluentPagedFooter
persistID={"events"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export const Files: React.FunctionComponent<FilesProps> = ({
footer={<FluentPagedFooter
persistID={"files"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/GroupMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const GroupMembers: React.FunctionComponent<GroupMembersProps> = ({
footer={<FluentPagedFooter
persistID={"username"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export const Groups: React.FunctionComponent<GroupsProps> = ({
footer={<FluentPagedFooter
persistID={"Name"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export const Logs: React.FunctionComponent<LogsProps> = ({
footer={<FluentPagedFooter
persistID={"cloudlogs"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Queries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export const Queries: React.FunctionComponent<QueriesProps> = ({
footer={<FluentPagedFooter
persistID={"queries"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export const Users: React.FunctionComponent<UsersProps> = ({
footer={<FluentPagedFooter
persistID={"username"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
1 change: 1 addition & 0 deletions esp/src/src-react/components/Workunits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export const Workunits: React.FunctionComponent<WorkunitsProps> = ({
footer={<FluentPagedFooter
persistID={"workunits"}
pageNum={pageNum}
selectionCount={selection.length}
setPageNum={setPageNum}
setPageSize={setPageSize}
total={total}
Expand Down
4 changes: 3 additions & 1 deletion esp/src/src-react/components/controls/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ interface FluentPagedFooterProps {
persistID: string,
pageNum?: number,
total: number,
selectionCount?: number,
setPageNum: (pageNum: number) => void,
setPageSize: (pageNum: number) => void
}
Expand All @@ -383,6 +384,7 @@ export const FluentPagedFooter: React.FunctionComponent<FluentPagedFooterProps>
persistID,
pageNum = 1,
total,
selectionCount = 0,
setPageNum,
setPageSize
}) => {
Expand Down Expand Up @@ -463,7 +465,7 @@ export const FluentPagedFooter: React.FunctionComponent<FluentPagedFooterProps>
const start = props.selectedPageIndex === 0 ? 1 : (props.selectedPageIndex * props.itemsPerPage) + 1;
const end = (props.itemsPerPage * (props.selectedPageIndex + 1)) > props.totalItemCount ? props.totalItemCount : props.itemsPerPage * (props.selectedPageIndex + 1);
return <div className={paginationStyles.paginationLabel}>
{start} {props.strings.divider} {end} {nlsHPCC.Of.toLowerCase()} {props.totalItemCount} {nlsHPCC.Rows}
{start} {props.strings.divider} {end} {nlsHPCC.Of.toLowerCase()} {props.totalItemCount} {nlsHPCC.Rows} {selectionCount ? `(${selectionCount} ${nlsHPCC.Selected})` : ""}
</div>;
}}
/>
Expand Down
1 change: 1 addition & 0 deletions esp/src/src/nls/hpcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ export = {
SecurityMessageHTML: "Only view HTML from trusted users. This workunit was created by \"{__placeholder__}\". \nRender HTML?",
SeeConfigurationManager: "See Configuration Manager",
SelectA: "Select a",
Selected: "Selected",
SelectValue: "Select a value",
SelectEllipsis: "Select...",
SelectPackageFile: "Select Package File",
Expand Down

0 comments on commit c37a140

Please sign in to comment.