This is an automated email from the ASF dual-hosted git repository. zehnder pushed a commit to branch STREAMPIPES-349 in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit ddb7ba4f46bb4cfe2e681a39a323fa731e75d8dc Author: Philipp Zehnder <[email protected]> AuthorDate: Fri Jul 16 13:10:53 2021 +0200 Remove old code --- .../backend/StreamPipesResourceConfig.java | 8 ++++ .../datalake/datalake-rest.service.ts | 43 +++++++--------------- .../image-categorize/image-categorize.component.ts | 4 +- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java index fca3daf..0cf6a43 100644 --- a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java +++ b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java @@ -101,6 +101,14 @@ public class StreamPipesResourceConfig extends ResourceConfig { register(Visualization.class); register(VisualizablePipeline.class); + // Serializers + register(GsonWithIdProvider.class); + register(GsonWithoutIdProvider.class); + register(GsonClientModelProvider.class); + register(JsonLdProvider.class); + register(JacksonSerializationProvider.class); + register(MultiPartFeature.class); + // Platform Services register(PipelineElementTemplateResource.class); register(DataLakeResourceV4.class); 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 fee644f..1326669 100644 --- a/ui/src/app/core-services/datalake/datalake-rest.service.ts +++ b/ui/src/app/core-services/datalake/datalake-rest.service.ts @@ -41,7 +41,12 @@ export class DatalakeRestService { return this.baseUrl + '/api/v3/users/' + this.authStatusService.email + '/datalake'; } - getAllInfos(): Observable<DataLakeMeasure[]> { + private get dataLakeUrlV4() { + return this.baseUrl + '/api/v4/users/' + this.authStatusService.email + '/datalake'; + } + + + getAllInfos(): Observable<DataLakeMeasure[]> { return this.http.get(this.dataLakeUrlV3 + '/info').pipe(map(response => { return (response as any[]).map(p => DataLakeMeasure.fromData(p)); })); @@ -56,11 +61,14 @@ export class DatalakeRestService { } getData(index, startDate, endDate, aggregationTimeUnit, aggregationValue): Observable<DataResult> { - return this.http.get<DataResult>(this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '?aggregationUnit=' + aggregationTimeUnit + '&aggregationValue=' + aggregationValue); + return this.http.get<DataResult>( + this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '?aggregationUnit=' + aggregationTimeUnit + '&aggregationValue=' + aggregationValue); } getGroupedData(index, startDate, endDate, aggregationTimeUnit, aggregationValue, groupingTag) { - return this.http.get<GroupedDataResult>(this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '/grouping/' + groupingTag + '?aggregationUnit=' + aggregationTimeUnit + '&aggregationValue=' + aggregationValue); + return this.http.get<GroupedDataResult>( + this.dataLakeUrlV3 + '/data/' + index + '/' + startDate + '/' + endDate + '/grouping/' + groupingTag + + '?aggregationUnit=' + aggregationTimeUnit + '&aggregationValue=' + aggregationValue); } getDataAutoAggregation(index, startDate, endDate) { @@ -68,7 +76,8 @@ 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); } downloadRowData(index, format) { @@ -88,32 +97,6 @@ export class DatalakeRestService { return this.http.request(request); } - getLabels() { - return { - 'boxes': ['blue', 'red'], - 'sign': ['trafficsign'], - 'person': ['person', 'Child'], - 'vehicle': ['bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat'], - 'outdoor': ['traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench'], - 'animal': ['bird', 'cat', 'dog'], - 'accessory': ['backpack', 'umbrella', 'handbag', 'suitcase'], - 'sports': ['frisbee', 'sports ball', 'skis', 'frisbee', 'baseball bat'], - 'kitchen': ['bottle', 'cup', 'fork', 'knife', 'spoon'], - 'furniture': ['chair', 'couch', 'bed', 'table'], - 'electronic': ['tv', 'laptop', 'mouse', 'keyboard'] - }; - } - - get_timeseries_labels() { - // mocked colorPropertyStringValues - const labels = { - coffee: ['coffee', 'coffee special', 'espresso', '2x espresso', 'hot water', 'undefined'], - state: ['online', 'offline', 'active', 'inactive'], - trend: ['increasing', 'decreasing'], - daytime: ['day', 'night']}; - return labels; - } - getImageUrl(imageRoute) { return this.dataLakeUrlV3 + '/data/image/' + imageRoute + '/file'; } diff --git a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts index 07507d4..875fc8b 100644 --- a/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts +++ b/ui/src/app/core-ui/image/image-categorize/image-categorize.component.ts @@ -52,8 +52,8 @@ export class ImageCategorizeComponent implements OnInit, AfterViewInit { // TODO: Load colorPropertyStringValues for images this.selectedLabels = []; - // TODO: Get Labels - this.labels = this.restService.getLabels(); + // TODO: Change to label service + // this.labels = this.restService.getLabels(); this.restService.getAllInfos().subscribe(res => { this.eventSchema = res.find(elem => elem.measureName === this.measureName).eventSchema;
