From fb0c9c5c29399232c787c72b189e78b7bfa90704 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 13:21:50 -0500 Subject: [PATCH 1/5] celltable bugfix --- src/components/tables/CellTable.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/tables/CellTable.jsx b/src/components/tables/CellTable.jsx index f62baec9b488..b757c6ba7bc5 100644 --- a/src/components/tables/CellTable.jsx +++ b/src/components/tables/CellTable.jsx @@ -20,11 +20,12 @@ export default function cellTable( columnProp = column } + console.log(Object.entries(columnProp)) if (!Array.isArray(columnProp) && typeof columnProp === 'object') { columnProp = Object.entries(columnProp).map((row) => { return { Name: row[0], Value: row[1] } }) - } else if (Array.isArray(columnProp) && Object.entries(columnProp).length === 1) { + } else if (Array.isArray(columnProp) && Object.entries(columnProp)[0].length === 2) { columnProp = columnProp.map((row) => { return { Value: row, From 0bb03a4925c2bb269c7d8108edba17b28e957591 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 13:28:03 -0500 Subject: [PATCH 2/5] Update CellTable.jsx --- src/components/tables/CellTable.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/tables/CellTable.jsx b/src/components/tables/CellTable.jsx index b757c6ba7bc5..a93bf26c26fd 100644 --- a/src/components/tables/CellTable.jsx +++ b/src/components/tables/CellTable.jsx @@ -20,7 +20,6 @@ export default function cellTable( columnProp = column } - console.log(Object.entries(columnProp)) if (!Array.isArray(columnProp) && typeof columnProp === 'object') { columnProp = Object.entries(columnProp).map((row) => { return { Name: row[0], Value: row[1] } From 667d6a1a14f4db363d65b4ebaaafa669ef51278e Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 13:37:03 -0500 Subject: [PATCH 3/5] Update CellTable.jsx --- src/components/tables/CellTable.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tables/CellTable.jsx b/src/components/tables/CellTable.jsx index a93bf26c26fd..6da1d1339b93 100644 --- a/src/components/tables/CellTable.jsx +++ b/src/components/tables/CellTable.jsx @@ -24,7 +24,7 @@ export default function cellTable( columnProp = Object.entries(columnProp).map((row) => { return { Name: row[0], Value: row[1] } }) - } else if (Array.isArray(columnProp) && Object.entries(columnProp)[0].length === 2) { + } else if (Array.isArray(columnProp) && typeof Object.entries(columnProp)[0][1] !== 'object') { columnProp = columnProp.map((row) => { return { Value: row, From 89784779ff9f0afe299b20361033628245129e27 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 13:44:38 -0500 Subject: [PATCH 4/5] up version --- public/version_latest.txt | 2 +- version_latest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/version_latest.txt b/public/version_latest.txt index b617d997d770..1f1ac7c2f330 100644 --- a/public/version_latest.txt +++ b/public/version_latest.txt @@ -1 +1 @@ -4.9.0 \ No newline at end of file +4.9.1 \ No newline at end of file diff --git a/version_latest.txt b/version_latest.txt index b617d997d770..1f1ac7c2f330 100644 --- a/version_latest.txt +++ b/version_latest.txt @@ -1 +1 @@ -4.9.0 \ No newline at end of file +4.9.1 \ No newline at end of file From 362961dcdb439146b684dd89a49e93b962592e50 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Tue, 2 Jan 2024 16:22:59 -0500 Subject: [PATCH 5/5] fix tenant view --- .../tenant/standards/BestPracticeAnalyser.jsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/views/tenant/standards/BestPracticeAnalyser.jsx b/src/views/tenant/standards/BestPracticeAnalyser.jsx index ccffd64e6e44..1d05c0be6278 100644 --- a/src/views/tenant/standards/BestPracticeAnalyser.jsx +++ b/src/views/tenant/standards/BestPracticeAnalyser.jsx @@ -95,6 +95,7 @@ RefreshAction.propTypes = { const getsubcolumns = (data) => { const flatObj = data && data.length > 0 ? data : [{ data: 'No Data Found' }] const QueryColumns = [] + if (flatObj[0]) { Object.keys(flatObj[0]).map((key) => { QueryColumns.push({ @@ -226,7 +227,6 @@ const BestPracticeAnalyser = () => { tenant.customerId, SearchNow, ]) - return ( <> @@ -342,40 +342,40 @@ const BestPracticeAnalyser = () => { {info.formatter === 'bool' && ( - {graphrequest.data.Data[info.value] ? 'Yes' : 'No'} + {graphrequest.data.Data[0][info.value] ? 'Yes' : 'No'} )} {info.formatter === 'reverseBool' && ( - {graphrequest.data.Data[info.value] ? 'No' : 'Yes'} + {graphrequest.data.Data[0][info.value] ? 'No' : 'Yes'} )} {info.formatter === 'warnBool' && ( - {graphrequest.data.Data[info.value] ? 'Yes' : 'No'} + {graphrequest.data.Data[0][info.value] ? 'Yes' : 'No'} )} @@ -384,15 +384,15 @@ const BestPracticeAnalyser = () => { key={QueryColumns.data} reportName="BestPracticeAnalyser" dynamicColumns={false} - columns={getsubcolumns(graphrequest.data.Data[info.value])} - data={graphrequest.data.Data[info.value]} + columns={getsubcolumns(graphrequest.data.Data[0][info.value])} + data={graphrequest.data.Data[0][info.value]} isFetching={graphrequest.isFetching} /> )} {info.formatter === 'number' && (

- {getNestedValue(graphrequest.data.Data, info.value)} + {getNestedValue(graphrequest.data.Data[0], info.value)}

)}