A set of functions used to render the Service Level associated with a Thing in different ways.
This filter provides a built-in set of icons and colors associated with common service level names (gold, silver, bronze, basic, premium, free).
In addition, you can register your own icons and colors by using the registerServiceLevel(serviceLevelName, iconName, color)
function into the Custom Filters component.
The serviceLevelName
parameter is ignore-case.
The iconName
parameter is the name of a FontAwesome 5 icon, but in the alternative you can also use the Material Icons names by adding the mi
prefix (e.g. mi license).
Here are two example of custom service level icon and color registration.
// FontAwesome 5 icons
registerServiceLevel("gold", "medal", "#FFAD25");
// Material icons
registerServiceLevel("premium", "mi license", "#FFAD25");
Filter Variants
The set of predefined filter variants that can be used to format values.
Service Level | Prints out the service level as icon and name. Name: serviceLevel Input Types: ANY Output Type: HTML |
Service Level Icon | Prints out the service level as icon only. Name: serviceLevelIcon Input Types: ANY Output Type: HTML |
Service Level Text | Prints out the service level as name only. Name: serviceLevelText Input Types: ANY Output Type: STRING |