Class: Katello::SyncManagementController
Instance Method Summary
collapse
#arches, #collect_arches, #collect_minor, #collect_repos, #minors, #pprint_collection
#month, #months, #relative_time_in_words
#authorized, #current_organization_object, #current_organization_object=
Instance Method Details
#destroy ⇒ Object
45
46
47
48
49
|
# File 'app/controllers/katello/sync_management_controller.rb', line 45
def destroy
repo = Repository.where(:id => params[:id]).syncable.first
repo&.cancel_dynflow_sync
render :plain => ""
end
|
#index ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/katello/sync_management_controller.rb', line 19
def index
org = current_organization_object
@products = org.library.products.readable
redhat_products, custom_products = @products.partition(&:redhat?)
redhat_products.sort_by { |p| p.name.downcase }
custom_products.sort_by { |p| p.name.downcase }
@products = redhat_products + custom_products
@product_size = {}
@repo_status = {}
@product_map = collect_repos(@products, org.library, false)
@products.each { |product| get_product_info(product) }
end
|
#section_id ⇒ Object
11
12
13
|
# File 'app/controllers/katello/sync_management_controller.rb', line 11
def section_id
'contents'
end
|
#sync ⇒ Object
34
35
36
37
|
# File 'app/controllers/katello/sync_management_controller.rb', line 34
def sync
tasks = sync_repos(params[:repoids]) || []
render :json => tasks.as_json
end
|
#sync_status ⇒ Object
39
40
41
42
43
|
# File 'app/controllers/katello/sync_management_controller.rb', line 39
def sync_status
repos = Repository.where(:id => params[:repoids]).readable
statuses = repos.map { |repo| format_sync_progress(repo) }
render :json => statuses.flatten.to_json
end
|
#title ⇒ Object
15
16
17
|
# File 'app/controllers/katello/sync_management_controller.rb', line 15
def title
_('Sync Status')
end
|