Commit Graph

3918 Commits

Author SHA1 Message Date
Maxim Prokhorov
f007db1ff6 webui: implicit build-only consts via .d file 2024-06-25 17:53:50 +03:00
Maxim Prokhorov
a7697a2578 webui: attempt to clean-up index js types
minimal type info for internal and some external funcs
fix Ago updates depending on uptime, use onmessage

html/src/types/* useless (at least without tsc actually running)
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
001f9dfbf3 webui: gulp-replace dependency clean-up
throw out broken package.json dependencies related to @types/...
plus, current pipe order needs neither stream or regexp implementations
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
2dadf01839 webui: gulpfile in strict mode
amends f58d086dd6
attempt to distinguish build and ui scripts
2024-06-25 17:53:50 +03:00
dependabot[bot]
464804b974 build(deps-dev): bump ws from 8.17.0 to 8.17.1 in /code (#2611)
Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:39:54 +03:00
Maxim Prokhorov
ab9c76e437 webui: fix "all" accidentally including local code 2024-06-24 23:08:53 +03:00
Maxim Prokhorov
acde98f820 webui: rebuild blobs 2024-06-24 22:57:50 +03:00
Maxim Prokhorov
b8ab3fbc3c sns: DHTSensor errors should not permanently disable interrupts
resolve #2609
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
4f520a8798 webui: consistent settingsMax check
remove leftover manual template merge, idForContainer() should just use template-id data key
group add event now checks that instead, raising alert when number is greater than max

ref. #2610
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
d6c758f099 webui: local server publishes modules as-is
note that import.meta.resolve for iro returns non-es file (for some reason)
hardcode minified dist es module from node_modules, whuch should be used instead

fix server routing to only rebuild html when root is accessed
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
ce5ada9d32 webui: type filter for element setters 2024-06-24 22:43:19 +03:00
Maxim Prokhorov
7bbbf08192 compat: core2.7.4 missing external operator+(String,String)
can't sum strings otherwise b/c of ambiguous overload w/ StringView
2024-06-24 22:43:01 +03:00
Maxim Prokhorov
a1363ddad9 system: iso8601 datetime & webui in local timezone
ref. #2608
2024-06-24 22:42:00 +03:00
Maxim Prokhorov
a5d8bf8746 ci: builder job per id 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
f58d086dd6 webui: gulp tasks as module exports
per https://gulpjs.com/docs/en/getting-started/creating-tasks/
gulp --tasks[-*] now actually works

update jsdoc comments and eslint rules
2024-06-24 22:42:00 +03:00
Maxim Prokhorov
ddcbd0e885 webui: color hierarchy for custom toggle 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
7604a9cd6a wifi: typo 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
8d569e19c0 wifi: export func to serialize mac address 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
4975a2382c webui: removing original .html & .js & .css 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
13b59c0beb webui: local module disabled by default 2024-06-22 19:49:59 +03:00
Maxim Prokhorov
289fea4f3d webui: separate sources per module
* migrate to esbuild from terser, since now js source needs bundling
* (temporary?) hijack inline-source object handling to inline html files
* get rid of legacy removeIf comments in source in favour of explicit
  removal either through bundling tree-shaking and / or manual module-*
  class element removal w/ jsdom
* get rid of multi-layered custom checkboxes in favour of
  `appearance: none` directly styling the `input` elem
  also removes scripting part that was supposed to adjust for=... labels
* update to html-minifier-terser, up-to-date html-minifier fork
* update to iro.js 5.5.x, using npm to manage dependencies
* build script can now update resulting html output
  (called after bundling stage, before minification)
2024-06-22 19:49:59 +03:00
Maxim Prokhorov
bfa4ed7541 pio: remove env:...-ota configs
already handled through environment variables, no need to duplicate things
2024-06-16 19:50:17 +03:00
Maxim Prokhorov
4e4425f906 core: bump version 2024-06-16 19:49:33 +03:00
Maxim Prokhorov
9e1b25f585 settings: mark user modified values 2024-06-15 20:56:52 +03:00
Maxim Prokhorov
30c6b90bc7 ci: py312 deprecation warnings 2024-06-15 20:46:49 +03:00
Maxim Prokhorov
fa7c187579 telnet: best-effort skip of command data
usually a good idea for clients like PuTTY, since these are sent by default
in the very first packet even before user types anything else
also restore iac+eof handling, which call close() on the stream

resolve #2563
resolve #2606
2024-06-15 16:57:31 +03:00
Maxim Prokhorov
11489d21e0 dcz: static json buffer overflow
revert to pre b23137f cstrings
fix #2605
2024-06-13 21:49:31 +03:00
Maxim Prokhorov
bc711dda4e webui: bump gulp to 5.0.0 2024-05-29 07:50:19 +03:00
Maxim Prokhorov
4a8a8e1913 webui: bump eslint to 9.3.0 2024-05-29 07:36:03 +03:00
Maxim Prokhorov
9a8466f622 webui: pending stylelint 2024-05-29 07:27:20 +03:00
Maxim Prokhorov
cf9ec76d2f webui: bump to inline-source-8.0.3
remove yet another deprecated gulp plugin, just calling it w/ through2
2024-05-29 05:08:46 +03:00
Maxim Prokhorov
d6f807d68c scheduler: midnight as default HH:MM
allow just "UTC", "Monday", "05-01", etc.
clarify webui paragraph and mention KEYWORD as an element

ignore sunrise and sunset keywords when sun module is disabled

move all of parsing to time module, test whether combined match works
2024-05-27 19:10:25 +03:00
Maxim Prokhorov
17a599f91b test: leftover printf 2024-05-27 03:34:50 +03:00
Maxim Prokhorov
c3a26a6241 relay: terminal formatting crash 2024-05-23 02:38:06 +03:00
Maxim Prokhorov
adf018084c scheduler: naming 2024-05-23 02:10:20 +03:00
Maxim Prokhorov
f8ff6f8e9a scheduler: build flags 2024-05-23 02:09:30 +03:00
Maxim Prokhorov
c8c9150b37 scheduler: test handle_today with a future date
github actions just happen to be in pacific time / utc-7 today
2024-05-23 01:40:30 +03:00
Maxim Prokhorov
331c44ad7c scheduler: actually loop through pending schedules 2024-05-23 01:30:13 +03:00
Maxim Prokhorov
414705dff5 sns: remove digital sensor debug flags
amends d9a7743d04
2024-05-23 01:20:15 +03:00
Maxim Prokhorov
271b4638a1 scheduler: formatting 2024-05-23 01:05:16 +03:00
Maxim Prokhorov
02a9ffad9b scheduler: extra state info 2024-05-23 01:01:46 +03:00
Maxim Prokhorov
f3f797f93b scheduler: refactor restore, proper sun state
certain actions need to happen when
- starting restore()
- switching date within restore()
- stopping restore()

pretty good fit for an object and raii. so, using context struct to handle
sun{rise,set} initialization and per-schedule time match updates

sun{rise,set} event happens on a specific date, make sure it is also checked
fix double action trigger by comparing minutes, not raw timestamp seconds

experimenting with 'invalid state' i.e. when timestamp was not generated

include restore logic in tests, as code now lives in .ipp
2024-05-23 00:58:36 +03:00
Maxim Prokhorov
8ff1cd9404 scheduler: clang-tidy being clever 2024-05-23 00:27:23 +03:00
Maxim Prokhorov
7ac9fd7489 relay: delay before mqtt disconnect action
https://github.com/xoseperez/espurna/issues/1550#issuecomment-2103315452
wait 30s for reconnection, perform status change after timer expires
2024-05-16 20:35:42 +03:00
Maxim Prokhorov
865c7bfc1b scheduler: formatting 2024-05-16 20:03:04 +03:00
Maxim Prokhorov
8735f4d762 scheduler: webui sun module, utc cannot be alone 2024-05-16 19:59:49 +03:00
Maxim Prokhorov
44c4124ec3 scheduler: extra days is a positive number 2024-05-16 19:58:33 +03:00
Maxim Prokhorov
111aff8e93 scheduler: build settings dump 2024-05-16 19:24:02 +03:00
Maxim Prokhorov
09fdf521fb scheduler: formatting 2024-05-16 19:15:55 +03:00
Maxim Prokhorov
b21fb542d4 scheduler: missing utc conversion 2024-05-16 19:15:40 +03:00