UI: Provide parent dashboard in embedded dashboard dialog.
This commit is contained in:
parent
b65aa4cc8a
commit
aac93c1818
@ -28,7 +28,7 @@
|
||||
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
|
||||
<div class="dashboard-state-dialog-content" mat-dialog-content fxFlex fxLayout="column" style="padding: 8px;">
|
||||
<tb-dashboard-page [embedded]="true" [syncStateWithQueryParam]="false" [hideToolbar]="hideToolbar"
|
||||
[currentState]="state" [dashboard]="dashboard" style="width: 100%; height: 100%;"></tb-dashboard-page>
|
||||
[currentState]="state" [dashboard]="dashboard" [parentDashboard]="parentDashboard" style="width: 100%; height: 100%;"></tb-dashboard-page>
|
||||
</div>
|
||||
<div mat-dialog-actions fxLayoutAlign="end center">
|
||||
<button mat-button color="primary"
|
||||
|
||||
@ -29,6 +29,7 @@ import { AppState } from '@core/core.state';
|
||||
import { Router } from '@angular/router';
|
||||
import { DialogComponent } from '@shared/components/dialog.component';
|
||||
import { Dashboard } from '@shared/models/dashboard.models';
|
||||
import { IDashboardComponent } from '@home/models/dashboard-component.models';
|
||||
|
||||
export interface EmbedDashboardDialogData {
|
||||
dashboard: Dashboard;
|
||||
@ -37,6 +38,7 @@ export interface EmbedDashboardDialogData {
|
||||
hideToolbar: boolean;
|
||||
width?: number;
|
||||
height?: number;
|
||||
parentDashboard?: IDashboardComponent;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -53,6 +55,7 @@ export class EmbedDashboardDialogComponent extends DialogComponent<EmbedDashboar
|
||||
state = this.data.state;
|
||||
title = this.data.title;
|
||||
hideToolbar = this.data.hideToolbar;
|
||||
parentDashboard = this.data.parentDashboard;
|
||||
|
||||
dialogStyle: any = {};
|
||||
|
||||
|
||||
@ -1446,7 +1446,9 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI
|
||||
title,
|
||||
hideToolbar: hideDashboardToolbar,
|
||||
width: dialogWidth,
|
||||
height: dialogHeight
|
||||
height: dialogHeight,
|
||||
parentDashboard: this.widgetContext.parentDashboard ?
|
||||
this.widgetContext.parentDashboard : this.widgetContext.dashboard
|
||||
}
|
||||
});
|
||||
this.cd.markForCheck();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user