Refactor var to const/let in admin/system + log search multi-term (4/4)#3303
Merged
Mips2648 merged 2 commits intojeedom:developfrom May 6, 2026
Merged
Refactor var to const/let in admin/system + log search multi-term (4/4)#3303Mips2648 merged 2 commits intojeedom:developfrom
Mips2648 merged 2 commits intojeedom:developfrom
Conversation
Migration of `var` declarations to `const`/`let` in 12 files handling admin/system flows: user, plugin, log, config, cron, backup, update, recovery, report, note, interact, appMobile. Also incorporates the multi-term log search refactor proposed in jeedom#3270 (desktop/js/log.js), with `const`/`let` instead of `var`. Search now supports comma-separated terms with per-term `:not()` exclusion, e.g. `error,warning` or `error,:not(daemon)`.
This was referenced Apr 29, 2026
kwizer15
approved these changes
May 2, 2026
Mips2648
approved these changes
May 5, 2026
Salvialf
reviewed
May 5, 2026
Extract multi-term search feature from this refactoring PR. Keep only the mechanical var→const/let migration for log.js: - var logfile → const logfile - var log → const log - var search → let search (reassigned) - var not → const not - var match, text → let match / const text (block-scoped in forEach) - var _target → let _target The multi-term comma-separated search with :not() exclusion will be proposed in a dedicated feature PR.
This was referenced May 5, 2026
Salvialf
approved these changes
May 5, 2026
Mips2648
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fourth of four migration PRs splitting #3297 by functional domain. This batch covers 12 admin/system files plus the multi-term log search refactor from #3270:
Log search multi-term (#3270)
desktop/js/log.jsadopts the multi-term search refactor proposed in #3270, but withconst/letrather thanvar. The search input now accepts comma-separated terms with per-term:not()exclusion:error— single term (unchanged behavior)error,warning— match any of the terms:not(debug)— exclude single termerror,:not(daemon)— matcherrorOR excludedaemonNo incidental fixes in this batch
All files in this batch follow the uniform AJAX boilerplate pattern, so the migration is purely mechanical (
var→constfor never-reassigned,letfor the rest).Test plan
error,warning,:not(debug)) — verify highlighting?v=m) that the dashboard still renders (appMobile.class.js)Part of the split following #3297 discussion. After this PR lands, all
core/js/*.jsfiles useconst/letexclusively, and the ESLint workflow from #3299 can be tightened to enforceno-varandprefer-constpermanently.