Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed May 12, 2021
1 parent 4dfae1e commit b05f7df
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 224 deletions.
4 changes: 0 additions & 4 deletions zooma-ui/src/main/frontend/public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ main {
background-color: #FFFDC4 !important;
}

.unmapped {
display: none;
}

.context-help-wrapper {
position: relative;
top: 20px;
Expand Down
17 changes: 9 additions & 8 deletions zooma-ui/src/main/frontend/src/components/ResultsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export default class ResultsTable extends Component<Props, State> {

let { results } = this.props

console.dir(results)

return (
<Fragment>
<label>
<input type="checkbox" checked={this.state.hideUnmapped} onClick={this.toggleHideUnmapped}>
Hide results that did not map
</input>
<input type="checkbox" checked={this.state.hideUnmapped} onClick={this.toggleHideUnmapped}/>
Hide results that did not map
</label>
<table>
<thead>
Expand Down Expand Up @@ -77,11 +78,11 @@ export default class ResultsTable extends Component<Props, State> {
</tbody>
</table>
<p>
<b>Stats:</b> {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
<b>Stats:</b> {results.length} properties &emsp;&emsp;
{results.filter(r => r.mappingConfidence === 'High').length} high &emsp;&emsp;
{results.filter(r => r.mappingConfidence === 'Good').length} good &emsp;&emsp;
{results.filter(r => r.mappingConfidence === 'Medium').length} medium &emsp;&emsp;
{results.filter(r => r.mappingConfidence === 'Low').length} low &emsp;&emsp;
{results.filter(r => r.mappingConfidence === 'Did not map').length} unmapped
</p>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions zooma-ui/src/main/frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ If you are new to ZOOMA, take a look at our getting started guide.</p>
</Row>
<br/>
<Row className="align-center">
<button className="button large" onClick={this.onClickAnnotate}>Annotate</button>
<button className="button large"
disabled={this.state.searching}
onClick={this.onClickAnnotate}>Annotate</button>
&nbsp;
<button className="button secondary large"
disabled={this.state.results.length === 0}
Expand Down Expand Up @@ -163,7 +165,7 @@ If you are new to ZOOMA, take a look at our getting started guide.</p>
properties, requiredSources, preferredSources, ontologySources, doNotSearchDatasources, doNotSearchOntologies
}

this.setState(prevState => ({ ...prevState, searching: true }))
await this.setState(prevState => ({ ...prevState, searching: true }))

let { results, tsv } = await ZoomaApi.search(searchParams, (progress:number) => {
this.setState(prevState => ({ ...prevState, progress }))
Expand Down
Loading

0 comments on commit b05f7df

Please sign in to comment.