iobroker.eos-admin 9.0.24 → 9.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +3 -3
  2. package/README.md +10 -4
  3. package/START_HIER_9.0.25.md +60 -0
  4. package/START_HIER_9.0.26.md +80 -0
  5. package/adminWww/.vite/manifest.json +39 -39
  6. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
  7. package/adminWww/assets/{AdapterUpdateDialog-D7sI5VRm.js → AdapterUpdateDialog-DIjnNZ5k.js} +1 -1
  8. package/adminWww/assets/{Adapters-DS6ITaEH.js → Adapters-D8UOQg1q.js} +1 -1
  9. package/adminWww/assets/{ConfigManager-_iFDSXuD.js → ConfigManager-CAvT_4-g.js} +1 -1
  10. package/adminWww/assets/{Enums-Bdv7Tqmf.js → Enums-CrNUOX0d.js} +1 -1
  11. package/adminWww/assets/{Fields-CWUY1AnV.js → Fields-D-0qFiqr.js} +1 -1
  12. package/adminWww/assets/{Files-BveV1b_F.js → Files-BL8kvaeC.js} +1 -1
  13. package/adminWww/assets/{Hosts-B1HWZLGl.js → Hosts-BToJLy61.js} +1 -1
  14. package/adminWww/assets/{Instances-DYvbOlj7.js → Instances-Dlrp1KGP.js} +1 -1
  15. package/adminWww/assets/{Intro-pYT2FzIK.js → Intro-5EbxvP4X.js} +1 -1
  16. package/adminWww/assets/{Logs-D2ZbCY3Z.js → Logs-xdFVJ6fZ.js} +1 -1
  17. package/adminWww/assets/{Objects-CTUxbXJM.js → Objects-DhyJ5eAY.js} +1 -1
  18. package/adminWww/assets/{Overview-i6PsoN_F.js → Overview-BspgcFB7.js} +1 -1
  19. package/adminWww/assets/{State-BEQXNcI3.js → State-CJ1mKH_U.js} +1 -1
  20. package/adminWww/assets/{UsedResources-CLc1afk1.js → UsedResources-BMiCxqWH.js} +1 -1
  21. package/adminWww/assets/{Users-DG6i7iqC.js → Users-DrlJHRa5.js} +1 -1
  22. package/adminWww/assets/{bootstrap-4KhX67tn.js → bootstrap-BU7j1Fe_.js} +3 -3
  23. package/adminWww/assets/{hostInit-B08JmaAP.js → hostInit-Cgee6juw.js} +1 -1
  24. package/adminWww/assets/{icons-material-sOCHi6x9.js → icons-material-C0U9EKON.js} +1 -1
  25. package/adminWww/assets/{index-DHSNS0v8.js → index-BUZf1ftI.js} +2 -2
  26. package/adminWww/assets/{installSVGRenderer-CWaaO5tF.js → installSVGRenderer-CcjgaxiA.js} +1 -1
  27. package/adminWww/assets/{mf-entry-bootstrap-0-e7c54f7f.js → mf-entry-bootstrap-0-96d40e57.js} +2 -2
  28. package/adminWww/index.html +23 -23
  29. package/adminWww/mf-manifest.json +1 -1
  30. package/adminWww/mf-stats.json +1 -1
  31. package/adminWww/{remoteEntry-eos-9.0.24.js → remoteEntry-eos-9.0.26.js} +1 -1
  32. package/adminWww/remoteEntry.js +1 -1
  33. package/build/lib/eosKiosk.js +11 -1
  34. package/build/lib/eosKiosk.js.map +1 -1
  35. package/build/lib/eosLegacyMigration.js +10 -0
  36. package/build/lib/eosLegacyMigration.js.map +1 -1
  37. package/build/lib/eosModuleConfigStore.js +1 -1
  38. package/build/lib/eosModuleConfigStore.js.map +1 -1
  39. package/build/lib/eosModuleHost.js +176 -36
  40. package/build/lib/eosModuleHost.js.map +1 -1
  41. package/build/lib/eosModuleHttp.js +43 -8
  42. package/build/lib/eosModuleHttp.js.map +1 -1
  43. package/build/lib/eosModuleLoad.js +83 -0
  44. package/build/lib/eosModuleLoad.js.map +1 -0
  45. package/build/lib/eosModuleProcess.js +16 -1
  46. package/build/lib/eosModuleProcess.js.map +1 -1
  47. package/build/lib/eosModuleProcessProtocol.js +13 -1
  48. package/build/lib/eosModuleProcessProtocol.js.map +1 -1
  49. package/build/lib/eosModuleProcessWorker.js +50 -23
  50. package/build/lib/eosModuleProcessWorker.js.map +1 -1
  51. package/build/lib/eosRuntimeControl.js +235 -0
  52. package/build/lib/eosRuntimeControl.js.map +1 -0
  53. package/build/lib/eosRuntimeHealth.js +17 -2
  54. package/build/lib/eosRuntimeHealth.js.map +1 -1
  55. package/build/lib/eosTlsHttp.js +84 -0
  56. package/build/lib/eosTlsHttp.js.map +1 -1
  57. package/build/lib/eosUiProcess.js +94 -55
  58. package/build/lib/eosUiProcess.js.map +1 -1
  59. package/build/lib/eosUiProcessRpc.js +16 -3
  60. package/build/lib/eosUiProcessRpc.js.map +1 -1
  61. package/build/lib/eosUiProcessWorker.js +48 -3
  62. package/build/lib/eosUiProcessWorker.js.map +1 -1
  63. package/build/lib/web.js +89 -12
  64. package/build/lib/web.js.map +1 -1
  65. package/build/main.js +6 -2
  66. package/build/main.js.map +1 -1
  67. package/docs/reports/unified-9.0.25/MIGRATION_INDEPENDENT_REVIEW.md +74 -0
  68. package/docs/reports/unified-9.0.25/OCPP_STARTSPERRE_9.0.24.md +60 -0
  69. package/docs/reports/unified-9.0.25/PRUEFBERICHT.md +78 -0
  70. package/docs/reports/unified-9.0.25/RUNTIME_CONTROLS_BROWSERPRUEFUNG.md +81 -0
  71. package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_BACKEND.md +58 -0
  72. package/docs/reports/unified-9.0.25/RUNTIME_CONTROL_INDEPENDENT_REVIEW.md +66 -0
  73. package/docs/reports/unified-9.0.25/RUNTIME_LOGIN_RECOVERY.md +32 -0
  74. package/docs/reports/unified-9.0.25/TARIFF_UPDATE_PERSISTENCE.md +50 -0
  75. package/docs/reports/unified-9.0.25/UI_CONFIG_COMMIT_ACK.md +51 -0
  76. package/docs/reports/unified-9.0.25/raw/BUILD_CHECKS.json +49 -0
  77. package/docs/reports/unified-9.0.25/raw/INDEX.json +43 -0
  78. package/docs/reports/unified-9.0.25/raw/SBOM_GENERATION.json +42 -0
  79. package/docs/reports/unified-9.0.25/raw/build-backend.log +5 -0
  80. package/docs/reports/unified-9.0.25/raw/build-frontend.log +152 -0
  81. package/docs/reports/unified-9.0.25/raw/build-installer.log +26 -0
  82. package/docs/reports/unified-9.0.25/raw/build-modules.log +5 -0
  83. package/docs/reports/unified-9.0.25/raw/build-ui-runtime.log +7 -0
  84. package/docs/reports/unified-9.0.25/raw/eos-production-audit.json +77 -0
  85. package/docs/reports/unified-9.0.25/raw/eos-production-audit.stderr +1 -0
  86. package/docs/reports/unified-9.0.25/raw/frontend-sbom.stderr +1 -0
  87. package/docs/reports/unified-9.0.25/raw/installer-sbom.stderr +1 -0
  88. package/docs/reports/unified-9.0.25/raw/lint.log +45 -0
  89. package/docs/reports/unified-9.0.25/raw/node22-tests-final.log +15879 -0
  90. package/docs/reports/unified-9.0.25/raw/node22-version.log +1 -0
  91. package/docs/reports/unified-9.0.25/raw/node24-tests-final.log +2653 -0
  92. package/docs/reports/unified-9.0.25/raw/node24-version.log +1 -0
  93. package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node22-final.tap +236 -0
  94. package/docs/reports/unified-9.0.25/raw/runtime-control-backend/runtime-control-backend-node24-final.tap +44 -0
  95. package/docs/reports/unified-9.0.25/raw/runtime-control-backend/source-sha256.json +19 -0
  96. package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node22.json +70 -0
  97. package/docs/reports/unified-9.0.25/raw/runtime-controls/controls-node24.json +70 -0
  98. package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node22.json +49 -0
  99. package/docs/reports/unified-9.0.25/raw/runtime-controls/health-node24.json +49 -0
  100. package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node22.log +15 -0
  101. package/docs/reports/unified-9.0.25/raw/runtime-controls/login-contract-node24.log +15 -0
  102. package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node22.json +32 -0
  103. package/docs/reports/unified-9.0.25/raw/runtime-controls/login-node24.json +32 -0
  104. package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node22.log +28 -0
  105. package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/node24.log +10 -0
  106. package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/route-regression-node24.log +28 -0
  107. package/docs/reports/unified-9.0.25/raw/runtime-login-recovery/source-sha256.json +6 -0
  108. package/docs/reports/unified-9.0.25/raw/runtime-processes/README.md +41 -0
  109. package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node22.tap +44 -0
  110. package/docs/reports/unified-9.0.25/raw/runtime-processes/runtime-control-processes-node24.tap +13 -0
  111. package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node22.tap +232 -0
  112. package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-and-ui-review-node24.tap +43 -0
  113. package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node22.tap +68 -0
  114. package/docs/reports/unified-9.0.25/raw/runtime-review/runtime-controls-review-node24.tap +17 -0
  115. package/docs/reports/unified-9.0.25/raw/sbom-lock.log +1 -0
  116. package/docs/reports/unified-9.0.25/raw/sbom-lock.stderr +1 -0
  117. package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node22.tap +44 -0
  118. package/docs/reports/unified-9.0.25/raw/tariff-update/ack-node24.tap +40 -0
  119. package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node22.tap +44 -0
  120. package/docs/reports/unified-9.0.25/raw/tariff-update/ack-review-node24.tap +13 -0
  121. package/docs/reports/unified-9.0.25/raw/tariff-update/commit-ack-sha256.txt +4 -0
  122. package/docs/reports/unified-9.0.25/raw/tariff-update/config-ack-result.json +19 -0
  123. package/docs/reports/unified-9.0.25/raw/tariff-update/generate-921-fixture.cjs +36 -0
  124. package/docs/reports/unified-9.0.25/raw/tariff-update/node22.tap +68 -0
  125. package/docs/reports/unified-9.0.25/raw/tariff-update/node24.tap +64 -0
  126. package/docs/reports/unified-9.0.25/raw/tariff-update/reproduce-config-ack.cjs +55 -0
  127. package/docs/reports/unified-9.0.25/raw/tariff-update/reviewed-sha256.txt +4 -0
  128. package/docs/reports/unified-9.0.25/raw/typecheck.log +5 -0
  129. package/docs/reports/unified-9.0.26/ACTIVATION.md +50 -0
  130. package/docs/reports/unified-9.0.26/BACKUP_READINESS_REVIEW.md +30 -0
  131. package/docs/reports/unified-9.0.26/BACKUP_UI.md +69 -0
  132. package/docs/reports/unified-9.0.26/CHARGING_CLIENT_REVIEW.md +24 -0
  133. package/docs/reports/unified-9.0.26/EVCS_DELETE_UI_REVIEW.md +120 -0
  134. package/docs/reports/unified-9.0.26/EVCS_IDENTITY_REVIEW.md +47 -0
  135. package/docs/reports/unified-9.0.26/INDEPENDENT_REVIEW.md +114 -0
  136. package/docs/reports/unified-9.0.26/LIFECYCLE_REVIEW.md +47 -0
  137. package/docs/reports/unified-9.0.26/OCPP_DELETION_REVIEW.md +49 -0
  138. package/docs/reports/unified-9.0.26/PIPELINE_OFFLINE_ASSERTION_REVIEW.md +71 -0
  139. package/docs/reports/unified-9.0.26/PRUEFBERICHT.md +71 -0
  140. package/docs/reports/unified-9.0.26/PWA_TLS.md +43 -0
  141. package/docs/reports/unified-9.0.26/TARIFF_STARTUP.md +42 -0
  142. package/docs/reports/unified-9.0.26/installed-package/README.md +105 -0
  143. package/docs/reports/unified-9.0.26/installed-package/baseline925-git-export.json +31 -0
  144. package/docs/reports/unified-9.0.26/installed-package/baseline925-node22-install.log +15 -0
  145. package/docs/reports/unified-9.0.26/installed-package/baseline925-node22-lifecycle.log +17 -0
  146. package/docs/reports/unified-9.0.26/installed-package/baseline925-node22.log +26 -0
  147. package/docs/reports/unified-9.0.26/installed-package/baseline925-node24-lifecycle.log +17 -0
  148. package/docs/reports/unified-9.0.26/installed-package/baseline925-node24.log +10 -0
  149. package/docs/reports/unified-9.0.26/installed-package/diagnostic-node22.log +26 -0
  150. package/docs/reports/unified-9.0.26/installed-package/diagnostic-node24.log +10 -0
  151. package/docs/reports/unified-9.0.26/installed-package/registry925-comparison.json +18 -0
  152. package/docs/reports/unified-9.0.26/raw/INDEX.json +43 -0
  153. package/docs/reports/unified-9.0.26/raw/activation/INTERNAL_VISUAL_CHECKS.md +1 -0
  154. package/docs/reports/unified-9.0.26/raw/activation/eslint.log +0 -0
  155. package/docs/reports/unified-9.0.26/raw/activation/node22-browser.json +74 -0
  156. package/docs/reports/unified-9.0.26/raw/activation/node22-browser.stderr.log +2 -0
  157. package/docs/reports/unified-9.0.26/raw/activation/node22-real-processes.log +40 -0
  158. package/docs/reports/unified-9.0.26/raw/activation/node22-unit-http.log +196 -0
  159. package/docs/reports/unified-9.0.26/raw/activation/node24-browser.json +74 -0
  160. package/docs/reports/unified-9.0.26/raw/activation/node24-browser.stderr.log +0 -0
  161. package/docs/reports/unified-9.0.26/raw/activation/node24-module-http.log +18 -0
  162. package/docs/reports/unified-9.0.26/raw/activation/node24-tests.log +43 -0
  163. package/docs/reports/unified-9.0.26/raw/activation/typecheck.log +0 -0
  164. package/docs/reports/unified-9.0.26/raw/activation/verification.json +38 -0
  165. package/docs/reports/unified-9.0.26/raw/backup-ui/field-map.json +497 -0
  166. package/docs/reports/unified-9.0.26/raw/backup-ui/node22-browser.json +67 -0
  167. package/docs/reports/unified-9.0.26/raw/backup-ui/node22-browser.stderr.log +2 -0
  168. package/docs/reports/unified-9.0.26/raw/backup-ui/node24-browser.json +67 -0
  169. package/docs/reports/unified-9.0.26/raw/backup-ui/node24-browser.stderr.log +0 -0
  170. package/docs/reports/unified-9.0.26/raw/backup-ui/verification.json +32 -0
  171. package/docs/reports/unified-9.0.26/raw/build-and-static/FINAL_CHECKS.json +45 -0
  172. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-backend-before-ems-tariff.log +5 -0
  173. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-backend-delivery.log +5 -0
  174. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-frontend.log +152 -0
  175. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-installer.log +26 -0
  176. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-modules.log +5 -0
  177. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-ui-runtime-delivery.log +7 -0
  178. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-ui-runtime.log +7 -0
  179. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-lint-complete.log +45 -0
  180. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-lint-delivery.log +45 -0
  181. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-production-audit.json +77 -0
  182. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-production-audit.stderr +1 -0
  183. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-registry-check.json +7 -0
  184. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-registry-check.stderr +9 -0
  185. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-sbom-vendored.log +1 -0
  186. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-typecheck-complete.log +5 -0
  187. package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-typecheck-delivery.log +5 -0
  188. package/docs/reports/unified-9.0.26/raw/charging-control-client-review-hashes.json +10 -0
  189. package/docs/reports/unified-9.0.26/raw/charging-control-client-review-node22.log +86 -0
  190. package/docs/reports/unified-9.0.26/raw/charging-control-client-review-node24.log +20 -0
  191. package/docs/reports/unified-9.0.26/raw/charging-identity/node22.log +130 -0
  192. package/docs/reports/unified-9.0.26/raw/charging-identity/node24.log +27 -0
  193. package/docs/reports/unified-9.0.26/raw/charging-identity-review/PRODUCT_REVIEW.md +45 -0
  194. package/docs/reports/unified-9.0.26/raw/charging-identity-review/independent-probes.json +18 -0
  195. package/docs/reports/unified-9.0.26/raw/charging-identity-review/independent-probes.stderr +0 -0
  196. package/docs/reports/unified-9.0.26/raw/charging-identity-review/node24-tests.log +38 -0
  197. package/docs/reports/unified-9.0.26/raw/charging-identity-review/registry-ipc.json +24 -0
  198. package/docs/reports/unified-9.0.26/raw/charging-identity-review/review-probes.cjs +81 -0
  199. package/docs/reports/unified-9.0.26/raw/deletion-station-kiosk-node22.log +188 -0
  200. package/docs/reports/unified-9.0.26/raw/deletion-station-kiosk-node24.log +36 -0
  201. package/docs/reports/unified-9.0.26/raw/evcs-control-fence-node22.log +148 -0
  202. package/docs/reports/unified-9.0.26/raw/evcs-control-fence-node24.log +30 -0
  203. package/docs/reports/unified-9.0.26/raw/evcs-delete/browser-lint.log +0 -0
  204. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-browser.json +28 -0
  205. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-browser.log +3 -0
  206. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-client-handshake.log +112 -0
  207. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-corrected.log +94 -0
  208. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-diagnostic.log +27 -0
  209. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-repro.log +94 -0
  210. package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-tick-probe.log +36 -0
  211. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-browser.json +28 -0
  212. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-browser.log +1 -0
  213. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-client-handshake.log +24 -0
  214. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-corrected.log +23 -0
  215. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-repro.log +23 -0
  216. package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-tick-probe.log +28 -0
  217. package/docs/reports/unified-9.0.26/raw/evcs-delete/pipeline-corrected-snapshot.json +23 -0
  218. package/docs/reports/unified-9.0.26/raw/evcs-delete/pipeline-lint.log +6 -0
  219. package/docs/reports/unified-9.0.26/raw/final-source-snapshot.json +16 -0
  220. package/docs/reports/unified-9.0.26/raw/git-vendor-source/node22.log +28 -0
  221. package/docs/reports/unified-9.0.26/raw/git-vendor-source/node24.log +10 -0
  222. package/docs/reports/unified-9.0.26/raw/git-vendor-source/verification.json +29 -0
  223. package/docs/reports/unified-9.0.26/raw/independent-review/GIT_ADDENDUM.json +20 -0
  224. package/docs/reports/unified-9.0.26/raw/independent-review/INDEX.json +76 -0
  225. package/docs/reports/unified-9.0.26/raw/independent-review/baseline925-artifacts-independent.json +16 -0
  226. package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-complete-node22.log +22 -0
  227. package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-complete-node24.log +9 -0
  228. package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-node24.log +9 -0
  229. package/docs/reports/unified-9.0.26/raw/independent-review/git-transport-independent.json +33 -0
  230. package/docs/reports/unified-9.0.26/raw/independent-review/npm-dry-run-file-inventory.json +16271 -0
  231. package/docs/reports/unified-9.0.26/raw/independent-review/npm-git-complete-inventory.json +40 -0
  232. package/docs/reports/unified-9.0.26/raw/independent-review/public-trust-node24.log +9 -0
  233. package/docs/reports/unified-9.0.26/raw/independent-review/runtime-lifecycle-import-node24.log +35 -0
  234. package/docs/reports/unified-9.0.26/raw/lifecycle/node22-baseline925.json +30 -0
  235. package/docs/reports/unified-9.0.26/raw/lifecycle/node22-candidate926.json +30 -0
  236. package/docs/reports/unified-9.0.26/raw/lifecycle/node24-baseline925.json +30 -0
  237. package/docs/reports/unified-9.0.26/raw/lifecycle/node24-candidate926.json +30 -0
  238. package/docs/reports/unified-9.0.26/raw/node22-tests-before-backup-git-regression.log +16035 -0
  239. package/docs/reports/unified-9.0.26/raw/node22-tests-before-backup-ui.log +16037 -0
  240. package/docs/reports/unified-9.0.26/raw/node22-tests-before-ems-tariff.log +16064 -0
  241. package/docs/reports/unified-9.0.26/raw/node22-tests-before-git-regression.log +16027 -0
  242. package/docs/reports/unified-9.0.26/raw/node22-tests-before-pipeline-fixture.log +11584 -0
  243. package/docs/reports/unified-9.0.26/raw/node22-tests-before-remap-noop.log +11581 -0
  244. package/docs/reports/unified-9.0.26/raw/node22-tests-final.log +16520 -0
  245. package/docs/reports/unified-9.0.26/raw/node22-version.log +1 -0
  246. package/docs/reports/unified-9.0.26/raw/node24-tests-before-backup-git-regression.log +2678 -0
  247. package/docs/reports/unified-9.0.26/raw/node24-tests-before-backup-ui.log +2678 -0
  248. package/docs/reports/unified-9.0.26/raw/node24-tests-before-ems-tariff.log +1860 -0
  249. package/docs/reports/unified-9.0.26/raw/node24-tests-before-git-regression.log +2677 -0
  250. package/docs/reports/unified-9.0.26/raw/node24-tests-before-pipeline-fixture.log +1925 -0
  251. package/docs/reports/unified-9.0.26/raw/node24-tests-before-remap-noop.log +1924 -0
  252. package/docs/reports/unified-9.0.26/raw/node24-tests-final.log +2757 -0
  253. package/docs/reports/unified-9.0.26/raw/node24-version.log +1 -0
  254. package/docs/reports/unified-9.0.26/raw/ocpp-deletion-node22.log +148 -0
  255. package/docs/reports/unified-9.0.26/raw/ocpp-deletion-node24.log +30 -0
  256. package/docs/reports/unified-9.0.26/raw/publish-overlay-provenance.json +10 -0
  257. package/docs/reports/unified-9.0.26/raw/pwa/INTERNAL_VISUAL_CHECKS.md +1 -0
  258. package/docs/reports/unified-9.0.26/raw/pwa/index.json +18 -0
  259. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-baseline.log +48 -0
  260. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser-node22.json +33 -0
  261. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser-node22.stderr +5 -0
  262. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser.json +33 -0
  263. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser.stderr +2 -0
  264. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-focused-node22.log +137 -0
  265. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-focused-node24.log +32 -0
  266. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-lint.log +0 -0
  267. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-recovery-node22.log +28 -0
  268. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-recovery-node24.log +10 -0
  269. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-tls-final.log +9 -0
  270. package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-typecheck.log +0 -0
  271. package/docs/reports/unified-9.0.26/raw/tariff-deletion-station-kiosk-node22.log +250 -0
  272. package/docs/reports/unified-9.0.26/raw/tariff-deletion-station-kiosk-node24.log +46 -0
  273. package/docs/reports/unified-9.0.26/raw/tariff-startup/PRODUCT_REVIEW.md +30 -0
  274. package/docs/reports/unified-9.0.26/raw/tariff-startup/browser-eslint.log +0 -0
  275. package/docs/reports/unified-9.0.26/raw/tariff-startup/eslint.log +0 -0
  276. package/docs/reports/unified-9.0.26/raw/tariff-startup/independent-review-node24.log +35 -0
  277. package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-browser.json +43 -0
  278. package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-browser.stderr +2 -0
  279. package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-process-final.log +26 -0
  280. package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-tests.log +378 -0
  281. package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-browser.json +43 -0
  282. package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-browser.stderr +0 -0
  283. package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-process-final.log +10 -0
  284. package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-tests.log +66 -0
  285. package/docs/reports/unified-9.0.26/raw/tariff-startup/process-verification.json +41 -0
  286. package/docs/reports/unified-9.0.26/raw/tariff-startup/typecheck.log +0 -0
  287. package/docs/unified/NEXOWATT_TLS_DE.md +12 -2
  288. package/io-package.json +12 -14
  289. package/modules/backup/admin/index.html +24 -95
  290. package/modules/backup/admin/index.js +350 -98
  291. package/modules/backup/admin/style.css +40 -0
  292. package/package.json +14 -8
  293. package/public/eos-runtime/index.html +7 -6
  294. package/public/eos-runtime/index.js +159 -11
  295. package/public/eos-runtime/style.css +9 -0
  296. package/public/eos-tls/index.html +1 -1
  297. package/public/eos-tls/trust.css +19 -0
  298. package/public/eos-tls/trust.html +52 -0
  299. package/release-manifests/unified/build-environment.cdx.json +6 -6
  300. package/release-manifests/unified/files.json +420 -149
  301. package/release-manifests/unified/frontend.cdx.json +6 -6
  302. package/release-manifests/unified/installer.cdx.json +6 -6
  303. package/release-manifests/unified/obsolete-admin-assets.json +552 -388
  304. package/release-manifests/unified/runtime.cdx.json +26 -26
  305. package/release-manifests/unified/validation.json +15 -15
  306. package/tools/eos-lifecycle-benchmark.cjs +50 -0
  307. package/tools/eos-release-manifest.cjs +1 -1
  308. package/ui/ems/engine.js +5 -1
  309. package/ui/io-package.json +1 -1
  310. package/ui/lib/charging-point-identity.js +465 -0
  311. package/ui/lib/charging-station-identity.js +111 -0
  312. package/ui/lib/ocpp-auto-discovery.js +34 -3
  313. package/ui/main.js +165 -29
  314. package/ui/package.json +1 -1
  315. package/ui/www/app.js +63 -18
  316. package/ui/www/customer-tariff.js +67 -11
  317. package/ui/www/dc-station-display.js +15 -11
  318. package/ui/www/ems-apps.js +40 -6
  319. package/ui/www/evcs.js +55 -12
  320. package/ui/www/login.html +1 -0
  321. package/ui/www/login.js +7 -3
  322. package/ui/www/manifest.webmanifest +2 -2
