Refactoring
This commit is contained in:
parent
b8a3b8ae14
commit
82bdb6acf1
@ -54,10 +54,10 @@ export class AttributeService {
|
|||||||
const keys = timeseries.map(attribute => encodeURI(attribute.key)).join(',');
|
const keys = timeseries.map(attribute => encodeURI(attribute.key)).join(',');
|
||||||
let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/delete` +
|
let url = `/api/plugins/telemetry/${entityId.entityType}/${entityId.id}/timeseries/delete` +
|
||||||
`?keys=${keys}&deleteAllDataForKeys=${deleteAllDataForKeys}`;
|
`?keys=${keys}&deleteAllDataForKeys=${deleteAllDataForKeys}`;
|
||||||
if (startTs) {
|
if (isDefinedAndNotNull(startTs)) {
|
||||||
url += `&startTs=${startTs}`;
|
url += `&startTs=${startTs}`;
|
||||||
}
|
}
|
||||||
if (endTs) {
|
if (isDefinedAndNotNull(endTs)) {
|
||||||
url += `&endTs=${endTs}`;
|
url += `&endTs=${endTs}`;
|
||||||
}
|
}
|
||||||
return this.http.delete(url, defaultHttpOptionsFromConfig(config));
|
return this.http.delete(url, defaultHttpOptionsFromConfig(config));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user