Browse Source

fixes

pull/8337/head
Maksym Dudnik 3 years ago
parent
commit
2be23ba39a
  1. 4
      ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts
  2. 1
      ui-ngx/src/app/shared/components/device/gateway-service-rpc.component.ts

4
ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts

@ -347,8 +347,8 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
if ($event) { if ($event) {
$event.stopPropagation(); $event.stopPropagation();
} }
attribute.value = typeof attribute.value === 'string' ? JSON.parse(attribute.value): attribute.value;
const params = deepClone(this.ctx.stateController.getStateParams()); const params = deepClone(this.ctx.stateController.getStateParams());
params.connector_logs = attribute;
params.targetEntityParamName = "connector_logs"; params.targetEntityParamName = "connector_logs";
this.ctx.stateController.openState("connector_logs", params); this.ctx.stateController.openState("connector_logs", params);
} }
@ -357,10 +357,10 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
if ($event) { if ($event) {
$event.stopPropagation(); $event.stopPropagation();
} }
attribute.value = typeof attribute.value === 'string' ? JSON.parse(attribute.value): attribute.value;
const params = deepClone(this.ctx.stateController.getStateParams()); const params = deepClone(this.ctx.stateController.getStateParams());
params.connector_rpc = attribute; params.connector_rpc = attribute;
params.targetEntityParamName = "connector_rpc"; params.targetEntityParamName = "connector_rpc";
console.log(attribute, 'connector page')
this.ctx.stateController.openState("connector_rpc", params); this.ctx.stateController.openState("connector_rpc", params);
} }

1
ui-ngx/src/app/shared/components/device/gateway-service-rpc.component.ts

@ -91,7 +91,6 @@ export class GatewayServiceRPCComponent extends PageComponent implements AfterVi
this.commandForm.get('command').setValue(this.RPCCommands[0]); this.commandForm.get('command').setValue(this.RPCCommands[0]);
} else { } else {
this.connectorType = this.ctx.stateController.getStateParams().connector_rpc.value.type; this.connectorType = this.ctx.stateController.getStateParams().connector_rpc.value.type;
console.log(this.ctx.stateController.getStateParams().connector_rpc, 'rpc page')
} }
} }

Loading…
Cancel
Save