Skip to content

Add an Option Field


With option fields, the user can select between different option. For example, they are used for passing fix values for stamps.

For general information about how to customize the PLOSSYS 4 panel, refer to Customize the Panel

Option field in panel


This is how you add an option field to the panel:

  1. Unless done, prepare customized panel configuration files panel-<customer_name>.json and settings-<customer_name>.json. For more information, refer to Customize the Panel.

  2. In both customized panel configuration files, add the option field into the properties list and specify the attributes of the option field, for example, the values which can be selected by the user:

    Example - option field providing different values for the status

    {
        ...
        "properties": {
          ...
          "PLS_STAMP_0": {
            "type": "string",
            "description": "Status",
            "default": "RELEASED",
            "widget": "select",
            "oneOf": [
              {
                "enum": [
                  "RELEASED"
                 ],
                "description": {
                  "de": "Freigegeben",
                  "en": "Released"
                }
              },
              {
                "enum": [
                  "OBS"
                ],
                "description": {
                  "de": "Obsolet",
                  "en": "Obsolete"
                }
              },
              {
                "enum": [
                  "LOCKED"
                ],
                "description": {
                  "de": "Gesperrt",
                  "en": "Locked"
                  }
               }
            ]
          }
          ...
        }
        ...
    }
    
  3. In both customized panel configuration files, add the option field to the fieldsets at the place where you want to have it in the panel:

    Example

    {
        ...
        "fieldsets": {
          ...
          "fields": {
            ...
            "PLS_STAMP_0",
            ...
          },
          ...
        }
        ...
    }
    
  4. Restart the following services:

    • seal-operator-p4

    • seal-operator-server


Back to top