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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
5 deletions
-
ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
-
ui-ngx/src/app/modules/home/components/widget/widget.component.ts
|
|
|
@ -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> |
|
|
|
|
|
|
|
@ -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)) { |
|
|
|
|