From 4dfae1e445816ccca0ea920d6405392985c4f9dd Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Tue, 11 May 2021 13:32:52 +0100 Subject: [PATCH 1/2] restore results summary info --- .../frontend/src/components/ResultsTable.tsx | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx b/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx index f19cc95f..3c639476 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,21 @@ export default class ResultsTable extends Component { super(props) this.state = { + hideUnmapped: false } } render() { + let { results } = this.props + return ( + + @@ -50,7 +60,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 +76,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) { From b05f7dfd1ae4fb16d9a8e3f8bfaad9cd6df52ab3 Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Wed, 12 May 2021 10:55:24 +0100 Subject: [PATCH 2/2] ui fixes --- .../src/main/frontend/public/css/styles.css | 4 - .../frontend/src/components/ResultsTable.tsx | 17 +- zooma-ui/src/main/frontend/src/pages/Home.tsx | 6 +- zooma-ui/src/main/frontend/yarn.lock | 243 +++--------------- 4 files changed, 46 insertions(+), 224 deletions(-) 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 3c639476..38692a34 100644 --- a/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx +++ b/zooma-ui/src/main/frontend/src/components/ResultsTable.tsx @@ -28,12 +28,13 @@ export default class ResultsTable extends Component { let { results } = this.props + console.dir(results) + return ( @@ -77,11 +78,11 @@ export default class ResultsTable extends Component {

- 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 + 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

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.


- +