Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-5548

create infra to execute commands from outside of terminal

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • openshift-4.8
    • None
    • UI
    • None
    • ODC Sprint 198

      Description

      As a user, I want to be able to click a button from anywhere in the console that will execute a command in terminal

      Acceptance Criteria

      1. Should be able to send data to terminal programmatically
      2. Should be able to open/maximize the terminal if it is closed/minimize when the user presses the execute button.
        1. Only hold the last executed command if user tries to execute more than one at a time. 

      Additional Details:

      const term = new Terminal();
      const socket = new WebSocket(url);
      const attachAddon = new AttachAddon(socket);
      
      // Attach the socket to terminal instance
      term.loadAddon(attachAddon);
      
      // Send command to terminal
      socket.send(`0${Base64.encode(commandData)}`)

              sbudhwar-1 Sahil Budhwar
              sbudhwar-1 Sahil Budhwar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: