Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stape-io/data-tag
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: nordnet/data-tag
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 10, 2024

  1. Copy the full SHA
    91d4f40 View commit details
  2. Merge pull request #1 from nordnet/event-settings-variable

    adding an option for event settings variables
    vriken authored Dec 10, 2024
    Copy the full SHA
    3735e22 View commit details
Showing with 41 additions and 1 deletion.
  1. +14 −0 template.js
  2. +27 −1 template.tpl
14 changes: 14 additions & 0 deletions template.js
Original file line number Diff line number Diff line change
@@ -415,6 +415,20 @@ function getUserAndCustomDataArray() {
userAndCustomDataArray = data.custom_data;
}

if (data.event_settings_variable) {
const eventSettings = data.event_settings_variable;
for (let paramName in eventSettings) {
if (eventSettings.hasOwnProperty(paramName)) {
userAndCustomDataArray.push({
name: ep.paramName,
value: eventSettings[paramName],
transformation: 'none',
store: 'none'
});
}
}
}

if (data.user_data && data.user_data.length) {
for (let userDataKey in data.user_data) {
userAndCustomDataArray.push(data.user_data[userDataKey]);
28 changes: 27 additions & 1 deletion template.tpl
Original file line number Diff line number Diff line change
@@ -319,7 +319,19 @@ ___TEMPLATE_PARAMETERS___
]
}
]
}
},
{
"type": "SELECT",
"name": "event_settings_variable",
"displayName": "Event Settings Variable",
"macrosInSelect": true,
"selectItems": [
{
"value": "none",
"displayValue": "None"
}
]
},
]
},
{
@@ -1096,6 +1108,20 @@ function getUserAndCustomDataArray() {
userAndCustomDataArray = data.custom_data;
}

if (data.event_settings_variable) {
const eventSettings = data.event_settings_variable;
for (let paramName in eventSettings) {
if (eventSettings.hasOwnProperty(paramName)) {
userAndCustomDataArray.push({
name: paramName,
value: eventSettings[paramName],
transformation: 'none',
store: 'none'
});
}
}
}

if (data.user_data && data.user_data.length) {
for (let userDataKey in data.user_data) {
userAndCustomDataArray.push(data.user_data[userDataKey]);