mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
add global environment variable feature
This commit is contained in:
19
packages/node_modules/@node-red/nodes/core/common/91-global-config.html
vendored
Normal file
19
packages/node_modules/@node-red/nodes/core/common/91-global-config.html
vendored
Normal 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>
|
7
packages/node_modules/@node-red/nodes/core/common/91-global-config.js
vendored
Normal file
7
packages/node_modules/@node-red/nodes/core/common/91-global-config.js
vendored
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user