Commit c07fcf7ba5596b7dc02239a2fdb67d9e7d330230
1 parent
685e89ea
Added rule chain type to rule node
Showing
4 changed files
with
13 additions
and
3 deletions
... | ... | @@ -292,6 +292,7 @@ export class ItemBufferService { |
292 | 292 | y: origNode.y, |
293 | 293 | name: origNode.name, |
294 | 294 | componentClazz: origNode.component.clazz, |
295 | + ruleChainType: origNode.ruleChainType | |
295 | 296 | }; |
296 | 297 | if (origNode.targetRuleChainId) { |
297 | 298 | node.targetRuleChainId = origNode.targetRuleChainId; | ... | ... |
... | ... | @@ -537,7 +537,8 @@ export class RuleChainPageComponent extends PageComponent |
537 | 537 | nodeClass: descriptor.nodeClass, |
538 | 538 | icon, |
539 | 539 | iconUrl, |
540 | - connectors: [] | |
540 | + connectors: [], | |
541 | + ruleChainType: this.ruleChainType | |
541 | 542 | }; |
542 | 543 | if (component.configurationDescriptor.nodeDefinition.inEnabled) { |
543 | 544 | node.connectors.push( |
... | ... | @@ -626,7 +627,8 @@ export class RuleChainPageComponent extends PageComponent |
626 | 627 | type: FlowchartConstants.leftConnectorType, |
627 | 628 | id: (this.nextConnectorID++) + '' |
628 | 629 | } |
629 | - ] | |
630 | + ], | |
631 | + ruleChainType: this.ruleChainType | |
630 | 632 | }; |
631 | 633 | ruleChainNodesMap[ruleChainConnection.additionalInfo.ruleChainNodeId] = ruleChainNode; |
632 | 634 | this.ruleChainModel.nodes.push(ruleChainNode); | ... | ... |
... | ... | @@ -19,6 +19,7 @@ import { Component, OnInit } from '@angular/core'; |
19 | 19 | import { FcNodeComponent } from 'ngx-flowchart/dist/ngx-flowchart'; |
20 | 20 | import { FcRuleNode, RuleNodeType } from '@shared/models/rule-node.models'; |
21 | 21 | import { Router } from '@angular/router'; |
22 | +import { ruleChainType } from '@app/shared/models/rule-chain.models'; | |
22 | 23 | |
23 | 24 | @Component({ |
24 | 25 | // tslint:disable-next-line:component-selector |
... | ... | @@ -48,7 +49,12 @@ export class RuleNodeComponent extends FcNodeComponent implements OnInit { |
48 | 49 | $event.stopPropagation(); |
49 | 50 | } |
50 | 51 | if (node.targetRuleChainId) { |
51 | - this.router.navigateByUrl(`/ruleChains/${node.targetRuleChainId}`); | |
52 | + if (node.ruleChainType === ruleChainType.edge) { | |
53 | + this.router.navigateByUrl(`/edges/ruleChains/${node.targetRuleChainId}`); | |
54 | + } else { | |
55 | + this.router.navigateByUrl(`/ruleChains/${node.targetRuleChainId}`); | |
56 | + } | |
57 | + | |
52 | 58 | } |
53 | 59 | } |
54 | 60 | } | ... | ... |