Commit Graph

112 Commits

Author SHA1 Message Date
Maxim Prokhorov
7260ec833a all: fix typos, spelling, phrasing
resolve #2645 w/ some extra corrections
2025-06-03 21:25:44 +03:00
Maxim Prokhorov
4b624a2e99 webui(lib): missing file 2025-04-14 04:56:15 +03:00
Maxim Prokhorov
e7acf9fb6a webui(build): rollup circular dependency
avoid sharing utility funcs through the main module
2025-04-14 04:08:48 +03:00
Maxim Prokhorov
9dc57878c1 webui(build): build params & vite dev support
- experimental vite dev server support
- gulp webui_build & webui_PRESET -> build
- gulp task params for build and dev server
- bundle sources using rollup in both gulp and vite
- PRESET lib to manage available modules and their constants
  replacing 'define' method of .js code treeshaking
2025-04-14 01:14:13 +03:00
Maxim Prokhorov
cbd28d26e4 webui(build): separate stylesheet files per module 2025-04-05 00:24:38 +03:00
Maxim Prokhorov
5152dc9958 webui(template): missing password-reveal click handler 2025-04-04 18:50:57 +03:00
Maxim Prokhorov
70b9843288 webui(debug): local cmdoutput instance & dev log output
avoid awkward `... | null` for the console text elem member var
update handlers to also clear up oldest lines when pushing new ones
2025-04-04 17:13:43 +03:00
Maxim Prokhorov
1697f0193f webui(local): do not attach network event handlers 2025-04-04 17:12:37 +03:00
Maxim Prokhorov
60ace03ef3 webui(menu): status highlighted inconsistently 2025-04-03 16:17:00 +03:00
Maxim Prokhorov
db84cdda5e webui(ws): try to contain wsSend to the queue callback
- 'log' payload nesting reduced, just one element (for now)
- move terminal and ws logger into ws helper classes
- 'manual' callback mode to simply allow for ws send window
  by using slightly more complicated loop w/ queue checks, though
2025-04-02 23:03:32 +03:00
Maxim Prokhorov
108ee655fe webui(build): pipeline instead of pipe
ref.
https://github.com/gulpjs/gulp/issues/2812
https://nodejs.org/en/learn/modules/how-to-use-streams#how-to-operate-with-streams
https://nodejs.org/en/learn/modules/how-to-use-streams#pipeline

while the gulp issue refers to this as a workaround, this is actually the
proper way to handle streams, merging streams and applying transformations

webserver code still spawns the pipe(line) unconditionally, though
2025-03-31 19:55:13 +03:00
Maxim Prokhorov
a593009fbd webui(settings): clarify dataset[...] and query for data-... 2025-03-31 19:55:13 +03:00
Maxim Prokhorov
efffead793 webui(settings): datalist enumerable for ntp timezones
making use of the feature to programatically generate offset options
additionally, saves 38bytes in the resulting blob
2025-03-19 04:41:06 +03:00
Maxim Prokhorov
1d2503a19e webui(settings): enumerables for both datalist & select
generalize <options> handlers, providing same entrypoint for both
2025-03-19 04:40:05 +03:00
Maxim Prokhorov
f2153f4a38 webui(settings): allow string id mapping in enumerables
store names as {id: name, ...}, not [{id, name}, ...]
entries appear the same way, and js stores keys in the insertion order

fixup numbers converted to strings
fixup select options typing to accept [string, string] instead of [number, string]
2025-03-19 04:38:39 +03:00
Maxim Prokhorov
fa5af86d0e webui: lint eqeqeq 2024-12-07 11:50:26 +03:00
Maxim Prokhorov
66e8867033 sch: capitalized type name 2024-11-29 20:05:30 +03:00
Maxim Prokhorov
c8ebbbd697 web: trying to fix lingering validity message
reset custom validity state when editing the input box
2024-11-29 20:05:30 +03:00
Maxim Prokhorov
442346708d web: dynamic types and fpstr to sv conversions
de-hardcode sch and led enumeration types from .html
publish raw type & pretty-string from .cpp indexed settings

de-fpstr string view references, use the object directly

publish 'faulty' schedule specs indexes, focus & report elems
ref. #2626

should fix faulty enum<->number references in selects
ref. #2628 - schedule types were numeric, while websocket delivered strings
2024-11-29 20:05:30 +03:00
Maxim Prokhorov
9427286a9b webui: rebuild blobs 2024-09-10 16:54:30 +03:00
Maxim Prokhorov
4000d3538c mqtt: use-json -> json
rename settings key and the corresponding build flags
2024-09-10 16:11:27 +03:00
Maxim Prokhorov
1f93ce4f29 mqtt: settings refactoring & custom topics
- customize will topic qos and retain, ref. #2616
- allow to fully replace will and json topics.
  empty string means the default <root>/<name>
  replacement is taken as-is, after applying placeholders
