Browse Source

Fix [object Object] in Execute RPC action summary for JSON parameters (#16622)

pull/16697/head
Maksym Tsymbarov 3 weeks ago
committed by GitHub
parent
commit
969a848e73
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts

5
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/set-value-action-settings.component.ts

@ -18,7 +18,7 @@ import { SetValueAction, SetValueSettings, ValueToDataType } from '@shared/model
import { TranslateService } from '@ngx-translate/core';
import { IAliasController } from '@core/api/widget-api.models';
import { TargetDevice, widgetType } from '@shared/models/widget.models';
import { isDefinedAndNotNull } from '@core/utils';
import { isDefinedAndNotNull, isObject } from '@core/utils';
import {
SetValueActionSettingsPanelComponent
} from '@home/components/widget/lib/settings/common/action/set-value-action-settings-panel.component';
@ -136,6 +136,9 @@ export class SetValueActionSettingsComponent implements OnInit, ControlValueAcce
break;
case ValueToDataType.CONSTANT:
value = this.modelValue.valueToData.constantValue;
if (isObject(value)) {
value = JSON.stringify(value);
}
break;
case ValueToDataType.FUNCTION:
value = 'f(value)';

Loading…
Cancel
Save