Skip to content

Commit d115528

Browse files
committed
fix(collector): update button label and refactor collector configuration structure
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 497e674 commit d115528

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
[disabled]="(!collectorValid(collector.groups) || savingConfig) ||
4343
(collectorValid(collector.groups) && changes && changes.keys.length === 0)">
4444
<i class="icon-cog5 mr-1"></i>
45-
Save collector
45+
Save configuration
4646
</button>
4747
</div>
4848
</div>

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,12 @@ export class IntGenericGroupConfigComponent implements OnInit {
285285
this.configs.push(...configurations);
286286
});
287287
const body = {
288-
collectorConfig: {
288+
collector: {
289+
... collectorDto,
290+
group: null,
291+
},
289292
moduleId: this.moduleId,
290293
keys: this.configs
291-
},
292-
collector: {
293-
... collectorDto,
294-
group: null,
295-
},
296294
};
297295
this.collectorService.create(body).subscribe(response => {
298296
this.savingConfig = false;

frontend/src/app/app-module/shared/services/utm-module-collector.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export class UtmModuleCollectorService {
2020
}
2121

2222
create(body: any): Observable<HttpResponse<UtmModuleGroupType>> {
23-
const options = createRequestOption(body.collector);
24-
return this.http.post<any>(`${this.resourceUrl}/collector-config/`, body.collectorConfig, {params: options, observe: 'response'});
23+
return this.http.post<any>(`${this.resourceUrl}/collector-config/`, body, {observe: 'response'});
2524
}
2625

2726
update(conf: UtmModuleGroupType): Observable<HttpResponse<UtmModuleGroupType>> {

0 commit comments

Comments
 (0)