From ab36b88c2f4ee6d5ce2fe4a100b4534bdf404f45 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Wed, 23 Oct 2024 12:45:19 +0530 Subject: [PATCH] Fix hidden table pagination --- .../panels/registry/RegistryRecords.js | 148 +++++++++--------- 1 file changed, 71 insertions(+), 77 deletions(-) diff --git a/src/containers/panels/registry/RegistryRecords.js b/src/containers/panels/registry/RegistryRecords.js index 46cdc42..366c638 100644 --- a/src/containers/panels/registry/RegistryRecords.js +++ b/src/containers/panels/registry/RegistryRecords.js @@ -11,8 +11,8 @@ import Button from '@material-ui/core/Button'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; -import TableFooter from '@material-ui/core/TableFooter'; import TablePagination from '@material-ui/core/TablePagination'; +import { Paper, TableContainer, } from '@material-ui/core'; import WNS_RECORDS from '../../../gql/wns_records.graphql'; @@ -108,86 +108,80 @@ const RegistryRecords = ({ type }) => { }; return ( - - - - Type - Registered Names - Version - Display Name - Created - Package - - - - - {records.sort(sorter) - .map((record) => { - const { id, names, createTime, attributes: { type, name: displayName, fileName, version, description, service, package: pkg } } = record; + + +
+ + + Type + Registered Names + Version + Display Name + Created + Package + + + + + {records.sort(sorter).map((record) => { + const { id, names, createTime, attributes: { type, name: displayName, fileName, version, description, service, package: pkg } } = record; - let pkgLink; - let appLinks; + let pkgLink; + let appLinks; - if (pkg) { - pkgLink = (); - } + if (pkg) { + pkgLink = (); + } - if (type === 'lrn:app') { - appLinks = ( - <> - {(names || []).map(lrn => -
- -
- )} - + if (type === 'lrn:app') { + appLinks = ( + <> + {(names || []).map(lrn => +
+ +
+ )} + + ); + } + + return ( + + {type} + + {appLinks || (names || []).map(name =>
{name}
)} +
+ {version} + {displayName || service || fileName || description} + {moment.utc(createTime).fromNow()} + {pkgLink} + + + +
); - } - - return ( - - {type} - - {appLinks || (names || []).map(name =>
{name}
)} -
- - {version} - - - {displayName || service || fileName || description} - - - {moment.utc(createTime).fromNow()} - - - {pkgLink} - - - - -
- ); - } - )} -
- - - - - -
+ })} + + + + + ); };