User Tools
This is an old revision of the document!
Table of Contents
MDC Translator Ui Configuration for Mobile
— Anna Dowling 2022/05/27 11:25
Overview
The mdc-translator application is leveraged for both mobile and ems-nova to process performance and configuration parameters and assign UiProperty entries to them. At a high level these values can be configured using YAML files per technology which are loaded on bootstrap by the translator application. They can also be inserted via the database directly. (See translator README linked above for more information).
These entries are used to render the performance and configuration cards on the device or component overview pages in mobile. If a UiProperty is found on a parameter object, it uses the UiProperty specification to attempt to render the parameter in a card. The same object can be used across both mobile and nova to prevent duplication of technology entries.
See sample of UiProperty object for mobile below:
"uiProperty": [
{
"title": "PSU Current 1",
"uiType": "GAUGE",
"row": 2,
"column": 1,
"order": 12,
"uiCategory": "POWER",
"properties": {
"showOnComponent": "true",
"showOnOverView": "true"
}
}
],
Description of Fields
- title - will render on parameter card / list entry instead of prettyName or key if specified
- uiType - not needed for mobile but used in nova to show different card types
- row - not needed for mobile but used in nova to determine how many rows card takes up
- column - not needed for mobile but used in nova to determine how many columns card takes up
- order - determines card order - used in both apps
- uiCategory - used in nova to customise performanceIcon displayed for parameter. For full list of icons see: performance icons dir
- properties: properties are configured via the translator key_value table. Mobile has a few extra properties that can be used to further control the ui. These are:
- showOnOverView : boolean - true / false (Controls device overview parameter display. Defaults to true if property not set but UiProperty is found for parameter)
- showOnComponent: boolean - true / false (Controls component overview parameter display. Defaults to true if property not set but UiProperty is found for parameter and matches component id / discoveredName)
- mobileUiTag: string - RANGE_SLIDER / INPUT_TEXT / INPUT_SELECT (Defaults to '', used on parameter edit card to render different ui types for configuration values)