From 768fe4f304448189de569850de4dd9897f0908ac Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 5 Aug 2020 15:54:56 +0300 Subject: [PATCH] Fixes deleting an attribute or telemetry for the entity whose name has spaces --- ui-ngx/src/app/core/http/attribute.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/core/http/attribute.service.ts b/ui-ngx/src/app/core/http/attribute.service.ts index fad0a70cb4..044b9314ba 100644 --- a/ui-ngx/src/app/core/http/attribute.service.ts +++ b/ui-ngx/src/app/core/http/attribute.service.ts @@ -42,7 +42,7 @@ export class AttributeService { public deleteEntityAttributes(entityId: EntityId, attributeScope: AttributeScope, attributes: Array, config?: RequestConfig): Observable { - const keys = attributes.map(attribute => attribute.key).join(','); + const keys = attributes.map(attribute => encodeURI(attribute.key)).join(','); return this.http.delete(`/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/${attributeScope}` + `?keys=${keys}`, defaultHttpOptionsFromConfig(config)); @@ -50,7 +50,7 @@ export class AttributeService { public deleteEntityTimeseries(entityId: EntityId, timeseries: Array, deleteAllDataForKeys = false, config?: RequestConfig): Observable { - const keys = timeseries.map(attribute => attribute.key).join(','); + const keys = timeseries.map(attribute => encodeURI(attribute.key)).join(','); return this.http.delete(`/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/delete` + `?keys=${keys}&deleteAllDataForKeys=${deleteAllDataForKeys}`, defaultHttpOptionsFromConfig(config));