From b5808bb86c9d6ca3d8ebcfe144f00ce6c6a1e8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20PAILHAREY?= <rpailharey@grandlyon.com> Date: Wed, 4 Sep 2024 15:50:51 +0200 Subject: [PATCH] publish: feat: simpler fluidPrices service generated from commit 690b373ece74ef849a689d93404f32921b9a8fc5 --- ...6937.js => ecolyo.bcc357e839d8591be3f6.js} | 37 +++++++++++-------- index.html | 2 +- services/aggregatorUsageEvents/ecolyo.js | 6 +++ services/consumptionAlert/ecolyo.js | 6 +++ .../enedisHalfHourMonthlyAnalysis/ecolyo.js | 6 +++ services/monthlyReportNotification/ecolyo.js | 6 +++ 6 files changed, 47 insertions(+), 16 deletions(-) rename app/{ecolyo.d21d39dda092dfe36937.js => ecolyo.bcc357e839d8591be3f6.js} (99%) diff --git a/app/ecolyo.d21d39dda092dfe36937.js b/app/ecolyo.bcc357e839d8591be3f6.js similarity index 99% rename from app/ecolyo.d21d39dda092dfe36937.js rename to app/ecolyo.bcc357e839d8591be3f6.js index d33524be1..3731118cf 100644 --- a/app/ecolyo.d21d39dda092dfe36937.js +++ b/app/ecolyo.bcc357e839d8591be3f6.js @@ -34006,7 +34006,7 @@ var ConsumptionDataManager = /*#__PURE__*/function () { return _context2.abrupt("return", formattedData); case 13: if (!(fluidTypes.length > 1 || isHome)) { - _context2.next = 38; + _context2.next = 40; break; } toBeAggregatedData = []; @@ -34015,7 +34015,7 @@ var ConsumptionDataManager = /*#__PURE__*/function () { _iterator.s(); case 18: if ((_step = _iterator.n()).done) { - _context2.next = 27; + _context2.next = 29; break; } _fluidType = _step.value; @@ -34023,39 +34023,46 @@ var ConsumptionDataManager = /*#__PURE__*/function () { return this.fetchSingleFluidGraphData(timePeriod, timeStep, _fluidType, compareTimePeriod); case 22: _fetchedData = _context2.sent; - _formattedData = this.formatGraphDataManager(_fetchedData, timeStep, timePeriod, compareTimePeriod || null, _fluidType, fluidStatus ? fluidStatus[_fluidType] : undefined); // validating output data + console.log({ + fetchedData: _fetchedData + }); + _formattedData = this.formatGraphDataManager(_fetchedData, timeStep, timePeriod, compareTimePeriod || null, _fluidType, fluidStatus ? fluidStatus[_fluidType] : undefined); + console.log({ + formattedData: _formattedData + }); + // validating output data toBeAggregatedData.push({ chartData: _formattedData, chartFluid: _fluidType }); - case 25: - _context2.next = 18; - break; case 27: - _context2.next = 32; + _context2.next = 18; break; case 29: - _context2.prev = 29; + _context2.next = 34; + break; + case 31: + _context2.prev = 31; _context2.t0 = _context2["catch"](16); _iterator.e(_context2.t0); - case 32: - _context2.prev = 32; + case 34: + _context2.prev = 34; _iterator.f(); - return _context2.finish(32); - case 35: + return _context2.finish(34); + case 37: console.log({ toBeAggregatedData: toBeAggregatedData }); aggregatedData = this.aggregateGraphData(toBeAggregatedData); return _context2.abrupt("return", aggregatedData); - case 38: + case 40: return _context2.abrupt("return", null); - case 39: + case 41: case "end": return _context2.stop(); } } - }, _callee2, this, [[16, 29, 32, 35]]); + }, _callee2, this, [[16, 31, 34, 37]]); })); function getGraphData(_x3) { return _getGraphData.apply(this, arguments); diff --git a/index.html b/index.html index 9553adba0..140dc1795 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.9cebad5ae7ea932ed345.js"></script><script src="app/ecolyo.d21d39dda092dfe36937.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.9cebad5ae7ea932ed345.js"></script><script src="app/ecolyo.bcc357e839d8591be3f6.js"></script></div></body></html> \ No newline at end of file diff --git a/services/aggregatorUsageEvents/ecolyo.js b/services/aggregatorUsageEvents/ecolyo.js index fed137d89..5f9cd431d 100644 --- a/services/aggregatorUsageEvents/ecolyo.js +++ b/services/aggregatorUsageEvents/ecolyo.js @@ -71733,7 +71733,13 @@ class ConsumptionDataManager { const toBeAggregatedData = []; for (const fluidType of fluidTypes) { const fetchedData = await this.fetchSingleFluidGraphData(timePeriod, timeStep, fluidType, compareTimePeriod); + console.log({ + fetchedData + }); const formattedData = this.formatGraphDataManager(fetchedData, timeStep, timePeriod, compareTimePeriod || null, fluidType, fluidStatus ? fluidStatus[fluidType] : undefined); + console.log({ + formattedData + }); // validating output data toBeAggregatedData.push({ chartData: formattedData, diff --git a/services/consumptionAlert/ecolyo.js b/services/consumptionAlert/ecolyo.js index a8b849d45..92d4bd34d 100644 --- a/services/consumptionAlert/ecolyo.js +++ b/services/consumptionAlert/ecolyo.js @@ -71330,7 +71330,13 @@ class ConsumptionDataManager { const toBeAggregatedData = []; for (const fluidType of fluidTypes) { const fetchedData = await this.fetchSingleFluidGraphData(timePeriod, timeStep, fluidType, compareTimePeriod); + console.log({ + fetchedData + }); const formattedData = this.formatGraphDataManager(fetchedData, timeStep, timePeriod, compareTimePeriod || null, fluidType, fluidStatus ? fluidStatus[fluidType] : undefined); + console.log({ + formattedData + }); // validating output data toBeAggregatedData.push({ chartData: formattedData, diff --git a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js index 92b4057fa..5173743a7 100644 --- a/services/enedisHalfHourMonthlyAnalysis/ecolyo.js +++ b/services/enedisHalfHourMonthlyAnalysis/ecolyo.js @@ -71330,7 +71330,13 @@ class ConsumptionDataManager { const toBeAggregatedData = []; for (const fluidType of fluidTypes) { const fetchedData = await this.fetchSingleFluidGraphData(timePeriod, timeStep, fluidType, compareTimePeriod); + console.log({ + fetchedData + }); const formattedData = this.formatGraphDataManager(fetchedData, timeStep, timePeriod, compareTimePeriod || null, fluidType, fluidStatus ? fluidStatus[fluidType] : undefined); + console.log({ + formattedData + }); // validating output data toBeAggregatedData.push({ chartData: formattedData, diff --git a/services/monthlyReportNotification/ecolyo.js b/services/monthlyReportNotification/ecolyo.js index 016243d52..aedf2031c 100644 --- a/services/monthlyReportNotification/ecolyo.js +++ b/services/monthlyReportNotification/ecolyo.js @@ -71330,7 +71330,13 @@ class ConsumptionDataManager { const toBeAggregatedData = []; for (const fluidType of fluidTypes) { const fetchedData = await this.fetchSingleFluidGraphData(timePeriod, timeStep, fluidType, compareTimePeriod); + console.log({ + fetchedData + }); const formattedData = this.formatGraphDataManager(fetchedData, timeStep, timePeriod, compareTimePeriod || null, fluidType, fluidStatus ? fluidStatus[fluidType] : undefined); + console.log({ + formattedData + }); // validating output data toBeAggregatedData.push({ chartData: formattedData, -- GitLab