+ let closeHelpModal = () => {
+ this.setState({helpModalShow: false});
+ };
+ let showHelpModal = () => {
+ genericRequest('/schema/searchable', true, 'GET').then(res=>{
+ let searchDOM = res.sort(function(a, b) {
+ var compareA = (a['node-type']).toLowerCase();
+ var compareB = (b['node-type']).toLowerCase();
+ if(compareA < compareB){
+ return -1;
+ };
+ if(compareA > compareB){
+ return 1;
+ };
+ return 0;
+ }).map((prop) => {
+ return (
+ <div><p><strong>{prop['node-type']}:</strong></p><p>{prop['searchable-attributes']}</p></div>
+ );
+ });
+ this.setState({searchable: searchDOM, helpModalShow: true});
+ }, error => {
+ console.log(error);
+ this.setState({searchable: 'An error occurred, please try again later.', helpModalShow: true});
+ }).catch(error => {
+ console.log(error);
+ this.setState({searchable: 'An error occurred, please try again later.', helpModalShow: true});
+ });
+ };
+