# src/components/Instrument/InstrumentOpticsWidget.js

## Maintainability

74.21

## Lines of code

31

## Difficulty

14.00

## Estimated Errors

0.18

## Function weight

### By Complexity

### By SLOC

import React from 'react'; import { Panel, Grid, Row, Col } from 'react-bootstrap'; import { getDatasetParameterByName, getDatasetParameterByPrefixName } from '../../helpers/DatasetHelper.js'; import ParameterTableWidget from './ParameterTableWidget.js'; class InstrumentOpticsWidget extends React.Component { constructor(props) { super(props); } render(){ var values = getDatasetParameterByPrefixName(this.props.dataset, "InstrumentOpticsPositioners_value"); var names = getDatasetParameterByPrefixName(this.props.dataset, "InstrumentOpticsPositioners_name"); if (values && names){ if (values.length > 0 && names.length > 0){ return <div className="container-fluid"> <h3>Optics</h3> <div class="row"> <ParameterTableWidget names={names[0].value} values={values[0].value} ></ParameterTableWidget> </div> </div>; } } return null; } } export default InstrumentOpticsWidget;