Commit 56bb0f60711e20bf820772c1263ff8890fd4f033
1 parent
fca2dd62
Improvement dialog and component style
Showing
24 changed files
with
105 additions
and
118 deletions
... | ... | @@ -379,7 +379,7 @@ spring: |
379 | 379 | database-platform: "${SPRING_JPA_DATABASE_PLATFORM:org.hibernate.dialect.PostgreSQLDialect}" |
380 | 380 | datasource: |
381 | 381 | driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}" |
382 | - url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" | |
382 | + url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard_angular}" | |
383 | 383 | username: "${SPRING_DATASOURCE_USERNAME:postgres}" |
384 | 384 | password: "${SPRING_DATASOURCE_PASSWORD:postgres}" |
385 | 385 | hikari: | ... | ... |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <section [formGroup]="parentForm"> |
19 | 19 | <mat-form-field class="mat-block"> |
20 | 20 | <mat-label translate>contact.country</mat-label> |
21 | - <mat-select matInput formControlName="country"> | |
21 | + <mat-select formControlName="country"> | |
22 | 22 | <mat-option *ngFor="let country of countries" [value]="country"> |
23 | 23 | {{ country }} |
24 | 24 | </mat-option> | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; | |
17 | +import { Component, EventEmitter, Input, Output } from '@angular/core'; | |
18 | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | 19 | import { Store } from '@ngrx/store'; |
20 | 20 | import { AppState } from '@core/core.state'; | ... | ... |
... | ... | @@ -16,11 +16,11 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form (ngSubmit)="add()" style="min-width: 400px;" [ngStyle]="entitiesTableConfig.addDialogStyle"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>{{ translations.add }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <div [tb-help]="resources.helpLinkId"></div> |
23 | - <button mat-button mat-icon-button | |
23 | + <button mat-icon-button | |
24 | 24 | (click)="cancel()" |
25 | 25 | type="button"> |
26 | 26 | <mat-icon class="material-icons">close</mat-icon> |
... | ... | @@ -32,15 +32,13 @@ |
32 | 32 | <div mat-dialog-content> |
33 | 33 | <tb-anchor #entityDetailsForm></tb-anchor> |
34 | 34 | </div> |
35 | - <div mat-dialog-actions fxLayout="row"> | |
36 | - <span fxFlex></span> | |
37 | - <button mat-button mat-raised-button color="primary" | |
35 | + <div mat-dialog-actions fxLayoutAlign="end center"> | |
36 | + <button mat-raised-button color="primary" | |
38 | 37 | type="submit" |
39 | 38 | [disabled]="(isLoading$ | async) || detailsForm.invalid || !detailsForm.dirty"> |
40 | 39 | {{ 'action.add' | translate }} |
41 | 40 | </button> |
42 | 41 | <button mat-button color="primary" |
43 | - style="margin-right: 20px;" | |
44 | 42 | type="button" |
45 | 43 | cdkFocusInitial |
46 | 44 | [disabled]="(isLoading$ | async)" | ... | ... |
... | ... | @@ -14,20 +14,19 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component, ComponentFactoryResolver, Inject, OnInit, SkipSelf, ViewChild} from '@angular/core'; | |
17 | +import { Component, ComponentFactoryResolver, Inject, OnInit, SkipSelf, ViewChild } from '@angular/core'; | |
18 | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | -import {PageComponent} from '@shared/components/page.component'; | |
21 | -import {Store} from '@ngrx/store'; | |
22 | -import {AppState} from '@core/core.state'; | |
23 | -import {FormControl, FormGroupDirective, NgForm} from '@angular/forms'; | |
24 | -import {EntityTypeResource, EntityTypeTranslation} from '@shared/models/entity-type.models'; | |
25 | -import {BaseData, HasId} from '@shared/models/base-data'; | |
26 | -import {EntityId} from '@shared/models/id/entity-id'; | |
27 | -import {TbAnchorComponent} from '@shared/components/tb-anchor.component'; | |
28 | -import {EntityComponent} from './entity.component'; | |
29 | -import {EntityTableConfig} from '@home/models/entity/entities-table-config.models'; | |
30 | -import {AddEntityDialogData} from '@home/models/entity/entity-component.models'; | |
20 | +import { Store } from '@ngrx/store'; | |
21 | +import { AppState } from '@core/core.state'; | |
22 | +import { FormControl, FormGroupDirective, NgForm } from '@angular/forms'; | |
23 | +import { EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models'; | |
24 | +import { BaseData, HasId } from '@shared/models/base-data'; | |
25 | +import { EntityId } from '@shared/models/id/entity-id'; | |
26 | +import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; | |
27 | +import { EntityComponent } from './entity.component'; | |
28 | +import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; | |
29 | +import { AddEntityDialogData } from '@home/models/entity/entity-component.models'; | |
31 | 30 | import { DialogComponent } from '@shared/components/dialog.component'; |
32 | 31 | import { Router } from '@angular/router'; |
33 | 32 | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form #addEntitiesToCustomerForm="ngForm" [formGroup]="addEntitiesToCustomerFormGroup" (ngSubmit)="assign()"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2>{{ assignToCustomerTitle | translate }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <button mat-button mat-icon-button |
... | ... | @@ -39,16 +39,14 @@ |
39 | 39 | </tb-entity-list> |
40 | 40 | </fieldset> |
41 | 41 | </div> |
42 | - <div mat-dialog-actions fxLayout="row"> | |
43 | - <span fxFlex></span> | |
44 | - <button mat-button mat-raised-button color="primary" | |
42 | + <div mat-dialog-actions fxLayoutAlign="end center"> | |
43 | + <button mat-raised-button color="primary" | |
45 | 44 | type="submit" |
46 | 45 | [disabled]="(isLoading$ | async) || addEntitiesToCustomerForm.invalid |
47 | 46 | || !addEntitiesToCustomerForm.dirty"> |
48 | 47 | {{ 'action.assign' | translate }} |
49 | 48 | </button> |
50 | 49 | <button mat-button color="primary" |
51 | - style="margin-right: 20px;" | |
52 | 50 | type="button" |
53 | 51 | [disabled]="(isLoading$ | async)" |
54 | 52 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -14,19 +14,18 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component, Inject, OnInit, SkipSelf} from '@angular/core'; | |
17 | +import { Component, Inject, OnInit, SkipSelf } from '@angular/core'; | |
18 | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | -import {PageComponent} from '@shared/components/page.component'; | |
21 | -import {Store} from '@ngrx/store'; | |
22 | -import {AppState} from '@core/core.state'; | |
23 | -import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators} from '@angular/forms'; | |
24 | -import {DeviceService} from '@core/http/device.service'; | |
25 | -import {EntityType} from '@shared/models/entity-type.models'; | |
26 | -import {forkJoin, Observable} from 'rxjs'; | |
27 | -import {AssetService} from '@core/http/asset.service'; | |
28 | -import {EntityViewService} from '@core/http/entity-view.service'; | |
29 | -import {DashboardService} from '@core/http/dashboard.service'; | |
20 | +import { Store } from '@ngrx/store'; | |
21 | +import { AppState } from '@core/core.state'; | |
22 | +import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators } from '@angular/forms'; | |
23 | +import { DeviceService } from '@core/http/device.service'; | |
24 | +import { EntityType } from '@shared/models/entity-type.models'; | |
25 | +import { forkJoin, Observable } from 'rxjs'; | |
26 | +import { AssetService } from '@core/http/asset.service'; | |
27 | +import { EntityViewService } from '@core/http/entity-view.service'; | |
28 | +import { DashboardService } from '@core/http/dashboard.service'; | |
30 | 29 | import { DialogComponent } from '@shared/components/dialog.component'; |
31 | 30 | import { Router } from '@angular/router'; |
32 | 31 | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form #assignToCustomerForm="ngForm" [formGroup]="assignToCustomerFormGroup" (ngSubmit)="assign()"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2>{{ assignToCustomerTitle | translate }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <button mat-button mat-icon-button |
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> |
31 | 31 | <div mat-dialog-content> |
32 | 32 | <fieldset [disabled]="isLoading$ | async"> |
33 | - <span>{{ assignToCustomerText | translate }}</span> | |
33 | + <div style="padding-bottom: 0.5em;">{{ assignToCustomerText | translate }}</div> | |
34 | 34 | <tb-entity-autocomplete |
35 | 35 | formControlName="customerId" |
36 | 36 | required |
... | ... | @@ -38,16 +38,14 @@ |
38 | 38 | </tb-entity-autocomplete> |
39 | 39 | </fieldset> |
40 | 40 | </div> |
41 | - <div mat-dialog-actions fxLayout="row"> | |
42 | - <span fxFlex></span> | |
43 | - <button mat-button mat-raised-button color="primary" | |
41 | + <div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> | |
42 | + <button mat-raised-button color="primary" | |
44 | 43 | type="submit" |
45 | 44 | [disabled]="(isLoading$ | async) || assignToCustomerForm.invalid |
46 | 45 | || !assignToCustomerForm.dirty"> |
47 | 46 | {{ 'action.assign' | translate }} |
48 | 47 | </button> |
49 | 48 | <button mat-button color="primary" |
50 | - style="margin-right: 20px;" | |
51 | 49 | type="button" |
52 | 50 | [disabled]="(isLoading$ | async)" |
53 | 51 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -14,19 +14,18 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component, Inject, OnInit, SkipSelf} from '@angular/core'; | |
17 | +import { Component, Inject, OnInit, SkipSelf } from '@angular/core'; | |
18 | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | 19 | import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
20 | -import {PageComponent} from '@shared/components/page.component'; | |
21 | -import {Store} from '@ngrx/store'; | |
22 | -import {AppState} from '@core/core.state'; | |
23 | -import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators} from '@angular/forms'; | |
24 | -import {DeviceService} from '@core/http/device.service'; | |
25 | -import {EntityId} from '@shared/models/id/entity-id'; | |
26 | -import {EntityType} from '@shared/models/entity-type.models'; | |
27 | -import {forkJoin, Observable} from 'rxjs'; | |
28 | -import {AssetService} from '@core/http/asset.service'; | |
29 | -import {EntityViewService} from '@core/http/entity-view.service'; | |
20 | +import { Store } from '@ngrx/store'; | |
21 | +import { AppState } from '@core/core.state'; | |
22 | +import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators } from '@angular/forms'; | |
23 | +import { DeviceService } from '@core/http/device.service'; | |
24 | +import { EntityId } from '@shared/models/id/entity-id'; | |
25 | +import { EntityType } from '@shared/models/entity-type.models'; | |
26 | +import { forkJoin, Observable } from 'rxjs'; | |
27 | +import { AssetService } from '@core/http/asset.service'; | |
28 | +import { EntityViewService } from '@core/http/entity-view.service'; | |
30 | 29 | import { DialogComponent } from '@shared/components/dialog.component'; |
31 | 30 | import { Router } from '@angular/router'; |
32 | 31 | ... | ... |
... | ... | @@ -17,8 +17,8 @@ |
17 | 17 | import { NgModule } from '@angular/core'; |
18 | 18 | import { CommonModule } from '@angular/common'; |
19 | 19 | import { SharedModule } from '@app/shared/shared.module'; |
20 | -import {AssignToCustomerDialogComponent} from '@modules/home/dialogs/assign-to-customer-dialog.component'; | |
21 | -import {AddEntitiesToCustomerDialogComponent} from '@modules/home/dialogs/add-entities-to-customer-dialog.component'; | |
20 | +import { AssignToCustomerDialogComponent } from '@modules/home/dialogs/assign-to-customer-dialog.component'; | |
21 | +import { AddEntitiesToCustomerDialogComponent } from '@modules/home/dialogs/add-entities-to-customer-dialog.component'; | |
22 | 22 | import { HomeDialogsService } from './home-dialogs.service'; |
23 | 23 | |
24 | 24 | @NgModule({ | ... | ... |
... | ... | @@ -15,8 +15,6 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { Injectable } from '@angular/core'; |
18 | -import { TranslateService } from '@ngx-translate/core'; | |
19 | -import { AuthService } from '@core/auth/auth.service'; | |
20 | 18 | import { MatDialog } from '@angular/material/dialog'; |
21 | 19 | import { EntityType } from '@shared/models/entity-type.models'; |
22 | 20 | import { Observable } from 'rxjs'; |
... | ... | @@ -38,7 +36,6 @@ export class HomeDialogsService { |
38 | 36 | return this.openImportDialogCSV(entityType, 'device.import', 'device.device-file'); |
39 | 37 | case EntityType.ASSET: |
40 | 38 | return this.openImportDialogCSV(entityType, 'asset.import', 'asset.asset-file'); |
41 | - break; | |
42 | 39 | } |
43 | 40 | } |
44 | 41 | ... | ... |
... | ... | @@ -146,7 +146,7 @@ export class AssetsTableConfigResolver implements Resolve<EntityTableConfig<Asse |
146 | 146 | |
147 | 147 | configureColumns(assetScope: string): Array<EntityTableColumn<AssetInfo>> { |
148 | 148 | const columns: Array<EntityTableColumn<AssetInfo>> = [ |
149 | - new DateEntityTableColumn<AssetInfo>('createdTime', 'asset.created-time', this.datePipe, '150px'), | |
149 | + new DateEntityTableColumn<AssetInfo>('createdTime', 'common.created-time', this.datePipe, '150px'), | |
150 | 150 | new EntityTableColumn<AssetInfo>('name', 'asset.name', '25%'), |
151 | 151 | new EntityTableColumn<AssetInfo>('type', 'asset.asset-type', '25%'), |
152 | 152 | new EntityTableColumn<DeviceInfo>('label', 'asset.label', '25%'), | ... | ... |
... | ... | @@ -15,11 +15,11 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<form #deviceCredentialsForm="ngForm" [formGroup]="deviceCredentialsFormGroup" (ngSubmit)="save()"> | |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
18 | +<form #deviceCredentialsForm="ngForm" [formGroup]="deviceCredentialsFormGroup" (ngSubmit)="save()" style="min-width: 350px;"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>device.device-credentials</h2> |
21 | 21 | <span fxFlex></span> |
22 | - <button mat-button mat-icon-button | |
22 | + <button mat-icon-button | |
23 | 23 | (click)="cancel()" |
24 | 24 | type="button"> |
25 | 25 | <mat-icon class="material-icons">close</mat-icon> |
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <fieldset [disabled]="(isLoading$ | async) || isReadOnly"> |
33 | 33 | <mat-form-field class="mat-block"> |
34 | 34 | <mat-label translate>device.credentials-type</mat-label> |
35 | - <mat-select matInput formControlName="credentialsType" | |
35 | + <mat-select formControlName="credentialsType" | |
36 | 36 | (ngModelChange)="credentialsTypeChanged()"> |
37 | 37 | <mat-option *ngFor="let credentialsType of credentialsTypes" [value]="credentialsType"> |
38 | 38 | {{ credentialTypeNamesMap.get(deviceCredentialsType[credentialsType]) }} |
... | ... | @@ -60,16 +60,14 @@ |
60 | 60 | </mat-form-field> |
61 | 61 | </fieldset> |
62 | 62 | </div> |
63 | - <div mat-dialog-actions fxLayout="row"> | |
64 | - <span fxFlex></span> | |
65 | - <button *ngIf="!isReadOnly" mat-button mat-raised-button color="primary" | |
63 | + <div mat-dialog-actions fxLayoutAlign="end center"> | |
64 | + <button *ngIf="!isReadOnly" mat-raised-button color="primary" | |
66 | 65 | type="submit" |
67 | 66 | [disabled]="(isLoading$ | async) || deviceCredentialsForm.invalid |
68 | 67 | || !deviceCredentialsForm.dirty"> |
69 | 68 | {{ 'action.save' | translate }} |
70 | 69 | </button> |
71 | 70 | <button mat-button color="primary" |
72 | - style="margin-right: 20px;" | |
73 | 71 | type="button" |
74 | 72 | [disabled]="(isLoading$ | async)" |
75 | 73 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -14,18 +14,14 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component, OnInit, SkipSelf, Inject} from '@angular/core'; | |
17 | +import { Component, Inject, OnInit, SkipSelf } from '@angular/core'; | |
18 | 18 | import { ErrorStateMatcher } from '@angular/material/core'; |
19 | -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
20 | -import { PageComponent } from '@shared/components/page.component'; | |
19 | +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | |
21 | 20 | import { Store } from '@ngrx/store'; |
22 | 21 | import { AppState } from '@core/core.state'; |
23 | -import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators} from '@angular/forms'; | |
24 | -import { ActionNotificationShow } from '@core/notification/notification.actions'; | |
25 | -import { TranslateService } from '@ngx-translate/core'; | |
26 | -import { AuthService } from '@core/auth/auth.service'; | |
27 | -import {DeviceService} from '@core/http/device.service'; | |
28 | -import {DeviceCredentials, DeviceCredentialsType, credentialTypeNames} from '@shared/models/device.models'; | |
22 | +import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Validators } from '@angular/forms'; | |
23 | +import { DeviceService } from '@core/http/device.service'; | |
24 | +import { credentialTypeNames, DeviceCredentials, DeviceCredentialsType } from '@shared/models/device.models'; | |
29 | 25 | import { DialogComponent } from '@shared/components/dialog.component'; |
30 | 26 | import { Router } from '@angular/router'; |
31 | 27 | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form (ngSubmit)="add()" style="width: 600px;"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>user.add</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <div [tb-help]="'user'"></div> |
... | ... | @@ -33,22 +33,20 @@ |
33 | 33 | <tb-user></tb-user> |
34 | 34 | <mat-form-field class="mat-block"> |
35 | 35 | <mat-label translate>user.activation-method</mat-label> |
36 | - <mat-select matInput [ngModelOptions]="{standalone: true}" [(ngModel)]="activationMethod"> | |
36 | + <mat-select [ngModelOptions]="{standalone: true}" [(ngModel)]="activationMethod"> | |
37 | 37 | <mat-option *ngFor="let activationMethod of activationMethods" [value]="activationMethod"> |
38 | 38 | {{ activationMethodTranslations.get(activationMethodEnum[activationMethod]) | translate }} |
39 | 39 | </mat-option> |
40 | 40 | </mat-select> |
41 | 41 | </mat-form-field> |
42 | 42 | </div> |
43 | - <div mat-dialog-actions fxLayout="row"> | |
44 | - <span fxFlex></span> | |
45 | - <button mat-button mat-raised-button color="primary" | |
43 | + <div mat-dialog-actions fxLayoutAlign="end center"> | |
44 | + <button mat-raised-button color="primary" | |
46 | 45 | type="submit" |
47 | 46 | [disabled]="(isLoading$ | async) || detailsForm.invalid || !detailsForm.dirty"> |
48 | 47 | {{ 'action.add' | translate }} |
49 | 48 | </button> |
50 | 49 | <button mat-button color="primary" |
51 | - style="margin-right: 20px;" | |
52 | 50 | type="button" |
53 | 51 | cdkFocusInitial |
54 | 52 | [disabled]="(isLoading$ | async)" | ... | ... |
1 | +/** | |
2 | + * Copyright © 2016-2020 The Thingsboard Authors | |
3 | + * | |
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | + * you may not use this file except in compliance with the License. | |
6 | + * You may obtain a copy of the License at | |
7 | + * | |
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | + * | |
10 | + * Unless required by applicable law or agreed to in writing, software | |
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | + * See the License for the specific language governing permissions and | |
14 | + * limitations under the License. | |
15 | + */ | |
16 | + | |
17 | +:host ::ng-deep .mat-padding{ | |
18 | + padding: 0; | |
19 | +} | ... | ... |
... | ... | @@ -16,7 +16,6 @@ |
16 | 16 | |
17 | 17 | import { Component, Inject, OnInit, ViewChild } from '@angular/core'; |
18 | 18 | import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; |
19 | -import { PageComponent } from '@shared/components/page.component'; | |
20 | 19 | import { Store } from '@ngrx/store'; |
21 | 20 | import { AppState } from '@core/core.state'; |
22 | 21 | import { NgForm } from '@angular/forms'; |
... | ... | @@ -30,7 +29,7 @@ import { |
30 | 29 | ActivationLinkDialogComponent, |
31 | 30 | ActivationLinkDialogData |
32 | 31 | } from '@modules/home/pages/user/activation-link-dialog.component'; |
33 | -import {TenantId} from '@app/shared/models/id/tenant-id'; | |
32 | +import { TenantId } from '@app/shared/models/id/tenant-id'; | |
34 | 33 | import { DialogComponent } from '@shared/components/dialog.component'; |
35 | 34 | import { Router } from '@angular/router'; |
36 | 35 | |
... | ... | @@ -42,7 +41,8 @@ export interface AddUserDialogData { |
42 | 41 | |
43 | 42 | @Component({ |
44 | 43 | selector: 'tb-add-user-dialog', |
45 | - templateUrl: './add-user-dialog.component.html' | |
44 | + templateUrl: './add-user-dialog.component.html', | |
45 | + styleUrls: ['./add-user-dialog.component.scss'] | |
46 | 46 | }) |
47 | 47 | export class AddUserDialogComponent extends DialogComponent<AddUserDialogComponent, User> implements OnInit { |
48 | 48 | ... | ... |
... | ... | @@ -16,8 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <h2 mat-dialog-title>{{data.title}}</h2> |
19 | -<div mat-dialog-content [innerHTML]="data.message"> | |
20 | -</div> | |
21 | -<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> | |
19 | +<div mat-dialog-content [innerHTML]="data.message"></div> | |
20 | +<div mat-dialog-actions fxLayoutAlign="end center"> | |
22 | 21 | <button mat-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>{{data.ok}}</button> |
23 | 22 | </div> | ... | ... |
... | ... | @@ -16,9 +16,8 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <h2 mat-dialog-title>{{data.title}}</h2> |
19 | -<div mat-dialog-content [innerHTML]="data.message"> | |
20 | -</div> | |
21 | -<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> | |
19 | +<div mat-dialog-content [innerHTML]="data.message"></div> | |
20 | +<div mat-dialog-actions fxLayoutAlign="end center"> | |
22 | 21 | <button mat-button color="primary" [mat-dialog-close]="false">{{data.cancel}}</button> |
23 | 22 | <button mat-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>{{data.ok}}</button> |
24 | 23 | </div> | ... | ... |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | --> |
18 | 18 | <mat-form-field [formGroup]="subTypeFormGroup" class="mat-block"> |
19 | 19 | <mat-label *ngIf="showLabel">{{ entitySubtypeTitle | translate }}</mat-label> |
20 | - <mat-select [fxShow]="subTypesLoaded" class="tb-entity-subtype-select" matInput formControlName="subType"> | |
20 | + <mat-select [fxShow]="subTypesLoaded" class="tb-entity-subtype-select" formControlName="subType"> | |
21 | 21 | <mat-option *ngFor="let subType of subTypesOptions | async" [value]="subType"> |
22 | 22 | {{ displaySubTypeFn(subType) }} |
23 | 23 | </mat-option> | ... | ... |
... | ... | @@ -14,26 +14,18 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {AfterViewInit, Component, ElementRef, forwardRef, Input, OnInit, ViewChild, OnDestroy} from '@angular/core'; | |
18 | -import {ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR} from '@angular/forms'; | |
19 | -import {Observable, of, throwError, Subscription, Subject} from 'rxjs'; | |
20 | -import {PageLink} from '@shared/models/page/page-link'; | |
21 | -import {Direction} from '@shared/models/page/sort-order'; | |
22 | -import {filter, map, mergeMap, publishReplay, refCount, startWith, tap, publish} from 'rxjs/operators'; | |
23 | -import {PageData, emptyPageData} from '@shared/models/page/page-data'; | |
24 | -import {DashboardInfo} from '@app/shared/models/dashboard.models'; | |
25 | -import {DashboardId} from '@app/shared/models/id/dashboard-id'; | |
26 | -import {DashboardService} from '@core/http/dashboard.service'; | |
27 | -import {Store} from '@ngrx/store'; | |
28 | -import {AppState} from '@app/core/core.state'; | |
29 | -import {getCurrentAuthUser} from '@app/core/auth/auth.selectors'; | |
30 | -import {Authority} from '@shared/models/authority.enum'; | |
31 | -import {TranslateService} from '@ngx-translate/core'; | |
32 | -import {DeviceService} from '@core/http/device.service'; | |
33 | -import {EntitySubtype, EntityType} from '@app/shared/models/entity-type.models'; | |
34 | -import {BroadcastService} from '@app/core/services/broadcast.service'; | |
35 | -import {AssetService} from '@core/http/asset.service'; | |
36 | -import {EntityViewService} from '@core/http/entity-view.service'; | |
17 | +import { AfterViewInit, Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; | |
18 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
19 | +import { Observable, Subject, Subscription, throwError } from 'rxjs'; | |
20 | +import { map, mergeMap, publishReplay, refCount, startWith, tap } from 'rxjs/operators'; | |
21 | +import { Store } from '@ngrx/store'; | |
22 | +import { AppState } from '@app/core/core.state'; | |
23 | +import { TranslateService } from '@ngx-translate/core'; | |
24 | +import { DeviceService } from '@core/http/device.service'; | |
25 | +import { EntitySubtype, EntityType } from '@app/shared/models/entity-type.models'; | |
26 | +import { BroadcastService } from '@app/core/services/broadcast.service'; | |
27 | +import { AssetService } from '@core/http/asset.service'; | |
28 | +import { EntityViewService } from '@core/http/entity-view.service'; | |
37 | 29 | |
38 | 30 | @Component({ |
39 | 31 | selector: 'tb-entity-subtype-select', | ... | ... |
... | ... | @@ -247,7 +247,6 @@ |
247 | 247 | "no-asset-types-matching": "No asset types matching '{{entitySubtype}}' were found.", |
248 | 248 | "asset-type-list-empty": "No asset types selected.", |
249 | 249 | "asset-types": "Asset types", |
250 | - "created-time": "Created time", | |
251 | 250 | "name": "Name", |
252 | 251 | "name-required": "Name is required.", |
253 | 252 | "description": "Description", | ... | ... |