diff --git a/zooma-ui/src/main/frontend/public/css/styles.css b/zooma-ui/src/main/frontend/public/css/styles.css index 0e05005a..b97c3257 100644 --- a/zooma-ui/src/main/frontend/public/css/styles.css +++ b/zooma-ui/src/main/frontend/public/css/styles.css @@ -25,10 +25,6 @@ main { background-color: #FFFDC4 !important; } -.unmapped { - display: none; -} - .context-help-wrapper { position: relative; top: 20px; diff --git a/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx b/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx index f19cc95f..38692a34 100644 --- a/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx +++ b/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx @@ -11,6 +11,7 @@ interface Props { } interface State { + hideUnmapped: boolean } export default class ResultsTable extends Component { @@ -19,12 +20,22 @@ export default class ResultsTable extends Component { super(props) this.state = { + hideUnmapped: false } } render() { + let { results } = this.props + + console.dir(results) + return ( + + @@ -50,7 +61,9 @@ export default class ResultsTable extends Component { { - this.props.results.map(result => + results + .filter(result => (!this.state.hideUnmapped) || result.mappingConfidence !== 'Did not map') + .map(result => @@ -64,9 +77,22 @@ export default class ResultsTable extends Component { )}
{result.propertyType} {result.propertyValue}
+

+ Stats: {results.length} properties    + {results.filter(r => r.mappingConfidence === 'High').length} high    + {results.filter(r => r.mappingConfidence === 'Good').length} good    + {results.filter(r => r.mappingConfidence === 'Medium').length} medium    + {results.filter(r => r.mappingConfidence === 'Low').length} low    + {results.filter(r => r.mappingConfidence === 'Did not map').length} unmapped +

+
) } + toggleHideUnmapped = () => { + this.setState({ hideUnmapped: !this.state.hideUnmapped }) + } + } function Datasource(props:any) { diff --git a/zooma-ui/src/main/frontend/src/pages/Home.tsx b/zooma-ui/src/main/frontend/src/pages/Home.tsx index 631e0064..bd349322 100644 --- a/zooma-ui/src/main/frontend/src/pages/Home.tsx +++ b/zooma-ui/src/main/frontend/src/pages/Home.tsx @@ -109,7 +109,9 @@ If you are new to ZOOMA, take a look at our getting started guide.


- +