From a71793353f02fdced2831c5aad9feb2a406b4ad6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 20 Dec 2019 07:21:14 +0100 Subject: [PATCH] Keys respecting JSON --- DesignerSpace/Workspace/FunctionLibraries/ProtocolNode.js | 3 +++ .../Workspace/FunctionLibraries/UiObjectsFromNodes.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DesignerSpace/Workspace/FunctionLibraries/ProtocolNode.js b/DesignerSpace/Workspace/FunctionLibraries/ProtocolNode.js index facc97d35..a48fe727b 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/ProtocolNode.js +++ b/DesignerSpace/Workspace/FunctionLibraries/ProtocolNode.js @@ -627,6 +627,9 @@ function newProtocolNode () { name: node.name, code: node.code } + if (parseCode) { + object.code = JSON.parse(node.code) + } if (includeIds) { object.id = node.id } diff --git a/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js b/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js index 425cd8674..6aecaa64e 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js +++ b/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js @@ -1621,7 +1621,7 @@ function newUiObjectsFromNodes () { let exchangeAccount = parentNode let key = { name: 'New Key', - code: 'Paste your exchange API secret key here and the put the key name as this key object title. Secret keys are filtered out and NOT exported when using the SHARE menu option on any object at your workspace. Secret keys ARE downloaded when using the download button.' + code: '{ \n\"name\": \"Paste your exchange API here\",\n"secret\": \"Paste your exchange API secret key here. Exchange keys are filtered out and NOT exported when using the SHARE menu option on any node at your workspace. Exchange keys ARE downloaded when using the DOWNLOAD button or the CLONE button.\"\n}' } if (exchangeAccount.keys !== undefined) { exchangeAccount.keys.push(key) @@ -1730,7 +1730,7 @@ function newUiObjectsFromNodes () { if (node.timePeriod === undefined) { node.timePeriod = { name: 'Time Period', - code: '01-hs' + code: '{ \n\"codeName\": \"01-hs\"\n}' } createUiObject(true, 'Time Period', '', node.timePeriod, node, node) }