Skip to content

Commit

Permalink
Show 'Disabled' on Home Page rather than repeating it.
Browse files Browse the repository at this point in the history
  • Loading branch information
spco committed Jan 4, 2024
1 parent 0e677d1 commit e762a0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions react-client-app/src/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e762a0c

Please sign in to comment.