Browse Source
Merge pull request #9409 from MrKartoshka/hotfix/3.6
Connector RPC parаms hotfix
pull/9414/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc.component.ts
|
|
@ -78,7 +78,7 @@ export class GatewayServiceRPCComponent implements AfterViewInit { |
|
|
sendCommand() { |
|
|
sendCommand() { |
|
|
const formValues = this.commandForm.value; |
|
|
const formValues = this.commandForm.value; |
|
|
const commandPrefix = this.isConnector ? `${this.connectorType}_` : 'gateway_'; |
|
|
const commandPrefix = this.isConnector ? `${this.connectorType}_` : 'gateway_'; |
|
|
this.ctx.controlApi.sendTwoWayCommand(commandPrefix+formValues.command.toLowerCase(), {},formValues.time).subscribe({ |
|
|
this.ctx.controlApi.sendTwoWayCommand(commandPrefix+formValues.command.toLowerCase(), formValues.params,formValues.time).subscribe({ |
|
|
next: resp => this.commandForm.get('result').setValue(JSON.stringify(resp)), |
|
|
next: resp => this.commandForm.get('result').setValue(JSON.stringify(resp)), |
|
|
error: error => { |
|
|
error: error => { |
|
|
console.log(error); |
|
|
console.log(error); |
|
|
|