- validate will and data topic structure before connecting
- validate {suf,post}fix as {suf,post}fix, not as topic
2024-09-08 01:11:56 +03:00
Maxim Prokhorov
2f255c042f webui: same-ey fields for host & ip addresses, fix message alignment 2024-08-22 23:40:32 +03:00
Maxim Prokhorov
8edb7b6333 sch: relative time spec for events
Reference calendar time of other schedules, user-created named events
or the sun{rise,set} (when enabled)

For example
- '15m before sunset'
- '30m after cal#0'
- '1h15m after "foobar"'

Empty time spec is allowed, defaults to '1m'
'before sunrise' is the same as '1m before sunrise'

Internals are reworked to handle a more generalized 'Event' type, based
on the 'time point' and 'event' base classes fron sunrise and sunset

Sunrise and sunset should also track 'last' event as well as 'next
(not currently displayed anywhere, though)
2024-08-22 23:40:31 +03:00
Maxim Prokhorov
71493cc9cb webui: heartbeat select[multiple] with everything in view
explicit size aka number of rows
2024-08-14 13:42:09 +03:00
Maxim Prokhorov
4c005fa9a5 webui: fix password reveal pushed to the next line
narrow screens style rule makes input & span `display: block`
revert to `inline-block`, assume parent node properly separates stuff
2024-08-13 20:59:11 +03:00
Maxim Prokhorov
5334739469 webui: key->value element setters with node root
allow to init limited set of elements, not whole document
update tests for 08f521dc35
2024-08-13 17:53:26 +03:00
Maxim Prokhorov
08f521dc35 webui: ignore group inputs when using generic setters
input[name=foo] means input[name=foo#] in groups, never name as-is
resolve #2615
2024-08-11 13:58:10 +03:00
Maxim Prokhorov
6bfed33469 webui: some margin between checkboxes and info messages 2024-08-10 11:40:20 +03:00
Maxim Prokhorov
5f500ffb1c webui: apply pure-menu-selected style after menu item click
- distinguish heading and selected menu item, apply menu item
  background color after panel item is selected
  for now, both heading and :first-child use a different color
- add x3 transition time to stall animation from hover & focus
  otherwise, background colors may linger between clicks
2024-08-09 22:03:00 +03:00
Maxim Prokhorov
1041bcb26e webui: correctly send NaN and compress numeric strings
convert NaN into "nan" string for remote, since JSON does not have NaN type
always -2bytes from quotes surrounding the numeric value
2024-08-09 14:53:24 +03:00
Maxim Prokhorov
29787143bf webui: expected emon app keys leaking into settings
disable on-change listener for webui-only inputs
also assuming input[readonly]s never needs to be commited
2024-08-09 14:25:19 +03:00
Maxim Prokhorov
c4c31fc5f0 sns: numeric settings are using fixed ids
Fixing inconsistent handling of group and non-group settings after rewrite.
Assuming most of the time template would be for group, manually reset
dataset field controlling automatic key${id} generation
2024-08-09 13:46:04 +03:00
Maxim Prokhorov
fc8ef5a298 sns: min & max threshold, revert zero threshold changes
- same as min & max delta, check the value itself before reporting
- refactor more of the report func, revert zero threshold to force the
  value to be zero. move condition check to the top, causing every other
  filter to check against zero.
- force zero threshold to be >= 0 in ui
2024-08-09 12:47:31 +03:00
Maxim Prokhorov
68892a0066 all: remove extra whitespace 2024-08-09 12:47:31 +03:00
Maxim Prokhorov
5ad894b915 tspk: naming, required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
ba067f726e rules: inline units 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
80d5007cea mqtt: config required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
cbef053f69 light: inline units 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
14b05e67eb idb: config required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
ca2f6ff083 ha: clarify prefix config, mention components 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
458b3b9b6e ha: swap publish and clear colors 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
1ca0dcc76b ntp: more settings in webui
sntp startup and update delays & dhcp toggle
2024-08-09 12:45:37 +03:00
Maxim Prokhorov
5ab317a9a0 sns: rework'ed report conditions, filter restart()
- preserve units for cached values, remove extra process() call for webui data
- reset magnitude filter state when value units change
- min & max delta checks only for report value, remove separate checks for read and report
- zero threshold only affects reports, amend ac993c7b4b
- pending BaseFilter::available() and BaseFilter::ready(), replacing BaseFilter::status()
  distinguish readiness between having *some* values and *enough* values
- pending BaseFilter::restart(), separate from BaseFilter::reset(), which
  should allow filter to drop existing value when it is not possible otherwise
  w/ just continuing normal BaseFilter::update()
2024-08-08 20:14:55 +03:00
Maxim Prokhorov
bc6af422ae sch: clarify location units 2024-08-06 15:30:42 +03:00
Maxim Prokhorov
e9497912e1 webui: duplicated error text 2024-08-06 13:28:09 +03:00
Maxim Prokhorov
08c4cdd3c0 webui: missing type="number" required
amend de2f96a7eb
2024-08-03 01:46:07 +03:00
Maxim Prokhorov
a0ed9b0e82 test: sync webui data 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
af3f83841f emon: side-by-side current and expected values 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
2c8470c11c sns: poll the remote until sensors are ready 2024-08-03 01:31:45 +03:00