@if (withName) {
{{'widget-config.action-name' | translate}}*
@if (widgetActionFormGroup.get('name').invalid && (widgetActionFormGroup.get('name').touched || widgetActionFormGroup.get('name').hasError('actionNameNotUnique'))) { warning }
}
widget-config.action
@for (actionType of actionTypes(); track actionType) { {{ widgetActionTypeTranslations.get(widgetActionType[actionType]) | translate }} }
@switch (widgetActionFormGroup.get('type').value) { @case (widgetActionType.openDashboard) {
{{ 'widget-action.target-dashboard' | translate }}*
} @case (widgetActionFormGroup.get('type').value === widgetActionType.openDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.updateDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.openDashboard ? widgetActionFormGroup.get('type').value : '') {
{{ 'widget-action.target-dashboard-state' | translate }} @if (widgetActionFormGroup.get('type').value === widgetActionType.openDashboardState) { * }
@if (actionTypeFormGroup.get('targetDashboardStateId').value) { } @if (actionTypeFormGroup.get('targetDashboardStateId').hasError('required') && actionTypeFormGroup.get('targetDashboardStateId').touched) { warning } @for (state of filteredDashboardStates | async; track state) { }
} @case (widgetActionType.openURL) {
{{ 'widget-action.URL' | translate }}
@if (actionTypeFormGroup.get('url').invalid && actionTypeFormGroup.get('url').touched) { warning }
} @case (widgetActionFormGroup.get('type').value === widgetActionType.openDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.updateDashboardState ? widgetActionFormGroup.get('type').value : '') {
{{ 'widget-action.open-right-layout' | translate }}
} @case (widgetActionFormGroup.get('type').value === widgetActionType.openDashboard || widgetActionFormGroup.get('type').value === widgetActionType.openURL ? widgetActionFormGroup.get('type').value : '') {
{{ 'widget-action.open-new-browser-tab' | translate }}
} @case (widgetActionFormGroup.get('type').value === widgetActionType.openDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.updateDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.openDashboard ? widgetActionFormGroup.get('type').value : '') { @if (widgetType !== WidgetType.static) {
{{ 'widget-action.set-entity-from-widget' | translate }}
} @if (actionTypeFormGroup.get('setEntityId').value) {
{{ 'alias.state-entity-parameter-name' | translate }}
} } @case (widgetActionFormGroup.get('type').value === widgetActionType.openDashboardState ? widgetActionFormGroup.get('type').value : '') {
{{ 'widget-action.state-display-type' | translate }}
@for (displayType of allStateDisplayTypes; track displayType) { {{ stateDisplayTypeName(displayType) }} }
@switch (actionTypeFormGroup.get('stateDisplayType').value) { @case ('separateDialog') {
{{ 'widget-action.dialog-title' | translate }}
{{ 'widget-action.dialog-hide-dashboard-toolbar' | translate }}
{{ 'widget-action.dialog-width' | translate }}
@if (stateDisplayTypeFormGroup.get('dialogWidth').invalid && stateDisplayTypeFormGroup.get('dialogWidth').touched) { warning }
{{ 'widget-action.dialog-height' | translate }}
@if (stateDisplayTypeFormGroup.get('dialogHeight').invalid && stateDisplayTypeFormGroup.get('dialogHeight').touched) { warning }
} @case ('popover') {
{{ 'widget-action.popover-preferred-placement' | translate }}
@for (placement of allPopoverPlacements; track placement) { {{ popoverPlacementName(placement) }} }
{{ 'widget-action.popover-hide-on-click-outside' | translate }}
{{ 'widget-action.popover-hide-dashboard-toolbar' | translate }}
{{ 'widget-action.popover-width' | translate }}
{{ 'widget-action.popover-height' | translate }}
} @case ('normal') { } }
} @case (widgetActionType.custom) { } @case (widgetActionType.placeMapItem) {
{{ 'widget-action.map-item-type' | translate }}
@for(type of mapItemTypes; track type) { {{ mapItemTypeTranslationMap.get(type) | translate }} }
} @case (widgetActionFormGroup.get('type').value === widgetActionType.customPretty || widgetActionFormGroup.get('type').value === widgetActionType.placeMapItem ? widgetActionFormGroup.get('type').value : '') { } @case (widgetActionType.mobileAction) { } }