Browse Source

Merge pull request #24 from kalutkaz/addConfigurationVersion

Added configurationVersion to ruleNodes
pull/8106/head
Shvaika Dmytro 3 years ago
committed by GitHub
parent
commit
315e260f6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts
  2. 2
      ui-ngx/src/app/shared/models/rule-chain.models.ts
  3. 1
      ui-ngx/src/app/shared/models/rule-node.models.ts

4
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts

@ -78,7 +78,7 @@ import { RuleChainService } from '@core/http/rule-chain.service';
import { fromEvent, NEVER, Observable, of, ReplaySubject, Subscription } from 'rxjs';
import { debounceTime, distinctUntilChanged, mergeMap, tap } from 'rxjs/operators';
import { ISearchableComponent } from '../../models/searchable-component.models';
import { deepClone } from '@core/utils';
import { deepClone, isDefinedAndNotNull } from '@core/utils';
import { RuleNodeDetailsComponent } from '@home/pages/rulechain/rule-node-details.component';
import { RuleNodeLinkComponent } from './rule-node-link.component';
import { DialogComponent } from '@shared/components/dialog.component';
@ -1425,7 +1425,7 @@ export class RuleChainPageComponent extends PageComponent
id: node.ruleNodeId,
type: node.component.clazz,
name: node.name,
configurationVersion: node.configurationVersion,
configurationVersion: isDefinedAndNotNull(node.configurationVersion) ? node.configurationVersion : node.component.configurationVersion,
configuration: node.configuration,
additionalInfo: node.additionalInfo ? node.additionalInfo : {},
debugMode: node.debugMode,

2
ui-ngx/src/app/shared/models/rule-chain.models.ts

@ -65,6 +65,7 @@ export const unknownNodeComponent: RuleNodeComponentDescriptor = {
type: RuleNodeType.UNKNOWN,
name: 'unknown',
clusteringMode: ComponentClusteringMode.ENABLED,
configurationVersion: 0,
clazz: 'tb.internal.Unknown',
configurationDescriptor: {
nodeDefinition: {
@ -81,6 +82,7 @@ export const unknownNodeComponent: RuleNodeComponentDescriptor = {
export const inputNodeComponent: RuleNodeComponentDescriptor = {
type: RuleNodeType.INPUT,
configurationVersion: 0,
clusteringMode: ComponentClusteringMode.ENABLED,
name: 'Input',
clazz: 'tb.internal.Input'

1
ui-ngx/src/app/shared/models/rule-node.models.ts

@ -305,6 +305,7 @@ export const ruleNodeTypeDescriptors = new Map<RuleNodeType, RuleNodeTypeDescrip
export interface RuleNodeComponentDescriptor extends ComponentDescriptor {
type: RuleNodeType;
configurationVersion: number,
configurationDescriptor?: RuleNodeConfigurationDescriptor;
}

Loading…
Cancel
Save