Sha256: 11d481bd5c46906380b13df2b9d191286bcd402e7076fb500cdee5979737e308

Contents?: true

Size: 755 Bytes

Versions: 5

Compression:

Stored size: 755 Bytes

Contents

class TemplateInvocationsController < ApplicationController
  def controller_permission
    'job_invocations'
  end

  def show
    @template_invocation_task = ForemanTasks::Task.find(params[:id])
    @template_invocation = @template_invocation_task.locks.where(:resource_type => 'TemplateInvocation').first.try(:resource)
    @host = @template_invocation_task.locks.where(:resource_type => 'Host::Managed').first.try(:resource)
    @auto_refresh = @template_invocation_task.pending?
    @since = params[:since].to_f if params[:since].present?
    @line_sets = @template_invocation_task.main_action.live_output
    @line_sets = @line_sets.drop_while { |o| o['timestamp'].to_f <= @since } if @since
    @line_counter = params[:line_counter].to_i
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_remote_execution-0.1.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-0.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-0.0.10 app/controllers/template_invocations_controller.rb
foreman_remote_execution-0.0.8 app/controllers/template_invocations_controller.rb
foreman_remote_execution-0.0.7 app/controllers/template_invocations_controller.rb