From 871d0f0cbe584bbf9d380a606554cf6244812776 Mon Sep 17 00:00:00 2001 From: Conrad Date: Fri, 30 Mar 2018 15:06:21 -0400 Subject: [PATCH] Add CID to thermal bridge section --- .../SensorInstall/Nodes/SensewareNode.js | 107 +++++++++++------- 1 file changed, 65 insertions(+), 42 deletions(-) diff --git a/src/components/SensorInstall/Nodes/SensewareNode.js b/src/components/SensorInstall/Nodes/SensewareNode.js index cd206505..1f9c6572 100644 --- a/src/components/SensorInstall/Nodes/SensewareNode.js +++ b/src/components/SensorInstall/Nodes/SensewareNode.js @@ -1,6 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Collapse, CardHeader, Card } from 'reactstrap'; +import { + Collapse, CardHeader, Card, + Form, FormGroup, Label, Input, +} from 'reactstrap'; import { Icon } from 'react-fa'; import CopyToClipboard from 'react-copy-to-clipboard'; import { sensewareNodeURL } from '../../../utils/restServices'; @@ -55,6 +58,10 @@ class SensewareNode extends Node { temperature_probe_2: this.props.form.temperature_probe_2, temperature_probe_3: this.props.form.temperature_probe_3, temperature_probe_4: this.props.form.temperature_probe_4, + temperature_probe_1_cid: this.props.form.temperature_probe_1_cid, + temperature_probe_2_cid: this.props.form.temperature_probe_2_cid, + temperature_probe_3_cid: this.props.form.temperature_probe_3_cid, + temperature_probe_4_cid: this.props.form.temperature_probe_4_cid, surface_type: this.props.form.surface_type, notes: this.props.form.notes, @@ -117,6 +124,10 @@ class SensewareNode extends Node { displayName = this.generateDisplayName('false', true); break; case 'node_id': + case 'temperature_probe_1_cid': + case 'temperature_probe_2_cid': + case 'temperature_probe_3_cid': + case 'temperature_probe_4_cid': value = value.replace(/\D/g, ''); break; default: @@ -168,6 +179,10 @@ class SensewareNode extends Node { temperature_probe_2: null, temperature_probe_3: null, temperature_probe_4: null, + temperature_probe_1_cid: null, + temperature_probe_2_cid: null, + temperature_probe_3_cid: null, + temperature_probe_4_cid: null, }, displayName, ); @@ -183,6 +198,10 @@ class SensewareNode extends Node { temperature_probe_2: null, temperature_probe_3: null, temperature_probe_4: null, + temperature_probe_1_cid: null, + temperature_probe_2_cid: null, + temperature_probe_3_cid: null, + temperature_probe_4_cid: null, }, displayName, ); @@ -212,53 +231,57 @@ class SensewareNode extends Node { const temperatureProbes = [1, 2, 3, 4].map((val) => { /* eslint-disable dot-notation */ return ( -
- -
-

- -

-
-
+
+ + + + + + + + + + + + + +
); }); return (
Thermal Bridge
-
- {temperatureProbes} -
+ {temperatureProbes}
); -- GitLab