It fixes #162

parent 65cca554
......@@ -2,9 +2,9 @@ import React, { Component } from 'react';
import ICATPLUS from '../config/icat/icatPlus.js';
import { connect } from 'react-redux';
import { setBreadCrumbs } from '../actions/breadcrumbs.js';
import { ReactiveBase, DateRange, MultiList, SingleRange, CategorySearch, ResultCard } from '@appbaseio/reactivesearch';
import { ReactiveBase, RangeInput, DateRange, MultiList, CategorySearch, ResultCard, SingleDropdownList } from '@appbaseio/reactivesearch';
import moment from 'moment';
import { Label, Badge, Image, Grid, Row, Col, FormControl, ButtonToolbar, ToggleButtonGroup, ToggleButton } from 'react-bootstrap';
import { Label, Grid, Row, Col } from 'react-bootstrap';
import { getFileByEventId } from '../api/icat/icatPlus.js';
import noimage from '../images/noimage.png';
import TECHNIQUES from '../config/techniques/techniques.js';
......@@ -111,17 +111,15 @@ class SearchContainer extends Component {
</Row>
<Row>
<Col sm={2}>
<br />
<Col sm={2}>
<br />
<DateRange
componentId="DateSensor"
dataField="startDate"
title="Filter by date"
/>
<br />
<MultiList
componentId="BeamlineSensor"
dataField="investigationVisitId.keyword"
......@@ -135,7 +133,7 @@ class SearchContainer extends Component {
/>
</Col>
<Col sm={10}>
<Col sm={8}>
<ResultCard
componentId="result"
title="Results"
......@@ -147,14 +145,56 @@ class SearchContainer extends Component {
stream={true}
showResultStats={true}
react={{
and: ["searchbox", "DateSensor", "BeamlineSensor", "DefinitionSensor"]
and: ["SingleDropdownListUsage", "RangeSliderSensorWavelength", "searchbox", "DateSensor", "BeamlineSensor", "DefinitionSensor", "RangeSliderSensor", "SingleDropdownListReflection", "InstrumentMonochromatorCrystal_type"]
}}
onData={(res) => {
return this.renderDataset(res);
}}
/>
</Col>
</Col>
<Col sm={2}>
<br />
<RangeInput
componentId="RangeSliderSensor"
dataField="InstrumentMonochromator_energy"
title="Energy (keV)"
range={{
"start": 0,
"end": 100
}}
/>
<br />
<RangeInput
componentId="RangeSliderSensorWavelength"
dataField="InstrumentMonochromator_wavelength"
title="Wavelength"
range={{
"start": 0,
"end": 10
}}
/>
<br />
<SingleDropdownList
componentId="SingleDropdownListReflection"
dataField="InstrumentMonochromatorCrystal_reflection.keyword"
title="Crystal Reflection"
/>
<br />
<SingleDropdownList
componentId="SingleDropdownListType"
dataField="InstrumentMonochromatorCrystal_type.keyword"
title="Crystal Type"
/>
<br />
<SingleDropdownList
componentId="SingleDropdownListUsage"
dataField="InstrumentMonochromatorCrystal_usage.keyword"
title="Crystal Usage"
/>
</Col>
</Row>
</Grid>
</ReactiveBase>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment