mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix: Clear personalized output before running
This commit is contained in:
parent
b7387849fe
commit
eeff440ecd
1 changed files with 10 additions and 1 deletions
|
|
@ -1717,12 +1717,21 @@ public class NotebookServer extends WebSocketServlet
|
|||
return;
|
||||
}
|
||||
|
||||
// 1. clear paragraph only if personalized,
|
||||
// otherwise this will be handed in `onOutputClear`
|
||||
final Note note = notebook.getNote(noteId);
|
||||
if (note.isPersonalizedMode()) {
|
||||
String user = fromMessage.principal;
|
||||
Paragraph p = note.clearPersonalizedParagraphOutput(paragraphId, user);
|
||||
unicastParagraph(note, p, user);
|
||||
}
|
||||
|
||||
// 2. set paragraph values
|
||||
String text = (String) fromMessage.get("paragraph");
|
||||
String title = (String) fromMessage.get("title");
|
||||
Map<String, Object> params = (Map<String, Object>) fromMessage.get("params");
|
||||
Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
|
||||
|
||||
final Note note = notebook.getNote(noteId);
|
||||
Paragraph p = setParagraphUsingMessage(note, fromMessage, paragraphId,
|
||||
text, title, params, config);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue