1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Properly report module remove errors in palette editor

Fixes #1043
This commit is contained in:
Nick O'Leary 2017-01-06 16:53:54 +00:00
parent 707dc8c65c
commit c989c533e8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 8 additions and 2 deletions

View File

@ -520,7 +520,12 @@ RED.palette.editor = (function() {
evt.preventDefault(); evt.preventDefault();
shade.show(); shade.show();
removeNodeModule(entry.name, function(xhr) { removeNodeModule(entry.name, function(xhr) {
console.log(xhr); shade.hide();
if (xhr) {
if (xhr.responseJSON) {
RED.notify(RED._('palette.editor.errors.removeFailed',{module: entry.name,message:xhr.responseJSON.message}));
}
}
}) })
}) })
if (!entry.local) { if (!entry.local) {

View File

@ -292,7 +292,8 @@
"sortRecent": "recent", "sortRecent": "recent",
"more": "+ __count__ more", "more": "+ __count__ more",
"errors": { "errors": {
"installFailed": "Failed to install: __module__<br>__message__<br>Check the log for more information" "installFailed": "Failed to install: __module__<br>__message__<br>Check the log for more information",
"removeFailed": "Failed to remove: __module__<br>__message__<br>Check the log for more information"
} }
} }