mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
8 Commits
3.1.3
...
4479-ensur
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a6b1e86dc | ||
|
|
f0a9b0cf69 | ||
|
|
26ddb5c1b7 | ||
|
|
82f8b64599 | ||
|
|
7f24de442f | ||
|
|
8365310ca7 | ||
|
|
74ff0599d1 | ||
|
|
e1f2e0656b |
@@ -109,7 +109,6 @@
|
||||
"selectionToSubflow": "Auswahl in Subflow umwandeln",
|
||||
"flows": "Flow",
|
||||
"add": "Hinzufügen",
|
||||
"rename": "Umbenennen",
|
||||
"delete": "Löschen",
|
||||
"keyboardShortcuts": "Tastenkürzel",
|
||||
"login": "Anmelden",
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
"selectionToSubflow": "Selection to Subflow",
|
||||
"flows": "Flows",
|
||||
"add": "Add",
|
||||
"rename": "Rename",
|
||||
"delete": "Delete",
|
||||
"keyboardShortcuts": "Keyboard shortcuts",
|
||||
"login": "Login",
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
"selectionToSubflow": "Convertir en sous-flux",
|
||||
"flows": "Flux",
|
||||
"add": "Ajouter",
|
||||
"rename": "Renommer",
|
||||
"delete": "Supprimer",
|
||||
"keyboardShortcuts": "Raccourcis clavier",
|
||||
"login": "Se connecter",
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
"selectionToSubflow": "選択部分をサブフロー化",
|
||||
"flows": "フロー",
|
||||
"add": "フローを新規追加",
|
||||
"rename": "フロー名を変更",
|
||||
"delete": "フローを削除",
|
||||
"keyboardShortcuts": "ショートカットキーの説明",
|
||||
"login": "ログイン",
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
"selectionToSubflow": "서브 플로우 선택",
|
||||
"flows": "플로우",
|
||||
"add": "추가",
|
||||
"rename": "이름변경",
|
||||
"delete": "삭제",
|
||||
"keyboardShortcuts": "단축키",
|
||||
"login": "로그인",
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
"selectionToSubflow": "Seleção para subfluxo",
|
||||
"flows": "Fluxos",
|
||||
"add": "Adicionar",
|
||||
"rename": "Renomear",
|
||||
"delete": "Apagar",
|
||||
"keyboardShortcuts": "Atalhos do teclado",
|
||||
"login": "Ingressar",
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
"selectionToSubflow": "Выделение в подпоток",
|
||||
"flows": "Потоки",
|
||||
"add": "Добавить",
|
||||
"rename": "Переименовать",
|
||||
"delete": "Удалить",
|
||||
"keyboardShortcuts": "Сочетания клавиш",
|
||||
"login": "Войти",
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
"selectionToSubflow": "将选择部分更改为子流程",
|
||||
"flows": "流程",
|
||||
"add": "增加",
|
||||
"rename": "重命名",
|
||||
"delete": "删除",
|
||||
"keyboardShortcuts": "键盘快捷方式",
|
||||
"login": "登录",
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
"selectionToSubflow": "將選擇部分更改為子流程",
|
||||
"flows": "流程",
|
||||
"add": "增加",
|
||||
"rename": "重新命名",
|
||||
"delete": "刪除",
|
||||
"keyboardShortcuts": "鍵盤快速鍵",
|
||||
"login": "登入",
|
||||
|
||||
@@ -39,15 +39,16 @@
|
||||
console.warn(evt,args);
|
||||
}
|
||||
if (handlers[evt]) {
|
||||
for (var i=0;i<handlers[evt].length;i++) {
|
||||
let cpyHandlers = [...handlers[evt]];
|
||||
|
||||
for (var i=0;i<cpyHandlers.length;i++) {
|
||||
try {
|
||||
handlers[evt][i].apply(null, args);
|
||||
cpyHandlers[i].apply(null, args);
|
||||
} catch(err) {
|
||||
console.warn("RED.events.emit error: ["+evt+"] "+(err.toString()));
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -722,7 +722,7 @@ var RED = (function() {
|
||||
menuOptions.push({id:"menu-item-config-nodes",label:RED._("menu.label.displayConfig"),onselect:"core:show-config-tab"});
|
||||
menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[
|
||||
{id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:"core:add-flow"},
|
||||
{id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:"core:edit-flow"},
|
||||
{id:"menu-item-workspace-edit",label:RED._("menu.label.edit"),onselect:"core:edit-flow"},
|
||||
{id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:"core:remove-flow"}
|
||||
]});
|
||||
menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [
|
||||
|
||||
@@ -484,7 +484,7 @@ RED.palette = (function() {
|
||||
var currentLabel = paletteNode.attr("data-palette-label");
|
||||
var currentInfo = paletteNode.attr("data-palette-info");
|
||||
|
||||
if (currentLabel !== sf.name || currentInfo !== sf.info) {
|
||||
if (currentLabel !== sf.name || currentInfo !== sf.info || sf.in.length > 0 || sf.out.length > 0) {
|
||||
paletteNode.attr("data-palette-info",sf.info);
|
||||
setLabel(sf.type+":"+sf.id,paletteNode,sf.name,RED.utils.renderMarkdown(sf.info||""));
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ class Flow {
|
||||
}
|
||||
if (!key.startsWith("$parent.")) {
|
||||
if (this._env.hasOwnProperty(key)) {
|
||||
return this._env[key]
|
||||
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
|
||||
}
|
||||
} else {
|
||||
key = key.substring(8);
|
||||
|
||||
@@ -41,7 +41,7 @@ class Group {
|
||||
}
|
||||
if (!key.startsWith("$parent.")) {
|
||||
if (this._env.hasOwnProperty(key)) {
|
||||
return this._env[key]
|
||||
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
|
||||
}
|
||||
} else {
|
||||
key = key.substring(8);
|
||||
|
||||
@@ -375,7 +375,7 @@ class Subflow extends Flow {
|
||||
}
|
||||
if (!key.startsWith("$parent.")) {
|
||||
if (this._env.hasOwnProperty(key)) {
|
||||
return this._env[key]
|
||||
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
|
||||
}
|
||||
} else {
|
||||
key = key.substring(8);
|
||||
|
||||
@@ -102,6 +102,9 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
pendingEvaluations.push(new Promise((resolve, _) => {
|
||||
redUtil.evaluateNodeProperty(value, 'jsonata', {_flow: flow}, null, (err, result) => {
|
||||
if (!err) {
|
||||
if (typeof result === 'object') {
|
||||
result = { value: result, __clone__: true}
|
||||
}
|
||||
evaluatedEnv[name] = result
|
||||
}
|
||||
resolve()
|
||||
@@ -109,6 +112,9 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
}))
|
||||
} else {
|
||||
value = redUtil.evaluateNodeProperty(value, type, {_flow: flow}, null, null);
|
||||
if (typeof value === 'object') {
|
||||
value = { value: value, __clone__: true}
|
||||
}
|
||||
}
|
||||
evaluatedEnv[name] = value
|
||||
}
|
||||
@@ -138,8 +144,13 @@ async function evaluateEnvProperties(flow, env, credentials) {
|
||||
}
|
||||
}}, null, null);
|
||||
}
|
||||
if (typeof value === 'object' && !value.__clone__) {
|
||||
value = { value: value, __clone__: true}
|
||||
}
|
||||
evaluatedEnv[name] = value
|
||||
|
||||
}
|
||||
// console.log(evaluatedEnv)
|
||||
|
||||
return evaluatedEnv
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user