This is an automated email from the ASF dual-hosted git repository.
riemer 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 03db03b [hotfix] Add minor layout improvements to dashboard
03db03b is described below
commit 03db03b69fc938c4631b311b20706422ae4777b6
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Feb 23 21:53:04 2021 +0100
[hotfix] Add minor layout improvements to dashboard
---
ui/src/app/dashboard/components/grid/dashboard-grid.component.ts | 3 +++
.../app/dashboard/components/panel/dashboard-panel.component.ts | 4 ++--
.../components/widgets/table/table-widget.component.css | 9 ++++++++-
.../components/widgets/table/table-widget.component.html | 6 +++---
.../dashboard/components/widgets/table/table-widget.component.ts | 3 ++-
5 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/ui/src/app/dashboard/components/grid/dashboard-grid.component.ts
b/ui/src/app/dashboard/components/grid/dashboard-grid.component.ts
index a3f7f5c..5ea24da 100644
--- a/ui/src/app/dashboard/components/grid/dashboard-grid.component.ts
+++ b/ui/src/app/dashboard/components/grid/dashboard-grid.component.ts
@@ -72,6 +72,7 @@ export class DashboardGridComponent implements OnInit,
OnChanges {
fixedColWidth: 50,
margin: 5,
resizable: { enabled: this.editMode },
+ displayGrid: this.editMode ? 'always' : 'none',
itemResizeCallback: ((item, itemComponent) => {
this.resizeService.notify({gridsterItem: item,
gridsterItemComponent: itemComponent} as GridsterInfo);
}),
@@ -87,6 +88,8 @@ export class DashboardGridComponent implements OnInit,
OnChanges {
this.options.resizable.enabled = this.editMode;
this.options.displayGrid = this.editMode ? 'always' : 'none';
this.options.api.optionsChanged();
+ console.log(this.options);
+ console.log(this.editMode);
}
}
diff --git a/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
b/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
index 32c24b9..9cce17f 100644
--- a/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
+++ b/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
@@ -75,8 +75,8 @@ export class DashboardPanelComponent implements OnInit {
dashboardItem.id = widget._id;
// TODO there should be a widget type DashboardWidget
dashboardItem.widgetType = widget.dashboardWidgetSettings.widgetName;
- dashboardItem.cols = 2;
- dashboardItem.rows = 2;
+ dashboardItem.cols = 4;
+ dashboardItem.rows = 4;
dashboardItem.x = 0;
dashboardItem.y = 0;
this.dashboard.widgets.push(dashboardItem);
diff --git
a/ui/src/app/dashboard/components/widgets/table/table-widget.component.css
b/ui/src/app/dashboard/components/widgets/table/table-widget.component.css
index 59023f4..4438684 100644
--- a/ui/src/app/dashboard/components/widgets/table/table-widget.component.css
+++ b/ui/src/app/dashboard/components/widgets/table/table-widget.component.css
@@ -23,4 +23,11 @@
.mt-20 {
margin-top:20px;
-}
\ No newline at end of file
+}
+
+.main-panel {
+ width:100%;
+ height: 100%;
+ display:inline-grid;
+ align-content: center;
+}
diff --git
a/ui/src/app/dashboard/components/widgets/table/table-widget.component.html
b/ui/src/app/dashboard/components/widgets/table/table-widget.component.html
index dc55f14..c4e1c4e 100644
--- a/ui/src/app/dashboard/components/widgets/table/table-widget.component.html
+++ b/ui/src/app/dashboard/components/widgets/table/table-widget.component.html
@@ -16,12 +16,12 @@
~
-->
-<div fxLayout="column" fxFlex="100" [ngStyle]="{'background-color':
selectedBackgroundColor, 'color':
+<div class="main-panel" fxLayout="column" fxFlex="100"
[ngStyle]="{'background-color': selectedBackgroundColor, 'color':
selectedPrimaryTextColor}">
<div class="title-panel mt-20" *ngIf="hasTitlePanelSettings">
{{selectedTitle}}
</div>
- <table fxFlex="100" mat-table [dataSource]="dataSource"
[ngStyle]="{'background': selectedBackgroundColor}">
+ <table mat-table [dataSource]="dataSource" [ngStyle]="{'background':
selectedBackgroundColor}">
<ng-container *ngFor="let element of selectedProperties"
[cdkColumnDef]="element">
<th mat-header-cell [ngStyle]="{'color': selectedPrimaryTextColor}"
@@ -33,4 +33,4 @@ selectedPrimaryTextColor}">
<tr mat-row *matRowDef="let row; columns: selectedProperties;"></tr>
</table>
-</div>
\ No newline at end of file
+</div>
diff --git
a/ui/src/app/dashboard/components/widgets/table/table-widget.component.ts
b/ui/src/app/dashboard/components/widgets/table/table-widget.component.ts
index 5af1d0d..706ada0 100644
--- a/ui/src/app/dashboard/components/widgets/table/table-widget.component.ts
+++ b/ui/src/app/dashboard/components/widgets/table/table-widget.component.ts
@@ -38,6 +38,7 @@ export class TableWidgetComponent extends
BaseStreamPipesWidget implements OnIni
displayedColumns: String[] = [];
dataSource = new MatTableDataSource();
semanticTypes: { [key: string]: string; } = {};
+ tableDisplayed: boolean = false;
constructor(rxStompService: RxStompService, dashboardService:
DashboardService, resizeService: ResizeService, private semanticTypeUtils:
SemanticTypeUtilsService) {
super(rxStompService, dashboardService, resizeService, false);
@@ -79,4 +80,4 @@ export class TableWidgetComponent extends
BaseStreamPipesWidget implements OnIni
protected onSizeChanged(width: number, height: number) {
}
-}
\ No newline at end of file
+}