Skip to content

Commit 4f69f4c

Browse files
author
rodriguez-facundo
committed
#144 Small fixes
1 parent 6c42aa2 commit 4f69f4c

12 files changed

Lines changed: 106 additions & 66 deletions

File tree

webapp/components/definition/cellRules/NetPyNECellRules.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import DialogTitle from '@material-ui/core/DialogTitle';
3131

3232
import RulePath from '../../general/RulePath'
3333
import ExpansionPanel from '../../general/ExpansionPanel'
34+
import Divider from '@material-ui/core/Divider';
3435

3536
const styles = ({ spacing }) => ({
3637
arrowRight : { marginLeft: spacing(1) },
@@ -697,16 +698,16 @@ export default class NetPyNECellRules extends React.Component {
697698
blockButton={page != 'mechanisms' && !!model && !!model[selectedCellRule] && !!model[selectedCellRule]['secs'][selectedSection] && Object.keys(model[selectedCellRule]['secs'][selectedSection]['mechs']).length > 0}
698699
/>
699700
</div>
701+
<Divider />
700702
<RulePath text={this.getCopyPath()}/>
703+
<Divider />
704+
<Filter
705+
value={this.state.filterValue}
706+
label={`Filter ${page === 'main' ? 'cell rule' : page === 'sections' ? 'section' : 'mechanism'} by name...`}
707+
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
708+
options={this.getFilterOptions()}
709+
/>
701710
</ExpansionPanel>
702-
703-
704-
<Filter
705-
value={this.state.filterValue}
706-
label={`Filter ${page === 'main' ? 'cell rule' : page === 'sections' ? 'section' : 'mechanism'} by name...`}
707-
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
708-
options={this.getFilterOptions()}
709-
/>
710711
</div>
711712

712713

webapp/components/definition/connectivity/NetPyNEConnectivityRules.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { NetPyNEThumbnail, GridLayout, Filter } from 'netpyne/components'
1111

1212
import RulePath from '../../general/RulePath'
1313
import ExpansionPanel from '../../general/ExpansionPanel'
14+
import Divider from '@material-ui/core/Divider';
1415
export default class NetPyNEConnectivityRules extends Component {
1516

1617
constructor (props) {
@@ -208,15 +209,18 @@ export default class NetPyNEConnectivityRules extends Component {
208209
/>
209210
<NetPyNEAddNew id={"newConnectivityRuleButton"} handleClick={this.handleNewConnectivityRule} />
210211
</div>
212+
<Divider />
211213
<RulePath text={`netParams.connParams["${this.state.selectedConnectivityRule}"]`}/>
214+
<Divider />
215+
<Filter
216+
value={this.state.filterValue}
217+
label="Filter connectivity rule by name..."
218+
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
219+
options={model === undefined ? [] : Object.keys(model)}
220+
/>
212221
</ExpansionPanel>
213222

214-
<Filter
215-
value={this.state.filterValue}
216-
label="Filter connectivity rule by name..."
217-
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
218-
options={model === undefined ? [] : Object.keys(model)}
219-
/>
223+
220224
</div>
221225
{ConnectivityRules}
222226
{selectedConnectivityRule}

webapp/components/definition/plots/NetPyNENewPlot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class NetPyNENewPlot extends React.Component {
2727

2828
render () {
2929
return <div>
30-
<Fab size='small' color='primary' style={{ margin: 10, float: 'left' }} onClick={this.handleButtonClick}>
30+
<Fab size='small' color='primary' onClick={this.handleButtonClick}>
3131
<ContentAdd style={{ color: 'white' }}/>
3232
</Fab>
3333
<Menu

webapp/components/definition/plots/NetPyNEPlots.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,11 @@ export default class NetPyNEPlots extends React.Component {
122122
return (
123123
<GridLayout>
124124
<div>
125-
126125
<ExpansionPanel>
127126
<div className="breadcrumby">
128-
<NetPyNENewPlot
129-
style={{ float: 'left', marginTop: "12px", marginLeft: "18px" }}
130-
handleClick={this.handleNewPlot}
131-
/>
127+
<NetPyNENewPlot handleClick={this.handleNewPlot} />
132128
</div>
133-
<RulePath text={`simConfig.analysis["${this.state.selectedPlot}"]`}/>
129+
<RulePath style={{ paddingBottom: 8 }} text={`simConfig.analysis["${this.state.selectedPlot}"]`}/>
134130
</ExpansionPanel>
135131

136132
</div>

webapp/components/definition/stimulationSources/NetPyNEStimulationSources.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616

1717
import RulePath from '../../general/RulePath'
1818
import ExpansionPanel from '../../general/ExpansionPanel'
19+
import Divider from '@material-ui/core/Divider';
1920

2021
export default class NetPyNEStimulationSources extends Component {
2122

@@ -186,16 +187,18 @@ export default class NetPyNEStimulationSources extends Component {
186187
handleClick={this.handleNewStimulationSource}
187188
/>
188189
</div>
190+
<Divider />
189191
<RulePath text={`netParams.stimSourceParams["${this.state.selectedStimulationSource}"]`}/>
192+
<Divider />
193+
<Filter
194+
value={this.state.filterValue}
195+
label="Filter stimulation source rule by name..."
196+
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
197+
options={model === undefined ? [] : Object.keys(model)}
198+
/>
190199
</ExpansionPanel>
191-
192200

193-
<Filter
194-
value={this.state.filterValue}
195-
label="Filter stimulation source rule by name..."
196-
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
197-
options={model === undefined ? [] : Object.keys(model)}
198-
/>
201+
199202
</div>
200203

201204
{StimulationSources}

webapp/components/definition/stimulationTargets/NetPyNEStimulationTargets.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616

1717
import RulePath from '../../general/RulePath'
1818
import ExpansionPanel from '../../general/ExpansionPanel'
19-
19+
import Divider from '@material-ui/core/Divider';
2020
export default class NetPyNEStimulationTargets extends Component {
2121

2222
constructor (props) {
@@ -185,15 +185,18 @@ export default class NetPyNEStimulationTargets extends Component {
185185
<NetPyNEAddNew id={"newStimulationTargetButton"} handleClick={this.handleNewStimulationTarget} />
186186

187187
</div>
188+
<Divider />
188189
<RulePath text={`netParams.stimTargetParams["${this.state.selectedStimulationTarget}"]`}/>
190+
<Divider />
191+
<Filter
192+
value={this.state.filterValue}
193+
label="Filter stimulation target rule by name..."
194+
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
195+
options={model === undefined ? [] : Object.keys(model)}
196+
/>
189197
</ExpansionPanel>
190198

191-
<Filter
192-
value={this.state.filterValue}
193-
label="Filter stimulation target rule by name..."
194-
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
195-
options={model === undefined ? [] : Object.keys(model)}
196-
/>
199+
197200
</div>
198201
{StimulationTargets}
199202
{selectedStimulationTarget}

webapp/components/definition/synapses/NetPyNESynapses.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616

1717
import RulePath from '../../general/RulePath'
1818
import ExpansionPanel from '../../general/ExpansionPanel'
19-
19+
import Divider from '@material-ui/core/Divider';
2020
export default class NetPyNESynapses extends Component {
2121

2222
constructor (props) {
@@ -182,15 +182,18 @@ export default class NetPyNESynapses extends Component {
182182
/>
183183
<NetPyNEAddNew id={"newSynapseButton"} handleClick={this.handleNewSynapse} />
184184
</div>
185+
<Divider />
185186
<RulePath text={`netParams.synMechParams["${this.state.selectedSynapse}"]`}/>
187+
<Divider />
188+
<Filter
189+
value={this.state.filterValue}
190+
label="Filter synapse rule by name..."
191+
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
192+
options={model === undefined ? [] : Object.keys(model)}
193+
/>
186194
</ExpansionPanel>
187195

188-
<Filter
189-
value={this.state.filterValue}
190-
label="Filter synapse rule by name..."
191-
handleFilterChange={newValue => this.setState({ filterValue: newValue })}
192-
options={model === undefined ? [] : Object.keys(model)}
193-
/>
196+
194197
</div>
195198

196199

webapp/components/general/NetPyNEHome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const useStyles = makeStyles(({ spacing, palette }) => ({
1010
display: 'flex',
1111
alignItems: 'center'
1212
},
13-
icon: { color: palette.common.white, fontSize: 42 }
13+
icon: { color: palette.common.white, fontSize: 40 }
1414
}))
1515

1616

webapp/components/general/RulePath.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class RulePath extends Component {
4646
}
4747

4848
render () {
49-
const { text, classes } = this.props
49+
const { text, style, classes, ...others } = this.props
5050
return (
51-
<div className={classes.root}>
51+
<div className={classes.root} style={style} {...others}>
5252
<Typography variant="caption" className={classes.text} ref={this.textAreaRef}>{text.includes('undefined') ? 'Select a rule' : text}</Typography>
5353

5454
<div className={classes.icon}>

webapp/components/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ export const NetPyNE = connect(
8585
dispatch => ({
8686
pythonCallErrorDialogBox: payload => dispatch(openBackendErrorDialog(payload)),
8787
setWidgets: payload => dispatch(setWidgets(payload)),
88-
modelLoaded: () => dispatch(modelLoaded),
89-
newWidget: widget => dispatch(newWidget(widget)),
90-
activateWidget: widgetId => dispatch(activateWidget(widgetId))
88+
modelLoaded: () => dispatch(modelLoaded)
9189
})
9290
)(_NetPyNE);
9391

0 commit comments

Comments
 (0)