Skip to content

Commit

Permalink
bugfix/timeseries-masking (#215)
Browse files Browse the repository at this point in the history
- fixes checking masked and validated fields on instrument timeseries
  • Loading branch information
KevinJJackson authored Mar 8, 2024
1 parent cbd1ded commit d43553a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hhd-ui",
"version": "0.15.5",
"version": "0.15.6",
"private": true,
"dependencies": {
"@ag-grid-community/client-side-row-model": "^30.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app-bundles/time-series-measurements-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default createRestBundle({
});
},

doPostTimeseriesMeasurements: ({ measurements = []}) => ({ store, apiPost }) => {
doPostTimeseriesMeasurements: ({ measurements = [] }) => ({ store, apiPost }) => {
const project = store['selectProjectsIdByRoute']();
const { projectId } = project;

Expand Down
4 changes: 2 additions & 2 deletions src/app-pages/instrument/timeseries/timeseries.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export default connect(
newValue.value = new Number(value);

if (field === 'time') doTimeseriesMeasurementsDelete({ timeseriesId: activeTimeseries, date: oldValue });
if (field === 'validated') newValue.validated = validated === 'true';
if (field === 'masked') newValue.masked = masked === 'true';
if (field === 'validated') newValue.validated = validated === true;
if (field === 'masked') newValue.masked = masked === true;

doTimeseriesMeasurementsSave({
timeseries_id: activeTimeseries,
Expand Down
1 change: 1 addition & 0 deletions src/upload-parsers/timeseries_measurements.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DateTime } from 'luxon';
import { isNumeric } from '../common/helpers/utils';

// TODO: Transition this to pass an array, instead of an object, to the timeseries_measurements endpoint.
const timeseriesMeasurementParser = {
name: 'Timeseries Measurement',
url: '/projects/:projectId/timeseries_measurements',
Expand Down

0 comments on commit d43553a

Please sign in to comment.