Browse Source
Extend the IoT Hub install dialog so installing a rule chain can also set it as the Default rule chain on a Device or Asset profile in one step. The confirm step shows three actions: Cancel, Install (creates the chain without targeting any profile), and Set for profile (opens a picker step). The picker step has Cancel, Back, and Install — confirming with a profile that already has a non-null defaultRuleChainId routes through a confirm-overwrite step before replacing it. CALCULATED_FIELD keeps its existing single-button flow unchanged. Backend: * RuleChainInstalledItemDescriptor gains a nullable EntityId targetProfileId field, persisted in the existing descriptor JSON column (no schema migration; @JsonIgnoreProperties(ignoreUnknown=true) handles pre-existing rows). * DefaultIotHubService.installRuleChain() now accepts SecurityUser and JsonNode data; a new setAsDefaultRuleChain() helper applies the chain as Default rule chain on the selected DEVICE_PROFILE or ASSET_PROFILE via the existing tbDeviceProfileService / tbAssetProfileService save paths (so the change shows up in the tenant audit log as a normal profile update). Frontend: * iot-hub-install-dialog.component grows a per-ItemType selectEntityConfig map, a 'confirm-overwrite' state, and the methods installAsEntityProfileDefault, selectEntityBack, resolveOverwrite, confirmOverwriteReplace, confirmOverwriteCancel. * tb-entity-select gets a 512px min-width above the gt-sm breakpoint so the picker renders at a consistent width regardless of the prompt text length (mirrors the pattern in recipient-notification-dialog). * New i18n keys: rule-chain-install-desc, rule-chain-install-as-default, select-profile-for-rule-chain, rule-chain-overwrite-title, rule-chain-overwrite-body, rule-chain-overwrite-replace.pull/15645/head
6 changed files with 234 additions and 13 deletions
Loading…
Reference in new issue