Sha256: f2c0c6a980be588cfe0de0581738d0fc55ca6666080434fea0bc8b03fcc004a6

Contents?: true

Size: 803 Bytes

Versions: 161

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

161 entries across 161 versions & 1 rubygems

Version Path
foreman_remote_execution-8.2.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-8.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-9.0.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-9.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-8.1.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-8.1.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-8.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.2.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.2.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-5.0.8 app/controllers/template_invocations_controller.rb
foreman_remote_execution-8.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.1.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-7.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-5.0.7 app/controllers/template_invocations_controller.rb
foreman_remote_execution-5.0.6 app/controllers/template_invocations_controller.rb
foreman_remote_execution-6.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-5.0.5 app/controllers/template_invocations_controller.rb
foreman_remote_execution-6.1.0 app/controllers/template_invocations_controller.rb