63 lines
2.9 KiB
HTML
63 lines
2.9 KiB
HTML
<!--
|
|
|
|
Copyright © 2016-2025 The Thingsboard Authors
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
|
|
-->
|
|
<section [formGroup]="deleteRelationConfigForm" class="tb-form-panel no-padding no-border">
|
|
<div class="tb-form-panel stroked no-padding-bottom">
|
|
<div class="tb-form-panel-title" translate>rule-node-config.relation-parameters</div>
|
|
<div class="flex flex-col">
|
|
<mat-form-field class="mat-block" hideRequiredMarker>
|
|
<mat-label translate>relation.direction</mat-label>
|
|
<mat-select required matInput formControlName="direction">
|
|
<mat-option *ngFor="let type of directionTypes" [value]="type">
|
|
{{ directionTypeTranslations.get(type) | translate }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<tb-relation-type-autocomplete
|
|
required
|
|
formControlName="relationType">
|
|
</tb-relation-type-autocomplete>
|
|
</div>
|
|
</div>
|
|
<div class="tb-form-panel stroked">
|
|
<div tb-hint-tooltip-icon="{{ 'rule-node-config.delete-relation-with-specific-entity-hint' | translate }}"
|
|
class="tb-form-row no-border no-padding">
|
|
<mat-slide-toggle class="mat-slide" formControlName="deleteForSingleEntity">
|
|
{{ 'rule-node-config.delete-relation-with-specific-entity' | translate }}
|
|
</mat-slide-toggle>
|
|
</div>
|
|
<div *ngIf="deleteRelationConfigForm.get('deleteForSingleEntity').value">
|
|
<div class="flex flex-row gap-2.5">
|
|
<tb-entity-type-select
|
|
class="flex-1"
|
|
showLabel
|
|
required
|
|
[allowedEntityTypes]="allowedEntityTypes"
|
|
formControlName="entityType">
|
|
</tb-entity-type-select>
|
|
<mat-form-field *ngIf="deleteRelationConfigForm.get('entityType').value && deleteRelationConfigForm.get('entityType').value !== entityType.TENANT"
|
|
class="mat-block flex-1">
|
|
<mat-label>{{ entityTypeNamePatternTranslation.get(deleteRelationConfigForm.get('entityType').value) | translate }}</mat-label>
|
|
<input required matInput formControlName="entityNamePattern">
|
|
</mat-form-field>
|
|
</div>
|
|
<tb-example-hint *ngIf="deleteRelationConfigForm.get('entityType').value && deleteRelationConfigForm.get('entityType').value !== entityType.TENANT"
|
|
[hintText]="'rule-node-config.kv-map-single-pattern-hint'"></tb-example-hint>
|
|
</div>
|
|
</div>
|
|
</section>
|