The objective of that PR was to try to fix Weatherford from the 2022 campaign to show up, which might also lead to the possibility of supporting manually uploading data for a particular building in a campaign (the original issue with Weatherford was that because the data was manually uploaded in SQL, the data was only uploaded in hourly increments while the database expected 15 minute values)
However, the findClosest function (at least in baseline_perc.js file) is not working as expected (you can see my old comments in this file about something not working quite right for 1 day / 6 hours)
I couldn't get Weatherford to show up on the 1 day / 6 hours graphs of the 2022 campaign either (although that may just be due lack of Weatherford data on the last day of 2022 campaign)
Potential Solutions
Option 1 (current): Just remove any references to findClosest function (and related variables etc) in src\store\chart_modifiers\line_bar\baseline_perc.js file
It is not vital that Weatherford shows up on the 2022 campaign (and as mentioned above, it didn't seem to work for 1 day / 6 hours anyways), and if the Office wants to support manually uploaded campaign data in the future, that can be handled via a new and better fix in the future
Fairly certain that baseline_perc.js file is only used by the campaigns, although that should be double checked
I don't think there are currently any issues with other files that use findClosest function (e.g. accumulated_real.js, energy_change.js)
Option 2: Try to fix the logic for the findClosest function in the baseline_perc.js file
Probably not feasible unless a very simple fix is found within a day or two, since it is important to get the campaign online and in mostly-working order ASAP)
Issue
baseline_perc.js
file) is not working as expected (you can see my old comments in this file about something not working quite right for 1 day / 6 hours)Potential Solutions
Option 1 (current): Just remove any references to
findClosest
function (and related variables etc) insrc\store\chart_modifiers\line_bar\baseline_perc.js
filebaseline_perc.js
file is only used by the campaigns, although that should be double checkedfindClosest
function (e.g.accumulated_real.js
,energy_change.js
)Option 2: Try to fix the logic for the
findClosest
function in thebaseline_perc.js
fileScreenshots
Before
After