Commit 44a5500c7df831e58561427036d5e6f8ca22b1ab

Authored by Vladyslav_Prykhodko
1 parent ad273dea

Remove device profile rpc topic filter

... ... @@ -37,23 +37,6 @@
37 37 </mat-error>
38 38 </mat-form-field>
39 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 40 <mat-label translate>device-profile.attributes-topic-filter</mat-label>
58 41 <input matInput required
59 42 formControlName="deviceAttributesTopic"
... ... @@ -68,21 +51,6 @@
68 51 {{ 'device-profile.not-valid-multi-character' | translate}}
69 52 </mat-error>
70 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 54 </div>
87 55 <div class="tb-hint" innerHTML="{{ 'device-profile.support-level-wildcards' | translate }}"></div>
88 56 <div class="tb-hint" innerHTML="{{ 'device-profile.single-level-wildcards-hint' | translate }}"></div>
... ...
... ... @@ -79,9 +79,7 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control
79 79 this.mqttDeviceProfileTransportConfigurationFormGroup = this.fb.group({
80 80 configuration: this.fb.group({
81 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 85 this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => {
... ...
... ... @@ -108,8 +108,6 @@ export interface DefaultDeviceProfileTransportConfiguration {
108 108 export interface MqttDeviceProfileTransportConfiguration {
109 109 deviceTelemetryTopic?: string;
110 110 deviceAttributesTopic?: string;
111   - deviceRpcRequestTopic?: string;
112   - deviceRpcResponseTopic?: string;
113 111 [key: string]: any;
114 112 }
115 113
... ... @@ -162,9 +160,7 @@ export function createDeviceProfileTransportConfiguration(type: DeviceTransportT
162 160 case DeviceTransportType.MQTT:
163 161 const mqttTransportConfiguration: MqttDeviceProfileTransportConfiguration = {
164 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 165 transportConfiguration = {...mqttTransportConfiguration, type: DeviceTransportType.MQTT};
170 166 break;
... ...
... ... @@ -795,15 +795,11 @@
795 795 "support-level-wildcards": "Single <code>[+]</code> and multi-level <code>[#]</code> wildcards supported.",
796 796 "telemetry-topic-filter": "Telemetry topic filter",
797 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 798 "attributes-topic-filter": "Attributes topic filter",
801 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 800 "not-valid-single-character": "Invalid use of a single-level wildcard character",
805 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 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 805 "dialog": {
... ...