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 {
components.forEach((component) => {
let comp_sum = summary[component];
let errors = Object.keys(comp_sum).sort();
rows.push(<tr key={unique_id()}>
rows.push(<tr key={component}>
<th>{component}</th>
<td>{errors.map((id, e) => <Badge key={id} count={comp_sum[e]} label={e}/>)}</td>
</tr>);
......@@ -89,7 +89,7 @@ class StationTestBadgeC extends Component {
{this.props.station}
</PopoverHeader>
<PopoverBody>
<Table borderless="borderless" size="sm">
<Table borderless size="sm">
<tbody>
<tr>
<th>Start:</th>
......@@ -174,7 +174,7 @@ class RTSMBadge extends Component {
{data.observation_id}
</PopoverHeader>
<PopoverBody>
<Table borderless="borderless" size="sm">
<Table borderless size="sm">
<tbody>
<tr>
<th>Start:</th>
......@@ -223,8 +223,7 @@ class SORow extends Component {
renderStationTests() {
let data = this.props.data;
let station_name = data.station_name;
return data.station_tests.map((testData) => <StationTestBadge key={[station_name, testData.start_datetime].join("_")} station={data.station_name} data={testData}/>);
return data.station_tests.map((testData) => <StationTestBadge key={testData.start_datetime} station={data.station_name} data={testData}/>);
}
renderRTSM() {
......
......@@ -31,7 +31,7 @@ class STSRow extends Component {
cols = [];
props.errorTypes.forEach((type) => {
cols.push(<td key={unique_id()}>{ errors[type] }</td>);
cols.push(<td key={type}>{ errors[type] }</td>);
});
return (
......@@ -147,7 +147,7 @@ class StationTestSummaryC extends Component {
renderTableHeaders() {
let th = []
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;
}
......
......@@ -6,7 +6,7 @@ const componentErrorTypes = {
"CHECKSRV": "CK",
"DOWN": "DW",
"FLAT": "FL",
"HIGH_NOISE24": "HN",
"HIGH_NOISE": "HN",
"JITTER": "JI",
"LOW_NOISE": "LN",
"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