Browse Source
Merge pull request #2958 from vvlladd28/bug/rpc-widget
[3.0] Fixed not correct call custom parseValueFunction in RPC widget
pull/3089/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/rpc/switch.component.ts
|
|
|
@ -320,7 +320,7 @@ export class LedIndicatorComponent extends PageComponent implements OnInit, OnDe |
|
|
|
const keyData = data[0]; |
|
|
|
if (keyData && keyData.data && keyData.data[0]) { |
|
|
|
const attrValue = keyData.data[0][1]; |
|
|
|
if (attrValue) { |
|
|
|
if (isDefined(attrValue)) { |
|
|
|
let parsed = null; |
|
|
|
try { |
|
|
|
parsed = this.parseValueFunction(JSON.parse(attrValue)); |
|
|
|
|
|
|
|
@ -315,7 +315,7 @@ export class RoundSwitchComponent extends PageComponent implements OnInit, OnDes |
|
|
|
const keyData = data[0]; |
|
|
|
if (keyData && keyData.data && keyData.data[0]) { |
|
|
|
const attrValue = keyData.data[0][1]; |
|
|
|
if (attrValue) { |
|
|
|
if (isDefined(attrValue)) { |
|
|
|
let parsed = null; |
|
|
|
try { |
|
|
|
parsed = this.parseValueFunction(JSON.parse(attrValue)); |
|
|
|
|
|
|
|
@ -333,7 +333,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy |
|
|
|
const keyData = data[0]; |
|
|
|
if (keyData && keyData.data && keyData.data[0]) { |
|
|
|
const attrValue = keyData.data[0][1]; |
|
|
|
if (attrValue) { |
|
|
|
if (isDefined(attrValue)) { |
|
|
|
let parsed = null; |
|
|
|
try { |
|
|
|
parsed = this.parseValueFunction(JSON.parse(attrValue)); |
|
|
|
|