Commit a36de5d62c5ef580fcf0ae7b52d7d98d3f60d590
Committed by
GitHub
1 parent
8cfe4ef4
Add gateway type and clear import (#2677)
Showing
11 changed files
with
26 additions
and
26 deletions
... | ... | @@ -18,7 +18,7 @@ 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'; |
21 | -import { FormGroup, NgForm } from '@angular/forms'; | |
21 | +import { FormGroup } from '@angular/forms'; | |
22 | 22 | |
23 | 23 | @Component({ |
24 | 24 | selector: 'tb-details-panel', | ... | ... |
... | ... | @@ -37,7 +37,7 @@ import { AppState } from '@core/core.state'; |
37 | 37 | import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
38 | 38 | import { BaseData, HasId } from '@shared/models/base-data'; |
39 | 39 | import { EntityType, EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models'; |
40 | -import { FormGroup, NgForm } from '@angular/forms'; | |
40 | +import { FormGroup } from '@angular/forms'; | |
41 | 41 | import { EntityComponent } from './entity.component'; |
42 | 42 | import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; |
43 | 43 | import { EntityAction } from '@home/models/entity/entity-component.models'; | ... | ... |
... | ... | @@ -30,7 +30,7 @@ import { AuditLogMode } from '@shared/models/audit-log.models'; |
30 | 30 | import { DebugEventType, EventType } from '@shared/models/event.models'; |
31 | 31 | import { AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models'; |
32 | 32 | import { NULL_UUID } from '@shared/models/id/has-uuid'; |
33 | -import { FormGroup, NgForm } from '@angular/forms'; | |
33 | +import { FormGroup } from '@angular/forms'; | |
34 | 34 | import { PageLink } from '@shared/models/page/page-link'; |
35 | 35 | |
36 | 36 | @Directive() | ... | ... |
... | ... | @@ -15,9 +15,9 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { BaseData, HasId } from '@shared/models/base-data'; |
18 | -import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; | |
18 | +import { FormBuilder, FormGroup } from '@angular/forms'; | |
19 | 19 | import { PageComponent } from '@shared/components/page.component'; |
20 | -import { Directive, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; | |
20 | +import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core'; | |
21 | 21 | import { Store } from '@ngrx/store'; |
22 | 22 | import { AppState } from '@core/core.state'; |
23 | 23 | import { EntityAction } from '@home/models/entity/entity-component.models'; | ... | ... |
... | ... | @@ -67,8 +67,12 @@ export const StorageTypeTranslationMap = new Map<StorageType, string>( |
67 | 67 | export enum ConnectorType { |
68 | 68 | mqtt= 'MQTT', |
69 | 69 | modbus = 'Modbus', |
70 | - opc_ua = 'OPC-UA', | |
71 | - ble = 'BLE' | |
70 | + opcua = 'OPC-UA', | |
71 | + ble = 'BLE', | |
72 | + request = 'Request', | |
73 | + can = 'CAN', | |
74 | + bacnet = 'BACnet', | |
75 | + custom = 'Custom' | |
72 | 76 | } |
73 | 77 | |
74 | 78 | export interface GatewayFormModels { | ... | ... |
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; | |
17 | +import { Component, Input, OnChanges, OnInit, SimpleChanges } 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'; |
... | ... | @@ -25,7 +25,7 @@ import { Widget } from '@shared/models/widget.models'; |
25 | 25 | import { WidgetComponentService } from '@home/components/widget/widget-component.service'; |
26 | 26 | import { WidgetConfigComponentData } from '../../models/widget-component.models'; |
27 | 27 | import { isDefined, isString } from '@core/utils'; |
28 | -import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; | |
28 | +import { FormBuilder, FormGroup } from '@angular/forms'; | |
29 | 29 | |
30 | 30 | @Component({ |
31 | 31 | selector: 'tb-edit-widget', | ... | ... |
... | ... | @@ -16,11 +16,11 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form (ngSubmit)="add()" style="min-width: 650px;"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>rulenode.add</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <div [tb-help]="helpLinkIdForRuleNodeType()"></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> |
... | ... | @@ -38,15 +38,13 @@ |
38 | 38 | </tb-rule-node> |
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 fxLayoutAlign="end center"> | |
42 | + <button mat-raised-button color="primary" | |
44 | 43 | type="submit" |
45 | 44 | [disabled]="(isLoading$ | async) || tbRuleNode.ruleNodeFormGroup.invalid || !tbRuleNode.ruleNodeFormGroup.dirty"> |
46 | 45 | {{ 'action.add' | translate }} |
47 | 46 | </button> |
48 | 47 | <button mat-button color="primary" |
49 | - style="margin-right: 20px;" | |
50 | 48 | type="button" |
51 | 49 | [disabled]="(isLoading$ | async)" |
52 | 50 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -15,12 +15,12 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 900px;"> | |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
18 | +<form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 480px;"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>rulenode.add-link</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <div [tb-help]="'ruleEngine'"></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> |
... | ... | @@ -38,15 +38,13 @@ |
38 | 38 | </tb-rule-node-link> |
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 fxLayoutAlign="end center"> | |
42 | + <button mat-raised-button color="primary" | |
44 | 43 | type="submit" |
45 | 44 | [disabled]="(isLoading$ | async) || ruleNodeLinkFormGroup.invalid || !ruleNodeLinkFormGroup.dirty"> |
46 | 45 | {{ 'action.add' | translate }} |
47 | 46 | </button> |
48 | 47 | <button mat-button color="primary" |
49 | - style="margin-right: 20px;" | |
50 | 48 | type="button" |
51 | 49 | [disabled]="(isLoading$ | async)" |
52 | 50 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -18,7 +18,7 @@ import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@ |
18 | 18 | import { PageComponent } from '@shared/components/page.component'; |
19 | 19 | import { Store } from '@ngrx/store'; |
20 | 20 | import { AppState } from '@core/core.state'; |
21 | -import { FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms'; | |
21 | +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
22 | 22 | import { FcRuleNode, RuleNodeType } from '@shared/models/rule-node.models'; |
23 | 23 | import { EntityType } from '@shared/models/entity-type.models'; |
24 | 24 | import { Subscription } from 'rxjs'; | ... | ... |
... | ... | @@ -14,8 +14,8 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import { Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core'; | |
18 | -import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, NgForm, Validators } from '@angular/forms'; | |
17 | +import { Component, forwardRef, Input, OnInit } from '@angular/core'; | |
18 | +import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms'; | |
19 | 19 | import { FcRuleEdge, LinkLabel } from '@shared/models/rule-node.models'; |
20 | 20 | import { coerceBooleanProperty } from '@angular/cdk/coercion'; |
21 | 21 | import { TruncatePipe } from '@shared/pipe/truncate.pipe'; | ... | ... |
... | ... | @@ -18,7 +18,7 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core'; |
18 | 18 | import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; |
19 | 19 | import { Store } from '@ngrx/store'; |
20 | 20 | import { AppState } from '@core/core.state'; |
21 | -import { FormGroup, NgForm } from '@angular/forms'; | |
21 | +import { FormGroup } from '@angular/forms'; | |
22 | 22 | import { UserComponent } from '@modules/home/pages/user/user.component'; |
23 | 23 | import { Authority } from '@shared/models/authority.enum'; |
24 | 24 | import { ActivationMethod, activationMethodTranslations, User } from '@shared/models/user.model'; | ... | ... |