|
|
|
@ -25,7 +25,6 @@ import { |
|
|
|
RuleChain, |
|
|
|
RuleChainConnectionInfo, |
|
|
|
RuleChainMetaData, |
|
|
|
ruleChainType, |
|
|
|
ruleChainNodeComponent, |
|
|
|
ruleNodeTypeComponentTypes, |
|
|
|
unknownNodeComponent |
|
|
|
@ -117,12 +116,12 @@ export class RuleChainService { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
public getRuleNodeComponents(ruleNodeConfigResourcesModulesMap: {[key: string]: any}, config?: RequestConfig): |
|
|
|
public getRuleNodeComponents(ruleNodeConfigResourcesModulesMap: {[key: string]: any}, ruleChainType: string, config?: RequestConfig): |
|
|
|
Observable<Array<RuleNodeComponentDescriptor>> { |
|
|
|
if (this.ruleNodeComponents) { |
|
|
|
return of(this.ruleNodeComponents); |
|
|
|
} else { |
|
|
|
return this.loadRuleNodeComponents(config).pipe( |
|
|
|
return this.loadRuleNodeComponents(ruleChainType, config).pipe( |
|
|
|
mergeMap((components) => { |
|
|
|
return this.resolveRuleNodeComponentsUiResources(components, ruleNodeConfigResourcesModulesMap).pipe( |
|
|
|
map((ruleNodeComponents) => { |
|
|
|
@ -205,8 +204,8 @@ export class RuleChainService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private loadRuleNodeComponents(config?: RequestConfig): Observable<Array<RuleNodeComponentDescriptor>> { |
|
|
|
return this.componentDescriptorService.getComponentDescriptorsByTypes(ruleNodeTypeComponentTypes, config).pipe( |
|
|
|
private loadRuleNodeComponents(ruleChainType: string, config?: RequestConfig): Observable<Array<RuleNodeComponentDescriptor>> { |
|
|
|
return this.componentDescriptorService.getComponentDescriptorsByTypes(ruleNodeTypeComponentTypes, ruleChainType, config).pipe( |
|
|
|
map((components) => { |
|
|
|
const ruleNodeComponents: RuleNodeComponentDescriptor[] = []; |
|
|
|
components.forEach((component) => { |
|
|
|
|