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 2022/08/07 12:58:39 UTC

[incubator-streampipes] branch dev updated: [STREAMPIPES-564] Fix group by update bug

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new eca719202 [STREAMPIPES-564] Fix group by update bug
eca719202 is described below

commit eca719202662a0d96f34e47c34ff516af7cfbfe2
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sun Aug 7 14:58:30 2022 +0200

    [STREAMPIPES-564] Fix group by update bug
---
 .../data-explorer-widget-data-settings.component.html          |  6 ++++--
 .../data-explorer-widget-data-settings.component.ts            | 10 ++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.html b/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
index 7edc2e249..c27679835 100644
--- a/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
+++ b/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.html
@@ -124,7 +124,8 @@
                 </div>
                 <div fxLayout="column" fxFlex="100" class="data-explorer-options-panel"
                      *ngIf="sourceConfig.queryType && sourceConfig.measure">
-                    <sp-field-selection-panel #fieldSelectionPanel [sourceConfig]="sourceConfig"
+                    <sp-field-selection-panel #fieldSelectionPanel 
+                                              [sourceConfig]="sourceConfig"
                                               [widgetId]="widgetId"></sp-field-selection-panel>
                 </div>
                 <div fxLayout="column" fxFlex="100" class="data-explorer-options-panel"
@@ -134,7 +135,8 @@
                 </div>
                 <div fxLayout="column" fxFlex="100" class="data-explorer-options-panel"
                      *ngIf="sourceConfig.queryType && sourceConfig.measure">
-                    <sp-group-selection-panel [sourceConfig]="sourceConfig"
+                    <sp-group-selection-panel #groupSelectionPanel
+                                              [sourceConfig]="sourceConfig"
                                               [widgetId]="widgetId"></sp-group-selection-panel>
                 </div>
             </div>
diff --git a/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.ts b/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
index e53af98f6..7768df97a 100644
--- a/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
+++ b/ui/src/app/data-explorer/components/designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
@@ -30,6 +30,7 @@ import { Tuple2 } from '../../../../core-model/base/Tuple2';
 import { zip } from 'rxjs';
 import { WidgetConfigurationService } from '../../../services/widget-configuration.service';
 import { FieldSelectionPanelComponent } from './field-selection-panel/field-selection-panel.component';
+import { GroupSelectionPanelComponent } from './group-selection-panel/group-selection-panel.component';
 
 @Component({
   selector: 'sp-data-explorer-widget-data-settings',
@@ -51,6 +52,10 @@ export class DataExplorerWidgetDataSettingsComponent implements OnInit {
   @ViewChild('fieldSelectionPanel')
   fieldSelectionPanel: FieldSelectionPanelComponent;
 
+  @ViewChild('groupSelectionPanel')
+  groupSelectionPanel: GroupSelectionPanelComponent;
+
+
   availablePipelines: DataLakeMeasure[] = [];
   availableMeasurements: DataLakeMeasure[] = [];
 
@@ -120,6 +125,11 @@ export class DataExplorerWidgetDataSettingsComponent implements OnInit {
       this.fieldSelectionPanel.applyDefaultFields();
     }
 
+    sourceConfig.queryConfig.groupBy = [];
+    if (this.groupSelectionPanel) {
+      this.groupSelectionPanel.applyDefaultFields();
+    }
+
   }
 
   findMeasure(measureName: string) {