Browse Source

Add gateway type and clear import (#2677)

pull/2684/head
Vladyslav 7 years ago
committed by GitHub
parent
commit
a36de5d62c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/components/details-panel.component.ts
  2. 2
      ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts
  3. 2
      ui-ngx/src/app/modules/home/components/entity/entity-tabs.component.ts
  4. 4
      ui-ngx/src/app/modules/home/components/entity/entity.component.ts
  5. 8
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-form.models.ts
  6. 4
      ui-ngx/src/app/modules/home/pages/dashboard/edit-widget.component.ts
  7. 10
      ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html
  8. 12
      ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-link-dialog.component.html
  9. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts
  10. 4
      ui-ngx/src/app/modules/home/pages/rulechain/rule-node-link.component.ts
  11. 2
      ui-ngx/src/app/modules/home/pages/user/add-user-dialog.component.ts

2
ui-ngx/src/app/modules/home/components/details-panel.component.ts

@ -18,7 +18,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { FormGroup, NgForm } from '@angular/forms'; import { FormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'tb-details-panel', selector: 'tb-details-panel',

2
ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts

@ -37,7 +37,7 @@ import { AppState } from '@core/core.state';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { BaseData, HasId } from '@shared/models/base-data'; import { BaseData, HasId } from '@shared/models/base-data';
import { EntityType, EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models'; import { EntityType, EntityTypeResource, EntityTypeTranslation } from '@shared/models/entity-type.models';
import { FormGroup, NgForm } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { EntityComponent } from './entity.component'; import { EntityComponent } from './entity.component';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { EntityAction } from '@home/models/entity/entity-component.models'; import { EntityAction } from '@home/models/entity/entity-component.models';

2
ui-ngx/src/app/modules/home/components/entity/entity-tabs.component.ts

@ -30,7 +30,7 @@ import { AuditLogMode } from '@shared/models/audit-log.models';
import { DebugEventType, EventType } from '@shared/models/event.models'; import { DebugEventType, EventType } from '@shared/models/event.models';
import { AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models'; import { AttributeScope, LatestTelemetry } from '@shared/models/telemetry/telemetry.models';
import { NULL_UUID } from '@shared/models/id/has-uuid'; import { NULL_UUID } from '@shared/models/id/has-uuid';
import { FormGroup, NgForm } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { PageLink } from '@shared/models/page/page-link'; import { PageLink } from '@shared/models/page/page-link';
@Directive() @Directive()

4
ui-ngx/src/app/modules/home/components/entity/entity.component.ts

@ -15,9 +15,9 @@
/// ///
import { BaseData, HasId } from '@shared/models/base-data'; import { BaseData, HasId } from '@shared/models/base-data';
import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Directive, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { Directive, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { EntityAction } from '@home/models/entity/entity-component.models'; import { EntityAction } from '@home/models/entity/entity-component.models';

8
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-form.models.ts

@ -67,8 +67,12 @@ export const StorageTypeTranslationMap = new Map<StorageType, string>(
export enum ConnectorType { export enum ConnectorType {
mqtt= 'MQTT', mqtt= 'MQTT',
modbus = 'Modbus', modbus = 'Modbus',
opc_ua = 'OPC-UA', opcua = 'OPC-UA',
ble = 'BLE' ble = 'BLE',
request = 'Request',
can = 'CAN',
bacnet = 'BACnet',
custom = 'Custom'
} }
export interface GatewayFormModels { export interface GatewayFormModels {

4
ui-ngx/src/app/modules/home/pages/dashboard/edit-widget.component.ts

@ -14,7 +14,7 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
@ -25,7 +25,7 @@ import { Widget } from '@shared/models/widget.models';
import { WidgetComponentService } from '@home/components/widget/widget-component.service'; import { WidgetComponentService } from '@home/components/widget/widget-component.service';
import { WidgetConfigComponentData } from '../../models/widget-component.models'; import { WidgetConfigComponentData } from '../../models/widget-component.models';
import { isDefined, isString } from '@core/utils'; import { isDefined, isString } from '@core/utils';
import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'tb-edit-widget', selector: 'tb-edit-widget',

10
ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html

@ -16,11 +16,11 @@
--> -->
<form (ngSubmit)="add()" style="min-width: 650px;"> <form (ngSubmit)="add()" style="min-width: 650px;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar color="primary">
<h2 translate>rulenode.add</h2> <h2 translate>rulenode.add</h2>
<span fxFlex></span> <span fxFlex></span>
<div [tb-help]="helpLinkIdForRuleNodeType()"></div> <div [tb-help]="helpLinkIdForRuleNodeType()"></div>
<button mat-button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
<mat-icon class="material-icons">close</mat-icon> <mat-icon class="material-icons">close</mat-icon>
@ -38,15 +38,13 @@
</tb-rule-node> </tb-rule-node>
</fieldset> </fieldset>
</div> </div>
<div mat-dialog-actions fxLayout="row"> <div mat-dialog-actions fxLayoutAlign="end center">
<span fxFlex></span> <button mat-raised-button color="primary"
<button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || tbRuleNode.ruleNodeFormGroup.invalid || !tbRuleNode.ruleNodeFormGroup.dirty"> [disabled]="(isLoading$ | async) || tbRuleNode.ruleNodeFormGroup.invalid || !tbRuleNode.ruleNodeFormGroup.dirty">
{{ 'action.add' | translate }} {{ 'action.add' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"
style="margin-right: 20px;"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="cancel()" cdkFocusInitial> (click)="cancel()" cdkFocusInitial>

12
ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-link-dialog.component.html

@ -15,12 +15,12 @@
limitations under the License. limitations under the License.
--> -->
<form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 900px;"> <form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 480px;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar color="primary">
<h2 translate>rulenode.add-link</h2> <h2 translate>rulenode.add-link</h2>
<span fxFlex></span> <span fxFlex></span>
<div [tb-help]="'ruleEngine'"></div> <div [tb-help]="'ruleEngine'"></div>
<button mat-button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
<mat-icon class="material-icons">close</mat-icon> <mat-icon class="material-icons">close</mat-icon>
@ -38,15 +38,13 @@
</tb-rule-node-link> </tb-rule-node-link>
</fieldset> </fieldset>
</div> </div>
<div mat-dialog-actions fxLayout="row"> <div mat-dialog-actions fxLayoutAlign="end center">
<span fxFlex></span> <button mat-raised-button color="primary"
<button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || ruleNodeLinkFormGroup.invalid || !ruleNodeLinkFormGroup.dirty"> [disabled]="(isLoading$ | async) || ruleNodeLinkFormGroup.invalid || !ruleNodeLinkFormGroup.dirty">
{{ 'action.add' | translate }} {{ 'action.add' | translate }}
</button> </button>
<button mat-button color="primary" <button mat-button color="primary"
style="margin-right: 20px;"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="cancel()" cdkFocusInitial> (click)="cancel()" cdkFocusInitial>

2
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts

@ -18,7 +18,7 @@ import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { FcRuleNode, RuleNodeType } from '@shared/models/rule-node.models'; import { FcRuleNode, RuleNodeType } from '@shared/models/rule-node.models';
import { EntityType } from '@shared/models/entity-type.models'; import { EntityType } from '@shared/models/entity-type.models';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';

4
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-link.component.ts

@ -14,8 +14,8 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core'; import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, NgForm, Validators } from '@angular/forms'; import { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
import { FcRuleEdge, LinkLabel } from '@shared/models/rule-node.models'; import { FcRuleEdge, LinkLabel } from '@shared/models/rule-node.models';
import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { TruncatePipe } from '@shared/pipe/truncate.pipe'; import { TruncatePipe } from '@shared/pipe/truncate.pipe';

2
ui-ngx/src/app/modules/home/pages/user/add-user-dialog.component.ts

@ -18,7 +18,7 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { FormGroup, NgForm } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { UserComponent } from '@modules/home/pages/user/user.component'; import { UserComponent } from '@modules/home/pages/user/user.component';
import { Authority } from '@shared/models/authority.enum'; import { Authority } from '@shared/models/authority.enum';
import { ActivationMethod, activationMethodTranslations, User } from '@shared/models/user.model'; import { ActivationMethod, activationMethodTranslations, User } from '@shared/models/user.model';

Loading…
Cancel
Save