@@ -2,17 +2,37 @@
2
2
  'use strict';
3
3
  (() => {
4
4
  const api = '/api/eos/modules/backup';
5
- let config = {},
6
- configurationRevision = '',
7
- csrf = '',
8
- busy = false,
9
- poll = null,
10
- lastCoverage = null;
11
- const byId = id => document.getElementById(id);
5
+ /** @typedef {Record<string, unknown>} Config */
6
+ /** @typedef {{id:string,section:string,title:string,description:string,flag?:string,match?:RegExp}} Group */
7
+ /** @typedef {{complete:boolean,required:string[],missing:string[],externalTargetConfigured:boolean}} Coverage */
8
+ /** @typedef {{name:string,size:number,kind?:string}} BackupFile */
9
+ /** @typedef {{provider:string,kind?:string,entries:BackupFile[]}} Remote */
10
+ /** @typedef {{id:string,startedAt:string,state:string,error?:string,remote?:Remote,files?:BackupFile[],moreFiles?:boolean}} Job */
11
+ /** @typedef {{config?:Config,configurationRevision?:string,csrfToken?:string,status?:{active?:boolean,reason?:string,details?:{current?:unknown,coverage?:Coverage,history?:Job[]}}}} View */
12
+ /** @type {Config} */ let config = {};
13
+ /** @type {Config} */ let savedConfig = {};
14
+ /** @type {Config|null} */ let dialogDraft = null;
15
+ /** @type {Group|null} */ let dialogGroup = null;
16
+ /** @type {HTMLElement|null} */ let dialogOpener = null;
17
+ /** @type {ReturnType<typeof setTimeout>|undefined} */ let poll;
18
+ /** @type {Coverage|null} */ let lastCoverage = null;
19
+ let loaded = false, configurationRevision = '', csrf = '', busy = false;
20
+ /** @param {string} id @returns {HTMLElement} */
21
+ const byId = id => { const node = document.getElementById(id); if (!node) throw new Error('EOS_BACKUP_UI_ELEMENT'); return node; };
22
+ /** @param {string} id @returns {HTMLInputElement} */
23
+ const inputById = id => /** @type {HTMLInputElement} */ (byId(id));
24
+ /** @param {string} id @returns {HTMLButtonElement} */
25
+ const buttonById = id => /** @type {HTMLButtonElement} */ (byId(id));
26
+ /** @returns {HTMLDialogElement} */
27
+ const dialog = () => /** @type {HTMLDialogElement} */ (byId('settingsDialog'));
28
+ /** @param {unknown} error */
29
+ const errorText = error => error instanceof Error ? error.message : 'Anfrage fehlgeschlagen.';
30
+ /** @param {string} text @param {boolean} [error] */
12
31
  function message(text, error = false) {
13
32
  byId('message').textContent = text;
14
33
  byId('message').classList.toggle('error', error);
15
34
  }
35
+ /** @template T @param {string} path @param {string} [method] @param {unknown} [body] @returns {Promise<T>} */
16
36
  async function request(path, method = 'GET', body) {
17
37
  const r = await fetch(api + path, {
18
38
  method,
@@ -20,27 +40,38 @@
20
40
  headers: { 'content-type': 'application/json', ...(method === 'GET' ? {} : { 'x-nw-csrf': csrf }) },
21
41
  ...(body ? { body: JSON.stringify(body) } : {}),
22
42
  });
23
- let v;
43
+ /** @type {unknown} */ let v;
24
44
  try {
25
45
  v = await r.json();
26
46
  } catch {
27
47
  throw new Error('EOS antwortet derzeit nicht. Bitte Status erneut laden.');
28
48
  }
29
49
  if (!r.ok) {
30
- if (v.error === 'EOS_MODULE_CONFIG_CONFLICT') throw new Error('Die Sicherungseinstellungen wurden inzwischen geändert. Deine Eingaben bleiben erhalten. Seite neu laden und Änderungen mit dem gespeicherten Stand abgleichen.');
50
+ const failure = /** @type {{error?:string}} */ (v && typeof v === 'object' ? v : {});
51
+ if (failure.error === 'EOS_MODULE_CONFIG_CONFLICT') throw new Error('Die Sicherungseinstellungen wurden inzwischen geändert. Deine Eingaben bleiben erhalten. Seite neu laden und Änderungen mit dem gespeicherten Stand abgleichen.');
31
52
  if (r.status === 401)
32
53
  throw new Error(
33
54
  'Sitzung abgelaufen. Bitte erneut bei EOS anmelden; ungespeicherte Eingaben bleiben hier erhalten.',
34
55
  );
35
- if (v.error === 'AUTH_CSRF')
56
+ if (failure.error === 'AUTH_CSRF')
36
57
  throw new Error('Sicherheitstoken erneuern: Status aktualisieren und erneut speichern.');
37
- throw new Error(v.error || 'Anfrage fehlgeschlagen.');
58
+ /** @type {Record<string,string>} */ const errors = {
59
+ EOS_BACKUP_SOURCE_PATH: 'Bitte die Pfade der aktivierten Sicherungsquellen und Speicherziele prüfen: Es wird ein absoluter lokaler Pfad benötigt (z. B. /mnt/eos-backup). NAS und SD-Karte müssen bereits eingebunden sein. Deine Eingaben bleiben erhalten.',
60
+ EOS_BACKUP_PREMOUNT_REQUIRED: 'Für dieses NAS-Ziel den bereits eingebundenen absoluten Zielordner angeben. EOS bindet Datenträger hier nicht selbst ein.',
61
+ EOS_BACKUP_FTPS_REQUIRED: 'Für FTPS müssen TLS und die Zertifikatsprüfung aktiviert sein.',
62
+ EOS_BACKUP_TLS_REQUIRED: 'Bitte eine verschlüsselte Verbindung mit gültiger Zertifikatsprüfung konfigurieren.',
63
+ EOS_BACKUP_COVERAGE_INCOMPLETE: 'Die Gesamtsicherung ist noch nicht vollständig eingerichtet. Den angezeigten Sicherungsumfang prüfen.',
64
+ EOS_RUNTIME_BUSY: 'Eine Prozessaktion läuft noch. Bitte ihren Abschluss abwarten; deine Eingaben bleiben erhalten.',
65
+ };
66
+ throw new Error(errors[failure.error || ''] || failure.error || 'Anfrage fehlgeschlagen.');
38
67
  }
39
- return v;
68
+ return /** @type {T} */ (v);
40
69
  }
70
+ /** @template [T=unknown] @param {string} name @param {Config} [payload] @returns {Promise<T>} */
41
71
  async function command(name, payload = {}) {
42
72
  return request('/command', 'POST', { command: name, payload });
43
73
  }
74
+ /** @param {string} name @param {string} content */
44
75
  function download(name, content) {
45
76
  const url = URL.createObjectURL(new Blob([content], { type: 'application/json' }));
46
77
  const a = document.createElement('a');
@@ -49,46 +80,282 @@
49
80
  a.click();
50
81
  setTimeout(() => URL.revokeObjectURL(url), 1000);
51
82
  }
52
- function advanced() {
53
- const root = byId('advanced');
54
- root.replaceChildren();
55
- for (const [key, value] of Object.entries(config)) {
56
- if (byId(key) || ['enabled'].includes(key)) continue;
57
- const label = document.createElement('label');
58
- label.textContent = key;
83
+ const SECRET = '__EOS_SECRET_UNCHANGED__';
84
+ /** @type {Record<string,string>} */ const channelPrefixes = { Telegram: 'telegram', WhatsApp: 'whatsapp', Gotify: 'gotify', Signal: 'signal',
85
+ Matrix: 'matrix', Discord: 'discord', Pushover: 'pushover', 'E-Mail': 'email', Email: 'email' };
86
+ /** @type {Array<[string,string,string]>} */ const sections = [
87
+ ['system', 'System und Zeitpläne', 'Die manuelle Systemsicherung enthält immer das ioBroker-Archiv. Die Zeitpläne lassen sich getrennt aktivieren.'],
88
+ ['databases', 'Datenbanken', 'Zusätzliche Datenbanken einzeln auswählen. Die aktive EOS-PostgreSQL-Historie wird unabhängig davon automatisch in die Gesamtsicherung einbezogen.'],
89
+ ['applications', 'Anwendungen und Geräte', 'Zusätzliche Inhalte der Systemsicherung. EOS-Geräteeinstellungen gehören zum EOS-Profil.'],
90
+ ['destinations', 'Zusätzliche Speicherziele', 'Die lokale EOS-Ablage bleibt bestehen. Diese Ziele erhalten zusätzliche Kopien; sie wählen keine Datenquelle aus.'],
91
+ ['service', 'Benachrichtigungen und Betrieb', 'Meldungen, Laufzeitgrenzen und übernommene Betriebseinstellungen.'],
92
+ ];
93
+ /** @type {Group[]} */ const groups = [
94
+ { id: 'system', section: 'system', title: 'Automatische Systemsicherung', flag: 'minimalEnabled', match: /^(minimal|iobrokerCron)/,
95
+ description: 'Steuert den automatischen Zeitplan. „Jetzt sichern“ bleibt unabhängig davon möglich.' },
96
+ { id: 'eos', section: 'system', title: 'EOS-Profil', flag: 'eosProfileEnabled', match: /^eos/,
97
+ description: 'EOS-Einstellungen und Geräteidentitäten. Für eine vollständige EOS-Gesamtsicherung erforderlich.' },
98
+ { id: 'ccu', section: 'system', title: 'Automatische CCU-Sicherung', flag: 'ccuEnabled', match: /^ccu/,
99
+ description: 'Eigener CCU-Zeitplan und CCU-Zugang. „CCU sichern“ bleibt unabhängig vom Zeitplan möglich.' },
100
+ { id: 'influx', section: 'databases', title: 'InfluxDB', flag: 'influxDBEnabled', match: /^influxDB/,
101
+ description: 'InfluxDB-Datenbank oder Bucket einschließlich Zugang und Aufbewahrung.' },
102
+ { id: 'mysql', section: 'databases', title: 'MySQL / MariaDB', flag: 'mySqlEnabled', match: /^(mySql|mysql)/,
103
+ description: 'Zusätzliche MySQL- oder MariaDB-Datenbanken sichern.' },
104
+ { id: 'postgres', section: 'databases', title: 'Zusätzliche PostgreSQL-Datenbank', flag: 'pgSqlEnabled', match: /^pgSql/,
105
+ description: 'Weitere PostgreSQL-Datenbanken. Die automatische EOS-Historiensicherung wird hiermit nicht ausgeschaltet.' },
106
+ { id: 'sqlite', section: 'databases', title: 'SQLite', flag: 'sqliteEnabled', match: /^sqlite/,
107
+ description: 'Eine zusätzliche lokale SQLite-Datenbank sichern.' },
108
+ { id: 'redis', section: 'databases', title: 'Redis', flag: 'redisEnabled', match: /^redis/,
109
+ description: 'Zusätzliche Redis-Sicherung und lokale oder entfernte Quelle.' },
110
+ ...[['history', 'Dateihistorie'], ['zigbee', 'Zigbee'], ['zigbee2mqtt', 'Zigbee2MQTT'], ['nodered', 'Node-RED'],
111
+ ['yahka', 'Yahka'], ['jarvis', 'Jarvis'], ['esphome', 'ESPHome'], ['grafana', 'Grafana']].map(([id = '', title = '']) => ({
112
+ id, title, section: 'applications', flag: `${id}Enabled`, match: new RegExp(`^${id}${id === 'zigbee' ? '(?!2mqtt)' : ''}`),
113
+ description: `Zusätzliche ${title}-Daten in die Systemsicherung aufnehmen.` })),
114
+ { id: 'local', section: 'destinations', title: 'Lokaler Ordner / NAS / SD-Karte', flag: 'cifsEnabled',
115
+ match: /^(cifs|sdCard|connectType$|mountedBackupPath$|cacheLoose$|expertMount$|noserverino$|smbType$|sudoMount$)/,
116
+ description: 'EOS verwendet bereits eingebundene Datenträger. Einbinden und Rechtevergabe erfolgen bei der Geräteeinrichtung.' },
117
+ ...[['ftp', 'FTPS'], ['webdav', 'WebDAV'], ['dropbox', 'Dropbox'], ['googledrive', 'Google Drive'], ['onedrive', 'OneDrive']].map(([id = '', title = '']) => ({
118
+ id, title, section: 'destinations', flag: `${id}Enabled`, match: new RegExp(`^${id}`),
119
+ description: `Zusätzliche verschlüsselte Sicherungskopien auf ${title} ablegen.` })),
120
+ { id: 'wake', section: 'destinations', title: 'Speicherziel aufwecken', flag: 'wakeOnLAN', match: /^(wakeOnLAN$|macAd$|wol)/,
121
+ description: 'Wake-on-LAN vor dem Sichern. MAC-Adresse und Wartezeit für das Speicherziel.' },
122
+ { id: 'notifications', section: 'service', title: 'Benachrichtigungen', flag: 'notificationEnabled',
123
+ match: /^(notification|telegram|whatsapp|gotify|signal|matrix|discord|pushover|email)/,
124
+ description: 'Ein Benachrichtigungskanal für Sicherungsläufe. Die Einstellungen anderer Kanäle bleiben gespeichert.' },
125
+ { id: 'limits', section: 'service', title: 'Aufbewahrung und Laufzeit',
126
+ match: /^(jobTimeoutMinutes|maxArchiveGiB|advancedDelete|deleteOldDataBase|debugLevel|ignoreErrors|fileSizeError|fileSizeWarning)$/,
127
+ description: 'Übergreifende Grenzwerte und Protokollierung. Die Aufbewahrung pro Sicherungsteil steht im jeweiligen Dialog.' },
128
+ { id: 'compatibility', section: 'service', title: 'Übernommene Betriebsoptionen',
129
+ match: /^(hostType|slaveInstance|slaveNameSuffix|stopSlaveAfter|restoreSource|restoreTab|startAllRestore|javascriptsEnabled)$/,
130
+ description: 'Bisherige Betriebs- und Wiederherstellungsoptionen. JavaScript-Objekte bleiben immer im ioBroker-Archiv enthalten.' },
131
+ { id: 'other', section: 'service', title: 'Weitere Bestandsoptionen',
132
+ description: 'Zusätzliche gespeicherte Felder bleiben unverändert erhalten und lassen sich hier bei Bedarf bearbeiten.' },
133
+ ];
134
+ /** @type {Record<string,Config>} */ const optional = {
135
+ limits: { jobTimeoutMinutes: 30, maxArchiveGiB: 10 }, local: { mountedBackupPath: '' },
136
+ influx: { influxDBBucketId: '', influxDBOrganization: '', influxDBOrganizationId: '' },
137
+ zigbee2mqtt: { zigbee2mqttProtocol: 'mqtt' }, dropbox: { dropboxAccessTokens: '' }, googledrive: { googledriveAccessJson: '' },
138
+ };
139
+ /** @type {Record<string,string>} */ const names = {
140
+ enabled: 'Backupmodul aktivieren', minimalTime: 'Uhrzeit', minimalEveryXDays: 'Alle … Tage', minimalDeleteAfter: 'Systemsicherungen behalten (Anzahl, 0 = unbegrenzt)',
141
+ minimalNameSuffix: 'Zusatz im Archivnamen', iobrokerCron: 'Eigenen Zeitplan verwenden', iobrokerCronJob: 'Zeitplan als Cron-Ausdruck',
142
+ ccuTime: 'Uhrzeit', ccuEveryXDays: 'Alle … Tage', ccuCron: 'Eigenen CCU-Zeitplan verwenden', ccuCronJob: 'CCU-Zeitplan als Cron-Ausdruck',
143
+ ccuUsehttps: 'HTTPS verwenden', eosIncludeVendorFile: 'Herstellerdatei einschließen', eosIncludeVendorSecret: 'Herstellergeheimnis einschließen',
144
+ jobTimeoutMinutes: 'Maximale Laufzeit (Minuten)', maxArchiveGiB: 'Maximale Archivgröße (GiB)',
145
+ connectType: 'Art des eingebundenen Ziels', mountedBackupPath: 'Absoluter eingebundener Zielordner',
146
+ sdCardMountPath: 'SD-Karte: absoluter Einhängepunkt', sdCardBackupSubDir: 'SD-Karte: Unterordner', sdCardInfluxRetention: 'InfluxDB-Sicherungen auf SD-Karte behalten',
147
+ influxDBName: 'Datenbank / Bucket', influxDBBucketId: 'Bucket-ID (optional)', influxDBOrganization: 'Organisation', influxDBOrganizationId: 'Organisations-ID (optional)',
148
+ influxDBVersion: 'InfluxDB-Version', influxDBType: 'Sicherungsart', redisAOFactive: 'Redis AOF verwenden',
149
+ redisMinimalEnabled: 'Übernommene Redis-Systemoption', mysqlMinimalEnabled: 'Übernommene MySQL-Systemoption',
150
+ mysqlQuick: 'MySQL: Datensätze direkt exportieren', mysqlSingleTransaction: 'MySQL: einzelne Transaktion', mysqlSkipSSL: 'MySQL: SSL auslassen (Betriebsprüfung erforderlich)',
151
+ historyEntriesNumber: 'Einträge im Sicherungsverlauf', notificationEnabled: 'Benachrichtigungen aktivieren', notificationsType: 'Benachrichtigungskanal',
152
+ telegramUser: 'Empfänger / Telegram-Nutzer', emailReceiver: 'Empfängeradresse', emailSender: 'Absenderadresse', discordTarget: 'Nutzer-ID oder Server-ID/Kanal-ID',
153
+ pushoverDeviceID: 'Pushover-Gerät', zigbee2mqttBaseTopic: 'MQTT-Basistopic', zigbee2mqttAuth: 'MQTT-Anmeldung verwenden',
154
+ wakeOnLAN: 'Wake-on-LAN aktivieren', macAd: 'MAC-Adresse des Speicherziels', wolPort: 'Wake-on-LAN-Port', wolWait: 'Wartezeit nach Aufwecken (Sekunden)', wolExtra: 'Zusätzliches Wake-on-LAN',
155
+ advancedDelete: 'Erweiterte Löschregel', deleteOldDataBase: 'Übernommene Datenbank-Löschregel', debugLevel: 'Ausführliches Protokoll', ignoreErrors: 'Fehler ignorieren (Betriebsprüfung erforderlich)',
156
+ fileSizeError: 'Fehlergrenze für Dateigröße', fileSizeWarning: 'Warngrenze für Dateigröße', hostType: 'Bisherige Host-Betriebsart',
157
+ slaveInstance: 'Bisherige Nebeninstanz', slaveNameSuffix: 'Namenszusatz der Nebeninstanz', stopSlaveAfter: 'Nebeninstanz nach Sicherung stoppen',
158
+ restoreSource: 'Bisherige Wiederherstellungsquelle', restoreTab: 'Wiederherstellung anzeigen', startAllRestore: 'Bisherige Gesamtwiederherstellung',
159
+ javascriptsEnabled: 'JavaScript-Bestandsoption (Objekte bleiben im Systemarchiv)', cacheLoose: 'Übernommene Mount-Cacheoption',
160
+ expertMount: 'Übernommener Einbindebefehl', noserverino: 'Übernommene SMB-Inodeoption', smbType: 'Übernommene SMB-Version', sudoMount: 'Übernommene sudo-Mountoption',
161
+ };
162
+ /** @type {Record<string,string>} */ const suffixNames = { Enabled: 'Aktivieren', Host: 'Server / Host', Port: 'Port', User: 'Benutzername', Username: 'Benutzername', Password: 'Kennwort',
163
+ Path: 'Absoluter Quellpfad', DumpExe: 'Exportprogramm (optional)', Name: 'Datenbankname', NameSuffix: 'Zusatz im Archivnamen', DeleteAfter: 'Sicherungen behalten (Anzahl)',
164
+ Multi: 'Mehrere Quellen verwenden', Events: 'Weitere Quellen (JSON-Liste)', Protocol: 'Protokoll', Type: 'Quelltyp', Token: 'Zugriffstoken',
165
+ ApiKey: 'API-Schlüssel', SignedCertificates: 'Zertifikat prüfen', URL: 'HTTPS-Adresse', Secure: 'TLS verwenden', Dir: 'Zielordner', MinimalDir: 'Zielordner für Systemsicherung',
166
+ CcuDir: 'Zielordner für CCU', OwnDir: 'Getrennte Zielordner pro Sicherungstyp', DeleteOldBackup: 'Alte Sicherungen im Ziel entfernen',
167
+ AccessJson: 'Zugangsangaben (JSON)', AccessToken: 'Zugriffstoken', AccessTokens: 'OAuth-Tokens (JSON)', CodeChallenge: 'OAuth Code Challenge',
168
+ TokenType: 'Token-Verfahren', LastTokenRenew: 'Letzte Tokenerneuerung', Instance: 'Adapterinstanz', NoticeType: 'Umfang der Nachricht',
169
+ OnlyError: 'Nur Fehler melden', WaitToSend: 'Verzögerung (Sekunden)', SilentNotice: 'Lautlose Benachrichtigung', Domain: 'Domäne', Mount: 'Übernommener Einhängepunkt' };
170
+ /** @type {Record<string,Array<string|[string,string]>>} */ const choices = {
171
+ connectType: [['Copy', 'Eingebundener Ordner / NAS'], ['SDCard', 'Eingebundene SD-Karte'], ['CIFS', 'Vorab eingebundenes CIFS'], ['NFS', 'Vorab eingebundenes NFS']],
172
+ influxDBVersion: ['1.x', '2.x'], influxDBProtocol: ['http', 'https'], grafanaProtocol: ['http', 'https'],
173
+ redisType: ['local', 'remote'], zigbee2mqttType: ['local', 'remote'], zigbee2mqttProtocol: ['mqtt', 'mqtts'],
174
+ notificationsType: ['Telegram', 'WhatsApp', 'Gotify', 'Signal', 'Matrix', 'Discord', 'Pushover', 'E-Mail'],
175
+ };
176
+ /** @type {Record<string,[number,number]>} */ const numericRanges = {
177
+ minimalEveryXDays: [1, 365], ccuEveryXDays: [1, 365], minimalDeleteAfter: [0, 3650],
178
+ ccuDeleteAfter: [0, 3650], historyEntriesNumber: [0, 3650], jobTimeoutMinutes: [1, 120], maxArchiveGiB: [1, 100],
179
+ };
180
+ /** @param {string} key @returns {Group} */
181
+ function groupFor(key) { return groups.find(group => group.match?.test(key)) || /** @type {Group} */ (groups.find(group => group.id === 'other')); }
182
+ /** @param {string} key @param {Group} group @returns {string} */
183
+ function fieldName(key, group) {
184
+ if (names[key]) return names[key];
185
+ const prefix = Object.values(channelPrefixes).find(value => key.startsWith(value)) ||
186
+ ['zigbee2mqtt', 'googledrive', 'influxDB', 'dropbox', 'onedrive', 'webdav', 'history', 'grafana', 'mySql', 'mysql', 'pgSql', 'sqlite', 'redis', 'cifs', 'ccu', 'ftp', 'eos'].find(value => key.startsWith(value));
187
+ const suffix = prefix ? key.slice(prefix.length) : key;
188
+ return suffixNames[suffix] || (key === group.flag ? `${group.title} aktivieren` : key);
189
+ }
190
+ /** @param {Group} group @param {Config} value */
191
+ function keysFor(group, value) {
192
+ return [...new Set([...Object.keys(value).filter(key => key !== 'enabled' && groupFor(key).id === group.id), ...Object.keys(optional[group.id] || {})])];
193
+ }
194
+ /** @type {Record<string,string[]>} */ const fieldOrder = {
195
+ system: ['minimalEnabled', 'minimalTime', 'minimalEveryXDays', 'minimalDeleteAfter', 'minimalNameSuffix', 'iobrokerCron', 'iobrokerCronJob'],
196
+ ccu: ['ccuEnabled', 'ccuHost', 'ccuUsehttps', 'ccuSignedCertificates', 'ccuUser', 'ccuPassword', 'ccuTime', 'ccuEveryXDays',
197
+ 'ccuDeleteAfter', 'ccuNameSuffix', 'ccuMulti', 'ccuEvents', 'ccuCron', 'ccuCronJob'],
198
+ local: ['cifsEnabled', 'connectType', 'mountedBackupPath', 'sdCardMountPath', 'sdCardBackupSubDir', 'sdCardInfluxRetention',
199
+ 'cifsOwnDir', 'cifsMinimalDir', 'cifsCcuDir', 'cifsDir', 'cifsDeleteOldBackup', 'cifsUser', 'cifsPassword', 'cifsDomain',
200
+ 'cifsMount', 'smbType', 'noserverino', 'cacheLoose', 'sudoMount', 'expertMount'],
201
+ };
202
+ /** @param {string} key @param {Group} group */
203
+ function fieldPriority(key, group) {
204
+ const ordered = fieldOrder[group.id]?.indexOf(key) ?? -1;
205
+ if (ordered >= 0) return ordered;
206
+ if (key === group.flag) return 0;
207
+ if (key === 'notificationsType') return 1;
208
+ if (/(?:Type|Version|Protocol)$/.test(key)) return 2;
209
+ if (/(?:Host|URL|Instance)$/.test(key)) return 3;
210
+ if (/Port$/.test(key)) return 4;
211
+ if (/(?:Name|BucketId|Organization|OrganizationId|Path|Dir)$/.test(key)) return 5;
212
+ if (/(?:User|Username)$/.test(key)) return 6;
213
+ if (/(?:Password|Token|Tokens|AccessJson|ApiKey)$/.test(key)) return 7;
214
+ if (/(?:DeleteAfter|DeleteOldBackup)$/.test(key)) return 9;
215
+ if (/(?:Multi|Events|DumpExe)$/.test(key)) return 10;
216
+ return 8;
217
+ }
218
+ function changed() { return JSON.stringify(config) !== JSON.stringify(savedConfig); }
219
+ function draftStatus() {
220
+ byId('draft-status').textContent = !loaded ? 'Einstellungen werden geladen …' : changed() ? 'Noch nicht gespeichert – Änderungen gelten erst nach dem Speichern.' : 'Gespeicherte Einstellungen';
221
+ byId('draft-status').classList.toggle('is-dirty', changed());
222
+ buttonById('saveSettings').disabled = busy || !loaded || !!dialogGroup;
223
+ inputById('enabled').disabled = busy || !loaded;
224
+ byId('backup-sections').querySelectorAll('button').forEach(node => { node.disabled = busy || !loaded; });
225
+ }
226
+ function renderSettings() {
227
+ const root = byId('backup-sections'); root.replaceChildren();
228
+ for (const [section, title, description] of sections) {
229
+ const block = document.createElement('section'); block.className = 'backup-setting-section';
230
+ const heading = document.createElement('h3'); heading.textContent = title;
231
+ const help = document.createElement('p'); help.className = 'backup-setting-help'; help.textContent = description;
232
+ const cards = document.createElement('div'); cards.className = 'backup-cards';
233
+ for (const group of groups.filter(item => item.section === section)) {
234
+ if (!keysFor(group, config).length) continue;
235
+ const card = document.createElement('article'); card.className = 'backup-card'; card.dataset.group = group.id;
236
+ const open = document.createElement('button'); open.type = 'button'; open.className = 'backup-card-title';
237
+ open.id = `backup-open-${group.id}`; open.textContent = group.title;
238
+ open.setAttribute('aria-haspopup', 'dialog'); open.addEventListener('click', () => openSettings(group, open));
239
+ const note = document.createElement('p'); note.textContent = group.description;
240
+ const dirty = document.createElement('span'); dirty.className = 'backup-card-draft'; dirty.textContent = 'Noch nicht gespeichert';
241
+ const updateDraft = () => { dirty.hidden = !keysFor(group, config).some(key => JSON.stringify(config[key]) !== JSON.stringify(savedConfig[key])); };
242
+ updateDraft();
243
+ const actions = document.createElement('div'); actions.className = 'backup-card-actions';
244
+ const flag = group.flag;
245
+ if (flag && Object.hasOwn(config, flag)) {
246
+ const toggle = document.createElement('button'); toggle.type = 'button'; toggle.className = 'backup-toggle';
247
+ toggle.dataset.toggle = flag; toggle.textContent = config[flag] === true ? 'An' : 'Aus';
248
+ toggle.setAttribute('aria-label', `${group.title}: ${toggle.textContent}`);
249
+ toggle.setAttribute('aria-pressed', String(config[flag] === true)); toggle.disabled = busy;
250
+ toggle.addEventListener('click', () => {
251
+ if (busy) return;
252
+ config[flag] = config[flag] !== true;
253
+ toggle.textContent = config[flag] ? 'An' : 'Aus';
254
+ toggle.setAttribute('aria-pressed', String(config[flag]));
255
+ toggle.setAttribute('aria-label', `${group.title}: ${toggle.textContent}`); updateDraft(); draftStatus();
256
+ }); actions.append(toggle);
257
+ }
258
+ const edit = document.createElement('button'); edit.type = 'button'; edit.textContent = 'Einstellungen';
259
+ edit.setAttribute('aria-label', `${group.title}: Einstellungen`); edit.setAttribute('aria-haspopup', 'dialog');
260
+ edit.addEventListener('click', () => openSettings(group, edit)); actions.append(edit);
261
+ card.append(open, note, actions, dirty); cards.append(card);
262
+ }
263
+ if (cards.children.length) { block.append(heading, help, cards); root.append(block); }
264
+ }
265
+ inputById('enabled').checked = config.enabled === true; draftStatus();
266
+ }
267
+ /** @returns {Config} */
268
+ function readDialogFields() {
269
+ if (!dialogDraft || !dialogGroup) throw new Error('Kein Einstellungsdialog geöffnet.');
270
+ const next = structuredClone(dialogDraft);
271
+ for (const node of byId('dialog-fields').querySelectorAll('[data-config]')) {
272
+ const input = /** @type {HTMLInputElement|HTMLSelectElement|HTMLTextAreaElement} */ (node);
273
+ const key = input.dataset.config; if (!key) continue;
274
+ let value;
275
+ if (input.dataset.secret === 'true' && !input.value && input.dataset.clearSecret !== 'true') value = SECRET;
276
+ else if (input.dataset.json === 'true') {
277
+ try { value = JSON.parse(input.value); } catch { throw new Error(`${fieldName(key, dialogGroup)}: Bitte gültiges JSON eingeben.`); }
278
+ } else if (input instanceof HTMLInputElement && input.type === 'checkbox') value = input.checked;
279
+ else if (input.dataset.number === 'true') {
280
+ if (input.value.trim() === '' || !Number.isFinite(Number(input.value))) throw new Error(`${fieldName(key, dialogGroup)}: Bitte eine Zahl eingeben.`);
281
+ value = Number(input.value);
282
+ } else value = input.value;
283
+ if (input.dataset.present !== 'false' || JSON.stringify(value) !== input.dataset.original) next[key] = value;
284
+ }
285
+ return next;
286
+ }
287
+ function dialogFields() {
288
+ if (!dialogGroup || !dialogDraft) return;
289
+ const root = byId('dialog-fields'); root.replaceChildren();
290
+ const group = dialogGroup;
291
+ let keys = keysFor(group, dialogDraft).sort((a, b) => fieldPriority(a, group) - fieldPriority(b, group));
292
+ if (group.id === 'notifications') {
293
+ const channel = channelPrefixes[String(dialogDraft.notificationsType)];
294
+ keys = keys.filter(key => key === 'notificationEnabled' || key === 'notificationsType' || (channel && key.startsWith(channel)));
295
+ }
296
+ for (const key of keys) {
297
+ const value = (Object.hasOwn(dialogDraft, key) ? dialogDraft[key] : optional[group.id]?.[key]) ?? null;
298
+ const label = document.createElement('label'); label.textContent = fieldName(key, group);
59
299
  let input;
60
- if (typeof value === 'boolean') {
61
- input = document.createElement('input');
62
- input.type = 'checkbox';
63
- input.checked = value;
64
- } else if (typeof value === 'number') {
65
- input = document.createElement('input');
66
- input.type = 'number';
67
- input.value = String(value);
68
- } else if (typeof value === 'string') {
69
- input = document.createElement('input');
70
- input.type = /password|token|secret|accessjson/i.test(key) ? 'password' : 'text';
71
- input.value = value;
300
+ const optionsForKey = choices[key];
301
+ if (optionsForKey) {
302
+ input = document.createElement('select');
303
+ const options = optionsForKey.map(item => Array.isArray(item) ? item : /** @type {[string,string]} */ ([item, item]));
304
+ if (!options.some(([item]) => item === value)) options.push([String(value ?? ''), String(value ?? '')]);
305
+ for (const [item, text] of options) { const option = document.createElement('option'); option.value = item; option.textContent = text; input.append(option); }
306
+ input.value = String(value ?? '');
307
+ } else if (typeof value === 'boolean') {
308
+ input = document.createElement('input'); input.type = 'checkbox'; input.checked = value;
309
+ } else if (typeof value === 'object') {
310
+ input = document.createElement('textarea'); input.rows = 5; input.value = JSON.stringify(value, null, 2); input.dataset.json = 'true'; label.className = 'backup-wide';
72
311
  } else {
73
- input = document.createElement('textarea');
74
- input.value = JSON.stringify(value, null, 2);
75
- input.rows = 3;
76
- input.dataset.json = 'true';
312
+ input = document.createElement('input');
313
+ input.type = typeof value === 'number' ? 'number' : value === SECRET || /password|token|secret|accessjson|apikey/i.test(key) ? 'password' : /^(minimalTime|ccuTime)$/.test(key) ? 'time' : 'text';
314
+ input.value = value === SECRET ? '' : String(value ?? ''); input.autocomplete = 'off';
315
+ if (typeof value === 'number') input.dataset.number = 'true';
316
+ const range = numericRanges[key];
317
+ if (range && input.type === 'number') { input.min = String(range[0]); input.max = String(range[1]); input.step = '1'; input.required = true; }
318
+ if (value === SECRET) { input.dataset.secret = 'true'; input.placeholder = 'Gespeichert – leer lassen zum Beibehalten'; }
319
+ }
320
+ input.id = `field-${key}`; input.dataset.config = key; input.dataset.present = String(Object.hasOwn(dialogDraft, key));
321
+ input.dataset.original = JSON.stringify(value); label.htmlFor = input.id; label.append(input);
322
+ if (value === SECRET) {
323
+ const clear = document.createElement('button'); clear.type = 'button'; clear.textContent = 'Gespeicherten Wert löschen';
324
+ clear.className = 'backup-secret-clear'; clear.addEventListener('click', () => { input.value = ''; input.dataset.clearSecret = 'true'; if ('placeholder' in input) input.placeholder = 'Wird beim Speichern gelöscht'; clear.disabled = true; }); label.append(clear);
77
325
  }
78
- input.dataset.config = key;
79
- label.append(input);
326
+ if (key === 'sdCardMountPath') {
327
+ const list = document.createElement('datalist'); list.id = 'sdTargets'; input.setAttribute('list', list.id);
328
+ const scan = document.createElement('button'); scan.type = 'button'; scan.id = 'scanSd'; scan.textContent = 'SD-Karten suchen';
329
+ scan.addEventListener('click', scanSd); label.append(list, scan);
330
+ }
331
+ if (key === 'notificationsType') input.addEventListener('change', () => {
332
+ try { dialogDraft = readDialogFields(); dialogFields(); byId('field-notificationsType').focus(); }
333
+ catch (error) { byId('dialog-message').textContent = errorText(error); }
334
+ });
80
335
  root.append(label);
81
336
  }
82
337
  }
83
- function fill() {
84
- for (const [key, value] of Object.entries(config)) {
85
- const e = byId(key);
86
- if (!e || !['INPUT', 'SELECT'].includes(e.tagName)) continue;
87
- if (e.type === 'checkbox') e.checked = value === true;
88
- else e.value = value ?? '';
89
- }
90
- advanced();
338
+ /** @param {Group} group @param {HTMLElement} opener */
339
+ function openSettings(group, opener) {
340
+ if (busy || !loaded || dialogGroup) return;
341
+ dialogDraft = structuredClone(config); dialogGroup = group; dialogOpener = opener;
342
+ byId('dialog-title').textContent = group.title; byId('dialog-description').textContent = `${group.description} „In Entwurf übernehmen“ speichert noch nicht auf dem Gerät.`;
343
+ byId('dialog-message').textContent = ''; dialogFields(); dialog().showModal(); draftStatus();
344
+ }
345
+ function closeSettings() { dialog().close(); }
346
+ async function scanSd() {
347
+ const group = dialogGroup, button = buttonById('scanSd');
348
+ if (button.disabled) return; button.disabled = true;
349
+ try {
350
+ /** @type {Array<{mountPoint:string,label:string}>} */ const values = await command('getSdCardTargets');
351
+ if (dialogGroup !== group || !dialog().open || !document.getElementById('sdTargets')) return;
352
+ const list = byId('sdTargets'); list.replaceChildren();
353
+ for (const value of values) { const option = document.createElement('option'); option.value = value.mountPoint; option.textContent = value.label; list.append(option); }
354
+ byId('dialog-message').textContent = values.length ? 'Gefundene Einhängepunkte stehen im SD-Kartenfeld zur Auswahl.' : 'Keine passende eingebundene SD-Karte gefunden.';
355
+ } catch (error) { if (dialogGroup === group) byId('dialog-message').textContent = errorText(error); }
356
+ finally { button.disabled = false; }
91
357
  }
358
+ /** @param {Remote} remote */
92
359
  function renderEntries(remote) {
93
360
  const root = byId('remoteEntries');
94
361
  root.replaceChildren();
@@ -114,13 +381,14 @@
114
381
  root.append(row);
115
382
  }
116
383
  }
384
+ /** @param {View} view */
117
385
  function render(view) {
118
386
  byId('status').textContent =
119
- (view.status?.active ? 'Bereit' : view.status?.reason || 'Nicht aktiv') +
387
+ (view.status?.active ? 'Backupmodul läuft' : view.status?.reason || 'Backupmodul nicht aktiv') +
120
388
  (view.status?.details?.current ? ' · Sicherung läuft' : '');
121
389
  const coverage = view.status?.details?.coverage || lastCoverage;
122
390
  if (coverage) lastCoverage = coverage;
123
- const coverageLabels = {
391
+ /** @type {Record<string,string>} */ const coverageLabels = {
124
392
  iobroker: 'ioBroker', 'eos-profile': 'EOS einschließlich Geräteeinstellungen', influxDB: 'InfluxDB-Historie', 'postgresql-history': 'PostgreSQL-Historie',
125
393
  EOS_BACKUP_EOS_PROFILE_REQUIRED: 'EOS-Profil in der Sicherung aktivieren',
126
394
  EOS_BACKUP_ACTIVE_INFLUX_NOT_COVERED: 'Die aktive InfluxDB-Historie ist noch nicht als Sicherungsziel eingerichtet (Server, Organisation und Bucket prüfen)',
@@ -135,15 +403,15 @@
135
403
  byId('coverage').classList.toggle('error', !coverage?.complete);
136
404
  const history = view.status?.details?.history || [];
137
405
  const latestRemote = history.find(job => job.remote && Array.isArray(job.remote.entries));
138
- if (latestRemote) {
406
+ if (latestRemote?.remote) {
139
407
  renderEntries(latestRemote.remote);
140
408
  if ((latestRemote.remote.entries || []).length === 50) {
141
409
  const all = document.createElement('button');
142
410
  all.textContent = 'Alle gefundenen Sicherungen anzeigen';
143
411
  all.addEventListener('click', () =>
144
412
  task(async () => {
145
- const { job } = await command('list', { jobId: latestRemote.id });
146
- renderEntries(job.remote);
413
+ /** @type {{job:Job}} */ const { job } = await command('list', { jobId: latestRemote.id });
414
+ if (job.remote) renderEntries(job.remote);
147
415
  }),
148
416
  );
149
417
  byId('remoteEntries').append(all);
@@ -152,7 +420,7 @@
152
420
  clearTimeout(poll);
153
421
  if (view.status?.details?.current)
154
422
  poll = setTimeout(() => {
155
- void load(false).catch(e => message(e.message, true));
423
+ void load(false).catch(e => message(errorText(e), true));
156
424
  }, 1500);
157
425
  const root = byId('jobs');
158
426
  root.replaceChildren();
@@ -172,7 +440,7 @@
172
440
  restore.textContent = 'Wiederherstellung vorbereiten';
173
441
  restore.addEventListener('click', () =>
174
442
  task(async () => {
175
- const plan = await command('restorePlan', { name: file.name });
443
+ /** @type {{message:string,command:string[]}} */ const plan = await command('restorePlan', { name: file.name });
176
444
  byId('restorePlan').textContent = plan.message + '\n\n' + plan.command.join(' ');
177
445
  }),
178
446
  );
@@ -183,7 +451,7 @@
183
451
  all.textContent = 'Alle Dateien dieses Auftrags anzeigen';
184
452
  all.addEventListener('click', () =>
185
453
  task(async () => {
186
- const full = await command('list', { jobId: job.id });
454
+ /** @type {{job:Job}} */ const full = await command('list', { jobId: job.id });
187
455
  render({ status: { active: true, details: { history: [full.job] } } });
188
456
  }),
189
457
  );
@@ -193,49 +461,51 @@
193
461
  }
194
462
  }
195
463
  async function load(replace = false) {
196
- const v = await request('');
464
+ /** @type {View} */ const v = await request('');
197
465
  csrf = v.csrfToken || csrf;
198
466
  if (replace) {
199
- config = v.config || {};
467
+ config = structuredClone(v.config || {});
468
+ savedConfig = structuredClone(config); loaded = true;
200
469
  configurationRevision = typeof v.configurationRevision === 'string' ? v.configurationRevision : '';
201
- fill();
470
+ renderSettings();
202
471
  }
203
472
  render(v);
204
473
  }
474
+ /** @param {()=>Promise<unknown>} fn */
205
475
  async function task(fn) {
206
476
  if (busy) return;
207
- busy = true;
477
+ busy = true; draftStatus();
208
478
  try {
209
479
  await fn();
210
480
  } catch (e) {
211
- message(e.message || String(e), true);
481
+ message(errorText(e), true);
212
482
  } finally {
213
- busy = false;
483
+ busy = false; draftStatus();
214
484
  }
215
485
  }
216
486
  async function save() {
487
+ if (!loaded || dialogGroup) return;
217
488
  const next = structuredClone(config);
218
- for (const e of document.querySelectorAll('#settings input,#settings select,[data-config]')) {
219
- const key = e.dataset.config || e.id;
220
- next[key] =
221
- e.type === 'checkbox'
222
- ? e.checked
223
- : e.type === 'number'
224
- ? Number(e.value)
225
- : e.dataset.json
226
- ? JSON.parse(e.value)
227
- : e.value;
228
- }
229
- const v = await request('', 'PUT', { config: next, expectedConfigurationRevision: configurationRevision });
230
- config = v.config;
231
- message('Einstellungen gespeichert.');
232
- await load(true);
489
+ /** @type {View} */ const v = await request('', 'PUT', { config: next, expectedConfigurationRevision: configurationRevision });
490
+ config = structuredClone(v.config || next); savedConfig = structuredClone(config);
491
+ configurationRevision = typeof v.configurationRevision === 'string' ? v.configurationRevision : configurationRevision;
492
+ csrf = v.csrfToken || csrf; renderSettings(); render(v); message('Einstellungen gespeichert.');
233
493
  }
234
- byId('settings').addEventListener('submit', e => {
494
+ byId('settings').addEventListener('submit', e => { e.preventDefault(); void task(save); });
495
+ inputById('enabled').addEventListener('change', () => { if (!busy && loaded) { config.enabled = inputById('enabled').checked; draftStatus(); } });
496
+ byId('dialog-form').addEventListener('submit', e => {
235
497
  e.preventDefault();
236
- void task(save);
498
+ try { config = readDialogFields(); closeSettings(); renderSettings(); }
499
+ catch (error) { byId('dialog-message').textContent = errorText(error); }
500
+ });
501
+ byId('dialog-cancel').addEventListener('click', closeSettings);
502
+ byId('dialog-close').addEventListener('click', closeSettings);
503
+ byId('settingsDialog').addEventListener('close', () => {
504
+ const focus = dialogOpener; const groupId = dialogGroup?.id;
505
+ dialogDraft = null; dialogGroup = null; dialogOpener = null; byId('dialog-fields').replaceChildren(); draftStatus();
506
+ if (focus?.isConnected) focus.focus();
507
+ else if (groupId) document.getElementById(`backup-open-${groupId}`)?.focus();
237
508
  });
238
- byId('saveAdvanced').addEventListener('click', () => task(save));
239
509
  byId('refresh').addEventListener('click', () =>
240
510
  task(async () => {
241
511
  await load(false);
@@ -264,36 +534,18 @@
264
534
  );
265
535
  byId('remoteList').addEventListener('click', () =>
266
536
  task(async () => {
267
- const provider = byId('remoteProvider').value;
537
+ const provider = (/** @type {HTMLSelectElement} */ (byId('remoteProvider'))).value;
268
538
  await command(provider === 'legacy' ? 'legacyList' : 'remoteList', {
269
539
  provider,
270
- kind: byId('remoteKind').value,
540
+ kind: (/** @type {HTMLSelectElement} */ (byId('remoteKind'))).value,
271
541
  });
272
542
  message('Sicherungen werden gesucht.');
273
543
  await load(false);
274
544
  }),
275
545
  );
276
- byId('scanSd').addEventListener('click', () =>
277
- task(async () => {
278
- const values = await command('getSdCardTargets');
279
- const list = byId('sdTargets');
280
- list.replaceChildren();
281
- for (const value of values) {
282
- const option = document.createElement('option');
283
- option.value = value.mountPoint;
284
- option.textContent = value.label;
285
- list.append(option);
286
- }
287
- message(
288
- values.length
289
- ? 'Gefundene Einhängepunkte stehen im SD-Kartenfeld zur Auswahl.'
290
- : 'Keine passende eingebundene SD-Karte gefunden.',
291
- );
292
- }),
293
- );
294
546
  byId('key').addEventListener('click', () =>
295
547
  task(async () => {
296
- const v = await command('exportRecoveryKey', { confirm: true });
548
+ /** @type {{filename:string,content:string}} */ const v = await command('exportRecoveryKey', { confirm: true });
297
549
  download(v.filename, v.content);
298
550
  message('Wiederherstellungsschlüssel heruntergeladen. Getrennt und geschützt aufbewahren.');
299
551
  }),