Kaa releases
Shortcuts
Skip to end of metadata
Go to start of metadata

This guide explains how to work with Avro UI forms. Avro UI forms are GUI components in the Admin UI that allow you to create Kaa schemas and enter corresponding data records without using the Avro/JSON syntax.

This guide also explains how to use Avro UI forms GWT Sandbox, which is a testing environment for Avro UI forms.

Avro UI form types

There are two Avro UI form types: a schema form and a record form.

Schema form

A schema form allows the user (tenant developer) to create Kaa schemas (profile, configuration, notification, and log schemas) for applications in Admin UI.

It consists of a header with the general schema info, such as the name, namespace, and display name, and the Fields section where you can add fields to your schema.

NOTE
You can also upload a schema from a file using the Upload from file option. In this case, the schema must be provided in the JSON format.

Record form

A record form allows the user (tenant developer) to enter data records according to corresponding Kaa schemas (configuration and notification schemas) for applications in Admin UI.

A record form contains the fields according to the corresponding schema.

NOTE
You can also upload data from a file using the Upload from file option. In this case, the data must be provided in the JSON format.

Working with schema form

An example of a schema form usage is creating a new configuration schema.

  1. Open the Configuration schemas window for some application in Admin UI and then click Add schema.
  2. In the Configuration schema schema form, specify the name, namespace, and display name of the record.
  3. To add a new field, click Add in the Fields section in the form.
  4. On the Add new Field page of the form, specify the field parameters as required and select the field type.
  5. Depending on the selected field type, specify additional parameters for the field.
  6. Click Add to finish adding the field.
  7. In a similar way, add as many fields as necessary and then save the schema (see Administration UI guide for details).

Working with record form

An example of a record form usage is adding new configuration data to an endpoint group.

  1. Open the Endpoint groups window for some application in Admin UI and click on some endpoint group.
  2. Scroll down to the Configurations form and then click Add configuration.
  3. Specify the field values in the Configuration body record form and then click Save to save the configuration.
  4. To apply the new configuration, click Activate.

Avro UI forms GWT Sandbox

To generate an Avro UI record form, proceed as follows:

  1. Create an Avro schema in the schema form or, alternatively, click Upload from JSON and paste your schema into the text field.
  2. Click Generate form.

  3. (Optional) To view the generated schema in the JSON format, click Show JSON under the schema form.

To view the JSON record for the data from the record form, enter some data into the field(s) and click Show JSON.

To upload data from the JSON record into the record form, click Upload from JSON, then enter the data into the text field in the JSON format and click Upload.

 

Avro schema parameters

If the Avro schema is added in the JSON format rather than via GUI, the following parameters of the schema determine the layout and values displayed on the Avro UI record form.

  • displayName - displays the name of the field on UI
  • displayNames - displays the name of each enumeration symbol on UI (only for enumeration fields in the schema)
  • displayPrompt - displays the text prompt for the field on UI
  • by_default - displays the default value of the field on UI
  • minRowCount - defines a minimum number of rows in a UI table (only for arrays in the schema)
  • optional - defines whether the field on UI is optional or mandatory
  • weight - defines a relative width of the corresponding column on UI (only for arrays in the schema)
  • keyIndex - defines the order in which the fields of a record are displayed in a row (only for arrays of records in the schema; integer; if this parameter is defined selectively for specific fields of the record, the other fields of the record will not be displayed)
  • overrideStrategy - defines how to merge arrays in the configuration across the endpoint groups (only for arrays in the schema; accepted values are "replace" and "append"; "replace" by default)
  • fieldAccess - defines the viewing and editing restrictions for the field (accepted values are "read_only", "editable" and "hidden"; "editable" by default)
  • inputType - defines whether the characters will be masked or not when the user enters the field value (accepted values are "password" and "plain"; "plain" by default)

Further reading

Use the following guides and references to make the most of Kaa.

Guide
What it is for
Design referenceUse this reference to learn about features and capabilities of Kaa.
Programming guideUse this guide to create your own Kaa applications.
Administration UI guideUse this guide to start working with Kaa Admin UI.

Copyright © 2014-2015, CyberVision, Inc.

  • No labels