You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/03/09 10:33:24 UTC

[incubator-streampipes] branch STREAMPIPES-79 updated: Working on new data explorer

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

zehnder pushed a commit to branch STREAMPIPES-79
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/STREAMPIPES-79 by this push:
     new 25ed819  Working on new data explorer
25ed819 is described below

commit 25ed8194d346375dcdc0cba7f55f62e5177dfd80
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Mar 9 11:33:01 2020 +0100

    Working on new data explorer
---
 .../streampipes/model/datalake/DataExplorerWidgetModel.java  | 12 ++----------
 ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts    |  9 +++++----
 .../widgets/line-chart/line-chart-widget.component.html      |  1 -
 .../widgets/line-chart/line-chart-widget.component.ts        |  4 ++--
 .../components/widgets/table/table-widget.component.ts       |  3 ++-
 .../data-explorer-add-visualization-dialog.component.ts      |  2 +-
 6 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
index 31055a3..725f0a1 100644
--- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
+++ b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataExplorerWidgetModel.java
@@ -39,8 +39,8 @@ public class DataExplorerWidgetModel extends DashboardEntity {
   @RdfProperty(StreamPipes.HAS_DASHBOARD_WIDGET_TYPE)
   private String widgetType;
 
-  @RdfProperty(StreamPipes.HAS_MEASUREMENT_NAME)
-  private String measureName;
+//  @RdfProperty(StreamPipes.HAS_MEASUREMENT_NAME)
+//  private String measureName;
 
   @OneToOne(fetch = FetchType.EAGER,
           cascade = {CascadeType.PERSIST, CascadeType.MERGE})
@@ -67,14 +67,6 @@ public class DataExplorerWidgetModel extends DashboardEntity {
     this.dataLakeMeasure = dataLakeMeasure;
   }
 
-  public String getMeasureName() {
-    return measureName;
-  }
-
-  public void setMeasureName(String measureName) {
-    this.measureName = measureName;
-  }
-
   public String getWidgetType() {
     return widgetType;
   }
diff --git a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts b/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
index f4b33c3..e776d16 100644
--- a/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
+++ b/ui/src/app/core-model/datalake/DataExplorerWidgetModel.ts
@@ -20,6 +20,7 @@ import { UnnamedStreamPipesEntity } from '../../connect/model/UnnamedStreamPipes
 import { EventSchema } from '../../connect/schema-editor/model/EventSchema';
 import { RdfsClass } from '../../platform-services/tsonld/RdfsClass';
 import { RdfProperty } from '../../platform-services/tsonld/RdfsProperty';
+import { DataLakeMeasure } from './DataLakeMeasure';
 
 @RdfsClass('sp:DataExplorerWidgetModel')
 export class DataExplorerWidgetModel extends UnnamedStreamPipesEntity {
@@ -33,14 +34,14 @@ export class DataExplorerWidgetModel extends UnnamedStreamPipesEntity {
     @RdfProperty('sp:hasDashboardWidgetId')
     widgetId: string;
 
-    @RdfProperty('sp:hasMeasurementName')
-    measureName: string;
+    // @RdfProperty('sp:hasMeasurementName')
+    // measureName: string;
 
     @RdfProperty('sp:hasDashboardWidgetType')
     widgetType: string;
 
-    @RdfProperty('sp:hasSchema')
-    eventSchema: EventSchema;
+    @RdfProperty('sp:hasDataLakeMeasure')
+    dataLakeMeasure: DataLakeMeasure
 
     constructor() {
         super();
diff --git a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html
index 61e070e..9ceede3 100644
--- a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.html
@@ -42,7 +42,6 @@
 
             <sp-no-data-in-date-range *ngIf="showNoDataInDateRange" [viewDateRange]="viewDateRange"></sp-no-data-in-date-range>
 
-
             <!-- Chart -->
             <plotly-plot fxFlex
                          *ngIf="showData"
diff --git a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts
index 2eab987..d746adc 100644
--- a/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts
+++ b/ui/src/app/data-explorer-v2/components/widgets/line-chart/line-chart-widget.component.ts
@@ -96,8 +96,8 @@ export class LineChartWidgetComponent extends BaseDataExplorerWidget implements
 
     this.setShownComponents(false, false, true);
     this.dataLakeRestService.getDataAutoAggergation(
-      this.dataExplorerWidget.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime()).subscribe(
-      (res: DataResult) => {
+      this.dataExplorerWidget.dataLakeMeasure.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime())
+      .subscribe((res: DataResult) => {
         if (res.total === 0) {
           this.setShownComponents(true, false, false);
         } else {
diff --git a/ui/src/app/data-explorer-v2/components/widgets/table/table-widget.component.ts b/ui/src/app/data-explorer-v2/components/widgets/table/table-widget.component.ts
index d341b49..8cd2b06 100644
--- a/ui/src/app/data-explorer-v2/components/widgets/table/table-widget.component.ts
+++ b/ui/src/app/data-explorer-v2/components/widgets/table/table-widget.component.ts
@@ -54,7 +54,8 @@ export class TableWidgetComponent extends BaseDataExplorerWidget implements OnIn
     this.setShownComponents(false, false, true);
 
     this.dataLakeRestService.getDataAutoAggergation(
-      this.dataExplorerWidget.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime()).subscribe(
+      this.dataExplorerWidget.dataLakeMeasure.measureName, this.viewDateRange.startDate.getTime(), this.viewDateRange.endDate.getTime())
+      .subscribe(
       (res: DataResult) => {
 
         this.dataSource.data = this.transformData(res);
diff --git a/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts b/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
index 38908eb..40352f9 100644
--- a/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
+++ b/ui/src/app/data-explorer-v2/dialogs/add-widget/data-explorer-add-visualization-dialog.component.ts
@@ -130,7 +130,7 @@ export class DataExplorerAddVisualizationDialogComponent implements OnInit {
       //       configuredWidget.eventSchema.eventProperties.push(ep.copy());
       //  }
 
-      configuredWidget.measureName = this.selectedDataSet.measureName;
+      configuredWidget.dataLakeMeasure = this.selectedDataSet;
       configuredWidget.widgetType = this.selectedWidget;
       this.dataViewDataExplorerService.saveWidget(configuredWidget).subscribe(response => {
         this.dialogRef.close(response);