Browse Source

UI: Rename component security-config

pull/4871/head
Vladyslav_Prykhodko 5 years ago
parent
commit
5a3dfec7f2
  1. 0
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.html
  2. 10
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.ts
  3. 8
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.html
  4. 0
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.scss
  5. 12
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.ts
  6. 4
      ui-ngx/src/app/modules/home/components/device/device-credentials.component.html
  7. 12
      ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts

0
ui-ngx/src/app/modules/home/components/device/security-config-lwm2m-server.component.html → ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.html

10
ui-ngx/src/app/modules/home/components/device/security-config-lwm2m-server.component.ts → ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.ts

@ -39,24 +39,24 @@ import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
@Component({ @Component({
selector: 'tb-security-config-lwm2m-server', selector: 'tb-device-credentials-lwm2m-server',
templateUrl: './security-config-lwm2m-server.component.html', templateUrl: './device-credentials-lwm2m-server.component.html',
styleUrls: [], styleUrls: [],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SecurityConfigLwm2mServerComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => SecurityConfigLwm2mServerComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent),
multi: true multi: true
} }
] ]
}) })
export class SecurityConfigLwm2mServerComponent implements OnDestroy, ControlValueAccessor, Validator { export class DeviceCredentialsLwm2mServerComponent implements OnDestroy, ControlValueAccessor, Validator {
serverFormGroup: FormGroup; serverFormGroup: FormGroup;
securityConfigLwM2MType = Lwm2mSecurityType; securityConfigLwM2MType = Lwm2mSecurityType;

8
ui-ngx/src/app/modules/home/components/device/security-config-lwm2m.component.html → ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.html

@ -89,9 +89,9 @@
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent> <ng-template matExpansionPanelContent>
<tb-security-config-lwm2m-server <tb-device-credentials-lwm2m-server
formControlName="bootstrapServer"> formControlName="bootstrapServer">
</tb-security-config-lwm2m-server> </tb-device-credentials-lwm2m-server>
</ng-template> </ng-template>
</mat-expansion-panel> </mat-expansion-panel>
<mat-expansion-panel> <mat-expansion-panel>
@ -101,9 +101,9 @@
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent> <ng-template matExpansionPanelContent>
<tb-security-config-lwm2m-server <tb-device-credentials-lwm2m-server
formControlName="lwm2mServer"> formControlName="lwm2mServer">
</tb-security-config-lwm2m-server> </tb-device-credentials-lwm2m-server>
</ng-template> </ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>

0
ui-ngx/src/app/modules/home/components/device/security-config-lwm2m.component.scss → ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.scss

12
ui-ngx/src/app/modules/home/components/device/security-config-lwm2m.component.ts → ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.ts

@ -40,24 +40,24 @@ import { takeUntil } from 'rxjs/operators';
import { isDefinedAndNotNull } from '@core/utils'; import { isDefinedAndNotNull } from '@core/utils';
@Component({ @Component({
selector: 'tb-security-config-lwm2m', selector: 'tb-device-credentials-lwm2m',
templateUrl: './security-config-lwm2m.component.html', templateUrl: './device-credentials-lwm2m.component.html',
styleUrls: ['./security-config-lwm2m.component.scss'], styleUrls: ['./device-credentials-lwm2m.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SecurityConfigLwm2mComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => SecurityConfigLwm2mComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent),
multi: true multi: true
} }
] ]
}) })
export class SecurityConfigLwm2mComponent implements ControlValueAccessor, Validator, OnDestroy { export class DeviceCredentialsLwm2mComponent implements ControlValueAccessor, Validator, OnDestroy {
lwm2mConfigFormGroup: FormGroup; lwm2mConfigFormGroup: FormGroup;
securityConfigLwM2MType = Lwm2mSecurityType; securityConfigLwM2MType = Lwm2mSecurityType;

4
ui-ngx/src/app/modules/home/components/device/device-credentials.component.html

@ -51,8 +51,8 @@
</tb-device-credentials-mqtt-basic> </tb-device-credentials-mqtt-basic>
</ng-template> </ng-template>
<ng-template [ngSwitchCase]="deviceCredentialsType.LWM2M_CREDENTIALS"> <ng-template [ngSwitchCase]="deviceCredentialsType.LWM2M_CREDENTIALS">
<tb-security-config-lwm2m formControlName="credentialsValue"> <tb-device-credentials-lwm2m formControlName="credentialsValue">
</tb-security-config-lwm2m> </tb-device-credentials-lwm2m>
</ng-template> </ng-template>
</div> </div>
</section> </section>

12
ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts

@ -19,16 +19,16 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module'; import { SharedModule } from '@shared/shared.module';
import { CopyDeviceCredentialsComponent } from './copy-device-credentials.component'; import { CopyDeviceCredentialsComponent } from './copy-device-credentials.component';
import { DeviceCredentialsComponent } from './device-credentials.component'; import { DeviceCredentialsComponent } from './device-credentials.component';
import { SecurityConfigLwm2mComponent } from './security-config-lwm2m.component'; import { DeviceCredentialsLwm2mComponent } from './device-credentials-lwm2m.component';
import { SecurityConfigLwm2mServerComponent } from './security-config-lwm2m-server.component'; import { DeviceCredentialsLwm2mServerComponent } from './device-credentials-lwm2m-server.component';
import { DeviceCredentialsMqttBasicComponent } from './device-credentials-mqtt-basic.component'; import { DeviceCredentialsMqttBasicComponent } from './device-credentials-mqtt-basic.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
CopyDeviceCredentialsComponent, CopyDeviceCredentialsComponent,
DeviceCredentialsComponent, DeviceCredentialsComponent,
SecurityConfigLwm2mComponent, DeviceCredentialsLwm2mComponent,
SecurityConfigLwm2mServerComponent, DeviceCredentialsLwm2mServerComponent,
DeviceCredentialsMqttBasicComponent DeviceCredentialsMqttBasicComponent
], ],
imports: [ imports: [
@ -38,8 +38,8 @@ import { DeviceCredentialsMqttBasicComponent } from './device-credentials-mqtt-b
exports: [ exports: [
CopyDeviceCredentialsComponent, CopyDeviceCredentialsComponent,
DeviceCredentialsComponent, DeviceCredentialsComponent,
SecurityConfigLwm2mComponent, DeviceCredentialsLwm2mComponent,
SecurityConfigLwm2mServerComponent, DeviceCredentialsLwm2mServerComponent,
DeviceCredentialsMqttBasicComponent DeviceCredentialsMqttBasicComponent
] ]
}) })

Loading…
Cancel
Save