mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Show information to the user when there are errors with related to
permission on running paragraphs.
This commit is contained in:
parent
2dc26f27be
commit
9f7cf678ea
3 changed files with 23 additions and 1 deletions
|
|
@ -258,6 +258,12 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Can't handle message", e);
|
||||
try {
|
||||
conn.send(serializeMessage(new Message(OP.ERROR_INFO).put("info",
|
||||
"Oops! Something went wrong. Please check with your administrator.")));
|
||||
} catch (IOException e1) {
|
||||
LOG.error("Can't handle message", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,21 @@ angular.module('zeppelinWebApp').factory('websocketEvents',
|
|||
$rootScope.$broadcast('noteRevision', data);
|
||||
} else if (op === 'INTERPRETER_BINDINGS') {
|
||||
$rootScope.$broadcast('interpreterBindings', data);
|
||||
} else if (op === 'ERROR_INFO') {
|
||||
BootstrapDialog.show({
|
||||
closable: false,
|
||||
closeByBackdrop: false,
|
||||
closeByKeyboard: false,
|
||||
title: 'Details',
|
||||
message: data.info.toString(),
|
||||
buttons: [{
|
||||
// close all the dialogs when there are error on running all paragraphs
|
||||
label: 'Close',
|
||||
action: function() {
|
||||
BootstrapDialog.closeAll();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ public class Message {
|
|||
SAVE_INTERPRETER_BINDINGS, // [c-s] save interpreter bindings
|
||||
// @param noteID
|
||||
// @param selectedSettingIds
|
||||
INTERPRETER_BINDINGS // [s-c] interpreter bindings
|
||||
INTERPRETER_BINDINGS, // [s-c] interpreter bindings
|
||||
ERROR_INFO // [s-c] error information to be sent
|
||||
}
|
||||
|
||||
public OP op;
|
||||
|
|
|
|||
Loading…
Reference in a new issue