From e762a0c79f1e851d08f0ffa7048a49da3d423f93 Mon Sep 17 00:00:00 2001 From: Sam Cox Date: Thu, 4 Jan 2024 14:42:01 +0000 Subject: [PATCH 1/2] Show 'Disabled' on Home Page rather than repeating it. --- react-client-app/src/components/Home.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/react-client-app/src/components/Home.jsx b/react-client-app/src/components/Home.jsx index 283dd8ec1..9fb3353e7 100644 --- a/react-client-app/src/components/Home.jsx +++ b/react-client-app/src/components/Home.jsx @@ -79,11 +79,11 @@ const Home = () => { // generate count stats of filtered data by adding up the count stats of the scan reports in the filtered list generatedCountStats = { - scanreport_count: filteredReports.length, - scanreporttable_count: filteredReports.map(report => report.scanreporttable_count).reduce((a, b) => { return a + b; }, 0), - scanreportfield_count: filteredReports.map(report => report.scanreportfield_count).reduce((a, b) => { return a + b; }, 0), - scanreportvalue_count: filteredReports.map(report => report.scanreportvalue_count).reduce((a, b) => { return a + b; }, 0), - scanreportmappingrule_count: filteredReports.map(report => report.scanreportmappingrule_count).reduce((a, b) => { return a + b; }, 0), + scanreport_count: "Disabled", //filteredReports.length, + scanreporttable_count: "Disabled", //filteredReports.map(report => report.scanreporttable_count).reduce((a, b) => { return a + b; }, 0), + scanreportfield_count: "Disabled", //filteredReports.map(report => report.scanreportfield_count).reduce((a, b) => { return a + b; }, 0), + scanreportvalue_count: "Disabled", //filteredReports.map(report => report.scanreportvalue_count).reduce((a, b) => { return a + b; }, 0), + scanreportmappingrule_count: "Disabled", //filteredReports.map(report => report.scanreportmappingrule_count).reduce((a, b) => { return a + b; }, 0), } // set the state of the data to be used in the donuts and tables setDonutData(filteredReports) From aabc00f17b7e255d5f0b371359d4f9dd5571da96 Mon Sep 17 00:00:00 2001 From: Sam Cox Date: Thu, 4 Jan 2024 14:50:31 +0000 Subject: [PATCH 2/2] Show 'Disabled' on Home Page rather than repeating it. --- react-client-app/src/components/Home.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react-client-app/src/components/Home.jsx b/react-client-app/src/components/Home.jsx index 9fb3353e7..0197b2248 100644 --- a/react-client-app/src/components/Home.jsx +++ b/react-client-app/src/components/Home.jsx @@ -87,7 +87,7 @@ const Home = () => { } // set the state of the data to be used in the donuts and tables setDonutData(filteredReports) - setMappingDonutData(filteredReports) + // setMappingDonutData(filteredReports) setStatuses(filteredStatuses) setCountStats(generatedCountStats) setTimeline(timeline) @@ -370,7 +370,7 @@ const Home = () => { } - {mappingrulesDonutData && + {/* {mappingrulesDonutData && { style={{ width: "100%", height: "auto" }} /> - } + } */}