Skip to content

Datagateway Search

esl-lewis edited this page Mar 5, 2020 · 11 revisions

Datagateway-search

The datagateway-search plugin is split into two logical components: the search box and the search table. The search box handles modifying and sending search requests while the table presents the retrieved data. These are contained and formatted in an overall component src/searchPageContainer.tsx which can be seen in src/App.tsx

Search Box

The search box is a material-ui grid made up of several sub-components which can be inspected in src/search/ :

  • SearchTextBox
  • SelectDates
  • CheckboxesGroup
  • SearchButton

The first three components take user input to modify the parameters sent to the search library Lucene. Users may filter by date, search string and the type of data entity they would like to search (Dataset, Datafile and Investigation). These parameters are saved to the Redux store for use and retrieval by the SearchButton. The SearchButton contains both functionality for rendering the user interface search button and for formatting, sending and storing the Lucene response data. (It is good practice to separate UI from functionality so this will require a refactor.)

Clone this wiki locally