diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestView.js b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestView.js index 954c73cb1535bd88e6f4c7547aa2ff821117c174..0fd96655aeab5a4f7909ee4eedee4063a7ffde0d 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestView.js +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestView.js @@ -39,7 +39,7 @@ class GenericStatus extends Component { const jsx = ( <td id={this.props.myId} className='component-status'> - <div className={this.getClass()}>{this.props.n_errors} </div> + <div className={this.getClass()}>{this.props.n_errors}</div> </td> ) return jsx; @@ -53,7 +53,7 @@ class StationSummaryLine extends Component { const jsx = ( <th scope="row">{date}</th> ) - return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> + return <tr>{jsx}{this.renderComponentErrors()}</tr> } renderLBH(){ const date = moment(this.props.data.end_date).format('YYYY-MM-DD'); @@ -61,7 +61,7 @@ class StationSummaryLine extends Component { const jsx = ( <th scope="row">{date}</th> ) - return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> + return <tr>{jsx}{this.renderComponentErrors()}</tr> } renderLBL(){ const date = moment(this.props.data.end_date).format('YYYY-MM-DD'); @@ -69,16 +69,16 @@ class StationSummaryLine extends Component { const jsx = ( <th scope="row">{date}</th> ) - return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> + return <tr>{jsx}{this.renderComponentErrors()}</tr> } renderComponentErrors(){ const component_errors = this.props.data.component_errors; const rendered_component_errors = this.props.ordered_component_ids.map((item, key) => { if (component_errors.hasOwnProperty(item)){ - return <GenericStatus component_id={item} n_errors={component_errors[item].length} status = 'error' /> + return <GenericStatus key={key} component_id={item} n_errors={component_errors[item].length} status = 'error' /> }else{ - return <GenericStatus component_id={item} n_errors={0} status = 'ok' /> + return <GenericStatus key={key} component_id={item} n_errors={0} status = 'ok' /> } }); return rendered_component_errors; @@ -91,7 +91,7 @@ class StationSummaryLine extends Component { const jsx = ( <th scope="row">{date}</th> ) - return <React.Fragment>{jsx}{this.renderComponentErrors()}</React.Fragment> + return <tr>{jsx}{this.renderComponentErrors()}</tr> } render (){ switch (this.props.component_type) { @@ -112,7 +112,10 @@ class StationSummaryLine extends Component { class RTSMSummaryLine extends Component { render(){ - <tr><StationSummaryLine ></tr> + const jsx = ( + <tr><StationSummaryLine /></tr> + ) + return jsx; } }