Browse Source

Merge pull request #10316 from Dmitriymush/hot-fix/open-URL

Refactoring widgetActionTypes
pull/10329/head
Igor Kulikov 2 years ago
committed by GitHub
parent
commit
4e61c9f76e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/widget-action.component.ts
  2. 2
      ui-ngx/src/app/shared/models/widget.models.ts

3
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/widget-action.component.ts

@ -28,6 +28,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an
import {
WidgetAction,
WidgetActionType,
widgetActionTypes,
widgetActionTypeTranslationMap,
widgetType
} from '@shared/models/widget.models';
@ -88,7 +89,7 @@ export class WidgetActionComponent implements ControlValueAccessor, OnInit, Vali
@Input()
callbacks: WidgetActionCallbacks;
widgetActionTypes = Object.keys(WidgetActionType);
widgetActionTypes = widgetActionTypes;
widgetActionTypeTranslations = widgetActionTypeTranslationMap;
widgetActionType = WidgetActionType;

2
ui-ngx/src/app/shared/models/widget.models.ts

@ -555,6 +555,8 @@ export enum WidgetMobileActionType {
takeScreenshot = 'takeScreenshot'
}
export const widgetActionTypes = Object.keys(WidgetActionType) as WidgetActionType[];
export const widgetActionTypeTranslationMap = new Map<WidgetActionType, string>(
[
[ WidgetActionType.openDashboardState, 'widget-action.open-dashboard-state' ],

Loading…
Cancel
Save