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