UI: Fixed advanced settings style in Save ts rule node config
This commit is contained in:
parent
80593f4b52
commit
e8dbe56219
@ -57,7 +57,7 @@
|
||||
></tb-advanced-persistence-settings>
|
||||
}
|
||||
</div>
|
||||
<section class="tb-form-panel stroked no-padding-bottom">
|
||||
<section class="tb-form-panel stroked">
|
||||
<mat-expansion-panel class="tb-settings">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title translate>rule-node-config.advanced-settings</mat-panel-title>
|
||||
@ -71,6 +71,7 @@
|
||||
</div>
|
||||
<tb-time-unit-input
|
||||
required
|
||||
subscriptSizing="dynamic"
|
||||
labelText="{{ 'rule-node-config.default-ttl' | translate }}"
|
||||
requiredText="{{ 'rule-node-config.default-ttl-required' | translate }}"
|
||||
minErrorText="{{ 'rule-node-config.min-default-ttl-message' | translate }}"
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<div matSuffix>
|
||||
<ng-content select="[matSuffix]"></ng-content>
|
||||
</div>
|
||||
<mat-hint></mat-hint>
|
||||
<mat-hint *ngIf="subscriptSizing === 'fixed'"></mat-hint>
|
||||
<mat-error *ngIf="timeInputForm.get('time').hasError('required') && requiredText">
|
||||
{{ requiredText }}
|
||||
</mat-error>
|
||||
@ -33,7 +33,7 @@
|
||||
{{ maxErrorText }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="h-fit max-w-33% flex-full">
|
||||
<mat-form-field class="h-fit max-w-33% flex-full" [subscriptSizing]="subscriptSizing">
|
||||
<mat-label translate>rule-node-config.units</mat-label>
|
||||
<mat-select formControlName="timeUnit">
|
||||
@for (timeUnit of timeUnits; track timeUnit) {
|
||||
|
||||
@ -30,6 +30,7 @@ import { isDefinedAndNotNull, isNumeric } from '@core/utils';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { coerceBoolean, coerceNumber } from '@shared/decorators/coercion';
|
||||
import { DAY, HOUR, MINUTE, SECOND } from '@shared/models/time/time.models';
|
||||
import { SubscriptSizing } from '@angular/material/form-field';
|
||||
|
||||
interface TimeUnitInputModel {
|
||||
time: number;
|
||||
@ -75,6 +76,9 @@ export class TimeUnitInputComponent implements ControlValueAccessor, Validator,
|
||||
@Input()
|
||||
maxErrorText: string;
|
||||
|
||||
@Input()
|
||||
subscriptSizing: SubscriptSizing = 'fixed';
|
||||
|
||||
timeUnits = Object.values(TimeUnit).filter(item => item !== TimeUnit.MILLISECONDS) as TimeUnit[];
|
||||
|
||||
timeUnitTranslations = timeUnitTranslations;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user