mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
Only offer to manage dependencies when theres a missing module identified
This commit is contained in:
@@ -1989,7 +1989,11 @@ RED.nodes = (function() {
|
||||
timeout: 10000,
|
||||
}
|
||||
let unknownNotification
|
||||
let missingModules = []
|
||||
if (options.modules) {
|
||||
missingModules = Object.keys(options.modules).filter(module => !RED.nodes.registry.getModule(module))
|
||||
}
|
||||
if (missingModules.length > 0) {
|
||||
notificationOptions.fixed = true
|
||||
delete notificationOptions.timeout
|
||||
// We have module hint list from imported global-config
|
||||
@@ -2003,13 +2007,13 @@ RED.nodes = (function() {
|
||||
|
||||
RED.actions.invoke('core:manage-palette', {
|
||||
view: 'install',
|
||||
filter: '"' + Object.keys(options.modules).join('", "') + '"'
|
||||
filter: '"' + missingModules.join('", "') + '"'
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
let moduleList = $("<ul>");
|
||||
Object.keys(options.modules).forEach(function(t) {
|
||||
missingModules.forEach(function(t) {
|
||||
$("<li>").text(t).appendTo(moduleList);
|
||||
})
|
||||
moduleList = moduleList[0].outerHTML;
|
||||
|
||||
Reference in New Issue
Block a user