Browse Source

UI: Fixed tenant profile dialog

pull/9389/head
Artem Dzhereleiko 3 years ago
parent
commit
fd2bf34508
  1. 2
      ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html
  2. 23
      ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.scss
  3. 2
      ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.ts
  4. 12
      ui-ngx/src/app/modules/home/components/queue/queue-form.component.html

2
ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.html

@ -15,7 +15,7 @@
limitations under the License.
-->
<form (ngSubmit)="save()" style="width: 600px;">
<form (ngSubmit)="save()" style="width: 650px;">
<mat-toolbar color="primary">
<h2>{{ (isAdd ? 'tenant-profile.add' : 'tenant-profile.edit' ) | translate }}</h2>
<span fxFlex></span>

23
ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.scss

@ -0,0 +1,23 @@
/**
* Copyright © 2016-2023 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.
*/
:host ::ng-deep {
tb-tenant-profile {
.mat-padding {
padding: 0;
}
}
}

2
ui-ngx/src/app/modules/home/components/profile/tenant-profile-dialog.component.ts

@ -43,7 +43,7 @@ export interface TenantProfileDialogData {
selector: 'tb-tenant-profile-dialog',
templateUrl: './tenant-profile-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: TenantProfileDialogComponent}],
styleUrls: []
styleUrls: ['tenant-profile-dialog.component.scss']
})
export class TenantProfileDialogComponent extends
DialogComponent<TenantProfileDialogComponent, TenantProfile> implements ErrorStateMatcher, AfterViewInit {

12
ui-ngx/src/app/modules/home/components/queue/queue-form.component.html

@ -91,9 +91,10 @@
</div>
<div fxFlex>
<label class="group-label" translate>queue.retries-settings</label>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block" subscriptSizing="dynamic">
<mat-label translate>queue.retries</mat-label>
<input type="number" matInput formControlName="retries" required>
<mat-hint></mat-hint>
<mat-error *ngIf="queueFormGroup.get('processingStrategy.retries').hasError('required')">
{{ 'queue.retries-required' | translate }}
</mat-error>
@ -102,9 +103,10 @@
{{ 'queue.retries-min-value' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block" subscriptSizing="dynamic">
<mat-label translate>queue.failure-percentage</mat-label>
<input type="number" matInput formControlName="failurePercentage" required>
<mat-hint></mat-hint>
<mat-error *ngIf="queueFormGroup.get('processingStrategy.failurePercentage').hasError('required')">
{{ 'queue.failure-percentage-required' | translate }}
</mat-error>
@ -119,9 +121,10 @@
{{ 'queue.failure-percentage-max-value' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block" subscriptSizing="dynamic">
<mat-label translate>queue.pause-between-retries</mat-label>
<input type="number" matInput formControlName="pauseBetweenRetries" required>
<mat-hint></mat-hint>
<mat-error *ngIf="queueFormGroup.get('processingStrategy.pauseBetweenRetries').hasError('required')">
{{ 'queue.pause-between-retries-required' | translate }}
</mat-error>
@ -130,9 +133,10 @@
{{ 'queue.pause-between-retries-min-value' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block" subscriptSizing="dynamic">
<mat-label translate>queue.max-pause-between-retries</mat-label>
<input type="number" matInput formControlName="maxPauseBetweenRetries" required>
<mat-hint></mat-hint>
<mat-error *ngIf="queueFormGroup.get('processingStrategy.maxPauseBetweenRetries').hasError('required')">
{{ 'queue.max-pause-between-retries-required' | translate }}
</mat-error>

Loading…
Cancel
Save