From 80cfd894216be29a522ed4e752c05175837a1d0b Mon Sep 17 00:00:00 2001 From: ViacheslavKlimov Date: Mon, 24 Apr 2023 15:47:31 +0300 Subject: [PATCH] Fix and update help pages for notification templates --- .../app/shared/models/notification.models.ts | 11 ++-- .../assets/help/en_US/notification/alarm.md | 43 +++++++------- .../en_US/notification/alarm_assignment.md | 59 ++++++++++--------- .../help/en_US/notification/alarm_comment.md | 53 +++++++++-------- .../en_US/notification/api_usage_limit.md | 40 +++++++------ .../en_US/notification/device_activity.md | 39 ++++++------ .../help/en_US/notification/entities_limit.md | 36 +++++------ .../help/en_US/notification/entity_action.md | 48 +++++++-------- .../assets/help/en_US/notification/general.md | 19 +++--- .../notification/new_platform_version.md | 31 +++++----- .../help/en_US/notification/rule_engine.md | 54 ----------------- .../rule_engine_lifecycle_event.md | 37 ++++++------ .../help/en_US/notification/rule_node.md | 57 ++++++++++++++++++ 13 files changed, 276 insertions(+), 251 deletions(-) delete mode 100644 ui-ngx/src/assets/help/en_US/notification/rule_engine.md create mode 100644 ui-ngx/src/assets/help/en_US/notification/rule_node.md diff --git a/ui-ngx/src/app/shared/models/notification.models.ts b/ui-ngx/src/app/shared/models/notification.models.ts index 2bb00fe745..23a6c08304 100644 --- a/ui-ngx/src/app/shared/models/notification.models.ts +++ b/ui-ngx/src/app/shared/models/notification.models.ts @@ -101,9 +101,10 @@ interface SlackNotificationDeliveryMethodConfig { export interface SlackConversation { id: string; title: string; - shortName: string; + name: string; wholeName: string; email: string; + type: string; } export interface NotificationRule extends Omit, 'label'>{ @@ -443,7 +444,7 @@ export enum NotificationType { ENTITIES_LIMIT = 'ENTITIES_LIMIT', API_USAGE_LIMIT = 'API_USAGE_LIMIT', NEW_PLATFORM_VERSION = 'NEW_PLATFORM_VERSION', - RULE_ENGINE = 'RULE_ENGINE' + RULE_NODE = 'RULE_NODE' } export const NotificationTypeIcons = new Map([ @@ -543,10 +544,10 @@ export const NotificationTemplateTypeTranslateMap = new Map
-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *alarmType* - alarm type; - * *action* - one of: 'created', 'severity changed', 'acknowledged', 'cleared', 'deleted'; - * *alarmId* - the alarm id as uuid string; - * *alarmSeverity* - alarm severity (lower case); - * *alarmStatus* - the alarm status; - * *alarmOriginatorEntityType* - the entity type of the alarm originator, e.g. 'Device'; - * *alarmOriginatorName* - the name of the alarm originator, e.g. 'Sensor T1'; - * *alarmOriginatorId* - the alarm originator entity id as uuid string; - -Parameter names must be wrapped using `${...}`. For example: `${action}`. +* `alarmType` - alarm type; +* `action` - one of: 'created', 'severity changed', 'acknowledged', 'cleared', 'deleted'; +* `alarmId` - the alarm id as uuid string; +* `alarmSeverity` - alarm severity (lower case); +* `alarmStatus` - the alarm status; +* `alarmOriginatorEntityType` - the entity type of the alarm originator, e.g. 'Device'; +* `alarmOriginatorName` - the name of the alarm originator, e.g. 'Sensor T1'; +* `alarmOriginatorId` - the alarm originator entity id as uuid string; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${action}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples - * Let's assume the notification about new alarm with type 'High Temperature' for device 'Sensor A'. The following template: +Let's assume the notification about new alarm with type 'High Temperature' for device 'Sensor A'. +The following template: ```text Alarm '${alarmType}' - ${action:upperCase} @@ -42,9 +45,10 @@ will be transformed to: ```text Alarm 'High Temperature' - CREATED -{:copy-code} ``` +
+ The following template: ```text @@ -56,7 +60,6 @@ will be transformed to: ```text Device - Sensor A -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/alarm_assignment.md b/ui-ngx/src/assets/help/en_US/notification/alarm_assignment.md index c4ff27d333..985aaadb95 100644 --- a/ui-ngx/src/assets/help/en_US/notification/alarm_assignment.md +++ b/ui-ngx/src/assets/help/en_US/notification/alarm_assignment.md @@ -3,42 +3,47 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *alarmType* - alarm type; - * *alarmId* - the alarm id as uuid string; - * *alarmSeverity* - alarm severity (lower case); - * *alarmStatus* - the alarm status; - * *alarmOriginatorEntityType* - the entity type of the alarm originator, e.g. 'Device'; - * *alarmOriginatorName* - the name of the alarm originator, e.g. 'Sensor T1'; - * *alarmOriginatorId* - the alarm originator entity id as uuid string; - * *assigneeEmail* - email of the assignee; - * *assigneeFirstName* - first name of the assignee; - * *assigneeLastName* - last name of the assignee; - * *assigneeId* - the id of the assignee as uuid string; - * *userEmail* - email of the user who made the action; - * *userFirstName* - first name of the user who made the action; - * *userLastName* - last name of the user who made the action; - * *action* - one of: 'assigned', 'unassigned'; - -Parameter names must be wrapped using `${...}`. For example: `${action}`. +* `alarmType` - alarm type; +* `alarmId` - the alarm id as uuid string; +* `alarmSeverity` - alarm severity (lower case); +* `alarmStatus` - the alarm status; +* `alarmOriginatorEntityType` - the entity type of the alarm originator, e.g. 'Device'; +* `alarmOriginatorName` - the name of the alarm originator, e.g. 'Sensor T1'; +* `alarmOriginatorId` - the alarm originator entity id as uuid string; +* `assigneeTitle` - title of the assignee; +* `assigneeEmail` - email of the assignee; +* `assigneeFirstName` - first name of the assignee; +* `assigneeLastName` - last name of the assignee; +* `assigneeId` - the id of the assignee as uuid string; +* `userTitle` - title of the user who made the action; +* `userEmail` - email of the user who made the action; +* `userFirstName` - first name of the user who made the action; +* `userLastName` - last name of the user who made the action; +* `action` - one of: 'assigned', 'unassigned'; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${action}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples - * Let's assume the notification about alarm with type 'High Temperature' for device 'Sensor A' was assigned to user 'John Doe'. The following template: +Let's assume the notification about alarm with type 'High Temperature' for device 'Sensor A' was assigned +to user 'John Doe'. The following template: ```text Alarm '${alarmType}' - ${action:upperCase} @@ -49,9 +54,10 @@ will be transformed to: ```text Alarm 'High Temperature' - ASSIGNED -{:copy-code} ``` +
+ The following template: ```text @@ -63,7 +69,6 @@ will be transformed to: ```text Alarm 'High Temperature' (Critical) was assigned to user -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/alarm_comment.md b/ui-ngx/src/assets/help/en_US/notification/alarm_comment.md index 8a008ecf27..3733d160a1 100644 --- a/ui-ngx/src/assets/help/en_US/notification/alarm_comment.md +++ b/ui-ngx/src/assets/help/en_US/notification/alarm_comment.md @@ -3,40 +3,43 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *alarmType* - alarm type; - * *alarmId* - the alarm id as uuid string; - * *alarmSeverity* - alarm severity (lower case); - * *alarmStatus* - the alarm status; - * *alarmOriginatorEntityType* - the entity type of the alarm originator, e.g. 'Device'; - * *alarmOriginatorName* - the name of the alarm originator, e.g. 'Sensor T1'; - * *alarmOriginatorId* - the alarm originator entity id as uuid string; - * *comment* - text of the comment; - * *action* - one of: 'added', 'updated'; - * *userEmail* - email of the user who made the action; - * *userFirstName* - first name of the user who made the action; - * *userLastName* - last name of the user who made the action; - -Parameter names must be wrapped using `${...}`. For example: `${action}`. +* `alarmType` - alarm type; +* `alarmId` - the alarm id as uuid string; +* `alarmSeverity` - alarm severity (lower case); +* `alarmStatus` - the alarm status; +* `alarmOriginatorEntityType` - the entity type of the alarm originator, e.g. 'Device'; +* `alarmOriginatorName` - the name of the alarm originator, e.g. 'Sensor T1'; +* `alarmOriginatorId` - the alarm originator entity id as uuid string; +* `comment` - text of the comment; +* `action` - one of: 'added', 'updated'; +* `userTitle` - title of the user who made the action; +* `userEmail` - email of the user who made the action; +* `userFirstName` - first name of the user who made the action; +* `userLastName` - last name of the user who made the action; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${action}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples - * Let's assume the notification about alarm with type 'High Temperature' for device 'Sensor A' was assigned to user 'John Doe'. - The following template: +Let's assume the notification about alarm with type 'High Temperature' for device 'Sensor A' was assigned +to user 'John Doe'. The following template: ```text Alarm '${alarmType}' - comment ${action} @@ -47,9 +50,10 @@ will be transformed to: ```text Alarm 'High Temperature' - comment added -{:copy-code} ``` +
+ The following template: ```text @@ -61,7 +65,6 @@ will be transformed to: ```text Alarm 'High Temperature' (Critical) was commented -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/api_usage_limit.md b/ui-ngx/src/assets/help/en_US/notification/api_usage_limit.md index 29bd757067..f22fb4166c 100644 --- a/ui-ngx/src/assets/help/en_US/notification/api_usage_limit.md +++ b/ui-ngx/src/assets/help/en_US/notification/api_usage_limit.md @@ -3,34 +3,39 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *feature* - API feature for which the limit is applied; one of: 'Device API', 'Telemetry persistence', 'Rule Engine execution', 'JavaScript functions execution', 'Email messages', 'SMS messages', 'Alarms'; - * *status* - one of: 'enabled', 'warning', 'disabled'; - * *unitLabel* - name of the limited unit; one of: 'message', 'data point', 'Rule Engine execution', 'JavaScript execution', 'email message', 'SMS message', 'alarm'; - * *limit* - the limit on used feature units; - * *currentValue* - current number of used units; - * *tenantId* - id of the tenant; - * *tenantName* - name of the tenant; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `feature` - API feature for which the limit is applied; one of: 'Device API', 'Telemetry persistence', + 'Rule Engine execution', 'JavaScript functions execution', 'Email messages', 'SMS messages', 'Alarms'; +* `status` - one of: 'enabled', 'warning', 'disabled'; +* `unitLabel` - name of the limited unit; one of: 'message', 'data point', 'Rule Engine execution', + 'JavaScript execution', 'email message', 'SMS message', 'alarm'; +* `limit` - the limit on used feature units; +* `currentValue` - current number of used units; +* `tenantId` - id of the tenant; +* `tenantName` - name of the tenant; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples -Let's assume tenant's devices pushed 8K messages with the max allowed number of 10K and warn threshold in tenant profile set to 0.8 (80%). The following template: +Let's assume tenant's devices pushed 8K messages with the max allowed number of 10K +and warn threshold in tenant profile set to 0.8 (80%). The following template: ```text ${feature} feature - ${status:upperCase} (usage: ${currentValue} out of ${limit} ${unitLabel}s) @@ -41,7 +46,6 @@ will be transformed to: ```text Device API feature - WARNING (usage: 8000 out of 10000 messages) -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/device_activity.md b/ui-ngx/src/assets/help/en_US/notification/device_activity.md index 5e69a0c634..4ccd3cdf53 100644 --- a/ui-ngx/src/assets/help/en_US/notification/device_activity.md +++ b/ui-ngx/src/assets/help/en_US/notification/device_activity.md @@ -3,36 +3,36 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *deviceId* - the device id as uuid string; - * *deviceName* - the device name; - * *deviceLabel* - the device label; - * *deviceType* - the device type; - * *eventType* - one of: 'inactive', 'active'; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `deviceId` - the device id as uuid string; +* `deviceName` - the device name; +* `deviceLabel` - the device label; +* `deviceType` - the device type; +* `eventType` - one of: 'inactive', 'active'; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples -Let's assume the notification about inactive thermometer device 'Sensor T1'. +Let's assume the notification about inactive thermometer device 'Sensor T1'. The following template: -Template message: `` - ```text Device '${deviceName}' inactive {:copy-code} @@ -42,11 +42,10 @@ will be transformed to: ```text Device 'Sensor T1' inactive -{:copy-code} ``` +
-
The following template: ```text @@ -58,7 +57,7 @@ will be transformed to: ```text Thermometer 'Sensor T1' became inactive -{:copy-code} ``` +

diff --git a/ui-ngx/src/assets/help/en_US/notification/entities_limit.md b/ui-ngx/src/assets/help/en_US/notification/entities_limit.md index da351ad30f..3dcfd5f7b2 100644 --- a/ui-ngx/src/assets/help/en_US/notification/entities_limit.md +++ b/ui-ngx/src/assets/help/en_US/notification/entities_limit.md @@ -3,33 +3,36 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *entityType* - one of: 'Device', 'Asset', 'User', etc.; - * *currentCount* - the current count of entities; - * *limit* - the limit on number of entities; - * *percents* - the percent from the notification rule configuration; - * *tenantId* - id of the tenant; - * *tenantName* - name of the tenant; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `entityType` - one of: 'Device', 'Asset', 'User', etc.; +* `currentCount` - the current count of entities; +* `limit` - the limit on number of entities; +* `percents` - the percent from the notification rule configuration; +* `tenantId` - id of the tenant; +* `tenantName` - name of the tenant; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples -Let's assume the tenant created 400 devices with the max allowed number is 500 and rule threshold 0.8 (80%). The following template: +Let's assume the tenant created 400 devices with the max allowed number is 500 and rule threshold 0.8 (80%). +The following template: ```text ${entityType:capitalize}s usage: ${currentCount}/${limit} (${percents}%) @@ -40,7 +43,6 @@ will be transformed to: ```text Devices usage: 400/500 (80%) -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/entity_action.md b/ui-ngx/src/assets/help/en_US/notification/entity_action.md index 06e3fe2d4e..8d8888b294 100644 --- a/ui-ngx/src/assets/help/en_US/notification/entity_action.md +++ b/ui-ngx/src/assets/help/en_US/notification/entity_action.md @@ -3,35 +3,38 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *entityType* - the entity type, e.g. 'Device'; - * *entityId* - the entity id as uuid string; - * *entityName* - the name of the entity; - * *actionType* - one of: 'added', 'updated', 'deleted'; - * *userId* - id of the user who made the action; - * *userEmail* - email of the user who made the action; - * *userFirstName* - first name of the user who made the action; - * *userLastName* - last name of the user who made the action; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `entityType` - the entity type, e.g. 'Device'; +* `entityId` - the entity id as uuid string; +* `entityName` - the name of the entity; +* `actionType` - one of: 'added', 'updated', 'deleted'; +* `userId` - id of the user who made the action; +* `userTitle` - title of the user who made the action; +* `userEmail` - email of the user who made the action; +* `userFirstName` - first name of the user who made the action; +* `userLastName` - last name of the user who made the action; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
##### Examples -Let's assume the notification about device 'T1' was added by user 'john.doe@gmail.com'. +Let's assume the notification about device 'T1' was added by user 'john.doe@gmail.com'. The following template: ```text @@ -43,22 +46,21 @@ will be transformed to: ```text Device was added! -{:copy-code} ``` -
+
+ The following template: ```text -${entityType} '${entityName}' was ${actionType} by user '${originatorUserName}'! +${entityType} '${entityName}' was ${actionType} by user ${userEmail} {:copy-code} ``` will be transformed to: ```text -Device 'T1' was added by user 'john.doe@gmail.com'! -{:copy-code} +Device 'T1' was added by user john.doe@gmail.com ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/general.md b/ui-ngx/src/assets/help/en_US/notification/general.md index 44c8e6aafb..cb4d368086 100644 --- a/ui-ngx/src/assets/help/en_US/notification/general.md +++ b/ui-ngx/src/assets/help/en_US/notification/general.md @@ -3,21 +3,23 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
@@ -34,7 +36,6 @@ will be transformed to: ```text Hi, John! -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/new_platform_version.md b/ui-ngx/src/assets/help/en_US/notification/new_platform_version.md index b71d70d6cc..f0e4165dc9 100644 --- a/ui-ngx/src/assets/help/en_US/notification/new_platform_version.md +++ b/ui-ngx/src/assets/help/en_US/notification/new_platform_version.md @@ -3,26 +3,28 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *latestVersion* - the latest platform version available; - * *latestVersionReleaseNotesUrl* - release notes link for latest version; - * *upgradeInstructionsUrl* - upgrade instructions link for latest version; - * *currentVersion* - the current platform version - * *currentVersionReleaseNotesUrl* - release notes link for current version; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `latestVersion` - the latest platform version available; +* `latestVersionReleaseNotesUrl` - release notes link for latest version; +* `upgradeInstructionsUrl` - upgrade instructions link for latest version; +* `currentVersion` - the current platform version +* `currentVersionReleaseNotesUrl` - release notes link for current version; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
@@ -39,7 +41,6 @@ will be transformed to: ```text New version 3.5.0 is available. Current version is 3.4.4 -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/rule_engine.md b/ui-ngx/src/assets/help/en_US/notification/rule_engine.md deleted file mode 100644 index 30dfa8797d..0000000000 --- a/ui-ngx/src/assets/help/en_US/notification/rule_engine.md +++ /dev/null @@ -1,54 +0,0 @@ -#### Rule engine notification templatization - -
-
- -Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. -See the available types and parameters below: - -Available template parameters: - - * values from the incoming message metadata; - * values from the incoming message data; - * *originatorType* - type of the originator, e.g. 'Device'; - * *originatorId* - id of the originator - * *msgType* - type of the message - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. -You may also modify the value of the parameter with one of the suffixes: - - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` - -
- -##### Examples - -Let's assume the incoming message to Rule node has the following data: -```json -{ - "building_1": { - "temperature": 24 - } -} -``` - -The following template: - -```text -Building 1: temperature is ${building_1.temperature} -{:copy-code} -``` - -will be transformed to: - -```text -Building 1: temperature is 24 -``` - -
-
diff --git a/ui-ngx/src/assets/help/en_US/notification/rule_engine_lifecycle_event.md b/ui-ngx/src/assets/help/en_US/notification/rule_engine_lifecycle_event.md index 1d22847bed..acb7c31469 100644 --- a/ui-ngx/src/assets/help/en_US/notification/rule_engine_lifecycle_event.md +++ b/ui-ngx/src/assets/help/en_US/notification/rule_engine_lifecycle_event.md @@ -3,29 +3,31 @@

-Notification subject and message fields support templatization. The list of available templatization parameters depends on the template type. +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. See the available types and parameters below: Available template parameters: - * *recipientEmail* - email of the recipient; - * *recipientFirstName* - first name of the recipient; - * *recipientLastName* - last name of the recipient; - * *componentType* - one of: 'Rule chain', 'Rule node'; - * *componentId* - the component id as uuid string; - * *componentName* - the rule chain or rule node name; - * *ruleChainId* - the rule chain id as uuid string; - * *ruleChainName* - the rule chain name; - * *eventType* - one of: 'started', 'updated', 'stopped'; - * *action* - one of: 'start', 'update', 'stop'; - * *error* - the error text; - -Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +* `componentType` - one of: 'Rule chain', 'Rule node'; +* `componentId` - the component id as uuid string; +* `componentName` - the rule chain or rule node name; +* `ruleChainId` - the rule chain id as uuid string; +* `ruleChainName` - the rule chain name; +* `eventType` - one of: 'started', 'updated', 'stopped'; +* `action` - one of: 'start', 'update', 'stop'; +* `error` - the error text; +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. You may also modify the value of the parameter with one of the suffixes: - * `upperCase`, for example - `${recipientFirstName:upperCase}` - * `lowerCase`, for example - `${recipientFirstName:lowerCase}` - * `capitalize`, for example - `${recipientFirstName:capitalize}` +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}`
@@ -42,7 +44,6 @@ will be transformed to: ```text Rule node 'Export to Kafka' - start failure:
Connection refused! -{:copy-code} ```
diff --git a/ui-ngx/src/assets/help/en_US/notification/rule_node.md b/ui-ngx/src/assets/help/en_US/notification/rule_node.md new file mode 100644 index 0000000000..7fce8bd931 --- /dev/null +++ b/ui-ngx/src/assets/help/en_US/notification/rule_node.md @@ -0,0 +1,57 @@ +#### Rule engine notification templatization + +
+
+ +Notification subject and message fields support templatization. +The list of available templatization parameters depends on the template type. +See the available types and parameters below: + +Available template parameters: + +* values from the incoming message metadata; +* values from the incoming message data; +* `originatorType` - type of the originator, e.g. 'Device'; +* `originatorId` - id of the originator +* `msgType` - type of the message +* `recipientTitle` - title of the recipient (first and last name if specified, email otherwise) +* `recipientEmail` - email of the recipient; +* `recipientFirstName` - first name of the recipient; +* `recipientLastName` - last name of the recipient; + +Parameter names must be wrapped using `${...}`. For example: `${recipientFirstName}`. +You may also modify the value of the parameter with one of the suffixes: + +* `upperCase`, for example - `${recipientFirstName:upperCase}` +* `lowerCase`, for example - `${recipientFirstName:lowerCase}` +* `capitalize`, for example - `${recipientFirstName:capitalize}` + +
+ +##### Examples + +Let's assume the incoming message to Rule node has the following data: + +```json +{ + "building_1": { + "temperature": 24 + } +} +``` + +The following template: + +```text +Building 1: temperature is ${building_1.temperature} +{:copy-code} +``` + +will be transformed to: + +```text +Building 1: temperature is 24 +``` + +
+