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.
The PR introduces a new UX for the creation, publishing and loading of Schemas as a reusable resource. The previous version only allowed the creation of a new resource from scratch.
The new UX is defined by a controlled finite state machine based on the three properties of a schema: name, version and the couple type + content
stateDiagram-v2
[*] --> DRAFT: create
[*] --> VERSION_N: load
DRAFT --> DRAFT: select type
DRAFT --> DRAFT: edit content
DRAFT --> DRAFT: create new name
DRAFT --> VERSION_LATEST: select name
VERSION_N:::namedSchema --> VERSION_LATEST: select name
VERSION_N --> DRAFT: create new name
VERSION_LATEST:::namedSchema --> DRAFT: create new name
VERSION_LATEST --> VERSION_N: select version
VERSION_N --> VERSION_N: select version
VERSION_LATEST --> MODIFIED: edit content
VERSION_N --> MODIFIED: edit content
DRAFT --> [*]: publish
VERSION_N --> [*]: publish
VERSION_LATEST --> [*]: publish
MODIFIED --> [*]: publish
classDef namedSchema fill:#f96,color:black
the name of a schema renders a select widget with the list of all existing schemas.
Selecting one listed schema will populate the name property and set the version, type and content from the selected family. The type cannot be changed anymore
the name select widget also offers the possibility to create a new schema from scratch, setting the type and content to the default (JSON) and the version to DRAFT (cannot be changed).
When on DRAFT, the type can be changed (JSON to PROTOBUF), the content will be populated by default and can be modified freely until ready for publishing
When on a selected schema, the version can be changed to one of the listed versions (created in previous policies). The content is updated accordingly.
When on a selected schema, the content can be edited and changed. The version is therefore changed to MODIFIED (and cannot be modified anymore), and the content is freely modified from that point.
The current state of the schema can be changed again by modifying the name as above and starting the whole process from the original state.
When the schema is ready for publishing, the version will trigger the right process:
if DRAFT, a new schema resource is created and linked to the policy
if MODIFIED, a new version of the schema is created (incremented by 1 from the latest) and linked to the policy
if a number, the existing policy is linked to the policy (no new instance of the schema created)
The UX described above allows a controlled versioning of resources, schema in this PR. It will be also applied to script.
See https://hivemq.kanbanize.com/ctrl_board/57/cards/20143/details/
The PR introduces a new UX for the creation, publishing and loading of
Schemas
as a reusable resource. The previous version only allowed the creation of a new resource from scratch.The new UX is defined by a controlled finite state machine based on the three properties of a
schema
:name
,version
and the coupletype
+content
name
of a schema renders a select widget with the list of all existing schemas.name
property and set theversion
,type
andcontent
from the selected family. Thetype
cannot be changed anymorename
select widget also offers the possibility to create a new schema from scratch, setting thetype
andcontent
to the default (JSON) and theversion
to DRAFT (cannot be changed).type
can be changed (JSON to PROTOBUF), thecontent
will be populated by default and can be modified freely until ready for publishingschema
, the version can be changed to one of the listed versions (created in previous policies). Thecontent
is updated accordingly.schema
, the content can be edited and changed. Theversion
is therefore changed toMODIFIED
(and cannot be modified anymore), and thecontent
is freely modified from that point.schema
can be changed again by modifying thename
as above and starting the whole process from the original state.version
will trigger the right process:schema
resource is created and linked to the policyversion
of the schema is created (incremented by 1 from the latest) and linked to the policyThe UX described above allows a controlled versioning of resources,
schema
in this PR. It will be also applied toscript
.Before
After