Skip to content

Configuration Item List

Sébastien Gallou edited this page Jun 3, 2024 · 4 revisions

List

This type allows the user to make list of items of same type. The item type can be a simple type or a container. the user can add / delete / modify each item instance in the list. The developper can allow item instance to be duplicated, and can limit the minimal and maximal quantity of item instances.

Non optionnal fields

Type descriptor

This field define the type as a list

"type" : "list"

Item

The item section contains all configuration fields that have to be in each item.

"item" : {
           "type": "section",
           "name": "",
           "description": "",				
           "content": {
               "string" : {
                   "type" : "string",
                   "name" : "String parameter",
                   "description" : "type as string"
               },
               "color": {
                   "type": "color",
                   "name" : "Color parameter",
                   "description" : "type as color",
                   "defaultValue": "#00FF00"
               }
           }
       }

Optionnal fields

Minimum number of item

This parameter permits to set the minimum items that must have into the list in order to be valid. There is no minimum by default.

"nbItemsMin": "1"

Maximum number of item

This parameter permits to set the maximum items into the list. There is no maximum by default.

"nbItemsMax": "5"

Duplication allowed

This parameter add a button to duplicate an item in the list. This function is deactivated by default.

"allowDuplication": "true"

Example

"listSection": {
    "type": "section",
    "name": "List of items",
    "description": "Here is an example of list items",
    "content": {
        "listItems": {
            "type": "list",
            "name": "List parameter",
            "description": "type as list",
            "nbItemsMin": "1",
            "nbItemsMax": "5",
            "allowDuplication": "true",
            "item": {
                "type": "section",
                "name": "",
                "description": "",				
                "content": {
                    "string" : {
                        "type" : "string",
                        "name" : "String parameter",
                        "description" : "type as string"
                    },
                    "color": {
                        "type": "color",
                        "name" : "Color parameter",
                        "description" : "type as color",
                        "defaultValue": "#00FF00"
                    }
                }
            }
        }
    }
}

Clone this wiki locally