thingsboard/ui-ngx/src/app/shared/components/time/timeinterval.component.html

52 lines
2.4 KiB
HTML
Raw Normal View History

2019-08-12 19:34:23 +03:00
<!--
2024-01-09 10:46:16 +02:00
Copyright © 2016-2024 The Thingsboard Authors
2019-08-12 19:34:23 +03:00
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.
-->
2024-08-05 18:48:52 +03:00
<section class="tb-form-panel no-border no-padding" [formGroup]="timeintervalFormGroup">
<mat-form-field fxFlex [subscriptSizing]="subscriptSizing" [appearance]="appearance">
<mat-label *ngIf="predefinedName" translate>{{ predefinedName }}</mat-label>
<mat-select formControlName="interval">
<mat-option *ngFor="let interval of intervals" [value]="interval.value">
{{ interval.name | translate:interval.translateParams }}
</mat-option>
</mat-select>
</mat-form-field>
<section class="tb-form-row column-xs no-border no-padding tb-standard-fields advanced-input"
formGroupName="customInterval"
[fxShow]="advanced">
<div class="tb-flex">
<mat-form-field class="number-input flex" [subscriptSizing]="subscriptSizing" [appearance]="appearance">
2019-08-12 19:34:23 +03:00
<mat-label translate>timeinterval.days</mat-label>
2024-08-05 18:48:52 +03:00
<input matInput type="number" step="1" min="0" formControlName="days" />
2019-08-12 19:34:23 +03:00
</mat-form-field>
2024-08-05 18:48:52 +03:00
<mat-form-field class="number-input flex" [subscriptSizing]="subscriptSizing" [appearance]="appearance">
2019-08-12 19:34:23 +03:00
<mat-label translate>timeinterval.hours</mat-label>
2024-08-05 18:48:52 +03:00
<input matInput type="number" step="1" formControlName="hours" />
2019-08-12 19:34:23 +03:00
</mat-form-field>
2024-08-05 18:48:52 +03:00
</div>
<div class="tb-flex">
<mat-form-field class="number-input flex" [subscriptSizing]="subscriptSizing" [appearance]="appearance">
2019-08-12 19:34:23 +03:00
<mat-label translate>timeinterval.minutes</mat-label>
2024-08-05 18:48:52 +03:00
<input matInput type="number" step="1" formControlName="mins" />
2019-08-12 19:34:23 +03:00
</mat-form-field>
2024-08-05 18:48:52 +03:00
<mat-form-field class="number-input flex" [subscriptSizing]="subscriptSizing" [appearance]="appearance">
2019-08-12 19:34:23 +03:00
<mat-label translate>timeinterval.seconds</mat-label>
2024-08-05 18:48:52 +03:00
<input matInput type="number" step="1" formControlName="secs" />
2019-08-12 19:34:23 +03:00
</mat-form-field>
2024-08-05 18:48:52 +03:00
</div>
2019-08-12 19:34:23 +03:00
</section>
</section>