|
|
|
@ -73,13 +73,14 @@ export interface RuleNodeConfigurationDescriptor { |
|
|
|
export interface IRuleNodeConfigurationComponent { |
|
|
|
ruleNodeId: string; |
|
|
|
ruleChainId: string; |
|
|
|
hasScript: boolean; |
|
|
|
testScriptLabel?: string; |
|
|
|
changeScript?: EventEmitter<void>; |
|
|
|
ruleChainType: RuleChainType; |
|
|
|
configuration: RuleNodeConfiguration; |
|
|
|
configurationChanged: Observable<RuleNodeConfiguration>; |
|
|
|
validate(); |
|
|
|
getSupportTestFunction(): boolean; |
|
|
|
getTestButtonLabel? (): string; |
|
|
|
testScript$? (debugEventBody?: DebugRuleNodeEventBody): Observable<string>; |
|
|
|
testScript? (debugEventBody?: DebugRuleNodeEventBody); |
|
|
|
[key: string]: any; |
|
|
|
} |
|
|
|
|
|
|
|
@ -92,6 +93,8 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple |
|
|
|
|
|
|
|
ruleChainId: string; |
|
|
|
|
|
|
|
hasScript: boolean = false; |
|
|
|
|
|
|
|
ruleChainType: RuleChainType; |
|
|
|
|
|
|
|
configurationValue: RuleNodeConfiguration; |
|
|
|
@ -115,8 +118,7 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple |
|
|
|
configurationChangedEmiter = new EventEmitter<RuleNodeConfiguration>(); |
|
|
|
configurationChanged = this.configurationChangedEmiter.asObservable(); |
|
|
|
|
|
|
|
protected constructor(@Inject(Store) protected store: Store<AppState>, |
|
|
|
@Inject(TranslateService) protected translate: TranslateService) { |
|
|
|
protected constructor(@Inject(Store) protected store: Store<AppState>) { |
|
|
|
super(store); |
|
|
|
} |
|
|
|
|
|
|
|
@ -134,14 +136,6 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple |
|
|
|
this.onValidate(); |
|
|
|
} |
|
|
|
|
|
|
|
getSupportTestFunction(): boolean { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
getTestButtonLabel(): string { |
|
|
|
return this.translate.instant('rulenode.test-script-function'); |
|
|
|
} |
|
|
|
|
|
|
|
protected setupConfiguration(configuration: RuleNodeConfiguration) { |
|
|
|
this.onConfigurationSet(this.prepareInputConfig(configuration)); |
|
|
|
this.updateValidators(false); |
|
|
|
|