iobroker.eos-admin 9.0.26 → 9.0.28
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.
- package/NEXOWATT_EOS_BUILD_INFO.json +9 -15
- package/README.md +17 -227
- package/adminWww/.vite/manifest.json +194 -203
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13887 -13897
- package/adminWww/assets/{AdapterUpdateDialog-DIjnNZ5k.js → AdapterUpdateDialog-DBLX7GoO.js} +5 -5
- package/adminWww/assets/{Adapters-D8UOQg1q.js → Adapters-c250DTTU.js} +5 -5
- package/adminWww/assets/AddLink-0L0E-LsA.js +1 -0
- package/adminWww/assets/ColorLens-DA51K29x.js +1 -0
- package/adminWww/assets/ConfigManager-BBUXk8hZ.js +1 -0
- package/adminWww/assets/Enums-CWJJ2zNF.js +92 -0
- package/adminWww/assets/Fields-CNefAzNH.js +1 -0
- package/adminWww/assets/FileCopy-B16lEuur.js +1 -0
- package/adminWww/assets/Files-Bf8oZSk6.js +1 -0
- package/adminWww/assets/{Hosts-BToJLy61.js → Hosts-8gg41ODb.js} +6 -6
- package/adminWww/assets/Instances-PPTEPJQN.js +4 -0
- package/adminWww/assets/Intro-9c_ynpJu.js +2 -0
- package/adminWww/assets/Lens-9lkeoWGk.js +1 -0
- package/adminWww/assets/LinearScale-Be5h2beh.js +1 -0
- package/adminWww/assets/{Logs-xdFVJ6fZ.js → Logs-Brgb9kR_.js} +2 -2
- package/adminWww/assets/North-C2whbHM-.js +1 -0
- package/adminWww/assets/{Objects-DhyJ5eAY.js → Objects-DHVNfs_x.js} +4 -4
- package/adminWww/assets/Overview-CgnpH8e8.js +3 -0
- package/adminWww/assets/PersonOff-DqBq0Fho.js +1 -0
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +1 -0
- package/adminWww/assets/State-vVobamei.js +1 -0
- package/adminWww/assets/UsedResources-1fEUqiQ6.js +2 -0
- package/adminWww/assets/Users-oRpvFtQR.js +1 -0
- package/adminWww/assets/{bootstrap-BU7j1Fe_.js → bootstrap-st8VxLDc.js} +25 -25
- package/adminWww/assets/date-fns-C1dqkno9.js +1 -0
- package/adminWww/assets/{hostInit-Cgee6juw.js → hostInit-OQMl4yOT.js} +1 -1
- package/adminWww/assets/icons-material-DeF0gQyK.js +1 -0
- package/adminWww/assets/{index-BUZf1ftI.js → index-D4lV2S7J.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CcjgaxiA.js → installSVGRenderer-1WdbDz-H.js} +1 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +1 -0
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +1 -0
- package/adminWww/assets/locale-hLcz_Xh2.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-96d40e57.js → mf-entry-bootstrap-0-3b253ab0.js} +2 -2
- package/adminWww/assets/sentry-DwQQLI7N.js +1 -0
- package/adminWww/assets/startOfWeek-DJph8SIW.js +1 -0
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.28.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +24 -1
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosModuleHost.js +66 -3
- package/build/lib/eosModuleHost.js.map +1 -1
- package/docs/DOKUMENTATION_9.0.27.md +7 -0
- package/docs/README.md +13 -0
- package/docs/UMSORTIERTE_DATEIEN.tsv +153 -0
- package/docs/reports/unified-9.0.14/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.16/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.17/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.27/ABHAENGIGKEITEN.md +27 -0
- package/docs/reports/unified-9.0.27/PRUEFBERICHT.md +68 -0
- package/docs/reports/unified-9.0.27/PRUEFERGEBNISSE.json +292 -0
- package/docs/reports/unified-9.0.27/SICHERHEITSBETRACHTUNG.md +26 -0
- package/docs/reports/unified-9.0.27/TIBBER_NEUSTART.md +23 -0
- package/docs/reports/unified-9.0.27/UPDATE_WIEDERANLAUF.md +46 -0
- package/docs/reports/unified-9.0.27/raw/INDEX.json +347 -0
- package/docs/reports/unified-9.0.27/raw/admin-build-mirror-review.json +75 -0
- package/docs/reports/unified-9.0.27/raw/ajv-production-reachability.json +35 -0
- package/docs/reports/unified-9.0.27/raw/backend-build.log +5 -0
- package/docs/reports/unified-9.0.27/raw/baseline-devices.log +138 -0
- package/docs/reports/unified-9.0.27/raw/baseline-module-startup.log +82 -0
- package/docs/reports/unified-9.0.27/raw/baseline-ocpp-contract.log +93 -0
- package/docs/reports/unified-9.0.27/raw/baseline-ocpp-frontend.log +255 -0
- package/docs/reports/unified-9.0.27/raw/baseline-repository-tools.log +84 -0
- package/docs/reports/unified-9.0.27/raw/browser-blocked.log +38 -0
- package/docs/reports/unified-9.0.27/raw/controller-725-reproduction-node24.log +4 -0
- package/docs/reports/unified-9.0.27/raw/devices-child-rpc-diagnostic.log +34 -0
- package/docs/reports/unified-9.0.27/raw/devices-filter-without-readiness.log +15 -0
- package/docs/reports/unified-9.0.27/raw/devices-final-web-filtered-node22.log +107 -0
- package/docs/reports/unified-9.0.27/raw/devices-final-web-filtered-node24.log +26 -0
- package/docs/reports/unified-9.0.27/raw/eos-update-path-node24.log +52 -0
- package/docs/reports/unified-9.0.27/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.27/raw/influx/provenance.json +42 -0
- package/docs/reports/unified-9.0.27/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.27/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.27/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.27/raw/node22-tests-final.log +16976 -0
- package/docs/reports/unified-9.0.27/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.27/raw/node24-tests-final.log +2831 -0
- package/docs/reports/unified-9.0.27/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.27/raw/npm-audit-development.json +398 -0
- package/docs/reports/unified-9.0.27/raw/npm-audit-production.json +77 -0
- package/docs/reports/unified-9.0.27/raw/npm-production-ajv-tree.json +33 -0
- package/docs/reports/unified-9.0.27/raw/npm-production-ajv-tree.stderr +1 -0
- package/docs/reports/unified-9.0.27/raw/npm926-dateivergleich.json +6 -0
- package/docs/reports/unified-9.0.27/raw/production-audit-review.json +30 -0
- package/docs/reports/unified-9.0.27/raw/release-targeted.log +118 -0
- package/docs/reports/unified-9.0.27/raw/restart-regressions-node22.log +361 -0
- package/docs/reports/unified-9.0.27/raw/sbom-generation.json +11 -0
- package/docs/reports/unified-9.0.27/raw/source-fixtures.json +30 -0
- package/docs/reports/unified-9.0.27/raw/targeted-ocpp-frontend.log +26 -0
- package/docs/reports/unified-9.0.27/raw/test-environment.json +24 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/REVIEW.md +40 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/appcenter-overwrite-patched-scratch.log +11 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/appcenter-overwrite-repro.log +33 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/customer-tariff-lint.log +0 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/customer-tariff-typecheck.log +0 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/process-disk-restart-node24.log +10 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-diagnostic.log +58 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-ipc-counts.log +45 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-node24.log +42 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-final-node22.log +134 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-final-node24.log +28 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-source-node22-diagnostic.log +220 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tariff-background-hydration-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-header-object-mask-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-independent-frontend-review.log +14 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-independent-scope-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-mapping-targeted-node24.log +2184 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-parent-persistence-review.log +20 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/appcenter-tariff-roundtrip-baseline.log +57 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/customer-editor-final.log +24 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/frontend-guard-baseline.log +303 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/frontend-guard-final.log +14 -0
- package/docs/reports/unified-9.0.27/raw/tibber-appcenter-baseline.log +33 -0
- package/docs/reports/unified-9.0.27/raw/tibber-background-hydration-baseline.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber-form-baseline.log +57 -0
- package/docs/reports/unified-9.0.27/raw/tibber-mapping-targeted-node24.log +2184 -0
- package/docs/reports/unified-9.0.27/raw/tibber-minimal-fix-isolation.log +11 -0
- package/docs/reports/unified-9.0.27/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.27/raw/ui-build.log +7 -0
- package/docs/reports/unified-9.0.28/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.28/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.28/raw/INDEX.json +87 -0
- package/docs/reports/unified-9.0.28/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.28/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.28/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.28/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.28/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.28/raw/node22-tests-final.log +17060 -0
- package/docs/reports/unified-9.0.28/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/node24-tests-final.log +2845 -0
- package/docs/reports/unified-9.0.28/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/npm-audit-runtime.json +77 -0
- package/docs/reports/unified-9.0.28/raw/runtime-mirror-check.log +1 -0
- package/docs/reports/unified-9.0.28/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.28/raw/ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.4/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.5/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.6/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.7/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.8/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.9/PRUEFBERICHT.md +1 -1
- package/{START_HIER_9.0.1.md → docs/start/START_HIER_9.0.1.md} +5 -5
- package/{START_HIER_9.0.10.md → docs/start/START_HIER_9.0.10.md} +1 -1
- package/{START_HIER_9.0.11.md → docs/start/START_HIER_9.0.11.md} +1 -1
- package/{START_HIER_9.0.12.md → docs/start/START_HIER_9.0.12.md} +1 -1
- package/{START_HIER_9.0.13.md → docs/start/START_HIER_9.0.13.md} +2 -2
- package/{START_HIER_9.0.14.md → docs/start/START_HIER_9.0.14.md} +1 -1
- package/{START_HIER_9.0.15.md → docs/start/START_HIER_9.0.15.md} +2 -2
- package/{START_HIER_9.0.16.md → docs/start/START_HIER_9.0.16.md} +1 -1
- package/{START_HIER_9.0.17.md → docs/start/START_HIER_9.0.17.md} +2 -2
- package/{START_HIER_9.0.18.md → docs/start/START_HIER_9.0.18.md} +4 -4
- package/{START_HIER_9.0.19.md → docs/start/START_HIER_9.0.19.md} +2 -2
- package/{START_HIER_9.0.2.md → docs/start/START_HIER_9.0.2.md} +2 -2
- package/{START_HIER_9.0.20.md → docs/start/START_HIER_9.0.20.md} +1 -1
- package/{START_HIER_9.0.21.md → docs/start/START_HIER_9.0.21.md} +1 -1
- package/{START_HIER_9.0.22.md → docs/start/START_HIER_9.0.22.md} +4 -4
- package/{START_HIER_9.0.24.md → docs/start/START_HIER_9.0.24.md} +1 -1
- package/{START_HIER_9.0.25.md → docs/start/START_HIER_9.0.25.md} +1 -1
- package/{START_HIER_9.0.26.md → docs/start/START_HIER_9.0.26.md} +1 -1
- package/docs/start/START_HIER_9.0.27.md +33 -0
- package/docs/start/START_HIER_9.0.28.md +20 -0
- package/{START_HIER_9.0.3.md → docs/start/START_HIER_9.0.3.md} +3 -3
- package/{START_HIER_9.0.4.md → docs/start/START_HIER_9.0.4.md} +3 -3
- package/{START_HIER_9.0.5.md → docs/start/START_HIER_9.0.5.md} +2 -2
- package/{START_HIER_9.0.6.md → docs/start/START_HIER_9.0.6.md} +3 -3
- package/{START_HIER_9.0.7.md → docs/start/START_HIER_9.0.7.md} +4 -4
- package/{START_HIER_9.0.8.md → docs/start/START_HIER_9.0.8.md} +3 -3
- package/{START_HIER_9.0.9.md → docs/start/START_HIER_9.0.9.md} +1 -1
- package/docs/unified/ARCHITECTURE.md +37 -1
- package/docs/unified/BESTANDSUEBERNAHME_9_0_7.md +1 -1
- package/docs/unified/INSTALL_PUBLISH.md +2 -2
- package/io-package.json +12 -12
- package/modules/devices/admin/ems-assignment.js +1 -0
- package/package.json +38 -34
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +378 -146
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +171 -6
- package/release-manifests/unified/runtime.cdx.json +28 -28
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +2 -2
- package/ui/io-package.json +5 -1
- package/ui/lib/customer-tariff.js +73 -1
- package/ui/lib/installer-lifecycle.js +5 -3
- package/ui/lib/ocpp-auto-discovery.js +53 -6
- package/ui/lib/smarthome-device-detection.js +177 -4
- package/ui/main.js +171 -95
- package/ui/package.json +1 -1
- package/ui/www/ems-apps.js +188 -130
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/smarthome-config-workspace.css +7 -0
- package/ui/www/smarthome-config.html +4 -4
- package/ui/www/smarthome-config.js +178 -163
- package/ui/www/smarthome-device-config.js +131 -6
- package/ui/www/smarthome-setup.js +252 -59
- package/adminWww/assets/AccessTime-CuR73YC3.js +0 -1
- package/adminWww/assets/ConfigManager-CAvT_4-g.js +0 -1
- package/adminWww/assets/Enums-CrNUOX0d.js +0 -92
- package/adminWww/assets/Fields-D-0qFiqr.js +0 -1
- package/adminWww/assets/Files-BL8kvaeC.js +0 -1
- package/adminWww/assets/Instances-Dlrp1KGP.js +0 -4
- package/adminWww/assets/Intro-5EbxvP4X.js +0 -2
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +0 -1
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +0 -1
- package/adminWww/assets/Overview-BspgcFB7.js +0 -3
- package/adminWww/assets/Pageview-wzrLQZ-j.js +0 -1
- package/adminWww/assets/PersonOff-YtHcY0sV.js +0 -1
- package/adminWww/assets/Star-D8VNXawT.js +0 -1
- package/adminWww/assets/State-CJ1mKH_U.js +0 -1
- package/adminWww/assets/UsedResources-BMiCxqWH.js +0 -2
- package/adminWww/assets/Users-DrlJHRa5.js +0 -1
- package/adminWww/assets/ViewCompact-D7bHgn99.js +0 -1
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +0 -1
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +0 -1
- package/adminWww/assets/date-fns-BtR4dG_j.js +0 -1
- package/adminWww/assets/en-US-BjjaEI6N.js +0 -1
- package/adminWww/assets/icons-material-C0U9EKON.js +0 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +0 -1
- package/adminWww/assets/locale-DN6Bdkdt.js +0 -1
- package/adminWww/assets/sentry-CPzCHrwe.js +0 -1
- package/adminWww/assets/setYear-DDSuW45e.js +0 -1
- package/adminWww/remoteEntry-eos-9.0.26.js +0 -12
- /package/{START_HIER_9.0.23.md → docs/start/START_HIER_9.0.23.md} +0 -0
|
@@ -199,6 +199,13 @@ body.nw-page-smarthome-config .nw-setup-device-info > span { color: #a9c6ce; fon
|
|
|
199
199
|
body.nw-page-smarthome-config .nw-setup-device-info > small { color: #90abb9; font-size: 12px; }
|
|
200
200
|
body.nw-page-smarthome-config .nw-setup-count { margin: 4px 0 10px; color: #9fbfc8; font-size: 13px; }
|
|
201
201
|
body.nw-page-smarthome-config .nw-setup-detection-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr); gap: 14px; align-items: end; }
|
|
202
|
+
body.nw-page-smarthome-config .nw-setup-detection-folders { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
|
|
203
|
+
body.nw-page-smarthome-config .nw-setup-detection-folder { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
|
|
204
|
+
body.nw-page-smarthome-config .nw-setup-detection-folder[aria-pressed="true"] { background: #123a3b; border-color: #57d8b4; color: #e4fff8; }
|
|
205
|
+
body.nw-page-smarthome-config .nw-setup-detection-folder-count { font-size: 12px; color: #a9d7ce; }
|
|
206
|
+
body.nw-page-smarthome-config .nw-setup-detection-filters { margin-top: 10px; }
|
|
207
|
+
body.nw-page-smarthome-config .nw-setup-detection-filters > summary { width: fit-content; padding: 11px 6px; color: #b8d6db; cursor: pointer; }
|
|
208
|
+
body.nw-page-smarthome-config .nw-shcfg-detect-state-group { margin: 14px 0 5px; color: #c3e4df; font-size: 14px; }
|
|
202
209
|
body.nw-page-smarthome-config .nw-setup-check { display: flex; gap: 10px; align-items: center; min-height: 44px; min-width: 0; font-size: 13px; }
|
|
203
210
|
body.nw-page-smarthome-config .nw-setup-check input { flex: 0 0 22px; width: 22px; height: 22px; }
|
|
204
211
|
body.nw-page-smarthome-config .nw-setup-batch-actions,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<script src="/static/nw-i18n.js" defer></script>
|
|
39
39
|
<link href="/static/smarthome-device-config.css?v=9.0.10" rel="stylesheet"/>
|
|
40
40
|
<link href="/static/smarthome-custom-config.css?v=9.0.10" rel="stylesheet"/>
|
|
41
|
-
<link href="/static/smarthome-config-workspace.css?v=9.0.
|
|
41
|
+
<link href="/static/smarthome-config-workspace.css?v=9.0.28" rel="stylesheet"/>
|
|
42
42
|
<script defer src="/eos-session-idle.js"></script>
|
|
43
43
|
</head>
|
|
44
44
|
<body data-nw-required-capability="smarthome.configure" data-nw-required-role="Installer oder Admin" data-nw-page-name="SmartHome-Einrichtung" class="nw-cockpit-page nw-cockpit-skin nw-page-smarthome-config">
|
|
@@ -592,11 +592,11 @@
|
|
|
592
592
|
<script src="/static/nw-shell.js"></script>
|
|
593
593
|
<script src="/static/smarthome-activation.js"></script>
|
|
594
594
|
<script src="/static/smarthome-custom-config.js?v=9.0.10"></script>
|
|
595
|
-
<script src="/static/smarthome-device-config.js?v=9.0.
|
|
595
|
+
<script src="/static/smarthome-device-config.js?v=9.0.28"></script>
|
|
596
596
|
<script src="/static/smarthome-alias-config.js?v=9.0.10"></script>
|
|
597
597
|
<script src="/static/smarthome-layout-editor.js?v=9.0.10"></script>
|
|
598
|
-
<script src="/static/smarthome-setup.js?v=9.0.
|
|
599
|
-
<script src="/static/smarthome-config.js?v=9.0.
|
|
598
|
+
<script src="/static/smarthome-setup.js?v=9.0.28"></script>
|
|
599
|
+
<script src="/static/smarthome-config.js?v=9.0.28"></script>
|
|
600
600
|
|
|
601
601
|
|
|
602
602
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/www/smarthome-config.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:570575237c9968bab95c8a2217bc3d971b17aff60bc64ca949b1dd544808f562
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -3501,7 +3501,9 @@ async function nwLoadTypeDetectorSuggestions(force = false) {
|
|
|
3501
3501
|
det.loaded = true;
|
|
3502
3502
|
det.loading = false;
|
|
3503
3503
|
const total = (det.stats && Number.isFinite(Number(det.stats.total))) ? Number(det.stats.total) : det.results.length;
|
|
3504
|
-
if (
|
|
3504
|
+
if (data?.diagnostics?.extraSuggestionsLimited === true) {
|
|
3505
|
+
nwSetDetectorStatus(`${total} Vorschläge geladen. Weitere Schlagworttreffer kannst du über die manuelle Datenpunktauswahl prüfen.`, 'warn');
|
|
3506
|
+
} else if (total > 0) {
|
|
3505
3507
|
nwSetDetectorStatus(`${total} Vorschläge geladen. Bitte prüfen und gezielt übernehmen.`, 'ok');
|
|
3506
3508
|
} else {
|
|
3507
3509
|
nwSetDetectorStatus('Keine passenden Vorschläge gefunden.', 'warn');
|
|
@@ -3831,87 +3833,12 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
3831
3833
|
const live = document.createElement('p'); live.className = currentStatus.className; live.setAttribute('role', 'status'); live.textContent = currentStatus.textContent; root.appendChild(live);
|
|
3832
3834
|
}
|
|
3833
3835
|
|
|
3834
|
-
const toolbar = document.createElement('div');
|
|
3835
|
-
toolbar.className = 'nw-shcfg-detect__toolbar';
|
|
3836
|
-
|
|
3837
|
-
const filterInput = document.createElement('input');
|
|
3838
|
-
filterInput.type = 'text';
|
|
3839
|
-
filterInput.className = 'nw-config-input';
|
|
3840
|
-
filterInput.placeholder = 'Nach Name, Pfad oder Datenpunkt suchen…';
|
|
3841
|
-
filterInput.value = det.filterText || '';
|
|
3842
|
-
// Ereignis-Kommentar: Bindet das UI-Ereignis 'input' an filterInput. Beim Umbau prüfen, welche DOM-Elemente/States dadurch geändert werden.
|
|
3843
|
-
filterInput.addEventListener('input', () => {
|
|
3844
|
-
det.filterText = filterInput.value || '';
|
|
3845
|
-
nwRenderShcfgDetector();
|
|
3846
|
-
});
|
|
3847
|
-
toolbar.appendChild(filterInput);
|
|
3848
|
-
|
|
3849
|
-
const showConfiguredLabel = document.createElement('label');
|
|
3850
|
-
showConfiguredLabel.className = 'nw-shcfg-detect__toggle';
|
|
3851
|
-
const showConfigured = document.createElement('input');
|
|
3852
|
-
showConfigured.type = 'checkbox';
|
|
3853
|
-
showConfigured.checked = !!det.showConfigured;
|
|
3854
|
-
// Ereignis-Kommentar: Bindet das UI-Ereignis 'change' an showConfigured. Beim Umbau prüfen, welche DOM-Elemente/States dadurch geändert werden.
|
|
3855
|
-
showConfigured.addEventListener('change', () => {
|
|
3856
|
-
det.showConfigured = !!showConfigured.checked;
|
|
3857
|
-
nwRenderShcfgDetector();
|
|
3858
|
-
});
|
|
3859
|
-
const showConfiguredText = document.createElement('span');
|
|
3860
|
-
showConfiguredText.textContent = 'Bereits zugeordnete Vorschläge anzeigen';
|
|
3861
|
-
showConfiguredLabel.appendChild(showConfigured);
|
|
3862
|
-
showConfiguredLabel.appendChild(showConfiguredText);
|
|
3863
|
-
toolbar.appendChild(showConfiguredLabel);
|
|
3864
|
-
|
|
3865
|
-
const aliasHelper = window.NW_SH_ALIAS_CONFIG;
|
|
3866
|
-
const canAlias = !!(aliasHelper && aliasHelper.canCreate());
|
|
3867
|
-
if (det.useAliases === undefined) det.useAliases = canAlias;
|
|
3868
|
-
const aliases = document.createElement('label'); aliases.className = 'nw-shcfg-detect__toggle';
|
|
3869
|
-
const aliasCheck = document.createElement('input'); aliasCheck.type = 'checkbox';
|
|
3870
|
-
aliasCheck.checked = canAlias && det.useAliases !== false; aliasCheck.disabled = !canAlias || !!det.importing;
|
|
3871
|
-
aliasCheck.addEventListener('change', () => { det.useAliases = aliasCheck.checked; });
|
|
3872
|
-
const aliasText = document.createElement('span');
|
|
3873
|
-
aliasText.textContent = 'Alias-Datenpunkte verwenden/anlegen' + (canAlias ? ' (bestehende Aliase wiederverwenden)' : ' (Berechtigung mapping.edit erforderlich)');
|
|
3874
|
-
aliases.appendChild(aliasCheck); aliases.appendChild(aliasText); toolbar.appendChild(aliases);
|
|
3875
|
-
// Compact overview owns the shared filter and alias choice.
|
|
3876
|
-
|
|
3877
|
-
const summary = document.createElement('div');
|
|
3878
|
-
summary.className = 'nw-shcfg-detect__summary';
|
|
3879
|
-
const stats = det.stats || {};
|
|
3880
|
-
const total = Number.isFinite(Number(stats.total)) ? Number(stats.total) : results.length;
|
|
3881
|
-
const importable = Number.isFinite(Number(stats.importable)) ? Number(stats.importable) : results.filter((r) => r && r.importable).length;
|
|
3882
|
-
const configured = Number.isFinite(Number(stats.configured)) ? Number(stats.configured) : results.filter((r) => r && r.alreadyConfigured).length;
|
|
3883
|
-
const filteredResults = results.filter((r) => {
|
|
3884
|
-
if (!r) return false;
|
|
3885
|
-
return true;
|
|
3886
|
-
});
|
|
3887
|
-
|
|
3888
|
-
/**
|
|
3889
|
-
* Code-Teil: Arrow-Funktion `mkBadge`
|
|
3890
|
-
* Zweck: stellt Objekte/States/Strukturen sicher, ohne bestehende Konfiguration unnötig zu überschreiben.
|
|
3891
|
-
* Zusammenhang: Hängt an DOM-IDs, /api/state, /config und den vom Backend veröffentlichten States; Änderungen müssen mit main.js/ems/* abgestimmt bleiben.
|
|
3892
|
-
* TypeScript-Hinweis: Beim TypeScript-Umbau Parameter, Rückgabewert und verwendete State-/Config-Struktur explizit typisieren.
|
|
3893
|
-
*/
|
|
3894
|
-
/**
|
|
3895
|
-
* Code-Teil: mkBadge
|
|
3896
|
-
* Zweck: Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen.
|
|
3897
|
-
* Zusammenhang: Teil von SmartHome: Räume, Geräte, Kacheln, Popover; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
3898
|
-
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
3899
|
-
*/
|
|
3900
3836
|
const mkBadge = (cls, text) => {
|
|
3901
3837
|
const span = document.createElement('span');
|
|
3902
3838
|
span.className = 'nw-config-badge ' + cls;
|
|
3903
3839
|
span.textContent = text;
|
|
3904
3840
|
return span;
|
|
3905
3841
|
};
|
|
3906
|
-
summary.appendChild(mkBadge('nw-config-badge--auto', `${total} Vorschläge`));
|
|
3907
|
-
summary.appendChild(mkBadge('nw-config-badge--ok', `${importable} direkt übernehmbar`));
|
|
3908
|
-
if (configured > 0) summary.appendChild(mkBadge('nw-config-badge--warn', `${configured} bereits zugeordnet`));
|
|
3909
|
-
if (det.scannedAt) {
|
|
3910
|
-
const stamp = new Date(det.scannedAt);
|
|
3911
|
-
summary.appendChild(mkBadge('nw-config-badge--idle', `Scan: ${stamp.toLocaleDateString('de-DE')} ${stamp.toLocaleTimeString('de-DE')}`));
|
|
3912
|
-
}
|
|
3913
|
-
root.appendChild(summary);
|
|
3914
|
-
|
|
3915
3842
|
if (det.loading && !results.length) {
|
|
3916
3843
|
const loading = document.createElement('div');
|
|
3917
3844
|
loading.className = 'nw-config-empty';
|
|
@@ -3920,12 +3847,10 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
3920
3847
|
return;
|
|
3921
3848
|
}
|
|
3922
3849
|
|
|
3923
|
-
if (!
|
|
3850
|
+
if (!results.length) {
|
|
3924
3851
|
const empty = document.createElement('div');
|
|
3925
3852
|
empty.className = 'nw-config-empty';
|
|
3926
|
-
empty.textContent =
|
|
3927
|
-
? 'Keine Vorschläge für den aktuellen Filter.'
|
|
3928
|
-
: (det.error ? ('Fehler: ' + det.error) : 'Keine passenden Vorschläge gefunden.');
|
|
3853
|
+
empty.textContent = det.error ? ('Fehler: ' + det.error) : 'Vorschlag nicht mehr vorhanden.';
|
|
3929
3854
|
root.appendChild(empty);
|
|
3930
3855
|
return;
|
|
3931
3856
|
}
|
|
@@ -3933,20 +3858,7 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
3933
3858
|
const list = document.createElement('div');
|
|
3934
3859
|
list.className = 'nw-shcfg-detect__list';
|
|
3935
3860
|
|
|
3936
|
-
|
|
3937
|
-
.sort((a, b) => {
|
|
3938
|
-
const aConfigured = (a.alreadyConfigured || a.imported) ? 1 : 0;
|
|
3939
|
-
const bConfigured = (b.alreadyConfigured || b.imported) ? 1 : 0;
|
|
3940
|
-
if (aConfigured !== bConfigured) return aConfigured - bConfigured;
|
|
3941
|
-
const aImportable = a.importable ? 1 : 0;
|
|
3942
|
-
const bImportable = b.importable ? 1 : 0;
|
|
3943
|
-
if (aImportable !== bImportable) return bImportable - aImportable;
|
|
3944
|
-
const aCount = Number(a.matchCount || 0);
|
|
3945
|
-
const bCount = Number(b.matchCount || 0);
|
|
3946
|
-
if (aCount !== bCount) return bCount - aCount;
|
|
3947
|
-
return String(a.displayName || '').localeCompare(String(b.displayName || ''), 'de', { sensitivity: 'base', numeric: true });
|
|
3948
|
-
})
|
|
3949
|
-
.forEach((suggestion) => {
|
|
3861
|
+
results.forEach((suggestion) => {
|
|
3950
3862
|
const card = document.createElement('div');
|
|
3951
3863
|
card.className = 'nw-config-card nw-shcfg-detect-card';
|
|
3952
3864
|
|
|
@@ -3968,31 +3880,21 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
3968
3880
|
|
|
3969
3881
|
const headRight = document.createElement('div');
|
|
3970
3882
|
headRight.className = 'nw-shcfg-detect-card__badges';
|
|
3971
|
-
headRight.appendChild(mkBadge('nw-config-badge--auto',
|
|
3883
|
+
if (!suggestion.discoveryReview) headRight.appendChild(mkBadge('nw-config-badge--auto', nwGetTypeLabel(suggestion.targetType || '')));
|
|
3972
3884
|
if (suggestion.imported) headRight.appendChild(mkBadge('nw-config-badge--ok', 'übernommen'));
|
|
3973
3885
|
else if (suggestion.update && suggestion.update.sourceChanged) headRight.appendChild(mkBadge('nw-config-badge--warn', 'Änderungen zur Prüfung'));
|
|
3974
3886
|
else if (suggestion.alreadyConfigured) headRight.appendChild(mkBadge('nw-config-badge--warn', 'bereits im Projekt'));
|
|
3975
3887
|
else if (!suggestion.importable) headRight.appendChild(mkBadge('nw-config-badge--warn', 'manuell prüfen'));
|
|
3976
|
-
if (suggestion.confidence) {
|
|
3977
|
-
const confText = suggestion.confidence === 'high' ? 'Passung hoch' : (suggestion.confidence === 'medium' ? 'Passung mittel' : 'Passung basis');
|
|
3978
|
-
headRight.appendChild(mkBadge('nw-config-badge--idle', confText));
|
|
3979
|
-
}
|
|
3980
3888
|
|
|
3981
3889
|
head.appendChild(headLeft);
|
|
3982
3890
|
head.appendChild(headRight);
|
|
3983
3891
|
card.appendChild(head);
|
|
3984
3892
|
|
|
3985
|
-
const meta = document.createElement('div');
|
|
3986
|
-
meta.className = 'nw-shcfg-detect-card__meta';
|
|
3987
|
-
meta.textContent = `Quelle: ${suggestion.sourceType || 'objekt'} • Gemappte Zustände: ${Number(suggestion.matchCount || 0)}`;
|
|
3988
|
-
card.appendChild(meta);
|
|
3989
3893
|
const hints = suggestion.metadata || {};
|
|
3990
3894
|
const assignmentHints = [];
|
|
3991
3895
|
if (Array.isArray(hints.rooms) && hints.rooms.length) assignmentHints.push('Räume: ' + hints.rooms.map(row => row.name).join(', '));
|
|
3992
3896
|
if (Array.isArray(hints.functions) && hints.functions.length) assignmentHints.push('Funktionen: ' + hints.functions.map(row => row.name).join(', '));
|
|
3993
3897
|
if (suggestion.usesAlias) assignmentHints.push('Alias-Zuordnung wird beibehalten');
|
|
3994
|
-
if (hints.icon) assignmentHints.push('Quell-Icon: ' + String(hints.icon).slice(0, 160));
|
|
3995
|
-
if (hints.color) assignmentHints.push('Akzent: ' + hints.color);
|
|
3996
3898
|
if (assignmentHints.length) {
|
|
3997
3899
|
const hint = document.createElement('div');
|
|
3998
3900
|
hint.className = 'nw-shcfg-detect-card__meta';
|
|
@@ -4012,38 +3914,50 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
4012
3914
|
card.appendChild(notes);
|
|
4013
3915
|
}
|
|
4014
3916
|
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
const
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
3917
|
+
const fields = Array.isArray(suggestion.states) ? suggestion.states : [];
|
|
3918
|
+
const stateGroups = new Map();
|
|
3919
|
+
const isBlind = ['blind', 'blindButtons'].includes(suggestion.detectorType);
|
|
3920
|
+
for (const st of fields) {
|
|
3921
|
+
if (!st || !st.id) continue;
|
|
3922
|
+
const key = String(st.key || '');
|
|
3923
|
+
const role = String(st.role || '');
|
|
3924
|
+
let group = 'Rückmeldungen & Messwerte';
|
|
3925
|
+
if (st.indicator || /^(indicator|sensor\.alarm)(\.|$)/.test(role)) group = 'Gerätestatus';
|
|
3926
|
+
else if (isBlind && key.startsWith('TILT_')) group = 'Lamellen';
|
|
3927
|
+
else if (isBlind && ['OPEN', 'CLOSE', 'STOP'].includes(key)) group = 'Fahrt';
|
|
3928
|
+
else if (isBlind && ['SET', 'ACTUAL'].includes(key)) group = 'Position';
|
|
3929
|
+
else if (suggestion.discoveryReview && !suggestion.importable) group = 'Datenpunkt prüfen';
|
|
3930
|
+
else if (st.write && st.read) group = 'Befehle & Rückmeldungen';
|
|
3931
|
+
else if (st.write) group = 'Befehle';
|
|
3932
|
+
if (!stateGroups.has(group)) stateGroups.set(group, []);
|
|
3933
|
+
stateGroups.get(group).push(st);
|
|
3934
|
+
}
|
|
3935
|
+
for (const [label, states] of stateGroups) {
|
|
3936
|
+
const heading = document.createElement('h3');
|
|
3937
|
+
heading.className = 'nw-shcfg-detect-state-group';
|
|
3938
|
+
heading.textContent = label;
|
|
3939
|
+
card.appendChild(heading);
|
|
3940
|
+
const grid = document.createElement('div');
|
|
3941
|
+
grid.className = 'nw-shcfg-detect-card__states';
|
|
3942
|
+
for (const st of states) {
|
|
3943
|
+
const cell = document.createElement('div');
|
|
3944
|
+
cell.className = 'nw-shcfg-detect-state';
|
|
3945
|
+
const title = document.createElement('div');
|
|
3946
|
+
title.className = 'nw-shcfg-detect-state__key';
|
|
3947
|
+
const stateLabel = st.label && typeof st.label === 'object' ? (st.label.de || st.label.en) : st.label;
|
|
3948
|
+
title.textContent = stateLabel || st.key || 'Datenpunkt';
|
|
3949
|
+
const id = document.createElement('div');
|
|
3950
|
+
id.className = 'nw-shcfg-detect-state__id';
|
|
3951
|
+
id.textContent = st.id;
|
|
3952
|
+
const meta = document.createElement('div');
|
|
3953
|
+
meta.className = 'nw-shcfg-detect-state__meta';
|
|
3954
|
+
const direction = st.read && st.write ? 'Lesen & Schreiben' : st.write ? 'Schreiben' : st.read ? 'Lesen' : '';
|
|
3955
|
+
meta.textContent = [direction, st.role, st.unit].filter(Boolean).join(' · ');
|
|
3956
|
+
cell.append(title, id, meta);
|
|
3957
|
+
grid.appendChild(cell);
|
|
3958
|
+
}
|
|
3959
|
+
card.appendChild(grid);
|
|
3960
|
+
}
|
|
4047
3961
|
|
|
4048
3962
|
// Aktualisierung ist immer eine ausdrückliche Feldwahl. Insbesondere
|
|
4049
3963
|
// manuelle Namen/Zuordnungen werden niemals vorausgewählt oder ersetzt.
|
|
@@ -4146,7 +4060,7 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
4146
4060
|
});
|
|
4147
4061
|
return options;
|
|
4148
4062
|
};
|
|
4149
|
-
if (!suggestion.alreadyConfigured && !suggestion.imported) {
|
|
4063
|
+
if (suggestion.importable && !suggestion.alreadyConfigured && !suggestion.imported) {
|
|
4150
4064
|
actions.appendChild(mkSelect('Raum', withSuggestions(rooms, hints.rooms), assignment.roomId || '', (next) => {
|
|
4151
4065
|
assignment.roomId = next || '';
|
|
4152
4066
|
}));
|
|
@@ -4165,8 +4079,12 @@ function nwRenderShcfgDetectorDetails(root, suggestionId) {
|
|
|
4165
4079
|
importBtn.textContent = 'Bereits im Projekt';
|
|
4166
4080
|
importBtn.disabled = true;
|
|
4167
4081
|
} else if (!suggestion.importable) {
|
|
4168
|
-
importBtn.textContent = 'Manuell
|
|
4169
|
-
importBtn.disabled =
|
|
4082
|
+
importBtn.textContent = 'Manuell zuordnen';
|
|
4083
|
+
importBtn.disabled = !!det.importing;
|
|
4084
|
+
importBtn.addEventListener('click', () => {
|
|
4085
|
+
nwShcState.ui.detectorDialog?.close();
|
|
4086
|
+
nwOpenSetupEditor('device');
|
|
4087
|
+
});
|
|
4170
4088
|
} else {
|
|
4171
4089
|
importBtn.textContent = det.importing ? 'Alias-Anlage läuft …' : 'Übernehmen';
|
|
4172
4090
|
importBtn.disabled = !!det.importing;
|
|
@@ -8256,7 +8174,7 @@ function nwMountDeviceControlProfile(container, dev, expanded = false) {
|
|
|
8256
8174
|
helper.mount(container, dev.io && dev.io.deviceControls, {
|
|
8257
8175
|
expanded,
|
|
8258
8176
|
fixedProfile: dev.customView && dev.customView.kind ? 'custom_' + dev.customView.kind : undefined,
|
|
8259
|
-
createDpInput: (label, value, onChange) => nwCreateDpInput(label, value, onChange, { allowWriteTest: false }),
|
|
8177
|
+
createDpInput: (label, value, onChange, profileHint) => nwCreateDpInput(label, value, onChange, { allowWriteTest: false, profileHint }),
|
|
8260
8178
|
onChange: mapping => {
|
|
8261
8179
|
if (!currentEditor()) return;
|
|
8262
8180
|
dev.io = dev.io || {};
|
|
@@ -8297,8 +8215,10 @@ function nwCreateDpInput(labelText, value, onChange, options = {}) {
|
|
|
8297
8215
|
btnPick.addEventListener('click', () => {
|
|
8298
8216
|
if (!currentEditor()) return;
|
|
8299
8217
|
nwOpenDatapointDialog({
|
|
8300
|
-
title: labelText,
|
|
8218
|
+
title: options.profileHint ? options.profileHint.label + ' · ' + labelText : labelText,
|
|
8301
8219
|
initial: input.value,
|
|
8220
|
+
profileHint: options.profileHint,
|
|
8221
|
+
onManual: () => { if (currentEditor() && input.isConnected) input.focus(); },
|
|
8302
8222
|
onSelect: (id) => {
|
|
8303
8223
|
if (!currentEditor()) return;
|
|
8304
8224
|
input.value = id || '';
|
|
@@ -10093,9 +10013,14 @@ async function nwDpFetchJson(url) {
|
|
|
10093
10013
|
* Zusammenhang: Teil von SmartHome: Räume, Geräte, Kacheln, Popover; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
10094
10014
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
10095
10015
|
*/
|
|
10096
|
-
async function nwDpSearch(q) {
|
|
10097
|
-
const
|
|
10098
|
-
|
|
10016
|
+
async function nwDpSearch(q, hint) {
|
|
10017
|
+
const params = new URLSearchParams({ q: nwDpSafeStr(q), limit: '500' });
|
|
10018
|
+
if (hint) {
|
|
10019
|
+
params.set('direction', hint.direction);
|
|
10020
|
+
params.set('types', hint.types.join(','));
|
|
10021
|
+
if (hint.roles.length) params.set('roles', hint.roles.join(','));
|
|
10022
|
+
}
|
|
10023
|
+
const json = await nwDpFetchJson('/api/smarthome/dpsearch?' + params.toString());
|
|
10099
10024
|
return Array.isArray(json.results) ? json.results : [];
|
|
10100
10025
|
}
|
|
10101
10026
|
/**
|
|
@@ -10133,6 +10058,7 @@ function nwDpMetaText(it) {
|
|
|
10133
10058
|
if (it && it.role) parts.push(String(it.role));
|
|
10134
10059
|
if (it && it.type) parts.push(String(it.type));
|
|
10135
10060
|
if (it && it.unit) parts.push(String(it.unit));
|
|
10061
|
+
if (it && (it.read === true || it.write === true)) parts.push(it.read && it.write ? 'Lesen/Schreiben' : it.read ? 'Lesen' : 'Schreiben');
|
|
10136
10062
|
return parts.join(' • ');
|
|
10137
10063
|
}
|
|
10138
10064
|
/**
|
|
@@ -10294,7 +10220,11 @@ function nwEnsureDpDialog() {
|
|
|
10294
10220
|
|
|
10295
10221
|
searchRow.appendChild(input);
|
|
10296
10222
|
searchRow.appendChild(searchBtn);
|
|
10297
|
-
|
|
10223
|
+
const manualBtn = document.createElement('button');
|
|
10224
|
+
manualBtn.type = 'button';
|
|
10225
|
+
manualBtn.className = 'nw-config-btn nw-config-btn--ghost';
|
|
10226
|
+
manualBtn.textContent = 'Datenpunkt-ID manuell eingeben';
|
|
10227
|
+
manualBtn.hidden = true;
|
|
10298
10228
|
const toolsRow = document.createElement('div');
|
|
10299
10229
|
toolsRow.className = 'nw-dp-dialog__tools';
|
|
10300
10230
|
|
|
@@ -10310,6 +10240,7 @@ function nwEnsureDpDialog() {
|
|
|
10310
10240
|
|
|
10311
10241
|
toolsRow.appendChild(rootBtn);
|
|
10312
10242
|
toolsRow.appendChild(upBtn);
|
|
10243
|
+
toolsRow.appendChild(manualBtn);
|
|
10313
10244
|
|
|
10314
10245
|
const breadcrumb = document.createElement('div');
|
|
10315
10246
|
breadcrumb.className = 'nw-dp-breadcrumb';
|
|
@@ -10361,14 +10292,22 @@ function nwEnsureDpDialog() {
|
|
|
10361
10292
|
upBtn,
|
|
10362
10293
|
breadcrumb,
|
|
10363
10294
|
treeWrap,
|
|
10295
|
+
resultsTitle,
|
|
10364
10296
|
resultsWrap,
|
|
10297
|
+
manualBtn,
|
|
10365
10298
|
searchTimer: null,
|
|
10299
|
+
searchSequence: 0,
|
|
10366
10300
|
treePrefix: '',
|
|
10367
10301
|
token: 0,
|
|
10368
10302
|
};
|
|
10369
10303
|
|
|
10370
10304
|
// Ereignis-Kommentar: Bindet das UI-Ereignis 'click' an btnClose. Beim Umbau prüfen, welche DOM-Elemente/States dadurch geändert werden.
|
|
10371
10305
|
btnClose.addEventListener('click', () => nwCloseDatapointDialog());
|
|
10306
|
+
manualBtn.addEventListener('click', () => {
|
|
10307
|
+
const onManual = nwDpDialogCurrent?.onManual;
|
|
10308
|
+
nwCloseDatapointDialog();
|
|
10309
|
+
if (typeof onManual === 'function') onManual();
|
|
10310
|
+
});
|
|
10372
10311
|
// Ereignis-Kommentar: Bindet das UI-Ereignis 'click' an searchBtn. Beim Umbau prüfen, welche DOM-Elemente/States dadurch geändert werden.
|
|
10373
10312
|
searchBtn.addEventListener('click', () => { nwRunDatapointDialogSearch().catch(() => {}); });
|
|
10374
10313
|
// Ereignis-Kommentar: Bindet das UI-Ereignis 'click' an rootBtn. Beim Umbau prüfen, welche DOM-Elemente/States dadurch geändert werden.
|
|
@@ -10486,7 +10425,14 @@ function nwRenderDpDialogTree(children) {
|
|
|
10486
10425
|
}
|
|
10487
10426
|
|
|
10488
10427
|
if (child.isState) {
|
|
10489
|
-
|
|
10428
|
+
const hint = nwDpDialogCurrent?.profileHint;
|
|
10429
|
+
if (hint) {
|
|
10430
|
+
const candidate = window.NW_SH_DEVICE_CONFIG.profileCandidate(child, hint);
|
|
10431
|
+
if (!candidate) return;
|
|
10432
|
+
wrap.appendChild(nwCreateDpResultRow(id, nwDpProfileMetaText(candidate), () => nwDpDialogPick(id)));
|
|
10433
|
+
} else {
|
|
10434
|
+
wrap.appendChild(nwCreateDpResultRow(id, nwDpMetaText(child) || 'Datenpunkt', () => nwDpDialogPick(id)));
|
|
10435
|
+
}
|
|
10490
10436
|
return;
|
|
10491
10437
|
}
|
|
10492
10438
|
|
|
@@ -10497,6 +10443,43 @@ function nwRenderDpDialogTree(children) {
|
|
|
10497
10443
|
wrap.innerHTML = '<div class="nw-config-empty">Keine Einträge.</div>';
|
|
10498
10444
|
}
|
|
10499
10445
|
}
|
|
10446
|
+
|
|
10447
|
+
/** Begründet einen Profilvorschlag anhand der sichtbaren Metadaten. */
|
|
10448
|
+
function nwDpProfileMetaText(candidate) {
|
|
10449
|
+
const reason = candidate.match === 'role' ? 'Passende Rolle'
|
|
10450
|
+
: candidate.match === 'name' ? 'Namenshinweis · Funktion prüfen' : 'Rolle prüfen';
|
|
10451
|
+
return nwDpMetaText(candidate) + ' • ' + reason;
|
|
10452
|
+
}
|
|
10453
|
+
|
|
10454
|
+
/** Zeigt zum Profil passende Rollen zuerst und klappt weitere Typ-Treffer ein. */
|
|
10455
|
+
function nwRenderDpProfileResults(list, hint, wrap) {
|
|
10456
|
+
const candidates = list.slice(0, 500).map(item => window.NW_SH_DEVICE_CONFIG.profileCandidate(item, hint)).filter(Boolean);
|
|
10457
|
+
const primary = candidates.filter(item => item.match !== 'type');
|
|
10458
|
+
const other = candidates.filter(item => item.match === 'type');
|
|
10459
|
+
const add = (parent, candidates) => {
|
|
10460
|
+
for (const item of candidates) parent.appendChild(nwCreateDpResultRow(item.id, nwDpProfileMetaText(item), () => nwDpDialogPick(item.id)));
|
|
10461
|
+
};
|
|
10462
|
+
add(wrap, primary.filter(item => item.match === 'role'));
|
|
10463
|
+
add(wrap, primary.filter(item => item.match === 'name'));
|
|
10464
|
+
if (other.length && (hint.roles.length || hint.keywords.length)) {
|
|
10465
|
+
const details = document.createElement('details');
|
|
10466
|
+
const summary = document.createElement('summary');
|
|
10467
|
+
summary.className = 'nw-dp-col-title';
|
|
10468
|
+
summary.textContent = `Weitere Datenpunkte prüfen (${other.length})`;
|
|
10469
|
+
details.appendChild(summary);
|
|
10470
|
+
let shown = false;
|
|
10471
|
+
details.addEventListener('toggle', () => {
|
|
10472
|
+
if (!details.open || shown) return;
|
|
10473
|
+
shown = true;
|
|
10474
|
+
add(details, other);
|
|
10475
|
+
});
|
|
10476
|
+
if (!primary.length) nwSetDpDialogResultsMessage('Kein Treffer mit passender Rolle oder Namen. Weitere Datenpunkte prüfen oder die ID manuell eingeben.');
|
|
10477
|
+
wrap.appendChild(details);
|
|
10478
|
+
} else if (other.length) {
|
|
10479
|
+
add(wrap, other);
|
|
10480
|
+
}
|
|
10481
|
+
if (!candidates.length) nwSetDpDialogResultsMessage('Keine Treffer mit passenden Datentypen und Zugriffsangaben.');
|
|
10482
|
+
}
|
|
10500
10483
|
/**
|
|
10501
10484
|
* Code-Teil: nwRenderDpDialogResults
|
|
10502
10485
|
* Zweck: Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen.
|
|
@@ -10509,6 +10492,12 @@ function nwRenderDpDialogResults(list) {
|
|
|
10509
10492
|
if (!wrap) return;
|
|
10510
10493
|
wrap.innerHTML = '';
|
|
10511
10494
|
|
|
10495
|
+
const hint = nwDpDialogCurrent?.profileHint;
|
|
10496
|
+
if (hint) {
|
|
10497
|
+
nwRenderDpProfileResults(Array.isArray(list) ? list : [], hint, wrap);
|
|
10498
|
+
return;
|
|
10499
|
+
}
|
|
10500
|
+
|
|
10512
10501
|
if (!Array.isArray(list) || !list.length) {
|
|
10513
10502
|
wrap.innerHTML = '<div class="nw-config-empty">Keine Treffer.</div>';
|
|
10514
10503
|
return;
|
|
@@ -10533,16 +10522,18 @@ function nwRenderDpDialogResults(list) {
|
|
|
10533
10522
|
async function nwRefreshDpDialogTree() {
|
|
10534
10523
|
const state = nwEnsureDpDialog();
|
|
10535
10524
|
const token = state.token;
|
|
10536
|
-
|
|
10525
|
+
const prefix = state.treePrefix || '';
|
|
10526
|
+
const current = () => nwDpDialogEl?.token === token && state.treePrefix === prefix && state.backdrop.style.display !== 'none';
|
|
10527
|
+
nwRenderDpBreadcrumb(prefix, state.breadcrumb, nwOpenDpDialogPrefix);
|
|
10537
10528
|
nwSetDpDialogTreeMessage('Ordner werden geladen…');
|
|
10538
10529
|
try {
|
|
10539
|
-
const children = await nwDpTree(
|
|
10540
|
-
if (!
|
|
10541
|
-
nwRenderDpBreadcrumb(
|
|
10530
|
+
const children = await nwDpTree(prefix);
|
|
10531
|
+
if (!current()) return;
|
|
10532
|
+
nwRenderDpBreadcrumb(prefix, state.breadcrumb, nwOpenDpDialogPrefix);
|
|
10542
10533
|
nwRenderDpDialogTree(children);
|
|
10543
10534
|
} catch (e) {
|
|
10544
|
-
if (!
|
|
10545
|
-
nwRenderDpBreadcrumb(
|
|
10535
|
+
if (!current()) return;
|
|
10536
|
+
nwRenderDpBreadcrumb(prefix, state.breadcrumb, nwOpenDpDialogPrefix);
|
|
10546
10537
|
nwSetDpDialogTreeMessage('Fehler: ' + (e && e.message ? e.message : e), 'error');
|
|
10547
10538
|
state.upBtn.disabled = !state.treePrefix;
|
|
10548
10539
|
state.rootBtn.disabled = !state.treePrefix;
|
|
@@ -10557,18 +10548,23 @@ async function nwRefreshDpDialogTree() {
|
|
|
10557
10548
|
async function nwRunDatapointDialogSearch() {
|
|
10558
10549
|
const state = nwEnsureDpDialog();
|
|
10559
10550
|
const token = state.token;
|
|
10551
|
+
const sequence = ++state.searchSequence;
|
|
10560
10552
|
const q = nwDpSafeStr(state.input.value || '');
|
|
10561
|
-
|
|
10553
|
+
const hint = nwDpDialogCurrent?.profileHint;
|
|
10554
|
+
const current = () => nwDpDialogEl?.token === token && state.searchSequence === sequence
|
|
10555
|
+
&& nwDpSafeStr(state.input.value || '') === q && state.backdrop.style.display !== 'none';
|
|
10556
|
+
if (!q && !hint) {
|
|
10562
10557
|
nwSetDpDialogResultsMessage('Suchbegriff eingeben…');
|
|
10563
10558
|
return;
|
|
10564
10559
|
}
|
|
10565
10560
|
nwSetDpDialogResultsMessage('Suche läuft…');
|
|
10566
10561
|
try {
|
|
10567
|
-
const
|
|
10568
|
-
|
|
10562
|
+
const query = hint ? window.NW_SH_DEVICE_CONFIG.profileSearchQuery(q, hint) : q;
|
|
10563
|
+
const list = await nwDpSearch(query, hint);
|
|
10564
|
+
if (!current()) return;
|
|
10569
10565
|
nwRenderDpDialogResults(list);
|
|
10570
10566
|
} catch (e) {
|
|
10571
|
-
if (!
|
|
10567
|
+
if (!current()) return;
|
|
10572
10568
|
nwSetDpDialogResultsMessage('Fehler: ' + (e && e.message ? e.message : e), 'error');
|
|
10573
10569
|
}
|
|
10574
10570
|
}
|
|
@@ -10592,22 +10588,40 @@ function nwOpenDpDialogPrefix(prefix) {
|
|
|
10592
10588
|
function nwOpenDatapointDialog(options) {
|
|
10593
10589
|
const state = nwEnsureDpDialog();
|
|
10594
10590
|
state.token += 1;
|
|
10591
|
+
if (state.searchTimer) { clearTimeout(state.searchTimer); state.searchTimer = null; }
|
|
10592
|
+
const profileHint = typeof window.NW_SH_DEVICE_CONFIG?.profileCandidate === 'function' ? options?.profileHint : undefined;
|
|
10595
10593
|
nwDpDialogCurrent = {
|
|
10596
10594
|
onSelect: options && options.onSelect,
|
|
10595
|
+
onManual: options?.onManual,
|
|
10596
|
+
profileHint,
|
|
10597
10597
|
};
|
|
10598
10598
|
|
|
10599
10599
|
state.title.textContent = (options && options.title) ? options.title : 'Datenpunkt auswählen';
|
|
10600
|
-
|
|
10601
|
-
state.
|
|
10600
|
+
const initial = (options && options.initial) ? String(options.initial) : '';
|
|
10601
|
+
state.input.value = profileHint ? '' : initial;
|
|
10602
|
+
state.input.placeholder = profileHint ? 'Nach Funktion, ID oder Name suchen…' : 'Nach ID oder Name suchen…';
|
|
10603
|
+
state.treePrefix = nwDpParentPrefix(initial);
|
|
10604
|
+
state.resultsTitle.textContent = profileHint ? 'Passende Datenpunkte' : 'Suche';
|
|
10605
|
+
state.manualBtn.hidden = !profileHint;
|
|
10602
10606
|
state.backdrop.style.display = 'flex';
|
|
10603
10607
|
|
|
10604
10608
|
nwRenderDpBreadcrumb(state.treePrefix || '', state.breadcrumb, nwOpenDpDialogPrefix);
|
|
10605
10609
|
nwSetDpDialogTreeMessage('Ordner werden geladen…');
|
|
10606
|
-
if (state.input.value.trim()) nwSetDpDialogResultsMessage('Suche wird vorbereitet…');
|
|
10610
|
+
if (profileHint || state.input.value.trim()) nwSetDpDialogResultsMessage('Suche wird vorbereitet…');
|
|
10607
10611
|
else nwSetDpDialogResultsMessage('Suchbegriff eingeben…');
|
|
10608
10612
|
|
|
10609
|
-
nwRefreshDpDialogTree().catch(() => {});
|
|
10610
|
-
if (
|
|
10613
|
+
const treeReady = nwRefreshDpDialogTree().catch(() => {});
|
|
10614
|
+
if (profileHint) {
|
|
10615
|
+
// Der Objektbaum und die Suche verwenden denselben Cache im Adapter.
|
|
10616
|
+
// Beim Öffnen zuerst die Baumabfrage abwarten, um doppelte Cache-Aufbauten zu vermeiden.
|
|
10617
|
+
const token = state.token;
|
|
10618
|
+
const sequence = state.searchSequence;
|
|
10619
|
+
void treeReady.then(() => {
|
|
10620
|
+
if (state.token === token && state.searchSequence === sequence && !state.input.value.trim()) {
|
|
10621
|
+
return nwRunDatapointDialogSearch().catch(() => {});
|
|
10622
|
+
}
|
|
10623
|
+
});
|
|
10624
|
+
} else if (state.input.value.trim().length >= 2) {
|
|
10611
10625
|
nwRunDatapointDialogSearch().catch(() => {});
|
|
10612
10626
|
}
|
|
10613
10627
|
|
|
@@ -10627,6 +10641,7 @@ function nwOpenDatapointDialog(options) {
|
|
|
10627
10641
|
function nwCloseDatapointDialog() {
|
|
10628
10642
|
if (!nwDpDialogEl) return;
|
|
10629
10643
|
nwDpDialogEl.token += 1;
|
|
10644
|
+
if (nwDpDialogEl.searchTimer) { clearTimeout(nwDpDialogEl.searchTimer); nwDpDialogEl.searchTimer = null; }
|
|
10630
10645
|
nwDpDialogEl.backdrop.style.display = 'none';
|
|
10631
10646
|
nwDpDialogCurrent = null;
|
|
10632
10647
|
}
|