Skip to content

Commit 92e78b3

Browse files
committed
fix: add change tracking for integration configuration and serialize confOptions
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 8e6a19b commit 92e78b3

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

frontend/src/app/app-module/conf/int-generic-group-config/int-generic-group-config.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101

102102
<ng-select *ngIf="integrationConfig.confDataType === 'select'"
103103
#options="ngModel"
104+
(change)="addChange(integrationConfig)"
104105
[items]="integrationConfig.confOptions"
105106
bindLabel="label"
106107
bindValue="value"

frontend/src/app/app-module/conf/int-generic-group-config/int-generic-group-config.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,13 @@ export class IntGenericGroupConfigComponent implements OnInit {
172172
saveConfig(group: UtmModuleGroupType) {
173173
this.savingConfig = true;
174174
const configs = this.changes.keys.filter(change => change.groupId === group.id);
175+
const keys = configs.map(config => ({
176+
...config,
177+
confOptions: config.confOptions ? JSON.stringify(config.confOptions) : null
178+
}));
175179
this.utmModuleGroupConfService.update({
176180
moduleId: group.moduleId,
177-
keys: configs
181+
keys
178182
}).subscribe(response => {
179183
this.savingConfig = false;
180184
this.pendingChanges = false;

0 commit comments

Comments
 (0)