eclipse / hawkbit

Eclipse hawkBit™
https://projects.eclipse.org/projects/iot.hawkbit
Eclipse Public License 2.0
444 stars 186 forks source link

Feature Request: Default distribution set name by type #1733

Open lizziemac opened 1 month ago

lizziemac commented 1 month ago

Currently, when creating a distribution set, users need to manually input a name for the set. To streamline this process and improve user experience, it would be nice if we could add a feature that automatically sets a default name for the distribution set based on its type, if no other name is provided.

Proposed Solution

Benefits

Example

User creates a distribution set type with the following body:

[
    {
        "key" : "device-revA-release",
        "colour" : "#0000FF",
        "name" : "Device Release (hw rev A)",
        "description" : "This distribution set contains any artifacts required for a release to Company Devices with hardware revision A",
        "defaultName": "Device Release",
        "optionalmodules" : [
           {
                "id": 1
            }, 
        ]
    }
]

User then creates a distribution set (note that the name is not provided):

[
  {
    "version": "1.0.2",
    "requiredMigrationStep": false,
    "modules": [
      {
        "id": 1
      }
    ],
    "type": "device-revA-release"
  }
]

with the (partial) response

{
            "name": "Device Release",
            "description": "",
            "version": "1.0.2",
            "modules": [],
            "requiredMigrationStep": false,
            "type": "os_app",
            "typeName": "OS with app(s)",
            "complete": true,
            "deleted": false,
            "valid": true,
            "_links": {
                "self": {
                    "href": "http://hawkbit.go/rest/v1/distributionsets/42"
                }
            },
            "id": 42
        }