From 82bdb6acf158863c928762da1c62feb56b11a700 Mon Sep 17 00:00:00 2001 From: Kalutka Zhenya Date: Wed, 4 Aug 2021 10:46:24 +0300 Subject: [PATCH] Refactoring --- 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 f68835121a..df7941cef3 100644 --- a/ui-ngx/src/app/core/http/attribute.service.ts +++ b/ui-ngx/src/app/core/http/attribute.service.ts @@ -54,10 +54,10 @@ export class AttributeService { const keys = timeseries.map(attribute => encodeURI(attribute.key)).join(','); let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/delete` + `?keys=${keys}&deleteAllDataForKeys=${deleteAllDataForKeys}`; - if (startTs) { + if (isDefinedAndNotNull(startTs)) { url += `&startTs=${startTs}`; } - if (endTs) { + if (isDefinedAndNotNull(endTs)) { url += `&endTs=${endTs}`; } return this.http.delete(url, defaultHttpOptionsFromConfig(config));