Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 37bc508

Browse files
BoykoAlexcppwfs
authored andcommitted
Fix setting the value for property id vs name for Tasks
1 parent 863ae66 commit 37bc508

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

ui/src/app/shared/flo/support/properties-group-model.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,9 @@ export class PropertiesGroupModel extends Properties.PropertiesGroupModel {
7272
});
7373
}
7474

75-
private determineAttributeName(metadata: Flo.PropertyMetadata): string {
75+
protected determineAttributeName(metadata: Flo.PropertyMetadata): string {
7676
const nameAttr = `props/${metadata.name}`;
7777
const idAttr = `props/${metadata.id}`;
78-
if (this.cell.attr('metadata/group') === 'other') {
79-
// For something in the other group (like tap) use the id not the name of the property
80-
return idAttr;
81-
}
8278
const valueFromName = this.cell.attr(nameAttr);
8379
const valueFromId = this.cell.attr(idAttr);
8480
if ((valueFromName === undefined || valueFromName === null) && !(valueFromId === undefined || valueFromId === null)) {

ui/src/app/streams/flo/properties/stream-properties-dialog.component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { Component, ViewEncapsulation } from '@angular/core';
44
import { BsModalRef } from 'ngx-bootstrap';
5-
import { Properties } from 'spring-flo';
5+
import { Flo, Properties } from 'spring-flo';
66
import { Validators } from '@angular/forms';
77
import { dia } from 'jointjs';
88
import { StreamsService } from '../../streams.service';
@@ -93,6 +93,15 @@ class StreamPropertiesGroupModel extends PropertiesGroupModel {
9393
}
9494
return notationalProperties;
9595
}
96+
97+
protected determineAttributeName(metadata: Flo.PropertyMetadata): string {
98+
if (this.cell.attr('metadata/group') === 'other') {
99+
// For something in the other group (like tap) use the id not the name of the property
100+
return `props/${metadata.id}`;
101+
}
102+
return super.determineAttributeName(metadata);
103+
}
104+
96105
}
97106

98107
/**

ui/src/app/tasks/flo/properties/task-properties-dialog-component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { Component, ViewEncapsulation } from '@angular/core';
44
import { BsModalRef } from 'ngx-bootstrap';
5-
import { Properties } from 'spring-flo';
5+
import { Flo, Properties } from 'spring-flo';
66
import { Validators } from '@angular/forms';
77
import { dia } from 'jointjs';
88
import { ApplicationType } from '../../../shared/model/application-type';
@@ -56,6 +56,15 @@ class TaskPropertiesGroupModel extends PropertiesGroupModel {
5656
}
5757
return notationalProperties;
5858
}
59+
60+
protected determineAttributeName(metadata: Flo.PropertyMetadata): string {
61+
if (this.cell instanceof dia.Link) {
62+
// For links properties are always id based
63+
return `props/${metadata.id}`;
64+
}
65+
return super.determineAttributeName(metadata);
66+
}
67+
5968
}
6069

6170
/**

0 commit comments

Comments
 (0)