Browse Source

Merge pull request #12268 from vvlladd28/bug/updated-timewindow/after-cancel-edit-dashboard

Fixed incorrect apply timewindows after cancel edit dashboard
pull/12277/head
Igor Kulikov 1 year ago
committed by GitHub
parent
commit
51dfb8d148
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
  2. 6
      ui-ngx/src/app/modules/home/components/widget/widget.component.ts

5
ui-ngx/src/app/modules/home/components/widget/widget-container.component.html

@ -66,6 +66,7 @@
<div class="tb-widget-content" [class.tb-no-interaction]="disableWidgetInteraction">
<tb-widget #widgetComponent
[dashboardWidget]="widget"
[widget]="widget.widget"
[isEdit]="isEdit"
[isPreview]="isPreview"
[isMobile]="isMobile"
@ -96,8 +97,8 @@
noMargin
noPadding
[isEdit]="isEdit"
[timewindowStyle]="widgetComponent.widget.config.timewindowStyle"
[(ngModel)]="widgetComponent.widget.config.timewindow"
[timewindowStyle]="widget.widget.config.timewindowStyle"
[(ngModel)]="widget.widget.config.timewindow"
(ngModelChange)="widgetComponent.onTimewindowChanged($event)">
</tb-timewindow>
</div>

6
ui-ngx/src/app/modules/home/components/widget/widget.component.ts

@ -150,9 +150,11 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges,
@Input()
dashboardWidget: DashboardWidget;
@Input()
widget: Widget;
@ViewChild('widgetContent', {read: ViewContainerRef, static: true}) widgetContentContainer: ViewContainerRef;
widget: Widget;
widgetInfo: WidgetInfo;
errorMessages: string[];
widgetContext: WidgetContext;
@ -223,8 +225,6 @@ export class WidgetComponent extends PageComponent implements OnInit, OnChanges,
this.loadingData = true;
this.widget = this.dashboardWidget.widget;
const actionDescriptorsBySourceId: {[actionSourceId: string]: Array<WidgetActionDescriptor>} = {};
if (this.widget.config.actions) {
for (const actionSourceId of Object.keys(this.widget.config.actions)) {

Loading…
Cancel
Save