Skip to content
Snippets Groups Projects
Commit e0c60fee authored by Reinoud Bokhorst's avatar Reinoud Bokhorst
Browse files

OSB-29: fixed keys

parent 816162d8
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
...@@ -78,7 +78,7 @@ class StationTestBadgeC extends Component { ...@@ -78,7 +78,7 @@ class StationTestBadgeC extends Component {
components.forEach((component) => { components.forEach((component) => {
let comp_sum = summary[component]; let comp_sum = summary[component];
let errors = Object.keys(comp_sum).sort(); let errors = Object.keys(comp_sum).sort();
rows.push(<tr key={unique_id()}> rows.push(<tr key={component}>
<th>{component}</th> <th>{component}</th>
<td>{errors.map((id, e) => <Badge key={id} count={comp_sum[e]} label={e}/>)}</td> <td>{errors.map((id, e) => <Badge key={id} count={comp_sum[e]} label={e}/>)}</td>
</tr>); </tr>);
...@@ -89,7 +89,7 @@ class StationTestBadgeC extends Component { ...@@ -89,7 +89,7 @@ class StationTestBadgeC extends Component {
{this.props.station} {this.props.station}
</PopoverHeader> </PopoverHeader>
<PopoverBody> <PopoverBody>
<Table borderless="borderless" size="sm"> <Table borderless size="sm">
<tbody> <tbody>
<tr> <tr>
<th>Start:</th> <th>Start:</th>
...@@ -174,7 +174,7 @@ class RTSMBadge extends Component { ...@@ -174,7 +174,7 @@ class RTSMBadge extends Component {
{data.observation_id} {data.observation_id}
</PopoverHeader> </PopoverHeader>
<PopoverBody> <PopoverBody>
<Table borderless="borderless" size="sm"> <Table borderless size="sm">
<tbody> <tbody>
<tr> <tr>
<th>Start:</th> <th>Start:</th>
...@@ -223,8 +223,7 @@ class SORow extends Component { ...@@ -223,8 +223,7 @@ class SORow extends Component {
renderStationTests() { renderStationTests() {
let data = this.props.data; let data = this.props.data;
let station_name = data.station_name; return data.station_tests.map((testData) => <StationTestBadge key={testData.start_datetime} station={data.station_name} data={testData}/>);
return data.station_tests.map((testData) => <StationTestBadge key={[station_name, testData.start_datetime].join("_")} station={data.station_name} data={testData}/>);
} }
renderRTSM() { renderRTSM() {
......
...@@ -31,7 +31,7 @@ class STSRow extends Component { ...@@ -31,7 +31,7 @@ class STSRow extends Component {
cols = []; cols = [];
props.errorTypes.forEach((type) => { props.errorTypes.forEach((type) => {
cols.push(<td key={unique_id()}>{ errors[type] }</td>); cols.push(<td key={type}>{ errors[type] }</td>);
}); });
return ( return (
...@@ -147,7 +147,7 @@ class StationTestSummaryC extends Component { ...@@ -147,7 +147,7 @@ class StationTestSummaryC extends Component {
renderTableHeaders() { renderTableHeaders() {
let th = [] let th = []
this.activeErrorTypes.forEach((err) => { this.activeErrorTypes.forEach((err) => {
th.push( <th key={unique_id()} title={err}>{ componentErrorTypes[err] ? componentErrorTypes[err] : err }</th> ); th.push( <th key={err} title={err}>{ componentErrorTypes[err] ? componentErrorTypes[err] : err }</th> );
}); });
return th; return th;
} }
......
...@@ -6,7 +6,7 @@ const componentErrorTypes = { ...@@ -6,7 +6,7 @@ const componentErrorTypes = {
"CHECKSRV": "CK", "CHECKSRV": "CK",
"DOWN": "DW", "DOWN": "DW",
"FLAT": "FL", "FLAT": "FL",
"HIGH_NOISE24": "HN", "HIGH_NOISE": "HN",
"JITTER": "JI", "JITTER": "JI",
"LOW_NOISE": "LN", "LOW_NOISE": "LN",
"MEMORY": "MY", "MEMORY": "MY",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment