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 2021/10/17 14:42:34 UTC
[incubator-streampipes] branch dev updated: [hotfix] Remove data
lake dashboard and widgets on reset
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 013b1b6 [hotfix] Remove data lake dashboard and widgets on reset
new e4728f0 Merge branch 'dev' of github.com:apache/incubator-streampipes into dev
013b1b6 is described below
commit 013b1b6024d6dac42112cb2a526ded6add3d1c9d
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Sun Oct 17 16:42:00 2021 +0200
[hotfix] Remove data lake dashboard and widgets on reset
---
.../java/org/apache/streampipes/rest/ResetManagement.java | 15 +++++++++++++++
ui/cypress/tests/datalake/widgets/table.ts | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/ResetManagement.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/ResetManagement.java
index 680879a..d667c20 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/ResetManagement.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/ResetManagement.java
@@ -30,6 +30,9 @@ import org.apache.streampipes.model.client.file.FileMetadata;
import org.apache.streampipes.model.connect.adapter.AdapterDescription;
import org.apache.streampipes.model.datalake.DataLakeMeasure;
import org.apache.streampipes.model.pipeline.Pipeline;
+import org.apache.streampipes.storage.api.IDashboardStorage;
+import org.apache.streampipes.storage.api.IDataExplorerWidgetStorage;
+import org.apache.streampipes.storage.management.StorageDispatcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -97,6 +100,18 @@ public class ResetManagement {
}
});
+ // Remove all data views widgets
+ IDataExplorerWidgetStorage widgetStorage = StorageDispatcher.INSTANCE.getNoSqlStore().getDataExplorerWidgetStorage();
+ widgetStorage.getAllDataExplorerWidgets().forEach(widget -> {
+ widgetStorage.deleteDataExplorerWidget(widget.getId());
+ });
+
+ // Remove all data views
+ IDashboardStorage dataLakeDashboardStorage = StorageDispatcher.INSTANCE.getNoSqlStore().getDataExplorerDashboardStorage();
+ dataLakeDashboardStorage.getAllDashboards().forEach(dashboard -> {
+ dataLakeDashboardStorage.deleteDashboard(dashboard.getCouchDbId());
+ });
+
logger.info("Resetting the system was completed");
}
}
diff --git a/ui/cypress/tests/datalake/widgets/table.ts b/ui/cypress/tests/datalake/widgets/table.ts
index 5937158..6892377 100644
--- a/ui/cypress/tests/datalake/widgets/table.ts
+++ b/ui/cypress/tests/datalake/widgets/table.ts
@@ -42,7 +42,7 @@ describe('Test Table View in Data Explorer', () => {
DataLakeUtils.dataConfigSelectAllFields();
- DataLakeUtils.clickNextButton();
+ DataLakeUtils.selectVisualizationConfig();
DataLakeUtils.selectVisualizationType('Table');