It fixes #173

parent 7839d3ed
......@@ -10,24 +10,41 @@ class EMDatasetSummary extends React.Component {
getParameters(){
return [
{name : 'Name', value : this.props.dataset.name},
{name : 'Dataset', value : this.props.dataset.name},
{name : 'Sample', value : this.props.dataset.sampleName},
{name : 'Protein', value : getDatasetParameterValueByName(this.props.dataset, "EM_protein_acronym")},
{name : 'Definition', value : getDatasetParameterValueByName(this.props.dataset, "definition")},
{name : 'Start', value : <Moment parse="YYYY-MM-DD HH:mm" format="LTS">{this.props.dataset.startDate}</Moment>},
{name : 'Sample', value : this.props.dataset.sampleName},
{name : 'Description', value : getDatasetParameterValueByName(this.props.dataset, "Sample_description")}
];
}
getTechniqueParameters(){
return [
{name : 'Amplitute', value : getDatasetParameterValueByName(this.props.dataset, "EM_amplitude_contrast") + " %" },
{name : 'Initial Dose', value : getDatasetParameterValueByName(this.props.dataset, "EM_dose_initial")},
{name : 'Dose/frame', value : getDatasetParameterValueByName(this.props.dataset, "EM_dose_per_frame")},
{name : 'Images', value : getDatasetParameterValueByName(this.props.dataset, "EM_images_count")},
{name : 'Magnification', value : getDatasetParameterValueByName(this.props.dataset, "EM_magnification")},
{name : 'Sampling Rate', value : getDatasetParameterValueByName(this.props.dataset, "EM_sampling_rate") + " Å/pixel"},
{name : 'Spherical Ab.', value : getDatasetParameterValueByName(this.props.dataset, "EM_spherical_aberration") + " mm"},
{name : 'Voltage', value : getDatasetParameterValueByName(this.props.dataset, "EM_voltage")}
];
}
render() {
return (
<Grid fluid style={{margin:'20px'}}>
<Row>
<Col xs={12} md={4}>
<ParameterTableWidget striped={true} parameters={this.getParameters()} ></ParameterTableWidget>
<Col xs={12} md={2}>
<ParameterTableWidget striped={false} parameters={this.getParameters()} ></ParameterTableWidget>
</Col>
<Col xs={12} sm={12} md={2}>
<ParameterTableWidget striped={false} parameters={this.getTechniqueParameters()} ></ParameterTableWidget>
</Col>
<Col xs={12} sm={12} md={2}>
......
......@@ -60,9 +60,13 @@ class DatasetWidget extends React.Component {
}
return null;
})}
<Tab eventKey={9} title="Instrument" disabled={ getDatasetParameterByPrefixName(this.props.dataset, "Instrument").length == 0}>
<InstrumentWidget dataset={dataset} ></InstrumentWidget>
</Tab>
{!getDatasetParameterByPrefixName(this.props.dataset, "Instrument").length == 0 &&
<Tab eventKey={9} title="Instrument" >
<InstrumentWidget dataset={dataset} ></InstrumentWidget>
</Tab>
}
<Tab eventKey={11} title={getFilesTabTitle(dataset)} mountOnEnter={true}>
<DatasetFileTree dataset={dataset} sessionId={this.props.sessionId}> ></DatasetFileTree>
</Tab>
......
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