57 lines
2.6 KiB
HTML
57 lines
2.6 KiB
HTML
<!--
|
|
|
|
Copyright © 2016-2024 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]="saveToCustomTableConfigForm" class="tb-form-panel no-border no-padding">
|
|
<mat-form-field class="mat-block" subscriptSizing="dynamic">
|
|
<mat-label translate>rule-node-config.custom-table-name</mat-label>
|
|
<input required matInput formControlName="tableName">
|
|
<mat-icon class="help-icon margin-8 cursor-pointer"
|
|
aria-hidden="false"
|
|
aria-label="help-icon"
|
|
matSuffix
|
|
matTooltip="{{ 'rule-node-config.custom-table-hint' | translate }}">
|
|
help
|
|
</mat-icon>
|
|
<mat-error *ngIf="saveToCustomTableConfigForm.get('tableName').hasError('required') ||
|
|
saveToCustomTableConfigForm.get('tableName').hasError('pattern')">
|
|
{{ 'rule-node-config.custom-table-name-required' | translate }}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<tb-kv-map-config
|
|
required
|
|
formControlName="fieldsMapping"
|
|
[labelText]="'rule-node-config.fields-mapping' | translate"
|
|
[requiredText]="'rule-node-config.fields-mapping-required' | translate"
|
|
[keyText]="'rule-node-config.message-field' | translate"
|
|
[keyRequiredText]="'rule-node-config.message-field-required' | translate"
|
|
[valText]="'rule-node-config.table-col' | translate"
|
|
[valRequiredText]="'rule-node-config.table-col-required' | translate"
|
|
[hintText]="'rule-node-config.fields-mapping-hint'">
|
|
</tb-kv-map-config>
|
|
<mat-form-field class="mat-block flex-1">
|
|
<mat-label translate>rule-node-config.default-ttl</mat-label>
|
|
<input type="number" min="0" step="1" matInput formControlName="defaultTtl" required>
|
|
<mat-hint translate>rule-node-config.default-ttl-zero-hint</mat-hint>
|
|
<mat-error *ngIf="saveToCustomTableConfigForm.get('defaultTtl').hasError('min')">
|
|
{{ 'rule-node-config.min-default-ttl-message' | translate }}
|
|
</mat-error>
|
|
<mat-error *ngIf="saveToCustomTableConfigForm.get('defaultTtl').hasError('required')">
|
|
{{ 'rule-node-config.default-ttl-required' | translate }}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
</section>
|