Commit 005145a3196923a9a82ec3f870c390471e8a0e14
1 parent
bc488421
Protobuf component COAP implementation
Showing
3 changed files
with
36 additions
and
18 deletions
... | ... | @@ -47,35 +47,50 @@ |
47 | 47 | </mat-error> |
48 | 48 | </mat-form-field> |
49 | 49 | <div *ngIf="protoPayloadType" fxLayout="column"> |
50 | - <mat-form-field fxFlex> | |
51 | - <mat-label translate>device-profile.telemetry-proto-schema</mat-label> | |
52 | - <textarea matInput required formControlName="deviceTelemetryProtoSchema" rows="5"></textarea> | |
50 | + <ng-container> | |
51 | + <tb-protobuf-content | |
52 | + fxFlex | |
53 | + formControlName="deviceTelemetryProtoSchema" | |
54 | + label="{{ 'device-profile.telemetry-proto-schema' | translate }}" | |
55 | + [fillHeight]="true"> | |
56 | + </tb-protobuf-content> | |
53 | 57 | <mat-error *ngIf="coapTransportConfigurationFormGroup.get('coapDeviceTypeConfiguration.transportPayloadTypeConfiguration.deviceTelemetryProtoSchema').hasError('required')"> |
54 | 58 | {{ 'device-profile.telemetry-proto-schema-required' | translate}} |
55 | 59 | </mat-error> |
56 | - </mat-form-field> | |
57 | - <mat-form-field fxFlex> | |
58 | - <mat-label translate>device-profile.attributes-proto-schema</mat-label> | |
59 | - <textarea matInput required formControlName="deviceAttributesProtoSchema" rows="5"></textarea> | |
60 | + </ng-container> | |
61 | + <ng-container> | |
62 | + <tb-protobuf-content | |
63 | + fxFlex | |
64 | + formControlName="deviceAttributesProtoSchema" | |
65 | + label="{{ 'device-profile.attributes-proto-schema' | translate }}" | |
66 | + [fillHeight]="true"> | |
67 | + </tb-protobuf-content> | |
60 | 68 | <mat-error *ngIf="coapTransportConfigurationFormGroup.get('coapDeviceTypeConfiguration.transportPayloadTypeConfiguration.deviceAttributesProtoSchema').hasError('required')"> |
61 | 69 | {{ 'device-profile.attributes-proto-schema-required' | translate}} |
62 | 70 | </mat-error> |
63 | - </mat-form-field> | |
64 | - <mat-form-field style="padding-bottom: 20px" fxFlex> | |
65 | - <mat-label translate>device-profile.rpc-request-proto-schema</mat-label> | |
66 | - <textarea matInput required formControlName="deviceRpcRequestProtoSchema" rows="5"></textarea> | |
71 | + </ng-container> | |
72 | + <ng-container> | |
73 | + <tb-protobuf-content | |
74 | + fxFlex | |
75 | + formControlName="deviceRpcRequestProtoSchema" | |
76 | + label="{{ 'device-profile.rpc-request-proto-schema' | translate }}" | |
77 | + [fillHeight]="true"> | |
78 | + </tb-protobuf-content> | |
67 | 79 | <mat-error *ngIf="coapTransportConfigurationFormGroup.get('coapDeviceTypeConfiguration.transportPayloadTypeConfiguration.deviceRpcRequestProtoSchema').hasError('required')"> |
68 | 80 | {{ 'device-profile.rpc-request-proto-schema-required' | translate}} |
69 | 81 | </mat-error> |
70 | - <mat-hint class="tb-hint" translate>device-profile.rpc-request-proto-schema-hint</mat-hint> | |
71 | - </mat-form-field> | |
72 | - <mat-form-field fxFlex> | |
73 | - <mat-label translate>device-profile.rpc-response-proto-schema</mat-label> | |
74 | - <textarea matInput required formControlName="deviceRpcResponseProtoSchema" rows="5"></textarea> | |
82 | + </ng-container> | |
83 | + <ng-container> | |
84 | + <tb-protobuf-content | |
85 | + fxFlex | |
86 | + formControlName="deviceRpcResponseProtoSchema" | |
87 | + label="{{ 'device-profile.rpc-response-proto-schema' | translate }}" | |
88 | + [fillHeight]="true"> | |
89 | + </tb-protobuf-content> | |
75 | 90 | <mat-error *ngIf="coapTransportConfigurationFormGroup.get('coapDeviceTypeConfiguration.transportPayloadTypeConfiguration.deviceRpcResponseProtoSchema').hasError('required')"> |
76 | 91 | {{ 'device-profile.rpc-response-proto-schema-required' | translate}} |
77 | 92 | </mat-error> |
78 | - </mat-form-field> | |
93 | + </ng-container> | |
79 | 94 | </div> |
80 | 95 | </div> |
81 | 96 | </fieldset> | ... | ... |
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | [fillHeight]="true"> |
105 | 105 | </tb-protobuf-content> |
106 | 106 | <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('transportPayloadTypeConfiguration.deviceRpcRequestProtoSchema').hasError('required')"> |
107 | - {{ 'device-profile.rpc-request-proto-required' | translate}} | |
107 | + {{ 'device-profile.rpc-request-proto-schema-required' | translate}} | |
108 | 108 | </mat-error> |
109 | 109 | </ng-container> |
110 | 110 | <ng-container> | ... | ... |
... | ... | @@ -36,6 +36,7 @@ export function loadAceDependencies(): Observable<any> { |
36 | 36 | aceObservables.push(from(import('ace-builds/src-noconflict/mode-text'))); |
37 | 37 | aceObservables.push(from(import('ace-builds/src-noconflict/mode-markdown'))); |
38 | 38 | aceObservables.push(from(import('ace-builds/src-noconflict/mode-html'))); |
39 | + aceObservables.push(from(import('ace-builds/src-noconflict/mode-c_cpp'))); | |
39 | 40 | aceObservables.push(from(import('ace-builds/src-noconflict/mode-protobuf'))); |
40 | 41 | aceObservables.push(from(import('ace-builds/src-noconflict/snippets/java'))); |
41 | 42 | aceObservables.push(from(import('ace-builds/src-noconflict/snippets/css'))); |
... | ... | @@ -44,6 +45,8 @@ export function loadAceDependencies(): Observable<any> { |
44 | 45 | aceObservables.push(from(import('ace-builds/src-noconflict/snippets/text'))); |
45 | 46 | aceObservables.push(from(import('ace-builds/src-noconflict/snippets/markdown'))); |
46 | 47 | aceObservables.push(from(import('ace-builds/src-noconflict/snippets/html'))); |
48 | + aceObservables.push(from(import('ace-builds/src-noconflict/snippets/c_cpp'))); | |
49 | + aceObservables.push(from(import('ace-builds/src-noconflict/snippets/protobuf'))); | |
47 | 50 | aceObservables.push(from(import('ace-builds/src-noconflict/theme-textmate'))); |
48 | 51 | aceObservables.push(from(import('ace-builds/src-noconflict/theme-github'))); |
49 | 52 | return forkJoin(aceObservables).pipe( | ... | ... |