mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'nodeSettings' into 0.17
This commit is contained in:
@@ -50,8 +50,13 @@ function registerType(nodeSet,type,constructor,opts) {
|
||||
type = nodeSet;
|
||||
nodeSet = "";
|
||||
}
|
||||
if (opts && opts.credentials) {
|
||||
credentials.register(type,opts.credentials);
|
||||
if (opts) {
|
||||
if (opts.credentials) {
|
||||
credentials.register(type,opts.credentials);
|
||||
}
|
||||
if (opts.settings) {
|
||||
settings.registerNodeSettings(type,opts.settings);
|
||||
}
|
||||
}
|
||||
registry.registerType(nodeSet,type,constructor);
|
||||
}
|
||||
|
@@ -493,6 +493,7 @@ function enableNodeSet(typeOrId) {
|
||||
delete config.err;
|
||||
config.enabled = true;
|
||||
nodeConfigCache = null;
|
||||
settings.enableNodeSettings(config.types);
|
||||
return saveNodeList().then(function() {
|
||||
return filterNodeInfo(config);
|
||||
});
|
||||
@@ -515,6 +516,7 @@ function disableNodeSet(typeOrId) {
|
||||
// TODO: persist setting
|
||||
config.enabled = false;
|
||||
nodeConfigCache = null;
|
||||
settings.disableNodeSettings(config.types);
|
||||
return saveNodeList().then(function() {
|
||||
return filterNodeInfo(config);
|
||||
});
|
||||
|
Reference in New Issue
Block a user