From 9017e2ab8d93bafa9d3e4d7e6e835cddacf96592 Mon Sep 17 00:00:00 2001 From: Kevin Jackson <30411845+KevinJJackson@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:54:31 -0500 Subject: [PATCH 1/4] bugfix/uploader (#205) --- src/app-bundles/time-series-bundle.js | 2 -- src/app-pages/project/batch-plotting/helper.js | 2 -- src/upload-parsers/inclinometer_measurements.js | 6 +----- src/upload-parsers/timeseries_measurements.js | 9 ++------- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/app-bundles/time-series-bundle.js b/src/app-bundles/time-series-bundle.js index 9809ca72..0d513254 100644 --- a/src/app-bundles/time-series-bundle.js +++ b/src/app-bundles/time-series-bundle.js @@ -33,14 +33,12 @@ export default createRestBundle({ doSaveFieldNamesToTimeseries: (newObject, instrumentId, dataLoggerId, tableId) => ({ dispatch, store, apiPost }) => { dispatch({ type: 'ASSIGN_FIELD_NAMES_TO_TIMESERIES_START' }); const toastId = tLoading('Creating new timeseries...'); - const { projectId } = store.selectProjectsIdByRoute(); const { newTs, existingTs } = newObject; const uri = '/timeseries'; const formData = []; newTs.forEach(item => formData.push({ - project_id: projectId, instrument_id: instrumentId, name: item?.field_name, })); diff --git a/src/app-pages/project/batch-plotting/helper.js b/src/app-pages/project/batch-plotting/helper.js index e199970e..9f938da1 100644 --- a/src/app-pages/project/batch-plotting/helper.js +++ b/src/app-pages/project/batch-plotting/helper.js @@ -12,8 +12,6 @@ const getStyle = (_index) => ({ export const generateNewChartData = (measurements, timeseries, chartSettings) => { const { show_comments, show_masked, show_nonvalidated } = chartSettings || {}; - console.log('test measurements, ts', measurements, timeseries) - if (measurements.length && timeseries.length) { const data = measurements.map((elem, index) => { if (elem && timeseries.length) { diff --git a/src/upload-parsers/inclinometer_measurements.js b/src/upload-parsers/inclinometer_measurements.js index b21f95c8..6920a4ed 100644 --- a/src/upload-parsers/inclinometer_measurements.js +++ b/src/upload-parsers/inclinometer_measurements.js @@ -34,12 +34,8 @@ const inclinometerMeasurementParser = { required: true, useFilterComponent: true, provider: state => { - const regex = new RegExp('/projects/(.*)/instruments'); - const match = state.instruments._lastResource.match(regex); - const projectId = match && match.length >= 2 ? match[1] : ''; - return Object.keys(state.instrumentTimeseries) - .filter(key => (key.charAt(0) !== '_' && state.instrumentTimeseries[key].project_id === projectId)) + .filter(key => key.charAt(0) !== '_') .map(key => ({ value: key, text: `${state.instrumentTimeseries[key].instrument} - ${state.instrumentTimeseries[key].name}`, diff --git a/src/upload-parsers/timeseries_measurements.js b/src/upload-parsers/timeseries_measurements.js index b1acbf08..75cba858 100644 --- a/src/upload-parsers/timeseries_measurements.js +++ b/src/upload-parsers/timeseries_measurements.js @@ -7,12 +7,11 @@ const timeseriesMeasurementParser = { prePostFilter: (data) => ( /** this will work for single timeseries_id, needs to be updated to allow for multiple */ data.reduce((accum, current) => { - const { timeseries_id, time, value, masked, validated, annotation, project_id } = current; + const { timeseries_id, time, value, masked, validated, annotation } = current; return ({ ...accum, timeseries_id, - project_id, items: (accum['items'] || []).concat([{ time: DateTime.fromISO(time, { zone: 'utc' }), value, @@ -30,12 +29,8 @@ const timeseriesMeasurementParser = { required: true, useFilterComponent: true, provider: state => { - const regex = new RegExp('/projects/(.*)/instruments'); - const match = state.instruments._lastResource.match(regex); - const projectId = match && match.length >= 2 ? match[1] : ''; - return Object.keys(state.instrumentTimeseries) - .filter(key => (key.charAt(0) !== '_' && state.instrumentTimeseries[key].project_id === projectId)) + .filter(key => key.charAt(0) !== '_') .map(key => ({ value: key, text: `${state.instrumentTimeseries[key].instrument} - ${state.instrumentTimeseries[key].name}`, From b82c04e9063468756e1c8a1beeb63e77d1abc142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:02:46 -0500 Subject: [PATCH 2/4] Bump @adobe/css-tools from 4.0.1 to 4.3.1 (#186) Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.0.1 to 4.3.1. - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md) - [Commits](https://github.com/adobe/css-tools/commits) --- updated-dependencies: - dependency-name: "@adobe/css-tools" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From d26b602dd6fb6bd3fd5dd7144b1dd46eeba1e775 Mon Sep 17 00:00:00 2001 From: Kevin Jackson <30411845+KevinJJackson@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:10:18 -0500 Subject: [PATCH 3/4] version bump 0.15.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e74ae5ae..dd3ecc25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hhd-ui", - "version": "0.15.2", + "version": "0.15.3", "private": true, "dependencies": { "@ag-grid-community/client-side-row-model": "^30.0.3", From 6a762a01bceac384ba439c5d65c5747d36579bb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:10:48 -0500 Subject: [PATCH 4/4] Bump plotly.js from 2.24.3 to 2.25.2 (#206) --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e5dbd63..42fb5b65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hhd-ui", - "version": "0.15.0", + "version": "0.15.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hhd-ui", - "version": "0.15.0", + "version": "0.15.2", "dependencies": { "@ag-grid-community/client-side-row-model": "^30.0.3", "@ag-grid-community/core": "^30.0.3", @@ -30,7 +30,7 @@ "luxon": "^3.3.0", "money-clip": "^3.0.5", "ol": "^7.4.0", - "plotly.js": "^2.24.3", + "plotly.js": "^2.25.2", "process": "^0.11.10", "proj4": "^2.9.0", "react": "^18.2.0", @@ -6444,9 +6444,9 @@ } }, "node_modules/plotly.js": { - "version": "2.24.3", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.24.3.tgz", - "integrity": "sha512-XPlBqWXx+BHU49gQ0tVIAhTqzP7cmnOfYTXIMxju8wTJElKEaiF9qqPG88WDiIAToup2n40zhXjsyJe/JaRu2g==", + "version": "2.25.2", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.25.2.tgz", + "integrity": "sha512-Pf6dPYGl21W7A3FTgLQ52fpgvrqGhCPDT3+612bxwg4QXlvxhnoFwvuhT1BRW/l2nbYGpRoUH79K54yf2vCMVQ==", "dependencies": { "@plotly/d3": "3.8.1", "@plotly/d3-sankey": "0.7.2", @@ -13210,9 +13210,9 @@ "version": "2.3.1" }, "plotly.js": { - "version": "2.24.3", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.24.3.tgz", - "integrity": "sha512-XPlBqWXx+BHU49gQ0tVIAhTqzP7cmnOfYTXIMxju8wTJElKEaiF9qqPG88WDiIAToup2n40zhXjsyJe/JaRu2g==", + "version": "2.25.2", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-2.25.2.tgz", + "integrity": "sha512-Pf6dPYGl21W7A3FTgLQ52fpgvrqGhCPDT3+612bxwg4QXlvxhnoFwvuhT1BRW/l2nbYGpRoUH79K54yf2vCMVQ==", "requires": { "@plotly/d3": "3.8.1", "@plotly/d3-sankey": "0.7.2", diff --git a/package.json b/package.json index dd3ecc25..d9eb1f2b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "luxon": "^3.3.0", "money-clip": "^3.0.5", "ol": "^7.4.0", - "plotly.js": "^2.24.3", + "plotly.js": "^2.25.2", "process": "^0.11.10", "proj4": "^2.9.0", "react": "^18.2.0",