@ -94,6 +94,7 @@ export class RuleNotificationDialogComponent extends
ruleEngineEventsTemplateForm : FormGroup ;
entitiesLimitTemplateForm : FormGroup ;
apiUsageLimitTemplateForm : FormGroup ;
newPlatformVersionTemplateForm : FormGroup ;
triggerType = TriggerType ;
triggerTypes : TriggerType [ ] ;
@ -294,6 +295,12 @@ export class RuleNotificationDialogComponent extends
} )
} ) ;
this . newPlatformVersionTemplateForm = this . fb . group ( {
triggerConfig : this.fb.group ( {
} )
} ) ;
this . triggerTypeFormsMap = new Map < TriggerType , FormGroup > ( [
[ TriggerType . ALARM , this . alarmTemplateForm ] ,
[ TriggerType . ALARM_COMMENT , this . alarmCommentTemplateForm ] ,
@ -302,7 +309,8 @@ export class RuleNotificationDialogComponent extends
[ TriggerType . ALARM_ASSIGNMENT , this . alarmAssignmentTemplateForm ] ,
[ TriggerType . RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT , this . ruleEngineEventsTemplateForm ] ,
[ TriggerType . ENTITIES_LIMIT , this . entitiesLimitTemplateForm ] ,
[ TriggerType . API_USAGE_LIMIT , this . apiUsageLimitTemplateForm ]
[ TriggerType . API_USAGE_LIMIT , this . apiUsageLimitTemplateForm ] ,
[ TriggerType . NEW_PLATFORM_VERSION , this . newPlatformVersionTemplateForm ]
] ) ;
if ( data . isAdd || data . isCopy ) {
@ -433,9 +441,10 @@ export class RuleNotificationDialogComponent extends
private allowTriggerTypes ( ) : TriggerType [ ] {
if ( this . isSysAdmin ( ) ) {
return [ TriggerType . ENTITIES_LIMIT , TriggerType . API_USAGE_LIMIT ] ;
return [ TriggerType . ENTITIES_LIMIT , TriggerType . API_USAGE_LIMIT , TriggerType . NEW_PLATFORM_VERSION ] ;
}
return Object . values ( TriggerType ) . filter ( type = > type !== TriggerType . ENTITIES_LIMIT && type !== TriggerType . API_USAGE_LIMIT ) ;
return Object . values ( TriggerType ) . filter ( type = > type !== TriggerType . ENTITIES_LIMIT && type !== TriggerType . API_USAGE_LIMIT
&& type !== TriggerType . NEW_PLATFORM_VERSION ) ;
}
get allowEntityTypeForEntityAction ( ) : EntityType [ ] {