add global environment variable feature

This commit is contained in:
Hiroyasu Nishiyama
2022-11-04 18:42:51 +09:00
parent 7da3773f7f
commit f23d0480e4
18 changed files with 460 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
<script type="text/html" data-template-name="global-config">
<div cllass="form-tips">
<span data-i18n="[html]global-config.tip"></span>
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('global-config',{
category: 'config',
defaults: {
name: { value: "" },
env: { value: [] },
},
credentials: {
map: { type: "map" }
}
});
</script>

View File

@@ -0,0 +1,7 @@
module.exports = function(RED) {
"use strict";
function GlobalConfigNode(n) {
RED.nodes.createNode(this,n);
}
RED.nodes.registerType("global-config", GlobalConfigNode);
}

View File

@@ -0,0 +1,19 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/html" data-help-name="global-config">
<p>A node for holding global configuration of flows.</p>
</script>

View File

@@ -1123,5 +1123,8 @@
"warn": {
"nonumber": "no number found in payload"
}
},
"global-config": {
"tip": "<p>This node holds global configuration of flows.</p><p>Do not delete this node unless you understand underlying mechanism.</p>"
}
}

View File

@@ -0,0 +1,19 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/html" data-help-name="global-config">
<p>大域的なフローの設定を保持するノード</p>
</script>p

View File

@@ -1123,5 +1123,8 @@
"warn": {
"nonumber": "ペイロードに数値が含まれていません"
}
},
"global-config": {
"tip": "<p>このノードはフローの大域的な設定を保持するために利用されます。</p><p>実装の詳細を理解していない場合、このノードの削除は推奨しません。</p>"
}
}