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/src/components/tables/CellTable.jsx b/src/components/tables/CellTable.jsx index f62baec9b488..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).length === 1) { + } else if (Array.isArray(columnProp) && typeof Object.entries(columnProp)[0][1] !== 'object') { columnProp = columnProp.map((row) => { return { Value: row, 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)}

)}
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