Class: Actions::Pulp::Repository::Presenters::DockerPresenter
- Inherits:
-
AbstractSyncPresenter
- Object
- Helpers::Presenter::Base
- AbstractSyncPresenter
- Actions::Pulp::Repository::Presenters::DockerPresenter
- Defined in:
- app/lib/actions/pulp/repository/presenters/docker_presenter.rb
Instance Attribute Summary
Attributes inherited from Helpers::Presenter::Base
Instance Method Summary collapse
Methods inherited from AbstractSyncPresenter
Methods inherited from Helpers::Presenter::Base
#humanized_output, #initialize
Constructor Details
This class inherits a constructor from Actions::Helpers::Presenter::Base
Instance Method Details
#progress ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/lib/actions/pulp/repository/presenters/docker_presenter.rb', line 6 def progress details = task_progress_details if details completion = 0.0 completion += 0.1 if content_completed?(details("sync_step_metadata")) completion += 0.1 if content_completed?(details("get_local")) completion += 0.1 if content_completed?(details("sync_step_save")) download_details = details("sync_step_download") if content_completed?(download_details) completion += 0.7 elsif content_started?(download_details) && items_total(download_details) > 0 completion += 0.7 * items_done(download_details) / items_total(download_details) end completion else 0.01 end end |