Commit 44a5500c7df831e58561427036d5e6f8ca22b1ab

Authored by Vladyslav_Prykhodko
1 parent ad273dea

Remove device profile rpc topic filter

@@ -37,23 +37,6 @@ @@ -37,23 +37,6 @@
37 </mat-error> 37 </mat-error>
38 </mat-form-field> 38 </mat-form-field>
39 <mat-form-field fxFlex> 39 <mat-form-field fxFlex>
40 - <mat-label translate>device-profile.rpc-request-topic-filter</mat-label>  
41 - <input matInput required  
42 - formControlName="deviceRpcRequestTopic"  
43 - type="text">  
44 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcRequestTopic').hasError('required')">  
45 - {{ 'device-profile.rpc-request-topic-filter-required' | translate}}  
46 - </mat-error>  
47 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcRequestTopic').hasError('invalidSingleTopicCharacter')">  
48 - {{ 'device-profile.not-valid-single-character' | translate}}  
49 - </mat-error>  
50 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcRequestTopic').hasError('invalidMultiTopicCharacter')">  
51 - {{ 'device-profile.not-valid-multi-character' | translate}}  
52 - </mat-error>  
53 - </mat-form-field>  
54 - </div>  
55 - <div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column">  
56 - <mat-form-field fxFlex>  
57 <mat-label translate>device-profile.attributes-topic-filter</mat-label> 40 <mat-label translate>device-profile.attributes-topic-filter</mat-label>
58 <input matInput required 41 <input matInput required
59 formControlName="deviceAttributesTopic" 42 formControlName="deviceAttributesTopic"
@@ -68,21 +51,6 @@ @@ -68,21 +51,6 @@
68 {{ 'device-profile.not-valid-multi-character' | translate}} 51 {{ 'device-profile.not-valid-multi-character' | translate}}
69 </mat-error> 52 </mat-error>
70 </mat-form-field> 53 </mat-form-field>
71 - <mat-form-field fxFlex>  
72 - <mat-label translate>device-profile.rpc-response-topic-filter</mat-label>  
73 - <input matInput required  
74 - formControlName="deviceRpcResponseTopic"  
75 - type="text">  
76 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcResponseTopic').hasError('required')">  
77 - {{ 'device-profile.rpc-response-topic-filter-required' | translate}}  
78 - </mat-error>  
79 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcResponseTopic').hasError('invalidSingleTopicCharacter')">  
80 - {{ 'device-profile.not-valid-single-character' | translate}}  
81 - </mat-error>  
82 - <mat-error *ngIf="mqttDeviceProfileTransportConfigurationFormGroup.get('configuration.deviceRpcResponseTopic').hasError('invalidMultiTopicCharacter')">  
83 - {{ 'device-profile.not-valid-multi-character' | translate}}  
84 - </mat-error>  
85 - </mat-form-field>  
86 </div> 54 </div>
87 <div class="tb-hint" innerHTML="{{ 'device-profile.support-level-wildcards' | translate }}"></div> 55 <div class="tb-hint" innerHTML="{{ 'device-profile.support-level-wildcards' | translate }}"></div>
88 <div class="tb-hint" innerHTML="{{ 'device-profile.single-level-wildcards-hint' | translate }}"></div> 56 <div class="tb-hint" innerHTML="{{ 'device-profile.single-level-wildcards-hint' | translate }}"></div>
@@ -79,9 +79,7 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control @@ -79,9 +79,7 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
79 this.mqttDeviceProfileTransportConfigurationFormGroup = this.fb.group({ 79 this.mqttDeviceProfileTransportConfigurationFormGroup = this.fb.group({
80 configuration: this.fb.group({ 80 configuration: this.fb.group({
81 deviceAttributesTopic: [null, [Validators.required, this.validationMQTTTopic()]], 81 deviceAttributesTopic: [null, [Validators.required, this.validationMQTTTopic()]],
82 - deviceTelemetryTopic: [null, [Validators.required, this.validationMQTTTopic()]],  
83 - deviceRpcRequestTopic: [null, [Validators.required, this.validationMQTTTopic()]],  
84 - deviceRpcResponseTopic: [null, [Validators.required, this.validationMQTTTopic()]] 82 + deviceTelemetryTopic: [null, [Validators.required, this.validationMQTTTopic()]]
85 }) 83 })
86 }); 84 });
87 this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => { 85 this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => {
@@ -108,8 +108,6 @@ export interface DefaultDeviceProfileTransportConfiguration { @@ -108,8 +108,6 @@ export interface DefaultDeviceProfileTransportConfiguration {
108 export interface MqttDeviceProfileTransportConfiguration { 108 export interface MqttDeviceProfileTransportConfiguration {
109 deviceTelemetryTopic?: string; 109 deviceTelemetryTopic?: string;
110 deviceAttributesTopic?: string; 110 deviceAttributesTopic?: string;
111 - deviceRpcRequestTopic?: string;  
112 - deviceRpcResponseTopic?: string;  
113 [key: string]: any; 111 [key: string]: any;
114 } 112 }
115 113
@@ -162,9 +160,7 @@ export function createDeviceProfileTransportConfiguration(type: DeviceTransportT @@ -162,9 +160,7 @@ export function createDeviceProfileTransportConfiguration(type: DeviceTransportT
162 case DeviceTransportType.MQTT: 160 case DeviceTransportType.MQTT:
163 const mqttTransportConfiguration: MqttDeviceProfileTransportConfiguration = { 161 const mqttTransportConfiguration: MqttDeviceProfileTransportConfiguration = {
164 deviceTelemetryTopic: 'v1/devices/me/telemetry', 162 deviceTelemetryTopic: 'v1/devices/me/telemetry',
165 - deviceAttributesTopic: 'v1/devices/me/attributes',  
166 - deviceRpcRequestTopic: 'v1/devices/me/rpc/request/',  
167 - deviceRpcResponseTopic: 'v1/devices/me/rpc/response/' 163 + deviceAttributesTopic: 'v1/devices/me/attributes'
168 }; 164 };
169 transportConfiguration = {...mqttTransportConfiguration, type: DeviceTransportType.MQTT}; 165 transportConfiguration = {...mqttTransportConfiguration, type: DeviceTransportType.MQTT};
170 break; 166 break;
@@ -795,15 +795,11 @@ @@ -795,15 +795,11 @@
795 "support-level-wildcards": "Single <code>[+]</code> and multi-level <code>[#]</code> wildcards supported.", 795 "support-level-wildcards": "Single <code>[+]</code> and multi-level <code>[#]</code> wildcards supported.",
796 "telemetry-topic-filter": "Telemetry topic filter", 796 "telemetry-topic-filter": "Telemetry topic filter",
797 "telemetry-topic-filter-required": "Telemetry topic filter is required.", 797 "telemetry-topic-filter-required": "Telemetry topic filter is required.",
798 - "rpc-request-topic-filter": "RPC request topic filter",  
799 - "rpc-request-topic-filter-required": "RPC request topic filter is required.",  
800 "attributes-topic-filter": "Attributes topic filter", 798 "attributes-topic-filter": "Attributes topic filter",
801 "attributes-topic-filter-required": "Attributes topic filter is required.", 799 "attributes-topic-filter-required": "Attributes topic filter is required.",
802 - "rpc-response-topic-filter": "RPC response topic filter",  
803 - "rpc-response-topic-filter-required": "RPC response topic filter is required.",  
804 "not-valid-single-character": "Invalid use of a single-level wildcard character", 800 "not-valid-single-character": "Invalid use of a single-level wildcard character",
805 "not-valid-multi-character": "Invalid use of a multi-level wildcard character", 801 "not-valid-multi-character": "Invalid use of a multi-level wildcard character",
806 - "single-level-wildcards-hint": "<code>[+]</code> is suitable for any topic level. Ex.: <b>v1/devices/+/telemetry</b> or <b>+/devices/+/attributes</b>.", 802 + "single-level-wildcards-hint": "<code>[+]</code> is suitable for any topic filter level. Ex.: <b>v1/devices/+/telemetry</b> or <b>+/devices/+/attributes</b>.",
807 "multi-level-wildcards-hint": "<code>[#]</code> can replace the topic filter itself and must be the last symbol of the topic. Ex.: <b>#</b> or <b>v1/devices/me/#</b>." 803 "multi-level-wildcards-hint": "<code>[#]</code> can replace the topic filter itself and must be the last symbol of the topic. Ex.: <b>#</b> or <b>v1/devices/me/#</b>."
808 }, 804 },
809 "dialog": { 805 "dialog": {