dominikriemer commented on code in PR #3763:
URL: https://github.com/apache/streampipes/pull/3763#discussion_r2324877764


##########
streampipes-service-core/src/main/java/org/apache/streampipes/service/core/scheduler/DataLakeScheduler.java:
##########
@@ -0,0 +1,64 @@
+package org.apache.streampipes.service.core.scheduler;
+
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerQueryManagement;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerSchemaManagement;
+import org.apache.streampipes.dataexplorer.management.DataExplorerDispatcher;
+import org.apache.streampipes.model.datalake.DataLakeMeasure;
+import org.slf4j.Logger;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DataLakeScheduler {
+
+    private static final Logger log = 
LoggerFactory.getLogger(DataLakeScheduler.class);
+
+    private final IDataExplorerSchemaManagement dataExplorerSchemaManagement = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getSchemaManagement();
+
+    private final IDataExplorerQueryManagement dataExplorerQueryManagement  = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getQueryManagement(this.dataExplorerSchemaManagement);
+  
+
+    public void exportMeasurements(){
+
+    }
+
+    public void deleteMeasurements(DataLakeMeasure m){
+        Instant now = Instant.now();
+        Instant DaysAgo = 
now.minus(m.getRetentionTime().dataRetentionConfig().olderThanDays(), 
ChronoUnit.DAYS);
+
+        long endDate = DaysAgo.toEpochMilli();
+        log.info("Current time in millis: " + now.toEpochMilli());
+        log.info("Current time in millis to delete: " + endDate);
+
+        this.dataExplorerQueryManagement.deleteData(m.getMeasureName(), null, 
endDate);
+
+    }
+
+
+       @Scheduled(cron="0 1 0 * * 6")//CronJob Scheduled every Saturday (5) 
00:01(cron="0 */5 * * * * ")//CronJob Scheduled evey 5 min
+       public void cleanupMeasurements() {
+        List<DataLakeMeasure> allMeasurements = 
this.dataExplorerSchemaManagement.getAllMeasurements();
+        log.info("GET ALL Measurements");
+        for (DataLakeMeasure m : allMeasurements) {
+            if(m.getRetentionTime() != null){
+                log.info("Start delete Measurement "+ m.getMeasureName());
+                deleteMeasurements(m);
+                log.info("Measurements "+m.getMeasureName()+ " successfully 
deleted");
+
+
+            }
+            
+        }
+               

Review Comment:
   Blank lines can be removed



##########
ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts:
##########
@@ -153,6 +154,21 @@ export class DatalakeRestService {
         return this.buildDownloadRequest(index, qp);
     }
 
+    cleanup(index: string, config: any) {
+        console.log('cleanup');
+        console.log(config);

Review Comment:
   ```suggestion
   ```
   
   (no console.log in dev)



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-retention/select-data-retention/select-data-retention.component.ts:
##########
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import { Component, Input, OnInit } from '@angular/core';
+import {
+    DataExplorerDataConfig,
+    DateRange,
+} from '@streampipes/platform-services';
+import { DataRetentionConfig } from 
'../../../model/data-retention-config.model';
+
+@Component({
+    selector: 'sp-select-data-retention',
+    templateUrl: './select-data-retention.component.html',
+    styleUrls: [
+        './select-data-retention.component.scss',
+        // '../select-data.component.scss',

Review Comment:
   ```suggestion
   ```



##########
streampipes-service-core/src/main/java/org/apache/streampipes/service/core/scheduler/DataLakeScheduler.java:
##########
@@ -0,0 +1,64 @@
+package org.apache.streampipes.service.core.scheduler;
+
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerQueryManagement;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerSchemaManagement;
+import org.apache.streampipes.dataexplorer.management.DataExplorerDispatcher;
+import org.apache.streampipes.model.datalake.DataLakeMeasure;
+import org.slf4j.Logger;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DataLakeScheduler {
+
+    private static final Logger log = 
LoggerFactory.getLogger(DataLakeScheduler.class);
+
+    private final IDataExplorerSchemaManagement dataExplorerSchemaManagement = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getSchemaManagement();
+
+    private final IDataExplorerQueryManagement dataExplorerQueryManagement  = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getQueryManagement(this.dataExplorerSchemaManagement);
+  
+
+    public void exportMeasurements(){
+
+    }
+
+    public void deleteMeasurements(DataLakeMeasure m){
+        Instant now = Instant.now();
+        Instant DaysAgo = 
now.minus(m.getRetentionTime().dataRetentionConfig().olderThanDays(), 
ChronoUnit.DAYS);
+
+        long endDate = DaysAgo.toEpochMilli();
+        log.info("Current time in millis: " + now.toEpochMilli());
+        log.info("Current time in millis to delete: " + endDate);
+
+        this.dataExplorerQueryManagement.deleteData(m.getMeasureName(), null, 
endDate);
+
+    }
+
+
+       @Scheduled(cron="0 1 0 * * 6")//CronJob Scheduled every Saturday (5) 
00:01(cron="0 */5 * * * * ")//CronJob Scheduled evey 5 min
+       public void cleanupMeasurements() {
+        List<DataLakeMeasure> allMeasurements = 
this.dataExplorerSchemaManagement.getAllMeasurements();
+        log.info("GET ALL Measurements");
+        for (DataLakeMeasure m : allMeasurements) {
+            if(m.getRetentionTime() != null){
+                log.info("Start delete Measurement "+ m.getMeasureName());
+                deleteMeasurements(m);
+                log.info("Measurements "+m.getMeasureName()+ " successfully 
deleted");
+

Review Comment:
   ```suggestion
   ```



##########
ui/src/app/configuration/dialog/data-retention-dialog/model/data-retention-config.model.ts:
##########
@@ -0,0 +1,25 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+export interface DataRetentionConfig {
+    olderThanDays: number;
+    //missingValueBehaviour: 'ignore' | 'empty';

Review Comment:
   ```suggestion
   ```



##########
ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts:
##########
@@ -153,6 +154,21 @@ export class DatalakeRestService {
         return this.buildDownloadRequest(index, qp);
     }
 
+    cleanup(index: string, config: any) {
+        console.log('cleanup');

Review Comment:
   ```suggestion
   ```



##########
streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java:
##########
@@ -400,6 +402,37 @@ private boolean checkProvidedQueryParams(Map<String, 
String> providedParams) {
     return SUPPORTED_PARAMS.containsAll(providedParams.keySet());
   }
 
+
+    //TODO Currently working on API ENdpoint 

Review Comment:
   Can we delete the TODO?



##########
streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java:
##########
@@ -400,6 +402,37 @@ private boolean checkProvidedQueryParams(Map<String, 
String> providedParams) {
     return SUPPORTED_PARAMS.containsAll(providedParams.keySet());
   }
 
+
+    //TODO Currently working on API ENdpoint 
+    @PostMapping(
+      path = "/{elementId}/cleanup",
+      produces = MediaType.APPLICATION_JSON_VALUE,
+      consumes = MediaType.APPLICATION_JSON_VALUE)
+  @Operation(summary = "Sets the retention mechanism for a certain 
measurement", tags = {"Data Lake"},
+      responses = {
+          @ApiResponse(
+              responseCode = "400",
+              description = "Can't store the given data to this data lake"),
+          @ApiResponse(
+              responseCode = "200",
+              description = "Successfully stored data")})
+  public ResponseEntity<?> setDataLakeRetention(
+      @PathVariable String elementId,
+      @RequestBody RetentionTimeConfig retention ){
+        var measure = this.dataExplorerSchemaManagement.getById(elementId);
+        if (measure.getRetentionTime() != null) {

Review Comment:
   Can we delete the empty if clause?



##########
ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts:
##########
@@ -153,6 +154,21 @@ export class DatalakeRestService {
         return this.buildDownloadRequest(index, qp);
     }
 
+    cleanup(index: string, config: any) {
+        console.log('cleanup');
+        console.log(config);
+
+        const url = `${this.dataLakeUrl}/${index}/cleanup`;
+
+        const request = new HttpRequest('POST', url, config, {
+            headers: new HttpHeaders({ 'Content-Type': 'application/json' }), 
// optional if already handled globally
+        });
+
+        console.log(request);

Review Comment:
   ```suggestion
   ```



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-retention/select-retention-action/select-retention-action.component.html:
##########
@@ -0,0 +1,47 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one or more
+  ~  contributor license agreements.  See the NOTICE file distributed with
+  ~  this work for additional information regarding copyright ownership.
+  ~  The ASF licenses this file to You under the Apache License, Version 2.0
+  ~  (the "License"); you may not use this file except in compliance with
+  ~  the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  -->
+
+<sp-configuration-box [title]="'Data Retention Action' | translate">
+    <mat-form-field appearance="fill" class="sp-select-field">
+        <mat-label>{{ 'Select Action' | translate }}</mat-label>
+        <mat-select
+            [(ngModel)]="dataRetentionConfig.action"
+            data-cy="retention-action-select"
+        >
+            <mat-option value="DELETE" data-cy="action-configuration-delete">
+                {{ 'delete' | translate }}
+            </mat-option>
+
+            <mat-option
+                value="SAVE"
+                disabled
+                data-cy="retention-configuration-save"
+            >
+                {{ 'save' | translate }}

Review Comment:
   I guess "Save" is the feature to offload data? Once we implement this, we 
can maybe find a better name or add a description since data is already saved.



##########
streampipes-service-core/src/main/java/org/apache/streampipes/service/core/scheduler/DataLakeScheduler.java:
##########
@@ -0,0 +1,64 @@
+package org.apache.streampipes.service.core.scheduler;
+
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerQueryManagement;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerSchemaManagement;
+import org.apache.streampipes.dataexplorer.management.DataExplorerDispatcher;
+import org.apache.streampipes.model.datalake.DataLakeMeasure;
+import org.slf4j.Logger;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DataLakeScheduler {
+
+    private static final Logger log = 
LoggerFactory.getLogger(DataLakeScheduler.class);
+
+    private final IDataExplorerSchemaManagement dataExplorerSchemaManagement = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getSchemaManagement();
+
+    private final IDataExplorerQueryManagement dataExplorerQueryManagement  = 
new DataExplorerDispatcher()
+        .getDataExplorerManager()
+        .getQueryManagement(this.dataExplorerSchemaManagement);
+  
+
+    public void exportMeasurements(){
+
+    }
+
+    public void deleteMeasurements(DataLakeMeasure m){
+        Instant now = Instant.now();
+        Instant DaysAgo = 
now.minus(m.getRetentionTime().dataRetentionConfig().olderThanDays(), 
ChronoUnit.DAYS);
+
+        long endDate = DaysAgo.toEpochMilli();
+        log.info("Current time in millis: " + now.toEpochMilli());
+        log.info("Current time in millis to delete: " + endDate);
+
+        this.dataExplorerQueryManagement.deleteData(m.getMeasureName(), null, 
endDate);
+

Review Comment:
   ```suggestion
   ```



##########
streampipes-service-core/src/main/java/org/apache/streampipes/service/core/scheduler/DataLakeScheduler.java:
##########
@@ -0,0 +1,64 @@
+package org.apache.streampipes.service.core.scheduler;
+
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.List;
+
+import org.slf4j.LoggerFactory;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerQueryManagement;
+import org.apache.streampipes.dataexplorer.api.IDataExplorerSchemaManagement;
+import org.apache.streampipes.dataexplorer.management.DataExplorerDispatcher;
+import org.apache.streampipes.model.datalake.DataLakeMeasure;
+import org.slf4j.Logger;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DataLakeScheduler {
+
+    private static final Logger log = 
LoggerFactory.getLogger(DataLakeScheduler.class);

Review Comment:
   ```suggestion
       private static final Logger LOG = 
LoggerFactory.getLogger(DataLakeScheduler.class);
   ```
   
   In most cases we use LOG as the variable for logging.



##########
ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts:
##########
@@ -153,6 +154,21 @@ export class DatalakeRestService {
         return this.buildDownloadRequest(index, qp);
     }
 
+    cleanup(index: string, config: any) {
+        console.log('cleanup');
+        console.log(config);
+
+        const url = `${this.dataLakeUrl}/${index}/cleanup`;
+
+        const request = new HttpRequest('POST', url, config, {

Review Comment:
   Content type is `application/json` by default, so the headers are not needed



##########
streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeResource.java:
##########
@@ -400,6 +402,37 @@ private boolean checkProvidedQueryParams(Map<String, 
String> providedParams) {
     return SUPPORTED_PARAMS.containsAll(providedParams.keySet());
   }
 
+
+    //TODO Currently working on API ENdpoint 
+    @PostMapping(
+      path = "/{elementId}/cleanup",
+      produces = MediaType.APPLICATION_JSON_VALUE,
+      consumes = MediaType.APPLICATION_JSON_VALUE)
+  @Operation(summary = "Sets the retention mechanism for a certain 
measurement", tags = {"Data Lake"},
+      responses = {
+          @ApiResponse(
+              responseCode = "400",
+              description = "Can't store the given data to this data lake"),
+          @ApiResponse(
+              responseCode = "200",
+              description = "Successfully stored data")})
+  public ResponseEntity<?> setDataLakeRetention(
+      @PathVariable String elementId,
+      @RequestBody RetentionTimeConfig retention ){

Review Comment:
   ```suggestion
         @RequestBody RetentionTimeConfig retention){
   ```



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-export/select-format.component.ts:
##########
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import { Component, inject, Input, OnInit } from '@angular/core';
+import { FormatExportConfig } from '../../model/format-export-config.model';
+import { FileMetadata, FilesService } from '@streampipes/platform-services';
+import { CurrentUserService } from '../../../../services/current-user.service';
+
+@Component({
+    selector: 'sp-select-format',
+    templateUrl: './select-format.component.html',
+    styleUrls: [
+        './select-format.component.scss',
+        '../../data-download-dialog.component.scss',
+    ],
+    standalone: false,
+})
+export class SelectFormatComponent implements OnInit {
+    @Input() formatExportConfig: FormatExportConfig;
+
+    hasReadFilePrivilege = false;
+    excelTemplates: FileMetadata[] = [];
+
+    private fileService = inject(FilesService);
+    private currentUserService = inject(CurrentUserService);
+
+    constructor() {}
+
+    ngOnInit() {
+        this.hasReadFilePrivilege = this.currentUserService.hasRole(
+            'PRIVILEGE_READ_FILES',
+        );
+        if (this.hasReadFilePrivilege) {

Review Comment:
   Do we need the excel templates?



##########
streampipes-model/src/main/java/org/apache/streampipes/model/datalake/RetentionTimeConfig.java:
##########
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.model.datalake;
+//, RetentionExportConfig exportConfig

Review Comment:
   ```suggestion
   ```



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-export/select-format.component.scss:
##########


Review Comment:
   Empty scss can be removed if we don't need it



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-retention/select-retention-action/select-retention-action.component.ts:
##########
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import { Component, Input, OnInit } from '@angular/core';
+import {
+    DataExplorerDataConfig,
+    DateRange,
+} from '@streampipes/platform-services';
+import { DataRetentionConfig } from 
'../../../model/data-retention-config.model';
+
+@Component({
+    selector: 'sp-select-retention-action',
+    templateUrl: './select-retention-action.component.html',
+    styleUrls: [
+        './select-retention-action.component.scss',
+        // '../select-data.component.scss',

Review Comment:
   ```suggestion
   ```



##########
ui/src/app/configuration/dialog/data-retention-dialog/model/retention-export-config.model.ts:
##########
@@ -0,0 +1,40 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+export type FormatExportConfig =

Review Comment:
   Are these settings here to prepare the offloading feature or can we remove 
them?



##########
ui/src/app/configuration/dialog/data-retention-dialog/data-retention-dialog.component.ts:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { Component, Input, OnInit, ViewChild } from '@angular/core';
+import { DialogRef } from '@streampipes/shared-ui';
+import { DataRetentionDialogModel } from './model/data-retention-dialog.model';
+import {
+    DatalakeRestService,
+    RetentionTimeConfig,
+} from '@streampipes/platform-services';
+
+@Component({
+    selector: 'sp-data-retention-dialog',
+    templateUrl: 'data-retention-dialog.component.html',
+    styleUrls: ['./data-retention-dialog.component.scss'],
+    standalone: false,
+})
+export class DataRetentionDialogComponent implements OnInit {
+    @Input() dataRetentionDialogModel: DataRetentionDialogModel;
+
+    @Input()
+    retentionConfig: RetentionTimeConfig;
+
+    @Input()
+    measurementIndex: string;
+
+    constructor(
+        public dialogRef: DialogRef<DataRetentionDialogComponent>,
+        private datalakeRestService: DatalakeRestService,
+    ) {}
+
+    ngOnInit() {
+        this.datalakeRestService

Review Comment:
   I think the HTML uses some variables that are not initialized. When I open 
the dialog, the dialog opens from. the left, look broken and then recovers. 
There are some errors in the console.



##########
ui/src/app/configuration/dialog/data-retention-dialog/components/select-export/select-format.component.ts:
##########
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+import { Component, inject, Input, OnInit } from '@angular/core';
+import { FormatExportConfig } from '../../model/format-export-config.model';
+import { FileMetadata, FilesService } from '@streampipes/platform-services';
+import { CurrentUserService } from '../../../../services/current-user.service';
+
+@Component({
+    selector: 'sp-select-format',
+    templateUrl: './select-format.component.html',
+    styleUrls: [
+        './select-format.component.scss',
+        '../../data-download-dialog.component.scss',
+    ],
+    standalone: false,
+})
+export class SelectFormatComponent implements OnInit {
+    @Input() formatExportConfig: FormatExportConfig;
+
+    hasReadFilePrivilege = false;
+    excelTemplates: FileMetadata[] = [];
+
+    private fileService = inject(FilesService);
+    private currentUserService = inject(CurrentUserService);
+
+    constructor() {}

Review Comment:
   Empty constructor can be removed
   ```suggestion
   ```



##########
streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataRetentionConfig.java:
##########
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.model.datalake;
+
+public record DataRetentionConfig(RetentionInterval interval, int 
olderThanDays, RetentionAction action) {}

Review Comment:
   Code style: If possible add a new line for each parameter in records and 
methods to ease git diff management



##########
ui/src/app/configuration/dialog/data-retention-dialog/model/retention-config.model.ts:
##########
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+import { DataRetentionConfig } from './data-retention-config.model';
+//import { FormatExportConfig } from './format-export-config.model';

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to