Sha256: f2c0c6a980be588cfe0de0581738d0fc55ca6666080434fea0bc8b03fcc004a6

Contents?: true

Size: 803 Bytes

Versions: 162

Compression:

Stored size: 803 Bytes

Contents

class TemplateInvocationsController < ApplicationController
  include Foreman::Controller::AutoCompleteSearch

  def controller_permission
    'job_invocations'
  end

  def show
    @template_invocation = TemplateInvocation.find(params[:id])
    raise ActiveRecord::RecordNotFound unless User.current.can?(:view_job_invocations, @template_invocation.job_invocation)

    @template_invocation_task = @template_invocation.run_host_job_task
    @host = @template_invocation.host
    @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

162 entries across 162 versions & 1 rubygems

Version Path
foreman_remote_execution-4.3.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.2.3 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.2.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.2.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.7 app/controllers/template_invocations_controller.rb
foreman_remote_execution-4.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.6 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.5 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.4 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.3 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.2.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.3.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.2.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-3.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-2.0.10 app/controllers/template_invocations_controller.rb