-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
9,043 additions
and
10,111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
9,520 changes: 4,319 additions & 5,201 deletions
9,520
backend/webserver/static/app/vendor.bundle.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React, {Component} from 'react' | ||
import SelectField from 'material-ui/SelectField' | ||
import MenuItem from 'material-ui/MenuItem' | ||
|
||
const style = { | ||
color: '#777777', | ||
width: '90%', | ||
} | ||
|
||
const selectedStyle = { | ||
color: '333333', | ||
fontWeight: 500, | ||
fontSize: '0.8em' | ||
} | ||
|
||
|
||
const EXAMPLES = { | ||
'example0': { | ||
label: 'Select an example:', | ||
type: '', | ||
value: '' | ||
}, | ||
'example1': { | ||
label: 'Growth: Delete REV7 and RAD57', | ||
type: 'growth', | ||
value: 'REV7 RAD57' | ||
}, | ||
'example2': { | ||
label: 'Genetic Interaction: Delete CYT1 and COX7', | ||
type: 'genetic_interaction', | ||
value: 'CYT1 COX7' | ||
} | ||
} | ||
|
||
|
||
class ExampleQueries extends Component { | ||
|
||
constructor(props) { | ||
super(props) | ||
this.state = { | ||
value: 'example0' | ||
} | ||
} | ||
|
||
handleChange = (event, index, value) => { | ||
this.setState({ | ||
value: value | ||
}) | ||
|
||
if(value === 'example0') { | ||
return | ||
} else { | ||
this.props.resetSelectionAction() | ||
this.props.queryOptionAction(EXAMPLES[value].type) | ||
this.props.setQueryAction(EXAMPLES[value].value) | ||
} | ||
} | ||
|
||
render = () => ( | ||
<SelectField | ||
value={this.state.value} | ||
labelStyle={selectedStyle} | ||
style={style} | ||
onChange={this.handleChange} | ||
floatingLabelText="Simulation Examples" | ||
floatingLabelStyle={{color: '#999999', fontWeight: 300}} | ||
> | ||
|
||
<MenuItem key={1} value='example0' primaryText={EXAMPLES.example0.label}/> | ||
<MenuItem key={2} value='example1' primaryText={EXAMPLES.example1.label}/> | ||
<MenuItem key={3} value='example2' primaryText={EXAMPLES.example2.label}/> | ||
|
||
</SelectField> | ||
) | ||
} | ||
|
||
export default ExampleQueries |
74 changes: 74 additions & 0 deletions
74
frontend/client/components/SearchPanel/ExampleTermSearch.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React, {Component} from 'react' | ||
import SelectField from 'material-ui/SelectField' | ||
import MenuItem from 'material-ui/MenuItem' | ||
|
||
const style = { | ||
color: '#777777', | ||
width: '90%', | ||
} | ||
|
||
const selectedStyle = { | ||
color: '333333', | ||
fontWeight: 500, | ||
fontSize: '0.8em' | ||
} | ||
|
||
|
||
const EXAMPLES = { | ||
'example0': { | ||
label: 'Select an example:', | ||
value: '' | ||
}, | ||
'example1': { | ||
label: 'Search terms related to DNA Repair', | ||
value: 'DNA Repair' | ||
}, | ||
'example2': { | ||
label: 'Find terms associated with COX7', | ||
value: 'COX7' | ||
} | ||
} | ||
|
||
|
||
class ExampleTermSearch extends Component { | ||
|
||
constructor(props) { | ||
super(props) | ||
this.state = { | ||
value: 'example0' | ||
} | ||
} | ||
|
||
handleChange = (event, index, value) => { | ||
this.setState({ | ||
value: value | ||
}) | ||
|
||
if(value === 'example0') { | ||
return | ||
} else { | ||
const val = EXAMPLES[value].value | ||
this.props.setQueryAction(val) | ||
this.props.searchAction(val) | ||
} | ||
} | ||
|
||
render = () => ( | ||
<SelectField | ||
value={this.state.value} | ||
labelStyle={selectedStyle} | ||
style={style} | ||
onChange={this.handleChange} | ||
floatingLabelText="Subsystem Search Examples:" | ||
floatingLabelStyle={{color: '#999999', fontWeight: 300}} | ||
> | ||
|
||
<MenuItem key={1} value='example0' primaryText={EXAMPLES.example0.label}/> | ||
<MenuItem key={2} value='example1' primaryText={EXAMPLES.example1.label}/> | ||
<MenuItem key={3} value='example2' primaryText={EXAMPLES.example2.label}/> | ||
|
||
</SelectField> | ||
) | ||
} | ||
|
||
export default ExampleTermSearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.container { | ||
animation: fadeIn 1s ease 0s 1 normal; | ||
} | ||
|
||
@keyframes fadeIn { | ||
0% {opacity: 0} | ||
100% {opacity: 1} | ||
} |