This is an automated email from the ASF dual-hosted git repository.

pdallig pushed a commit to branch branch-0.12
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.12 by this push:
     new 36a8dda28d [ZEPPELIN-6145] Remove useless message type in Terminal 
Interpreter
36a8dda28d is described below

commit 36a8dda28d12e3f2997ebf0856f4609c1809b297
Author: SeungYoung Oh <seung...@naver.com>
AuthorDate: Wed Nov 13 22:48:27 2024 +0900

    [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 <philipp.dal...@gmail.com>
    (cherry picked from commit 0a7f86126e68b12258c1633f3cf7a5f82fbba134)
    Signed-off-by: Philipp Dallig <philipp.dal...@gmail.com>
---
 .../apache/zeppelin/shell/terminal/service/TerminalService.java   | 4 ----
 .../apache/zeppelin/shell/terminal/websocket/TerminalSocket.java  | 6 ------
 shell/src/main/resources/html/js/index.js                         | 8 --------
 3 files changed, 18 deletions(-)

diff --git 
a/shell/src/main/java/org/apache/zeppelin/shell/terminal/service/TerminalService.java
 
b/shell/src/main/java/org/apache/zeppelin/shell/terminal/service/TerminalService.java
index f7d3c13f9d..41483e84bc 100644
--- 
a/shell/src/main/java/org/apache/zeppelin/shell/terminal/service/TerminalService.java
+++ 
b/shell/src/main/java/org/apache/zeppelin/shell/terminal/service/TerminalService.java
@@ -50,10 +50,6 @@ public class TerminalService {
 
   private LinkedBlockingQueue<String> commandQueue = new 
LinkedBlockingQueue<>();
 
-  public void onTerminalInit() {
-    LOGGER.info("onTerminalInit");
-  }
-
   public void onTerminalReady() {
     TerminalService.startThread(() -> {
       try {
diff --git 
a/shell/src/main/java/org/apache/zeppelin/shell/terminal/websocket/TerminalSocket.java
 
b/shell/src/main/java/org/apache/zeppelin/shell/terminal/websocket/TerminalSocket.java
index 64ce0355d4..4f63f1f9ad 100644
--- 
a/shell/src/main/java/org/apache/zeppelin/shell/terminal/websocket/TerminalSocket.java
+++ 
b/shell/src/main/java/org/apache/zeppelin/shell/terminal/websocket/TerminalSocket.java
@@ -64,12 +64,6 @@ public class TerminalSocket {
     if (messageMap.containsKey("type")) {
       String type = messageMap.get("type");
       switch (type) {
-        case "TERMINAL_INIT":
-          terminalService.onTerminalInit();
-          this.noteId = messageMap.get("noteId");
-          this.paragraphId = messageMap.get("paragraphId");
-          terminalManager.onWebSocketConnect(noteId, paragraphId);
-          break;
         case "TERMINAL_READY":
           terminalService.onTerminalReady();
           this.noteId = messageMap.get("noteId");
diff --git a/shell/src/main/resources/html/js/index.js 
b/shell/src/main/resources/html/js/index.js
index 0a6b3f4224..f9cc7b7c78 100644
--- a/shell/src/main/resources/html/js/index.js
+++ b/shell/src/main/resources/html/js/index.js
@@ -46,12 +46,6 @@ function action(type, data) {
 }
 
 let app = {
-    onTerminalInit() {
-        // alert("TERMINAL_INIT");
-        ws.send(action("TERMINAL_INIT", {
-            noteId, paragraphId
-        }));
-    },
     onCommand(command) {
         ws.send(action("TERMINAL_COMMAND", {
             command
@@ -78,8 +72,6 @@ function setupHterm() {
     t = new hterm.Terminal();
 
     t.onTerminalReady = function() {
-        // app.onTerminalInit();
-
         // Create a new terminal IO object and give it the foreground.
         // (The default IO object just prints warning messages about unhandled
         // things to the the JS console.)

Reply via email to