mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Better logging when deprecated editorTheme.palette.* settings used
This commit is contained in:
parent
5743a5f91d
commit
af19536222
@ -520,9 +520,6 @@ RED.palette.editor = (function() {
|
|||||||
installAllowList = parseModuleList(installAllowList);
|
installAllowList = parseModuleList(installAllowList);
|
||||||
installDenyList = parseModuleList(installDenyList);
|
installDenyList = parseModuleList(installDenyList);
|
||||||
|
|
||||||
console.log(installAllowList);
|
|
||||||
console.log(installDenyList);
|
|
||||||
|
|
||||||
createSettingsPane();
|
createSettingsPane();
|
||||||
|
|
||||||
RED.userSettings.add({
|
RED.userSettings.add({
|
||||||
|
@ -362,6 +362,14 @@ function uninstallModule(module) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function checkPrereq() {
|
async function checkPrereq() {
|
||||||
|
if (settings.editorTheme && settings.editorTheme.palette) {
|
||||||
|
if (settings.editorTheme.palette.hasOwnProperty("editable")) {
|
||||||
|
log.warn(log._("server.deprecatedOption",{old:"editorTheme.palette.editable", new:"externalModules.palette.allowInstall"}));
|
||||||
|
}
|
||||||
|
if (settings.editorTheme.palette.hasOwnProperty("upload")) {
|
||||||
|
log.warn(log._("server.deprecatedOption",{old:"editorTheme.palette.upload", new:"externalModules.palette.allowUpload"}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (settings.editorTheme.palette.editable === false) {
|
if (settings.editorTheme.palette.editable === false) {
|
||||||
|
@ -90,8 +90,21 @@ var api = module.exports = {
|
|||||||
safeSettings.flowFilePretty = runtime.settings.flowFilePretty;
|
safeSettings.flowFilePretty = runtime.settings.flowFilePretty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runtime.settings.editorTheme && runtime.settings.editorTheme.palette) {
|
||||||
|
if (runtime.settings.editorTheme.palette.upload === false || runtime.settings.editorTheme.palette.editable === false) {
|
||||||
|
safeSettings.externalModules = {palette: { } }
|
||||||
|
}
|
||||||
|
if (runtime.settings.editorTheme.palette.upload === false) {
|
||||||
|
safeSettings.externalModules.palette.allowUpload = false;
|
||||||
|
}
|
||||||
|
if (runtime.settings.editorTheme.palette.editable === false) {
|
||||||
|
safeSettings.externalModules.palette.allowInstall = false;
|
||||||
|
safeSettings.externalModules.palette.allowUpload = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (runtime.settings.externalModules) {
|
if (runtime.settings.externalModules) {
|
||||||
safeSettings.externalModules = runtime.settings.externalModules;
|
safeSettings.externalModules = extend(safeSettings.externalModules||{},runtime.settings.externalModules);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!runtime.nodes.installerEnabled()) {
|
if (!runtime.nodes.installerEnabled()) {
|
||||||
|
@ -125,7 +125,7 @@ function start() {
|
|||||||
return redNodes.load().then(function() {
|
return redNodes.load().then(function() {
|
||||||
let autoInstallModules = false;
|
let autoInstallModules = false;
|
||||||
if (settings.hasOwnProperty('autoInstallModules')) {
|
if (settings.hasOwnProperty('autoInstallModules')) {
|
||||||
log.warn(log._("runtime.deprecatedOption",{old:"autoInstallModules", new:"externalModules.autoInstall"}));
|
log.warn(log._("server.deprecatedOption",{old:"autoInstallModules", new:"externalModules.autoInstall"}));
|
||||||
autoInstallModules = true;
|
autoInstallModules = true;
|
||||||
}
|
}
|
||||||
if (settings.externalModules) {
|
if (settings.externalModules) {
|
||||||
@ -198,7 +198,7 @@ function reinstallModules(moduleList) {
|
|||||||
const reinstallList = [];
|
const reinstallList = [];
|
||||||
const installRetry = 30000;
|
const installRetry = 30000;
|
||||||
if (settings.hasOwnProperty('autoInstallModulesRetry')) {
|
if (settings.hasOwnProperty('autoInstallModulesRetry')) {
|
||||||
log.warn(log._("runtime.deprecatedOption",{old:"autoInstallModulesRetry", new:"externalModules.autoInstallRetry"}));
|
log.warn(log._("server.deprecatedOption",{old:"autoInstallModulesRetry", new:"externalModules.autoInstallRetry"}));
|
||||||
installRetry = settings.autoInstallModulesRetry;
|
installRetry = settings.autoInstallModulesRetry;
|
||||||
}
|
}
|
||||||
if (settings.externalModules && settings.externalModules.hasOwnProperty('autoInstallRetry')) {
|
if (settings.externalModules && settings.externalModules.hasOwnProperty('autoInstallRetry')) {
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"uninstall-failed-long": "Uninstall of module __name__ failed:",
|
"uninstall-failed-long": "Uninstall of module __name__ failed:",
|
||||||
"uninstalled": "Uninstalled module: __name__"
|
"uninstalled": "Uninstalled module: __name__"
|
||||||
},
|
},
|
||||||
"deprecatedOption": "use of __old__ is deprecated. Use __new__ instead",
|
"deprecatedOption": "Use of __old__ is deprecated. Use __new__ instead",
|
||||||
"unable-to-listen": "Unable to listen on __listenpath__",
|
"unable-to-listen": "Unable to listen on __listenpath__",
|
||||||
"port-in-use": "Error: port in use",
|
"port-in-use": "Error: port in use",
|
||||||
"uncaught-exception": "Uncaught Exception:",
|
"uncaught-exception": "Uncaught Exception:",
|
||||||
|
Loading…
Reference in New Issue
Block a user