katello 3.1.0.1 → 3.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +8 -47
- data/app/assets/javascripts/katello/common/index.js +0 -1
- data/app/assets/javascripts/katello/providers/redhat/index.js +0 -1
- data/app/assets/stylesheets/katello/_katello_colors.scss +0 -2
- data/app/assets/stylesheets/katello/katello.scss +0 -2
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +45 -42
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +7 -19
- data/app/controllers/katello/api/v2/api_controller.rb +3 -3
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +29 -18
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +10 -8
- data/app/controllers/katello/api/v2/content_views_controller.rb +5 -5
- data/app/controllers/katello/api/v2/environments_controller.rb +10 -9
- data/app/controllers/katello/api/v2/file_units_controller.rb +16 -0
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_autocomplete_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_collections_controller.rb +41 -13
- data/app/controllers/katello/api/v2/host_errata_controller.rb +12 -5
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +9 -9
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +52 -13
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -3
- data/app/controllers/katello/api/v2/packages_controller.rb +1 -1
- data/app/controllers/katello/api/v2/ping_controller.rb +2 -2
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +2 -2
- data/app/controllers/katello/api/v2/products_controller.rb +6 -16
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +60 -21
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +3 -3
- data/app/controllers/katello/api/v2/root_controller.rb +2 -2
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +19 -10
- data/app/controllers/katello/api/v2/sync_controller.rb +3 -3
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +2 -2
- data/app/controllers/katello/api/v2/uebercerts_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +7 -7
- data/app/controllers/katello/auto_complete_search_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +19 -16
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +8 -6
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +10 -6
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +1 -1
- data/app/controllers/katello/errors_controller.rb +2 -2
- data/app/controllers/katello/organizations_controller.rb +1 -1
- data/app/controllers/katello/products_controller.rb +4 -4
- data/app/controllers/katello/providers_controller.rb +2 -2
- data/app/helpers/katello/application_helper.rb +0 -240
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +19 -0
- data/app/lib/actions/candlepin/import_pool_handler.rb +11 -6
- data/app/lib/actions/katello/capsule_content/create_repos.rb +3 -3
- data/app/lib/actions/katello/capsule_content/sync.rb +23 -9
- data/app/lib/actions/katello/content_view/add_to_environment.rb +1 -1
- data/app/lib/actions/katello/content_view/errata_mail.rb +2 -2
- data/app/lib/actions/katello/content_view/incremental_updates.rb +60 -1
- data/app/lib/actions/katello/content_view/remove.rb +2 -2
- data/app/lib/actions/katello/content_view_environment/destroy.rb +1 -1
- data/app/lib/actions/katello/content_view_environment/reassign_objects.rb +2 -2
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +3 -1
- data/app/lib/actions/katello/host/attach_subscriptions.rb +13 -6
- data/app/lib/actions/katello/host/destroy.rb +0 -19
- data/app/lib/actions/katello/host/generate_applicability.rb +8 -3
- data/app/lib/actions/katello/host/hypervisors.rb +17 -9
- data/app/lib/actions/katello/host/hypervisors_update.rb +19 -44
- data/app/lib/actions/katello/host/reassign.rb +14 -0
- data/app/lib/actions/katello/host/register.rb +3 -22
- data/app/lib/actions/katello/host/remove_subscriptions.rb +15 -2
- data/app/lib/actions/katello/host/update.rb +0 -6
- data/app/lib/actions/katello/organization/destroy.rb +2 -2
- data/app/lib/actions/katello/product/content_destroy.rb +7 -9
- data/app/lib/actions/katello/product/destroy.rb +23 -7
- data/app/lib/actions/katello/repository/clear.rb +1 -0
- data/app/lib/actions/katello/repository/clone_file_content.rb +17 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -0
- data/app/lib/actions/katello/repository/clone_to_version.rb +2 -0
- data/app/lib/actions/katello/repository/create.rb +2 -1
- data/app/lib/actions/katello/repository/destroy.rb +20 -10
- data/app/lib/actions/katello/repository/errata_mail.rb +2 -2
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -0
- data/app/lib/actions/katello/repository/import_upload.rb +6 -2
- data/app/lib/actions/katello/repository/{refresh_repostiory.rb → refresh_repository.rb} +0 -0
- data/app/lib/actions/katello/repository/remove_content.rb +2 -0
- data/app/lib/actions/katello/repository/sync.rb +8 -12
- data/app/lib/actions/katello/repository_set/disable_repository.rb +6 -5
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +1 -1
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -1
- data/app/lib/actions/pulp/consumer/unassociate_units.rb +20 -0
- data/app/lib/actions/pulp/repository/copy_files.rb +11 -0
- data/app/lib/actions/pulp/repository/create.rb +5 -1
- data/app/lib/actions/pulp/repository/presenters/file_presenter.rb +1 -1
- data/app/lib/actions/pulp/repository/refresh.rb +4 -2
- data/app/lib/actions/pulp/repository/remove_file.rb +15 -0
- data/app/lib/actions/pulp/repository/sync.rb +3 -1
- data/app/lib/actions/pulp/repository_group/export.rb +1 -1
- data/app/lib/katello/errors.rb +1 -1
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +14 -0
- data/app/lib/katello/util/cdn_var_substitutor.rb +5 -2
- data/app/lib/katello/util/model.rb +1 -2
- data/app/lib/katello/util/package.rb +2 -2
- data/app/models/katello/activation_key.rb +0 -49
- data/app/models/katello/authorization/content_view_version.rb +7 -0
- data/app/models/katello/candlepin/content.rb +15 -3
- data/app/models/katello/concerns/container_extensions.rb +1 -2
- data/app/models/katello/concerns/content_facet_host_extensions.rb +11 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +4 -13
- data/app/models/katello/concerns/hostgroup_extensions.rb +0 -2
- data/app/models/katello/concerns/medium_extensions.rb +2 -2
- data/app/models/katello/concerns/organization_extensions.rb +0 -5
- data/app/models/katello/concerns/pulp_database_unit.rb +5 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +21 -1
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -2
- data/app/models/katello/content_view.rb +12 -6
- data/app/models/katello/content_view_component.rb +0 -3
- data/app/models/katello/content_view_environment.rb +2 -2
- data/app/models/katello/content_view_package_filter_rule.rb +13 -0
- data/app/models/katello/content_view_puppet_environment.rb +2 -2
- data/app/models/katello/content_view_repository.rb +2 -1
- data/app/models/katello/content_view_version.rb +9 -2
- data/app/models/katello/erratum.rb +1 -5
- data/app/models/katello/file_unit.rb +41 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +2 -2
- data/app/models/katello/glue/candlepin/pool.rb +19 -14
- data/app/models/katello/glue/pulp/repo.rb +44 -10
- data/app/models/katello/host/content_facet.rb +6 -6
- data/app/models/katello/host/subscription_facet.rb +6 -8
- data/app/models/katello/kt_environment.rb +3 -5
- data/app/models/katello/package_group.rb +1 -3
- data/app/models/katello/pool.rb +7 -2
- data/app/models/katello/pool_with_quantities.rb +12 -0
- data/app/models/katello/product.rb +6 -0
- data/app/models/katello/provider.rb +1 -1
- data/app/models/katello/puppet_module.rb +1 -2
- data/app/models/katello/repository.rb +7 -3
- data/app/models/katello/repository_file.rb +9 -0
- data/app/models/katello/rpm.rb +1 -1
- data/app/models/katello/subscription_status.rb +1 -1
- data/app/models/katello/sync_plan.rb +2 -1
- data/app/models/katello/task_status.rb +3 -36
- data/app/models/setting/content.rb +4 -1
- data/app/overrides/add_activation_keys_input.rb +2 -2
- data/app/presenters/katello/activation_key_subscriptions_presenter.rb +10 -0
- data/app/services/katello/candlepin/consumer.rb +5 -1
- data/app/services/katello/pulp/file_unit.rb +13 -0
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/dashboard/_subscription_widget.html.erb +30 -8
- data/app/views/foreman/job_templates/install_errata.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +1 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +2 -2
- data/app/views/katello/api/v2/content_facet/base.json.rabl +2 -4
- data/app/views/katello/api/v2/{systems → content_facet}/erratum.json.rabl +0 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +5 -4
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -1
- data/app/views/katello/api/v2/file_units/base.json.rabl +7 -0
- data/app/views/katello/api/v2/{systems → file_units}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/file_units/show.json.rabl +3 -0
- data/app/views/katello/api/v2/host_errata/index.json.rabl +1 -1
- data/app/views/katello/api/v2/host_errata/show.json.rabl +1 -1
- data/app/views/katello/api/v2/package_groups/base.json.rabl +1 -1
- data/app/views/katello/api/v2/ping/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +0 -4
- data/app/views/katello/api/v2/subscription_facet/show.json.rabl +1 -5
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +3 -3
- data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
- data/app/views/katello/api/v2/tasks/task_status_show.json.rabl +0 -1
- data/app/views/katello/providers/redhat/show.html.erb +1 -1
- data/app/views/katello/sync_management/_products.html.erb +5 -1
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +1 -9
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
- data/config/routes/api/v2.rb +9 -2
- data/config/routes/overrides.rb +9 -0
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +38 -0
- data/db/migrate/20160627125310_delete_system.rb +7 -0
- data/db/migrate/20160722193256_add_verify_ssl_on_sync_to_repository.rb +9 -0
- data/db/migrate/20160727144242_add_registered_through_to_katello_subscription_facets.rb +5 -0
- data/db/migrate/20160808002834_add_files.rb +30 -0
- data/db/migrate/20160906181923_add_puppet_path_to_smart_proxy.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +7 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +101 -102
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions-list.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +82 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsules/capsules.module.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/common.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/registration.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-subscriptions.controller.js +46 -72
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-errata.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-host-collections.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-subscriptions.html +79 -33
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +27 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +57 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +5 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +117 -118
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +13 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-environments.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/content-view-deletion.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-environments.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-file-repositories.controller.js +47 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-file-repositories-list.controller.js +45 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-composite-available-content-views.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-composite-content-views-list.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +151 -140
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +118 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +13 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +8 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-file.html +22 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +6 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifests.module.js +6 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tags-details.html +59 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.module.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-docker.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-packages.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/errata-content-hosts.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-content-hosts.html +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details.html +44 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details-info.controller.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +52 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-info.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-products.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/gpg-key-new.html +62 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +6 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +85 -86
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/views/host-collection-new.html +16 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/views/host-collections.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +28 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-erratum.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +1 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/hosts.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organizations.module.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branches-details-repositories.controller.js +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branches-details.controller.js +31 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details-info.html +23 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details-repositories.html +83 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details.html +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +67 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +53 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches-table-collapsed.html +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches-table-full.html +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/package-groups/package-groups.module.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-details.controller.js +17 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details-info.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details.html +51 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.module.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +72 -73
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-repositories.html +19 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +144 -145
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/views/product-new.html +17 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-modules-details.html +44 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js +11 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-info.html +343 -324
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/views/repository-new.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repositories.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +46 -47
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest.html +41 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions-helper.service.js +15 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +54 -55
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks.module.js +3 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -0
- data/lib/katello/engine.rb +11 -1
- data/lib/katello/permissions/host_permissions.rb +13 -1
- data/lib/katello/plugin.rb +20 -1
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/test.rake +8 -0
- data/lib/katello/tasks/unify_hosts.rake +91 -0
- data/lib/katello/tasks/upgrade_check.rake +3 -2
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +2 -4
- data/lib/katello/version.rb +1 -1
- data/lib/proxy_api/pulp.rb +7 -0
- data/lib/proxy_api/pulp_node.rb +7 -0
- metadata +79 -67
- data/app/assets/javascripts/katello/common/jquery.jeditable.custominputs.js +0 -180
- data/app/assets/javascripts/katello/widgets/jquery.jeditable.helpers.js +0 -247
- data/app/assets/stylesheets/katello/widgets/_scrollpane.scss +0 -66
- data/app/controllers/katello/api/v2/systems_controller.rb +0 -213
- data/app/helpers/katello/activation_keys_helper.rb +0 -4
- data/app/helpers/katello/host_collection_events_helper.rb +0 -7
- data/app/helpers/katello/katello_form_builder.rb +0 -150
- data/app/helpers/katello/packages_helper.rb +0 -67
- data/app/helpers/katello/subscriptions_helper.rb +0 -32
- data/app/helpers/katello/system_events_helper.rb +0 -4
- data/app/helpers/katello/system_packages_helper.rb +0 -42
- data/app/lib/actions/katello/repository/incremental_import.rb +0 -61
- data/app/lib/actions/katello/subscription/subscribe.rb +0 -26
- data/app/lib/actions/katello/system/destroy.rb +0 -17
- data/app/lib/actions/katello/system/reassign.rb +0 -14
- data/app/models/katello/authorization/system.rb +0 -53
- data/app/models/katello/glue/candlepin/consumer.rb +0 -386
- data/app/models/katello/glue/pulp/consumer.rb +0 -171
- data/app/models/katello/hypervisor.rb +0 -15
- data/app/models/katello/system.rb +0 -283
- data/app/models/katello/system_activation_key.rb +0 -8
- data/app/models/katello/system_repository.rb +0 -8
- data/app/presenters/katello/activation_key_subscription_presenter.rb +0 -10
- data/app/views/katello/api/v2/errata/_applicable_errata.json.rabl +0 -3
- data/app/views/katello/api/v2/subscriptions/create.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/_pool.json.rabl +0 -6
- data/app/views/katello/api/v2/systems/activate.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/add_host_collections.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/available_host_collections.json.rabl +0 -5
- data/app/views/katello/api/v2/systems/base.json.rabl +0 -35
- data/app/views/katello/api/v2/systems/enabled_repos.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/events.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/package.json.rabl +0 -5
- data/app/views/katello/api/v2/systems/package_profile.json.rabl +0 -7
- data/app/views/katello/api/v2/systems/pools.json.rabl +0 -7
- data/app/views/katello/api/v2/systems/regenerate_identity_certificates.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/remove_host_collections.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/show.json.rabl +0 -64
- data/app/views/katello/api/v2/systems/subscriptions.json.rabl +0 -8
- data/app/views/katello/api/v2/systems/upload_package_profile.json.rabl +0 -3
- data/db/seeds.d/105-roles_permissions.rb +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host.factory.js +0 -25
- data/lib/katello/permissions/content_host_permissions.rb +0 -30
- data/lib/katello/tasks/yard.rake +0 -9
- data/vendor/assets/stylesheets/katello/jquery.jscrollpane.css +0 -120
@@ -6,21 +6,24 @@ module Katello
|
|
6
6
|
included do
|
7
7
|
def_param_group :hostgroup do
|
8
8
|
param :hostgroup, Hash, :required => true, :action_aware => true do
|
9
|
-
param :name, String, :required => true
|
10
|
-
param :parent_id, :number
|
11
|
-
param :environment_id, :number
|
12
|
-
param :
|
13
|
-
param :
|
14
|
-
param :
|
15
|
-
param :
|
16
|
-
param :
|
17
|
-
param :
|
18
|
-
param :
|
19
|
-
param :
|
20
|
-
param :
|
21
|
-
param :
|
22
|
-
param :
|
23
|
-
param :
|
9
|
+
param :name, String, :required => true, :desc => N_('Name of the host group')
|
10
|
+
param :parent_id, :number, :desc => N_('Parent ID of the host group')
|
11
|
+
param :environment_id, :number, :desc => N_('Environment ID')
|
12
|
+
param :compute_profile_id, :number, :desc => N_('Compute profile ID')
|
13
|
+
param :operatingsystem_id, :number, :desc => N_('Operating system ID')
|
14
|
+
param :architecture_id, :number, :desc => N_('Architecture ID')
|
15
|
+
param :pxe_loader, Operatingsystem.all_loaders, :desc => N_("DHCP filename option (Grub2/PXELinux by default)")
|
16
|
+
param :medium_id, :number, :desc => N_('Media ID')
|
17
|
+
param :ptable_id, :number, :desc => N_('Partition table ID')
|
18
|
+
param :puppet_ca_proxy_id, :number, :desc => N_('Puppet CA proxy ID')
|
19
|
+
param :subnet_id, :number, :desc => N_('Subnet ID')
|
20
|
+
param :domain_id, :number, :desc => N_('Domain ID')
|
21
|
+
param :realm_id, :number, :desc => N_('Realm ID')
|
22
|
+
param :puppet_proxy_id, :number, :desc => N_('Puppet proxy ID')
|
23
|
+
param :root_pass, String, :desc => N_('Root password on provisioned hosts')
|
24
|
+
param :content_source_id, :number, :desc => N_('Content source ID')
|
25
|
+
param :content_view_id, :number, :desc => N_('Content view ID')
|
26
|
+
param :lifecycle_environment_id, :number, :desc => N_('Lifecycle environment ID')
|
24
27
|
param_group :taxonomies, ::Api::V2::BaseController
|
25
28
|
end
|
26
29
|
end
|
@@ -28,7 +31,7 @@ module Katello
|
|
28
31
|
api :POST, "/hostgroups/", N_("Create a host group")
|
29
32
|
param_group :hostgroup, :as => :create
|
30
33
|
def create
|
31
|
-
@hostgroup = Hostgroup.new(
|
34
|
+
@hostgroup = Hostgroup.new(hostgroup_params)
|
32
35
|
process_response @hostgroup.save
|
33
36
|
end
|
34
37
|
|
@@ -6,12 +6,12 @@ module Katello
|
|
6
6
|
included do
|
7
7
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
before_action :find_repository
|
10
|
+
before_action :find_optional_organization, :only => [:index, :auto_complete_search]
|
11
|
+
before_action :find_environment, :only => [:index, :auto_complete_search]
|
12
|
+
before_action :find_content_view_version, :only => [:index, :auto_complete_search]
|
13
|
+
before_action :find_filter, :only => [:index, :auto_complete_search]
|
14
|
+
before_action :find_content_resource, :only => [:show]
|
15
15
|
end
|
16
16
|
|
17
17
|
extend ::Apipie::DSL::Concern
|
@@ -200,6 +200,8 @@ module Katello
|
|
200
200
|
_("Docker Tag")
|
201
201
|
when "Katello::OstreeBranch"
|
202
202
|
_("OSTree Branch")
|
203
|
+
when "Katello::FileUnit"
|
204
|
+
_("File")
|
203
205
|
else
|
204
206
|
fail "Can't find resource class: #{resource_class}"
|
205
207
|
end
|
@@ -3,9 +3,9 @@ module Katello
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
before_action :authorize_destroy, :only => [:destroy]
|
7
|
+
before_action :authorize_remove_from_environment, :only => [:remove_from_environment]
|
8
|
+
before_action :authorize_remove, :only => [:remove]
|
9
9
|
end
|
10
10
|
|
11
11
|
private
|
@@ -118,14 +118,18 @@ module Katello
|
|
118
118
|
# and also ensure that the environments have the remove permission
|
119
119
|
return deny_access unless KTEnvironment.promotable.where(:id => env_ids).count == env_ids.size && view.promotable_or_removable?
|
120
120
|
|
121
|
-
|
121
|
+
total_count = Katello::Host::ContentFacet.where(:content_view_id => view, :lifecycle_environment_id => env_ids).count
|
122
|
+
if total_count > 0
|
122
123
|
unless options[:system_content_view_id] && options[:system_environment_id]
|
123
124
|
fail _("Unable to reassign content hosts. Please provide system_content_view_id and system_environment_id.")
|
124
125
|
end
|
125
126
|
|
126
|
-
# if we are reassigning systems to a
|
127
|
+
# if we are reassigning systems to a different environment or cv
|
127
128
|
# make sure all the systems in existing environments are editable.
|
128
|
-
|
129
|
+
if total_count != ::Host::Managed.authorized('edit_hosts').in_content_view_environment(:content_view => view,
|
130
|
+
:lifecycle_environment => ::Katello::KTEnvironment.where(:id => env_ids)).count
|
131
|
+
deny_access
|
132
|
+
end
|
129
133
|
end
|
130
134
|
|
131
135
|
if Katello::ActivationKey.where(:content_view_id => view, :environment_id => env_ids).count > 0
|
@@ -26,7 +26,7 @@ module Katello
|
|
26
26
|
def create_with_dynflow
|
27
27
|
if taxonomy_class == Organization
|
28
28
|
begin
|
29
|
-
@taxonomy = Organization.new(
|
29
|
+
@taxonomy = Organization.new(resource_params)
|
30
30
|
sync_task(::Actions::Katello::Organization::Create, @taxonomy)
|
31
31
|
@taxonomy.reload
|
32
32
|
if @count_nil_hosts > 0
|
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
|
6
6
|
included do
|
7
7
|
append_view_path('app/views/foreman')
|
8
|
-
|
8
|
+
before_action :find_resource_and_status, :only => [:pulp_storage, :pulp_status]
|
9
9
|
alias_method_chain :action_permission, :katello
|
10
10
|
alias_method_chain :show, :content
|
11
11
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class ErrorsController < Katello::ApplicationController
|
3
|
-
|
4
|
-
|
3
|
+
skip_before_action :require_user, :require_org
|
4
|
+
skip_before_action :authorize # ok - is used by warden
|
5
5
|
|
6
6
|
# handles unknown routes from both / and /api namespaces
|
7
7
|
def routing
|
@@ -2,9 +2,9 @@ module Katello
|
|
2
2
|
class ProductsController < Katello::ApplicationController
|
3
3
|
respond_to :html, :js
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
before_action :find_product, :only => [:available_repositories, :toggle_repository]
|
6
|
+
before_action :find_provider, :only => [:available_repositories, :toggle_repository]
|
7
|
+
before_action :find_content, :only => [:toggle_repository]
|
8
8
|
|
9
9
|
include ForemanTasks::Triggers
|
10
10
|
|
@@ -53,7 +53,7 @@ module Katello
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def find_content
|
56
|
-
if product_content = @product.product_content_by_id(params[:content_id])
|
56
|
+
if (product_content = @product.product_content_by_id(params[:content_id]))
|
57
57
|
@content = product_content.content
|
58
58
|
else
|
59
59
|
fail HttpErrors::NotFound, _("Couldn't find content '%s'") % params[:content_id]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class ProvidersController < Katello::ApplicationController
|
3
|
-
|
4
|
-
|
3
|
+
before_action :find_rh_provider, :only => [:redhat_provider, :redhat_provider_tab]
|
4
|
+
before_action :search_filter, :only => [:auto_complete_search]
|
5
5
|
|
6
6
|
respond_to :html, :js
|
7
7
|
|
@@ -6,168 +6,12 @@ module Katello
|
|
6
6
|
User.current
|
7
7
|
end
|
8
8
|
|
9
|
-
def current_url(extra_params = {})
|
10
|
-
url_for params.merge(extra_params)
|
11
|
-
end
|
12
|
-
|
13
|
-
def link_to_authorized(*args, &block)
|
14
|
-
if block_given?
|
15
|
-
options = args.first || {}
|
16
|
-
html_options = args.second
|
17
|
-
link_to_authorized(capture(&block), options, html_options)
|
18
|
-
else
|
19
|
-
name = args[0]
|
20
|
-
options = args[1] || {}
|
21
|
-
html_options = args[2]
|
22
|
-
|
23
|
-
if options.key? :controller
|
24
|
-
ctrl = options[:controller]
|
25
|
-
action = options[:action] || 'index'
|
26
|
-
|
27
|
-
if current_user && current_user.allowed_to?(:controller => ctrl, :action => action)
|
28
|
-
link_to(name, options, html_options)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Headpin inclusion
|
35
|
-
def stats_line(stats, _options = {})
|
36
|
-
render :partial => "katello/commonstats_line",
|
37
|
-
:locals => {:stats => stats}
|
38
|
-
end
|
39
|
-
|
40
|
-
# Headpin inclusion
|
41
|
-
def to_value_list(stats)
|
42
|
-
list = ""
|
43
|
-
prepend = ""
|
44
|
-
stats.each do |stat|
|
45
|
-
list += prepend
|
46
|
-
prepend = ","
|
47
|
-
list += stat.value.to_s
|
48
|
-
end
|
49
|
-
list
|
50
|
-
end
|
51
|
-
|
52
|
-
def two_panel(collection, options)
|
53
|
-
options[:accessor] ||= "id"
|
54
|
-
options[:left_panel_width] ||= nil
|
55
|
-
options[:ajax_load] ||= false
|
56
|
-
enable_create = options[:enable_create]
|
57
|
-
enable_create = true if enable_create.nil?
|
58
|
-
enable_sort = options[:enable_sort] ? options[:enable_sort] : false
|
59
|
-
|
60
|
-
fail ":titles option not provided" unless options[:titles]
|
61
|
-
|
62
|
-
render :partial => "katello/common/panel",
|
63
|
-
:locals => {
|
64
|
-
:title => options[:title],
|
65
|
-
:name => options[:name],
|
66
|
-
:create => options[:create],
|
67
|
-
:enable_create => enable_create,
|
68
|
-
:create_label => options[:create_label] || nil,
|
69
|
-
:enable_sort => enable_sort,
|
70
|
-
:columns => options[:col],
|
71
|
-
:titles => options[:titles],
|
72
|
-
:custom_rows => options[:custom_rows],
|
73
|
-
:collection => collection,
|
74
|
-
:accessor => options[:accessor],
|
75
|
-
:url => options[:url],
|
76
|
-
:left_panel_width => options[:left_panel_width],
|
77
|
-
:ajax_load => options[:ajax_load],
|
78
|
-
:ajax_scroll => options[:ajax_scroll],
|
79
|
-
:search_env => options[:search_env],
|
80
|
-
:initial_action => options[:initial_action] || :edit,
|
81
|
-
:initial_state => options[:initial_state] || false,
|
82
|
-
:actions => options[:actions],
|
83
|
-
:search_class => options[:search_class],
|
84
|
-
:disable_create => options[:disable_create] || false}
|
85
|
-
end
|
86
|
-
|
87
|
-
def one_panel(panel_id, collection, options)
|
88
|
-
options[:accessor] ||= "id"
|
89
|
-
panel_id ||= "panel"
|
90
|
-
|
91
|
-
render :partial => "katello/common/one_panel",
|
92
|
-
:locals => {
|
93
|
-
:single_select => options[:single_select] || false,
|
94
|
-
:hover_text_cb => options[:hover_text_cb],
|
95
|
-
:panel_id => panel_id,
|
96
|
-
:title => options[:title],
|
97
|
-
:name => options[:name],
|
98
|
-
:columns => options[:col],
|
99
|
-
:column_titles => options[:col_titles],
|
100
|
-
:custom_rows => options[:custom_rows],
|
101
|
-
:collection => collection,
|
102
|
-
:accessor => options[:accessor] }
|
103
|
-
end
|
104
|
-
|
105
|
-
def notification_polling_time
|
106
|
-
time = 120
|
107
|
-
return time.to_i * 1_000 if time
|
108
|
-
return 120_000
|
109
|
-
end
|
110
|
-
|
111
|
-
def environment_selector(options = {})
|
112
|
-
options[:library_clickable] = true if options[:library_clickable].nil? # ||= doesn't work if false
|
113
|
-
options[:url_proc] = nil if options[:url_proc].nil? #explicitly set url_method to nil if not provided
|
114
|
-
|
115
|
-
# the path widget and entries classes allow the user to override the classes that will be applied to these
|
116
|
-
# elements. by default, they are set assuming the env selector will be displayed on a page (vs w/in a panel)
|
117
|
-
options[:path_widget_class] = "" if options[:path_widget_class].nil?
|
118
|
-
options[:path_entries_class] = "grid_10" if options[:path_entries_class].nil?
|
119
|
-
|
120
|
-
render :partial => "/katello/common/env_select", :locals => options
|
121
|
-
end
|
122
|
-
|
123
|
-
def env_select_class(curr_env, selected_env, curr_path, selected_path, accessible_envs, library_clickable)
|
124
|
-
classes = []
|
125
|
-
if (library_clickable || !curr_env.library?) && accessible_envs.member?(curr_env)
|
126
|
-
classes << "path_link"
|
127
|
-
else
|
128
|
-
# if library isn't clickable, disable the hover effect
|
129
|
-
classes << "crumb-nohover"
|
130
|
-
end
|
131
|
-
|
132
|
-
if curr_env.id == selected_env.id
|
133
|
-
if !selected_env.library?
|
134
|
-
classes << "active"
|
135
|
-
else
|
136
|
-
#we only want to highlight the Library along the path that is actually selected
|
137
|
-
classes << "active" if curr_path[1] == selected_path[1]
|
138
|
-
end
|
139
|
-
end
|
140
|
-
classes.join(' ')
|
141
|
-
end
|
142
|
-
|
143
|
-
def env_select_url(proc, env, next_env, org)
|
144
|
-
return nil if proc.nil?
|
145
|
-
proc.call(:environment => env, :next_environment => next_env, :organization => org)
|
146
|
-
end
|
147
|
-
|
148
|
-
# auto_tab_index: this method may be used to simplify adding a tabindex to UI forms.
|
149
|
-
def auto_tab_index
|
150
|
-
@current_index ||= 0
|
151
|
-
@current_index += 1
|
152
|
-
end
|
153
|
-
|
154
9
|
#formats the date time if the dat is not nil
|
155
10
|
def format_time(date, options = {})
|
156
11
|
return I18n.l(date, options) if date
|
157
12
|
""
|
158
13
|
end
|
159
14
|
|
160
|
-
def generate_url(path, options, entity)
|
161
|
-
panel_page = options.key?(:panel_page) ? ("&panelpage=" + options[:panel_page]) : ""
|
162
|
-
path + "?list_search=id%3D#{options[:id]}#panel=#{entity}_#{options[:id]}" + panel_page
|
163
|
-
end
|
164
|
-
|
165
|
-
# used for jeditable fields
|
166
|
-
def editable_class(editable = false)
|
167
|
-
return "editable edit_panel_element multiline" if editable
|
168
|
-
"multiline"
|
169
|
-
end
|
170
|
-
|
171
15
|
# These 2 methods copied from scoped_search {https://github.com/wvanbergen/scoped_search}
|
172
16
|
# which Katello used to use but no longer uses.
|
173
17
|
#
|
@@ -218,21 +62,6 @@ module Katello
|
|
218
62
|
return link.respond_to?(:html_safe) ? link.html_safe : link
|
219
63
|
end
|
220
64
|
|
221
|
-
def activation_key_link_helper(key)
|
222
|
-
if ActivationKey.readable? key.organization
|
223
|
-
link_to(key.name, activation_keys_path(key.id, :anchor => "/&list_search=id:#{key.id}&panel=activation_key_#{key.id}"))
|
224
|
-
else
|
225
|
-
key.name
|
226
|
-
end
|
227
|
-
rescue
|
228
|
-
_('Activation key with uuid %s not found') % key.try(:id)
|
229
|
-
end
|
230
|
-
|
231
|
-
def kt_form_for(object, options = {}, &block)
|
232
|
-
options[:builder] = KatelloFormBuilder
|
233
|
-
form_for(object, options, &block)
|
234
|
-
end
|
235
|
-
|
236
65
|
def select_content_view
|
237
66
|
_('Select Content View')
|
238
67
|
end
|
@@ -241,77 +70,8 @@ module Katello
|
|
241
70
|
_('No Content View')
|
242
71
|
end
|
243
72
|
|
244
|
-
def content_view_select_labels(_organization, environment)
|
245
|
-
if environment
|
246
|
-
labels = ContentView.readable.
|
247
|
-
in_environment(environment).collect { |cv| [cv.name, cv.id] }
|
248
|
-
else
|
249
|
-
labels = []
|
250
|
-
end
|
251
|
-
labels
|
252
|
-
end
|
253
|
-
|
254
73
|
def selected_content_view(content_view)
|
255
74
|
content_view.nil? ? no_content_view : content_view.id
|
256
75
|
end
|
257
|
-
|
258
|
-
def to_calendar_date(date)
|
259
|
-
date.strftime('%m/%d/%Y')
|
260
|
-
end
|
261
|
-
|
262
|
-
def subscription_limits_helper(sub)
|
263
|
-
lim = []
|
264
|
-
lim << _("Sockets: %s") % sub.sockets if sub.sockets > 0
|
265
|
-
lim << _("Cores: %s") % sub.cores if sub.cores > 0
|
266
|
-
lim << _("RAM: %s GB") % sub.ram if sub.ram > 0
|
267
|
-
lim.join(", ")
|
268
|
-
end
|
269
|
-
|
270
|
-
def repo_selector(repositories, url, field = :repository_id, record = nil)
|
271
|
-
products = repositories.map(&:product).uniq.sort_by { |product| product[:name] }
|
272
|
-
repo_ids = repositories.map(&:id)
|
273
|
-
|
274
|
-
content_tag "select", :id => "repo_select", :name => field, "data-url" => url do
|
275
|
-
html = ""
|
276
|
-
html << content_tag("option", :value => "") { "None" }
|
277
|
-
|
278
|
-
groups = products.map do |prod|
|
279
|
-
content_tag("optgroup", :label => "#{h(prod.name)}") do
|
280
|
-
options = prod.repositories.select { |repo| repo_ids.include?(repo.id) }.map do |repo|
|
281
|
-
selected = record && record.send(field) == repo.id
|
282
|
-
|
283
|
-
content_tag("option", :value => repo.id, :selected => selected) do
|
284
|
-
h(repo.name)
|
285
|
-
end
|
286
|
-
end
|
287
|
-
options.join.html_safe
|
288
|
-
end
|
289
|
-
end
|
290
|
-
|
291
|
-
(html + groups.join).html_safe
|
292
|
-
end
|
293
|
-
end
|
294
|
-
|
295
|
-
# Using the record provided, return a hash where the
|
296
|
-
# keys are the products associated with the record and the
|
297
|
-
# values are arrays listing the repositories associated
|
298
|
-
# with the given product.
|
299
|
-
# For example: {product1 => [repo1, repo2]}
|
300
|
-
def get_product_and_repos(record, content_types)
|
301
|
-
products_hash = record.resulting_products.inject({}) do |hash, product|
|
302
|
-
if record.repositories.empty?
|
303
|
-
hash[product] = []
|
304
|
-
else
|
305
|
-
repos = product.repos(current_organization.library).where(:content_type => content_types)
|
306
|
-
repos.each do |repo|
|
307
|
-
hash[product] ||= []
|
308
|
-
hash[product] << repo
|
309
|
-
end
|
310
|
-
end
|
311
|
-
hash
|
312
|
-
end
|
313
|
-
|
314
|
-
products_hash
|
315
|
-
end
|
316
76
|
end
|
317
77
|
end
|