add support of environtment variable for tab & group

This commit is contained in:
Hiroyasu Nishiyama
2021-08-19 21:15:13 +09:00
parent f1e7ec0c6b
commit 6aecc3915c
15 changed files with 673 additions and 95 deletions

View File

@@ -539,6 +539,9 @@ async function addFlow(flow, user) {
if (flow.hasOwnProperty('disabled')) {
tabNode.disabled = flow.disabled;
}
if (flow.hasOwnProperty('env')) {
tabNode.env = flow.env;
}
var nodes = [tabNode];
@@ -599,6 +602,9 @@ function getFlow(id) {
if (flow.hasOwnProperty('info')) {
result.info = flow.info;
}
if (flow.hasOwnProperty('env')) {
result.env = flow.env;
}
if (id !== 'global') {
result.nodes = [];
}
@@ -694,6 +700,9 @@ async function updateFlow(id,newFlow, user) {
if (newFlow.hasOwnProperty('disabled')) {
tabNode.disabled = newFlow.disabled;
}
if (newFlow.hasOwnProperty('env')) {
tabNode.env = newFlow.env;
}
nodes = [tabNode].concat(newFlow.nodes||[]).concat(newFlow.configs||[]);
nodes.forEach(function(n) {