From f8a7e32c783f30e067939fd568ec705a18072411 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Tue, 22 Oct 2024 17:04:37 +0530 Subject: [PATCH 1/3] Handle undefined attributes in records resolver --- src/resolvers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolvers.js b/src/resolvers.js index a5643d4..b14adfa 100644 --- a/src/resolvers.js +++ b/src/resolvers.js @@ -46,7 +46,7 @@ export const createResolvers = config => { wns_records: async (_, { attributes }) => { log('WNS records...'); - const {limit, offset, ...queryAttributes } = attributes; + const {limit, offset, ...queryAttributes } = attributes || {}; const data = await registry.queryRecords(queryAttributes, false, false, limit, offset); return { -- 2.45.2 From ab36b88c2f4ee6d5ce2fe4a100b4534bdf404f45 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Wed, 23 Oct 2024 12:45:19 +0530 Subject: [PATCH 2/3] 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} - - - - -
- ); - } - )} -
- - - - - -
+ })} + + + + + ); }; -- 2.45.2 From b52a26bb803e9553e1571f74d92e7fee78dd4b5e Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Wed, 23 Oct 2024 13:22:41 +0530 Subject: [PATCH 3/3] Remove max hight for table container --- src/containers/panels/registry/RegistryRecords.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/containers/panels/registry/RegistryRecords.js b/src/containers/panels/registry/RegistryRecords.js index 366c638..9300d5c 100644 --- a/src/containers/panels/registry/RegistryRecords.js +++ b/src/containers/panels/registry/RegistryRecords.js @@ -111,9 +111,7 @@ const RegistryRecords = ({ type }) => { - + -- 2.45.2