shell.js

appendShellOutput(input, ip, stream_name, stop, command, identifier)

Appends a new output or ends the command execution

Arguments:
  • input (str) – The input command
  • ip (str) – The ip of the node
  • stream_name (str) – The name of the stream (stdout, stderr)
  • stop (bool) – Indicates if the message is the “EOF” of the stream
  • command (str) – The name of the command
  • identifier (str) – An unique identifier for the command
createShellTab(ip)

Creates the HTML of a new tab and appends it

processCommand(input)

Creates a new command output

Arguments:
  • input (str) – The command to execute
ready()

Binds the initial events

scrollToBottom(placeholder)

Automatically scrolls the placeholder to the bottom

Arguments:
  • placeholder (object) – The jQuery object with the tab
sendInput(input, hosts)

Sends the command to each of the nodes in the network

Arguments:
  • input (str) – The command
  • hosts (list) – The list of nodes