-
Notifications
You must be signed in to change notification settings - Fork 100
chore(analog): analog branch cleanup efforts #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore(analog): analog branch cleanup efforts #213
Conversation
…Control" to current
…og-branch-cleanup
Edit - disregard. This seems to be a dev env issue related to one of my Chrome extensions. It does not repro in Firefox or in a Chrome incognito tab. hey @opensprinklershop, no matter which version of apexcharts I try, I get a console error when visiting the "Edit Programs" page. I have tried v3.35.0, v3.50.0 and v3.54.1 but they all fail in similar manner. I'm not sure if I've broken something with my branch, can you check if you see this on your end? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR continues the analog branch cleanup efforts by refining naming conventions, refactoring integration code, and updating user‐facing text and error handling. Key changes include removal of unused markup attributes and testing comments, renaming files and constants for improved readability, and refactoring functions (e.g. error handling in sendToOS) to add a default timeout and support new dashboard and flow alert features.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
www/sw.js | Added program-view.js to the service worker cache list. |
www/locale/messages_en.po | Added/updated msgid entries for new texts and corrections. |
www/locale/de.js | Updated German translations to reflect new strings. |
www/js/modules/utils.js | Introduced escapeJSON2 and new utility functions; minor refactor. |
www/js/modules/ui-dom.js | Initialized analog module via asb_init. |
www/js/modules/system-diagnostics.js | Refactored diagnostic integration to load du status for fw 233+. |
www/js/modules/supported.js | Added support check for Flow Alert. |
www/js/modules/stations.js | Updated stopAllStations to accept an optional callback. |
www/js/modules/sites.js | Added a call to update monitors after analog sensor update. |
www/js/modules/programs.js | Added a new pid case; fixed error message case sensitivity. |
www/js/modules/program-view.js | Introduced a new module for program visualization using ApexCharts. |
www/js/modules/options.js | Extended options display with new dashboard mode and influxdb config. |
www/js/modules/import-export.js | Updated JSON escaping for configuration import/export. |
www/js/modules/firmware.js | Added a default timeout parameter in sendToOS. |
www/js/modules/dashboard.js | Updated dashboards to support flow alert setpoints and new views. |
www/index.html | Included program-view.js in main index. |
www/css/analog.css | Updated media queries and button styles for responsive design. |
@mellodev Is this PR ready for merge? @rayshobby do we want to merge this? |
Hi Samer/Ray! This branch looked good to me when sent, however we were waiting on someone to get actual sensors to do some testing and verification before merging. I'm not sure if any QA work like that has been completed? Additionally I see that we have a couple merge conflicts that need resolving now. We should make sure that program-view.js change to use |
Got it, thank you Joel! Ray also let me know he is still pending testing the sensors. So we can hold off on the conflict fixes if we want until that is verified. Thank you again! |
Changes Proposed
Various Fixes:
data-appversion
attribute in index.htmlcheckAnalogSensorAvail
to prevent crash at app launchprogramview.js
toprogram-view.js
and updated importsCURRENT_FW
related constants toMIN_REQ_FW
for improved readibilityConstants.CHANNELS
; refactored all uses of channel ids; refactored if statements to switchname: "Adjustment"
toname: OSApp.Language._("Adjustment")
window.alert()
toOSApp.Errors.showError()
x2getExportMethodSensors()
andgetImportMethodSensors()
; update callers of those functionsOSApp.Analog.Constants.SENSOR_GROUP_MIN
rather than hardcoded integer 1000combineWithSep()
refactored toOSApp.Utils.combineWithSep()
and caller updatedisNumber()
,formatVal()
andformatValUnit()
toOSApp.Utils
namespace; updated callersgetUnit()
to use Constants; refactoredbuildGraph()
to better use constantssendToOS()
OSApp.Utils.buildOptionsForObj()
to automate building tags from constantsOptions.showOptions
to use newDASHBOARD_MODE
constantSystemDiagnostics.showDiagnostics()
refactored to conditionally call/du
endpoint for OS v 233; passed duStatus section strings through Language translationsapexcharts.min.js
from 3.35.1 to latest 3.54.1Demo Video or Screenshots
Please include a short video or screenshot(s) to assist with pr review