Sha256: 03ca823ccb3795ace7461f7dbfc627e9e2bdca4d2b4b483b4f3124aaaf212940

Contents?: true

Size: 1.1 KB

Versions: 224

Compression:

Stored size: 1.1 KB

Contents

module Actions
  module Katello
    module ContentView
      class RemoveVersion < Actions::EntryAction
        def plan(version)
          action_subject(version.content_view)
          version.validate_destroyable!

          history = ::Katello::ContentViewHistory.create!(:content_view_version => version,
                                                          :user => ::User.current.login,
                                                          :status => ::Katello::ContentViewHistory::IN_PROGRESS,
                                                          :action => ::Katello::ContentViewHistory.actions[:removal],
                                                          :task => self.task)

          plan_action(ContentViewVersion::Destroy, version)
          plan_self(history_id: history.id)
        end

        def finalize
          history = ::Katello::ContentViewHistory.find(input[:history_id])
          history.status = ::Katello::ContentViewHistory::SUCCESSFUL
          history.save!
        end

        def humanized_name
          _("Remove Version")
        end
      end
    end
  end
end

Version data entries

224 entries across 224 versions & 1 rubygems

Version Path
katello-4.16.0 app/lib/actions/katello/content_view/remove_version.rb
katello-4.15.1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.16.0.rc2 app/lib/actions/katello/content_view/remove_version.rb
katello-4.16.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.3 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.2 app/lib/actions/katello/content_view/remove_version.rb
katello-4.15.0 app/lib/actions/katello/content_view/remove_version.rb
katello-4.15.0.rc2 app/lib/actions/katello/content_view/remove_version.rb
katello-4.15.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.0 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.0.rc3 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.0.rc2 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.14.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.13.1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.13.0 app/lib/actions/katello/content_view/remove_version.rb
katello-4.12.1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.13.0.rc1 app/lib/actions/katello/content_view/remove_version.rb
katello-4.12.0 app/lib/actions/katello/content_view/remove_version.rb