Class: RVT::ConsoleSessionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rvt/console_sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#configurationObject



28
29
30
31
32
33
# File 'app/controllers/rvt/console_sessions_controller.rb', line 28

def configuration
  @console_session = ConsoleSession.find_by_pid_and_uid(params[:id], params[:uid])
  @console_session.configure(console_session_params)

  head :no_content
end

#indexObject



17
18
19
# File 'app/controllers/rvt/console_sessions_controller.rb', line 17

def index
  @console_session = ConsoleSession.create
end

#inputObject



21
22
23
24
25
26
# File 'app/controllers/rvt/console_sessions_controller.rb', line 21

def input
  @console_session = ConsoleSession.find_by_pid_and_uid(params[:id], params[:uid])
  @console_session.send_input(console_session_params[:input])

  head :no_content
end

#pending_outputObject



35
36
37
38
39
# File 'app/controllers/rvt/console_sessions_controller.rb', line 35

def pending_output
  @console_session = ConsoleSession.find_by_pid_and_uid(params[:id], params[:uid])

  render json: { output: @console_session.pending_output }
end