hivemq / hivemq-edge

HiveMQ Edge is an MQTT gateway that enables interoperability between OT devices and IT systems. It translates diverse protocols into MQTT for streamlined communication and helps organize data into a unified namespace, making managing and streaming data across your infrastructure easier.
http://hivemq.com
Apache License 2.0
92 stars 21 forks source link

feat(18960): Add connectivity and payload checks for behavior and transitions #282

Closed vanch3d closed 5 months ago

vanch3d commented 5 months ago

See https://hivemq.kanbanize.com/ctrl_board/57/cards/18960/details/

This PR is one part of the "connectivity and payload" epic.

It implements the UX allowing users to select a model in a Behavior Policy node and the relevant event and state in the connected Transition node

The design of the feature required a few elements:

Note that the UX is experimental, trying to render what is in effect three interdependent configuration properties (transition, fromState and toState) into a single flow. It doesn't cover all the use cases yet (in particular, the Any.* state is not offered)

Also worth noting is that the reactFlow visualisation of the FSM, which offers the best potential for user interaction, requires an external layout library (https://github.com/kieler/elkjs) that is almost doubling the size of the runtime bundle!

dist/assets/index-b2957c85.js                                1,961.89 kB │ gzip: 623.56 kB
dist/assets/index-5957e81e.js                                3,442.76 kB │ gzip: 1,075.01 kB

Out-of-scope

Before

screenshot-localhost_3000-2024 02 08-09_52_53

After

screenshot-localhost_3000-2024 02 08-09_46_02

screenshot-localhost_3000-2024 02 08-13_37_16

Screenshot 2024-02-08 at 09 46 52

screenshot-localhost_3000-2024 02 08-09_49_03