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-14.1.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-14.1.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-14.0.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-14.0.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.6 app/controllers/template_invocations_controller.rb
foreman_remote_execution-14.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.5 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.4 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.3 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-12.0.7 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.2.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-10.1.3 app/controllers/template_invocations_controller.rb
foreman_remote_execution-13.0.0 app/controllers/template_invocations_controller.rb
foreman_remote_execution-12.0.5 app/controllers/template_invocations_controller.rb
foreman_remote_execution-12.0.4 app/controllers/template_invocations_controller.rb
foreman_remote_execution-12.0.1 app/controllers/template_invocations_controller.rb
foreman_remote_execution-12.0.2 app/controllers/template_invocations_controller.rb
foreman_remote_execution-11.1.3 app/controllers/template_invocations_controller.rb