You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by eb...@apache.org on 2020/05/13 10:37:28 UTC

[incubator-streampipes] 03/09: Add label update request to DataLake-REST-Service

This is an automated email from the ASF dual-hosted git repository.

ebi pushed a commit to branch timeseries-labeling
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 539ac1090b5074dcbabce143783816e0b433ca22
Author: Daniel Ebi <eb...@fzi.de>
AuthorDate: Wed May 13 10:28:24 2020 +0200

    Add label update request to DataLake-REST-Service
---
 .../app/core-services/datalake/datalake-rest.service.ts  | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/ui/src/app/core-services/datalake/datalake-rest.service.ts b/ui/src/app/core-services/datalake/datalake-rest.service.ts
index 5a5e960..59caebb 100644
--- a/ui/src/app/core-services/datalake/datalake-rest.service.ts
+++ b/ui/src/app/core-services/datalake/datalake-rest.service.ts
@@ -73,7 +73,7 @@ export class DatalakeRestService {
     }
 
     getGroupedDataAutoAggergation(index, startDate, endDate, groupingTag) {
-            return this.http.get<GroupedDataResult>(this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '/grouping/' + groupingTag);
+        return this.http.get<GroupedDataResult>(this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '/grouping/' + groupingTag);
     }
 
 
@@ -81,7 +81,7 @@ export class DatalakeRestService {
         @deprecate
      */
     getFile(index, format) {
-        const request = new HttpRequest('GET', this.dataLakeUrlV3 + '/data/' + index + "?format=" + format,  {
+        const request = new HttpRequest('GET', this.dataLakeUrlV3 + '/data/' + index + "?format=" + format, {
             reportProgress: true,
             responseType: 'text'
         });
@@ -89,7 +89,7 @@ export class DatalakeRestService {
     }
 
     downloadRowData(index, format) {
-        const request = new HttpRequest('GET', this.dataLakeUrlV3 + '/data/' + index + "/download?format=" + format,  {
+        const request = new HttpRequest('GET', this.dataLakeUrlV3 + '/data/' + index + "/download?format=" + format, {
             reportProgress: true,
             responseType: 'text'
         });
@@ -105,4 +105,12 @@ export class DatalakeRestService {
         return this.http.request(request)
     }
 
-}
\ No newline at end of file
+    saveLabelsInDatabase(index, startDate, endDate, label) {
+        const request = new HttpRequest('POST', this.dataLakeUrlV3 + '/data/' + index + '/labeling/' + startDate + '/' +
+            endDate + '/' + label,  {}, {
+            reportProgress: true,
+            responseType: 'text'
+        });
+        return this.http.request(request);
+    }
+}