Skip to content
Snippets Groups Projects
Commit 0022d88c authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-31: end of day commit

parent 04440c9e
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
...@@ -39,7 +39,7 @@ class GenericStatus extends Component { ...@@ -39,7 +39,7 @@ class GenericStatus extends Component {
const jsx = ( const jsx = (
<td id={this.props.myId} className='component-status'> <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> </td>
) )
return jsx; return jsx;
...@@ -53,7 +53,7 @@ class StationSummaryLine extends Component { ...@@ -53,7 +53,7 @@ class StationSummaryLine extends Component {
const jsx = ( const jsx = (
<th scope="row">{date}</th> <th scope="row">{date}</th>
) )
return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> return <tr>{jsx}{this.renderComponentErrors()}</tr>
} }
renderLBH(){ renderLBH(){
const date = moment(this.props.data.end_date).format('YYYY-MM-DD'); const date = moment(this.props.data.end_date).format('YYYY-MM-DD');
...@@ -61,7 +61,7 @@ class StationSummaryLine extends Component { ...@@ -61,7 +61,7 @@ class StationSummaryLine extends Component {
const jsx = ( const jsx = (
<th scope="row">{date}</th> <th scope="row">{date}</th>
) )
return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> return <tr>{jsx}{this.renderComponentErrors()}</tr>
} }
renderLBL(){ renderLBL(){
const date = moment(this.props.data.end_date).format('YYYY-MM-DD'); const date = moment(this.props.data.end_date).format('YYYY-MM-DD');
...@@ -69,16 +69,16 @@ class StationSummaryLine extends Component { ...@@ -69,16 +69,16 @@ class StationSummaryLine extends Component {
const jsx = ( const jsx = (
<th scope="row">{date}</th> <th scope="row">{date}</th>
) )
return <tr className='component-list'>{jsx}{this.renderComponentErrors()}</tr> return <tr>{jsx}{this.renderComponentErrors()}</tr>
} }
renderComponentErrors(){ renderComponentErrors(){
const component_errors = this.props.data.component_errors; const component_errors = this.props.data.component_errors;
const rendered_component_errors = this.props.ordered_component_ids.map((item, key) => const rendered_component_errors = this.props.ordered_component_ids.map((item, key) =>
{ {
if (component_errors.hasOwnProperty(item)){ 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{ }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; return rendered_component_errors;
...@@ -91,7 +91,7 @@ class StationSummaryLine extends Component { ...@@ -91,7 +91,7 @@ class StationSummaryLine extends Component {
const jsx = ( const jsx = (
<th scope="row">{date}</th> <th scope="row">{date}</th>
) )
return <React.Fragment>{jsx}{this.renderComponentErrors()}</React.Fragment> return <tr>{jsx}{this.renderComponentErrors()}</tr>
} }
render (){ render (){
switch (this.props.component_type) { switch (this.props.component_type) {
...@@ -112,7 +112,10 @@ class StationSummaryLine extends Component { ...@@ -112,7 +112,10 @@ class StationSummaryLine extends Component {
class RTSMSummaryLine extends Component { class RTSMSummaryLine extends Component {
render(){ render(){
<tr><StationSummaryLine ></tr> const jsx = (
<tr><StationSummaryLine /></tr>
)
return jsx;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment