Skip to content

Commit 0a7f861

Browse files
authored
[ZEPPELIN-6145] Remove useless message type in Terminal Interpreter
### What is this PR for? This PR removes `TERMINAL_INIT` to simplify the code. `TERMINAL_INIT`, one of the WebSocket message types in the terminal interpreter, looks unused and redundant with `TERMINAL_READY` ### What type of PR is it? Refactoring ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-6145 ### How should this be tested? * Execute terminal interpreter ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #4894 from seung-00/ZEPPELIN-6145. Signed-off-by: Philipp Dallig <[email protected]>
1 parent 4a7fdb1 commit 0a7f861

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

shell/src/main/java/org/apache/zeppelin/shell/terminal/service/TerminalService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ public class TerminalService {
5050

5151
private LinkedBlockingQueue<String> commandQueue = new LinkedBlockingQueue<>();
5252

53-
public void onTerminalInit() {
54-
LOGGER.info("onTerminalInit");
55-
}
56-
5753
public void onTerminalReady() {
5854
TerminalService.startThread(() -> {
5955
try {

shell/src/main/java/org/apache/zeppelin/shell/terminal/websocket/TerminalSocket.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ public void onWebSocketText(String message) {
6464
if (messageMap.containsKey("type")) {
6565
String type = messageMap.get("type");
6666
switch (type) {
67-
case "TERMINAL_INIT":
68-
terminalService.onTerminalInit();
69-
this.noteId = messageMap.get("noteId");
70-
this.paragraphId = messageMap.get("paragraphId");
71-
terminalManager.onWebSocketConnect(noteId, paragraphId);
72-
break;
7367
case "TERMINAL_READY":
7468
terminalService.onTerminalReady();
7569
this.noteId = messageMap.get("noteId");

shell/src/main/resources/html/js/index.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ function action(type, data) {
4646
}
4747

4848
let app = {
49-
onTerminalInit() {
50-
// alert("TERMINAL_INIT");
51-
ws.send(action("TERMINAL_INIT", {
52-
noteId, paragraphId
53-
}));
54-
},
5549
onCommand(command) {
5650
ws.send(action("TERMINAL_COMMAND", {
5751
command
@@ -78,8 +72,6 @@ function setupHterm() {
7872
t = new hterm.Terminal();
7973

8074
t.onTerminalReady = function() {
81-
// app.onTerminalInit();
82-
8375
// Create a new terminal IO object and give it the foreground.
8476
// (The default IO object just prints warning messages about unhandled
8577
// things to the the JS console.)

0 commit comments

Comments
 (0)