Sha256: dcd08e823c84c743b1b3aa590fd4bd3cbaa8d7a10bff1a01e304cf413561a40a

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

module Katello
  module UINotifications
    class TaskNotification < AbstractNotification
      def initialize(options)
        @subject = options[:subject]
        @task = options[:task]
        fail(Foreman::Exception, 'must provide notification subject') if @subject.nil?
        fail(Foreman::Exception, 'must provide related task') if @task.nil?
      end

      protected

      def actions
        ::UINotifications::URLResolver.new(
          @task,
          :links => [
            {
              :path_method => :foreman_tasks_task_path,
              :title => _('Task detail'),
            },
          ]
        ).actions
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-4.15.0 app/services/katello/ui_notifications/task_notification.rb
katello-4.15.0.rc2 app/services/katello/ui_notifications/task_notification.rb
katello-4.15.0.rc1 app/services/katello/ui_notifications/task_notification.rb