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/05/23 20:48:22 UTC
[incubator-streampipes] branch STREAMPIPES-537-NEW updated: [STREAMPIPES-537] Clean up dashboard overview component
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-537-NEW
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/STREAMPIPES-537-NEW by this push:
new b75ff2489 [STREAMPIPES-537] Clean up dashboard overview component
b75ff2489 is described below
commit b75ff248938dbfadfc96a945efbabbbf0e3f3c78
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon May 23 22:48:14 2022 +0200
[STREAMPIPES-537] Clean up dashboard overview component
---
.idea/runConfigurations/all_extensions_jvm.xml | 1 +
.idea/runConfigurations/backend.xml | 1 +
ui/deployment/prebuild.js | 2 +-
.../data-explorer-dashboard-overview.component.ts | 16 +++++-----------
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/.idea/runConfigurations/all_extensions_jvm.xml b/.idea/runConfigurations/all_extensions_jvm.xml
index 20063d047..1521eed35 100644
--- a/.idea/runConfigurations/all_extensions_jvm.xml
+++ b/.idea/runConfigurations/all_extensions_jvm.xml
@@ -9,6 +9,7 @@
<env name="SP_DATA_LAKE_HOST" value="localhost" />
<env name="SP_DATA_LAKE_PORT" value="8086" />
<env name="SP_IMAGE_STORAGE_LOCATION" value=".streampipes/spImages/" />
+ <env name="SP_HOST" value="192.168.0.35" />
</envs>
<option name="MAIN_CLASS_NAME" value="org.apache.streampipes.extensions.all.jvm.AllExtensionsInit" />
<module name="streampipes-extensions-all-jvm" />
diff --git a/.idea/runConfigurations/backend.xml b/.idea/runConfigurations/backend.xml
index ff3c77297..296cdb0f2 100644
--- a/.idea/runConfigurations/backend.xml
+++ b/.idea/runConfigurations/backend.xml
@@ -14,6 +14,7 @@
<env name="SP_JMS_HOST" value="localhost" />
<env name="SP_DEBUG" value="true " />
<env name="SP_PRIORITIZED_PROTOCOL" value="kafka" />
+ <env name="SP_HOST" value="192.168.0.35" />
</envs>
<method v="2">
<option name="Make" enabled="true" />
diff --git a/ui/deployment/prebuild.js b/ui/deployment/prebuild.js
index f104a2e1d..6947f123d 100644
--- a/ui/deployment/prebuild.js
+++ b/ui/deployment/prebuild.js
@@ -83,7 +83,7 @@ for (let module of config.modules) {
// Create necessary JavaScript-Files from Template and move to respective Directory
fs.writeFileSync('src/app/appng5.module.ts', mustache.render(fs.readFileSync('deployment/appng5.module.mst', 'utf8').toString(), modulesActive));
fs.writeFileSync('src/app/home/home.service.ts', mustache.render(fs.readFileSync('deployment/home.service.mst', 'utf8').toString(), modulesActive));
-fs.writeFileSync('src/app/app-routing.module.ts', mustache.render(fs.readFileSync('deployment/app-routing.module.mst', 'utf8').toString(), modulesActive));
+// fs.writeFileSync('src/app/app-routing.module.ts', mustache.render(fs.readFileSync('deployment/app-routing.module.mst', 'utf8').toString(), modulesActive));
fs.writeFileSync('src/app/core/components/base-navigation.component.ts', mustache.render(fs.readFileSync('deployment/base-navigation.component.mst', 'utf8').toString(), modulesActive));
fs.writeFileSync('src/scss/sp/sp-theme.scss', fs.readFileSync('deployment/sp-theme.scss'));
fs.writeFileSync('src/app/services/app.constants.ts', fs.readFileSync('deployment/app-constants.ts', 'utf8'));
diff --git a/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview.component.ts b/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview.component.ts
index c5490069b..b80d4f2a3 100644
--- a/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview.component.ts
+++ b/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview.component.ts
@@ -35,7 +35,6 @@ import { Router } from '@angular/router';
})
export class DataExplorerDashboardOverviewComponent implements OnInit {
- dataViewDashboards: Dashboard[];
dataSource = new MatTableDataSource<Dashboard>();
displayedColumns: string[] = [];
@@ -66,12 +65,10 @@ export class DataExplorerDashboardOverviewComponent implements OnInit {
getDashboards() {
this.dataViewService.getDataViews().subscribe(data => {
- this.dataViewDashboards = data.sort((a, b) => a.name.localeCompare(b.name));
- this.dataSource.data = this.dataViewDashboards;
+ this.dataSource.data = data.sort((a, b) => a.name.localeCompare(b.name));
});
}
-
openNewDataViewDialog() {
const dataViewDashboard: Dashboard = {};
dataViewDashboard.widgets = [];
@@ -91,7 +88,7 @@ export class DataExplorerDashboardOverviewComponent implements OnInit {
});
dialogRef.afterClosed().subscribe(result => {
- // this.reloadDashboardsEmitter.emit();
+ this.getDashboards();
});
}
@@ -109,7 +106,7 @@ export class DataExplorerDashboardOverviewComponent implements OnInit {
dialogRef.afterClosed().subscribe(refresh => {
if (refresh) {
- // this.reloadDashboardsEmitter.emit();
+ this.getDashboards();
}
});
}
@@ -119,16 +116,13 @@ export class DataExplorerDashboardOverviewComponent implements OnInit {
}
openDeleteDashboardDialog(dashboard: Dashboard) {
- // TODO add confirm dialog
- this.dashboardService.deleteDashboard(dashboard).subscribe(result => {
- // this.reloadDashboardsEmitter.emit();
+ this.dashboardService.deleteDashboard(dashboard).subscribe(() => {
+ this.getDashboards();
});
}
showDashboard(dashboard: Dashboard) {
- // const dashboardSettings: Tuple2<Dashboard, boolean> = { a: dashboard, b: editMode };
this.router.navigate(['dataexplorer/', dashboard._id]);
- // this.selectDashboardEmitter.emit(dashboardSettings);
}
editDashboard(dashboard: Dashboard) {