katello 3.0.2 → 3.1.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/app/assets/javascripts/katello/sync_management/sync_management.js +14 -5
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -4
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -0
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +2 -12
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +2 -4
- data/app/controllers/katello/api/v2/environments_controller.rb +0 -16
- data/app/controllers/katello/api/v2/host_contents_controller.rb +9 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +25 -6
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -3
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +2 -1
- data/app/controllers/katello/api/v2/systems_controller.rb +1 -13
- data/app/controllers/katello/application_controller.rb +15 -18
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +11 -7
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +2 -2
- data/app/helpers/katello/application_helper.rb +1 -1
- data/app/helpers/katello/concerns/settings_helper_extensions.rb +3 -2
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -1
- data/app/helpers/katello/katello_form_builder.rb +1 -1
- data/app/helpers/katello/katello_url_helper.rb +2 -2
- data/app/lib/actions/candlepin/candlepin_listening_service.rb +3 -3
- data/app/lib/actions/candlepin/consumer/remove_subscription.rb +6 -0
- data/app/lib/actions/candlepin/import_pool_handler.rb +2 -1
- data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +4 -5
- data/app/lib/actions/katello/content_view/errata_mail.rb +1 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
- data/app/lib/actions/katello/content_view/promote.rb +8 -3
- data/app/lib/actions/katello/content_view/publish.rb +8 -3
- data/app/lib/actions/katello/content_view/remove.rb +2 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -1
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
- data/app/lib/actions/katello/host/generate_applicability.rb +1 -1
- data/app/lib/actions/katello/host/hypervisors_update.rb +23 -5
- data/app/lib/actions/katello/host/register.rb +2 -11
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/katello/host/update.rb +1 -1
- data/app/lib/actions/katello/host/update_content_view.rb +5 -1
- data/app/lib/actions/katello/repository/errata_mail.rb +1 -1
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +2 -0
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -1
- data/app/lib/actions/pulp/abstract_async_task_group.rb +76 -0
- data/app/lib/actions/pulp/consumer/create.rb +1 -1
- data/app/lib/actions/pulp/repos/update.rb +2 -1
- data/app/lib/actions/pulp/repository/associate_importer.rb +4 -0
- data/app/lib/actions/pulp/repository/import_upload.rb +0 -4
- data/app/lib/actions/pulp/repository/refresh.rb +7 -18
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +2 -2
- data/app/lib/actions/pulp/repository/sync.rb +1 -1
- data/app/lib/actions/pulp/repository/update_importer.rb +4 -0
- data/app/lib/katello/api/v2/error_handling.rb +1 -1
- data/app/lib/katello/bulk_actions.rb +7 -8
- data/app/lib/katello/capsule_content.rb +11 -11
- data/app/lib/katello/errors.rb +2 -0
- data/app/lib/katello/glue/queue.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +3 -3
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/lib/katello/util/cdn_var_substitutor.rb +1 -1
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/package_filter.rb +4 -4
- data/app/lib/katello/util/search.rb +3 -3
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +20 -14
- data/app/models/katello/activation_key.rb +4 -4
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +6 -2
- data/app/models/katello/concerns/operatingsystem_extensions.rb +2 -2
- data/app/models/katello/concerns/organization_extensions.rb +5 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +2 -13
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +27 -2
- data/app/models/katello/content_view.rb +5 -5
- data/app/models/katello/content_view_erratum_filter_rule.rb +3 -3
- data/app/models/katello/content_view_filter.rb +3 -3
- data/app/models/katello/content_view_history.rb +4 -4
- data/app/models/katello/content_view_repository.rb +1 -1
- data/app/models/katello/erratum.rb +14 -10
- data/app/models/katello/glue.rb +0 -2
- data/app/models/katello/glue/candlepin/consumer.rb +4 -4
- data/app/models/katello/glue/candlepin/content.rb +2 -2
- data/app/models/katello/glue/candlepin/pool.rb +6 -0
- data/app/models/katello/glue/candlepin/product.rb +1 -1
- data/app/models/katello/glue/provider.rb +1 -1
- data/app/models/katello/glue/pulp/consumer.rb +3 -3
- data/app/models/katello/glue/pulp/repo.rb +26 -31
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/content_facet.rb +6 -1
- data/app/models/katello/host/subscription_facet.rb +1 -8
- data/app/models/katello/host_collection.rb +1 -82
- data/app/models/katello/hypervisor.rb +1 -1
- data/app/models/katello/kt_environment.rb +3 -2
- data/app/models/katello/package_group.rb +2 -2
- data/app/models/katello/ping.rb +4 -4
- data/app/models/katello/provider.rb +8 -1
- data/app/models/katello/pulp_sync_status.rb +7 -7
- data/app/models/katello/pulp_task_status.rb +1 -1
- data/app/models/katello/repository.rb +6 -6
- data/app/models/katello/rhsm_fact_parser.rb +0 -9
- data/app/models/katello/sync_plan.rb +14 -21
- data/app/models/katello/system.rb +6 -12
- data/app/models/katello/task_status.rb +3 -24
- data/app/models/setting/{katello.rb → content.rb} +10 -2
- data/app/overrides/add_about_page.rb +3 -3
- data/app/overrides/add_organization_attributes.rb +2 -2
- data/app/overrides/add_subscription_status.rb +1 -1
- data/app/services/katello/candlepin/consumer.rb +8 -8
- data/app/services/katello/pulp/consumer.rb +1 -1
- data/app/services/katello/pulp/consumer_group.rb +3 -3
- data/app/services/katello/pulp/docker_manifest.rb +1 -1
- data/app/services/katello/pulp/erratum.rb +1 -1
- data/app/services/katello/pulp/ostree_branch.rb +1 -1
- data/app/services/katello/pulp/package_group.rb +1 -1
- data/app/services/katello/pulp/puppet_module.rb +1 -1
- data/app/services/katello/pulp/rpm.rb +3 -3
- data/app/services/katello/puppet_class_importer_extensions.rb +1 -1
- data/app/views/dashboard/_subscription_status_widget.html.erb +1 -1
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
- data/app/views/foreman/unattended/finish-katello.erb +2 -2
- data/app/views/foreman/unattended/kickstart-katello.erb +2 -2
- data/app/views/foreman/unattended/userdata-katello.erb +2 -0
- data/app/views/katello/api/v2/common/_syncable.json.rabl +1 -1
- data/app/views/katello/api/v2/errata/show.json.rabl +2 -2
- data/app/views/katello/api/v2/{systems/releases.json.rabl → host_subscriptions/available_release_versions.json.rabl} +0 -0
- data/app/views/katello/api/v2/products/base.json.rabl +0 -19
- data/app/views/katello/api/v2/products/show.json.rabl +21 -2
- data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +2 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +19 -17
- data/config/katello.yml +242 -0
- data/config/routes/api/v2.rb +7 -6
- data/config/routes/overrides.rb +10 -5
- data/db/migrate/20140117160939_refactor_content_views.rb +4 -4
- data/db/migrate/20140318174203_drop_cdn_import_success_column.rb +1 -1
- data/db/migrate/20140404122011_drop_repositories_enabled_column.rb +1 -1
- data/db/migrate/20140610083129_add_pulp_proxy_to_host.rb +1 -1
- data/db/migrate/20140930170628_add_errata.rb +1 -1
- data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
- data/db/migrate/20150602153756_remove_user_notices.rb +1 -1
- data/db/migrate/20150602153757_remove_notices.rb +2 -2
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20160203195736_remove_docker_image_schema.rb +3 -1
- data/db/migrate/20160505181337_rename_katello_settings.rb +9 -0
- data/db/migrate/20160520175340_add_host_applicable_package.rb +8 -0
- data/db/migrate/20160605160933_remove_jobs.rb +25 -0
- data/db/migrate/20160605162929_remove_system_smart_proxy.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +14 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-packages.controller.js +16 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-packages.html +27 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +17 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-collapsed.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-full.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +0 -1
- 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 +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/gpg-key-new.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/check-current-organization.run.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/views/new-sync-plan-form.html +1 -0
- data/engines/bastion_katello/lib/bastion_katello/version.rb +1 -1
- data/lib/katello.rb +0 -1
- data/lib/katello/engine.rb +12 -8
- data/lib/katello/permissions/content_host_permissions.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +5 -6
- data/lib/katello/tasks/delete_orphaned_content.rake +1 -1
- data/lib/katello/tasks/jenkins.rake +1 -3
- data/lib/katello/tasks/jshint.rake +28 -29
- data/lib/katello/tasks/jsroutes.rake +2 -2
- data/lib/katello/tasks/regenerate_repo_metadata.rake +3 -5
- data/lib/katello/tasks/reindex.rake +17 -16
- data/lib/katello/tasks/rubocop.rake +1 -3
- data/lib/katello/tasks/setup.rake +3 -4
- data/lib/katello/tasks/test.rake +8 -23
- data/lib/katello/tasks/upgrades/2.4/import_distributions.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_package_groups.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_rpms.rake +1 -1
- data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +1 -2
- data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +1 -1
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +1 -1
- data/lib/katello/tasks/yard.rake +2 -2
- data/lib/katello/version.rb +1 -1
- metadata +14 -15
- data/app/models/katello/job.rb +0 -197
- data/app/models/katello/job_task.rb +0 -10
- data/app/views/katello/api/v2/systems_bulk_actions/applicable_errata.json.rabl +0 -7
- data/app/views/katello/api/v2/systems_bulk_actions/available_incremental_updates.json.rabl +0 -21
- data/app/views/katello/api/v2/systems_bulk_actions/erratum.json.rabl +0 -7
- data/app/views/katello/api/v2/systems_bulk_actions/job.json.rabl +0 -1
- data/db/migrate/20160619223332_fix_viewer_role.rb +0 -41
data/config/routes/api/v2.rb
CHANGED
@@ -155,6 +155,7 @@ Katello::Engine.routes.draw do
|
|
155
155
|
api_resources :activation_keys, :only => [:index]
|
156
156
|
api_resources :content_views, :only => [:index, :create]
|
157
157
|
api_resources :environments, :only => [:index, :show, :create, :update, :destroy] do
|
158
|
+
api_resources :repositories, :only => [:index]
|
158
159
|
collection do
|
159
160
|
get :paths
|
160
161
|
get :auto_complete_search
|
@@ -239,14 +240,9 @@ Katello::Engine.routes.draw do
|
|
239
240
|
end
|
240
241
|
|
241
242
|
api_resources :systems, :only => [:index, :show, :create, :update, :destroy] do
|
242
|
-
member do
|
243
|
-
get :releases
|
244
|
-
end
|
245
243
|
collection do
|
246
244
|
get :auto_complete_search
|
247
245
|
end
|
248
|
-
api_resources :activation_keys, :only => [:index]
|
249
|
-
api_resources :host_collections, :only => [:index]
|
250
246
|
api_resources :products, :only => [:index]
|
251
247
|
end
|
252
248
|
|
@@ -344,7 +340,9 @@ Katello::Engine.routes.draw do
|
|
344
340
|
|
345
341
|
api_resources :environments, :only => [] do
|
346
342
|
api_resources :products, :only => [:index] do
|
347
|
-
|
343
|
+
api_resources :repositories, :only => [:index] do
|
344
|
+
get :index, :on => :member
|
345
|
+
end
|
348
346
|
end
|
349
347
|
|
350
348
|
api_resources :content_views, :only => [:index]
|
@@ -356,6 +354,9 @@ Katello::Engine.routes.draw do
|
|
356
354
|
end
|
357
355
|
|
358
356
|
api_resources :products, :only => [] do
|
357
|
+
api_resources :repositories, :only => [:index] do
|
358
|
+
get :index, :on => :member
|
359
|
+
end
|
359
360
|
get :repositories, :on => :member
|
360
361
|
api_resources :sync, :only => [:index] do
|
361
362
|
delete :index, :on => :collection, :action => :cancel
|
data/config/routes/overrides.rb
CHANGED
@@ -1,21 +1,25 @@
|
|
1
1
|
module Katello
|
2
2
|
class WhitelistConstraint
|
3
|
-
PATHS ||= [%r{\A/api/v2/organizations/\S+/parameters}]
|
3
|
+
PATHS ||= [%r{\A/api/v2/organizations/\S+/parameters}].freeze
|
4
4
|
|
5
5
|
def matches?(request)
|
6
|
-
PATHS.map { |path| request.env["REQUEST_PATH"].match
|
6
|
+
PATHS.map { |path| request.env["REQUEST_PATH"].try(:match, path) }.any? ? false : true
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
Foreman::Application.routes.draw do
|
12
|
-
override_message = '{"message": "Route
|
12
|
+
override_message = '{"message": "Route overriden by Katello, use the /katello API endpoint instead. See /apidoc for more details."}'
|
13
13
|
|
14
14
|
match "/api/v2/organizations/*all", :to => proc { [404, {}, [override_message]] },
|
15
|
-
:via => :
|
15
|
+
:via => :put,
|
16
16
|
:constraints => Katello::WhitelistConstraint.new
|
17
17
|
|
18
|
-
match "/api/
|
18
|
+
match "/api/v2/organizations", :to => proc { [404, {}, [override_message]] },
|
19
|
+
:via => :post,
|
20
|
+
:constraints => Katello::WhitelistConstraint.new
|
21
|
+
|
22
|
+
match "/api/v2/organizations/:id", via: :delete, to: proc { [404, {}, [override_message]] }
|
19
23
|
|
20
24
|
resources :hosts, :only => [] do
|
21
25
|
get 'puppet_environment_for_content_view', :on => :collection
|
@@ -79,6 +83,7 @@ Foreman::Application.routes.draw do
|
|
79
83
|
put :auto_attach
|
80
84
|
get :product_content
|
81
85
|
get :events
|
86
|
+
get :available_release_versions
|
82
87
|
put :content_override
|
83
88
|
put :remove_subscriptions
|
84
89
|
put :add_subscriptions
|
@@ -45,12 +45,12 @@ class RefactorContentViews < ActiveRecord::Migration
|
|
45
45
|
def down
|
46
46
|
create_table "katello_content_view_definition_bases", :force => true do |t|
|
47
47
|
t.string "name", :limit => 255
|
48
|
-
t.string "label",
|
48
|
+
t.string "label", :null => false, :limit => 255
|
49
49
|
t.text "description"
|
50
50
|
t.integer "organization_id"
|
51
51
|
t.datetime "created_at", :null => false
|
52
52
|
t.datetime "updated_at", :null => false
|
53
|
-
t.boolean "composite",
|
53
|
+
t.boolean "composite", :default => false, :null => false
|
54
54
|
t.string "type", :limit => 255
|
55
55
|
t.integer "source_id"
|
56
56
|
end
|
@@ -70,8 +70,8 @@ class RefactorContentViews < ActiveRecord::Migration
|
|
70
70
|
create_table "katello_filter_rules", :force => true do |t|
|
71
71
|
t.string "type", :limit => 255
|
72
72
|
t.text "parameters"
|
73
|
-
t.integer "filter_id",
|
74
|
-
t.boolean "inclusion",
|
73
|
+
t.integer "filter_id", :null => false
|
74
|
+
t.boolean "inclusion", :default => true
|
75
75
|
t.datetime "created_at", :null => false
|
76
76
|
t.datetime "updated_at", :null => false
|
77
77
|
end
|
@@ -4,6 +4,6 @@ class DropCdnImportSuccessColumn < ActiveRecord::Migration
|
|
4
4
|
end
|
5
5
|
|
6
6
|
def down
|
7
|
-
add_column :katello_products,
|
7
|
+
add_column :katello_products, "cdn_import_success", :boolean, :default => true, :null => false
|
8
8
|
end
|
9
9
|
end
|
@@ -6,7 +6,7 @@ class AddPulpProxyToHost < ActiveRecord::Migration
|
|
6
6
|
add_index :hosts, :content_source_id
|
7
7
|
add_index :hostgroups, :content_source_id
|
8
8
|
|
9
|
-
add_foreign_key :hosts, :smart_proxies, :name => "hosts_content_source_id_fk",
|
9
|
+
add_foreign_key :hosts, :smart_proxies, :name => "hosts_content_source_id_fk", :column => "content_source_id"
|
10
10
|
add_foreign_key :hostgroups, :smart_proxies, :name => "hostgroups_content_source_id_fk", :column => "content_source_id"
|
11
11
|
end
|
12
12
|
end
|
@@ -26,7 +26,7 @@ class AddErrata < ActiveRecord::Migration
|
|
26
26
|
end
|
27
27
|
|
28
28
|
add_index :katello_erratum_packages, [:erratum_id, :nvrea, :name, :filename], :unique => true,
|
29
|
-
:name =>
|
29
|
+
:name => 'katello_erratum_packages_eid_nvrea_n_f'
|
30
30
|
add_foreign_key "katello_erratum_packages", "katello_errata",
|
31
31
|
:name => "katello_erratum_packages_errata_id_fk", :column => "erratum_id"
|
32
32
|
|
@@ -8,7 +8,7 @@ class AddHostContentViewEnvironment < ActiveRecord::Migration
|
|
8
8
|
|
9
9
|
[Hostgroup, Host::Managed].each do |model|
|
10
10
|
model.find_each do |host|
|
11
|
-
lifecycle_environment =
|
11
|
+
lifecycle_environment = host.environment.try(:lifecycle_environment)
|
12
12
|
content_view = host.environment.try(:content_view)
|
13
13
|
if lifecycle_environment && content_view
|
14
14
|
host.update_column(:content_view_id, content_view.id)
|
@@ -7,7 +7,7 @@ class RemoveUserNotices < ActiveRecord::Migration
|
|
7
7
|
create_table "katello_user_notices", :force => true do |t|
|
8
8
|
t.integer "user_id"
|
9
9
|
t.integer "notice_id"
|
10
|
-
t.boolean "viewed",
|
10
|
+
t.boolean "viewed", :default => false, :null => false
|
11
11
|
end
|
12
12
|
|
13
13
|
add_index "katello_user_notices", ["notice_id"], :name => "index_user_notices_on_notice_id"
|
@@ -5,9 +5,9 @@ class RemoveNotices < ActiveRecord::Migration
|
|
5
5
|
|
6
6
|
def down
|
7
7
|
create_table "katello_notices", :force => true do |t|
|
8
|
-
t.string "text", :limit => 1024,
|
8
|
+
t.string "text", :limit => 1024, :null => false
|
9
9
|
t.text "details"
|
10
|
-
t.boolean "global",
|
10
|
+
t.boolean "global", :default => false, :null => false
|
11
11
|
t.string "level", :null => false, :limit => 255
|
12
12
|
t.datetime "created_at", :null => false
|
13
13
|
t.datetime "updated_at", :null => false
|
@@ -325,7 +325,7 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
325
325
|
if hostname.nil?
|
326
326
|
logger.warn("Content host #{system.uuid} does not have a hostname, removing.")
|
327
327
|
unregister_system(system)
|
328
|
-
|
328
|
+
break
|
329
329
|
end
|
330
330
|
|
331
331
|
MigrateContentHosts::Host.reset_column_information
|
@@ -1,6 +1,8 @@
|
|
1
1
|
class RemoveDockerImageSchema < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
|
3
|
+
if foreign_key_exists?(:katello_docker_tags, :name => "katello_docker_tags_docker_image_id_fk")
|
4
|
+
remove_foreign_key :katello_docker_tags, :name => "katello_docker_tags_docker_image_id_fk"
|
5
|
+
end
|
4
6
|
remove_column :katello_docker_tags, :docker_image_id
|
5
7
|
drop_table :katello_repository_docker_images
|
6
8
|
drop_table :katello_docker_images
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class RenameKatelloSettings < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Setting.where(category: 'Setting::Katello').update_all(:category => 'Setting::Content')
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
Setting.where(category: 'Setting::Content').update_all(:category => 'Setting::Katello')
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class RemoveJobs < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
drop_table :katello_job_tasks
|
4
|
+
drop_table :katello_jobs
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
create_table "katello_job_tasks", force: :cascade do |t|
|
9
|
+
t.integer "job_id"
|
10
|
+
t.integer "task_status_id"
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index "katello_job_tasks", ["job_id"], name: "index_job_tasks_on_job_id", using: :btree
|
14
|
+
add_index "katello_job_tasks", ["task_status_id"], name: "index_job_tasks_on_task_status_id", using: :btree
|
15
|
+
|
16
|
+
create_table "katello_jobs", force: :cascade do |t|
|
17
|
+
t.integer "job_owner_id"
|
18
|
+
t.string "job_owner_type", limit: 255
|
19
|
+
t.string "pulp_id", limit: 255, null: false
|
20
|
+
end
|
21
|
+
|
22
|
+
add_index "katello_jobs", ["job_owner_id"], name: "index_jobs_on_job_owner_id", using: :btree
|
23
|
+
add_index "katello_jobs", ["pulp_id"], name: "index_jobs_on_pulp_id", using: :btree
|
24
|
+
end
|
25
|
+
end
|
@@ -14,8 +14,8 @@
|
|
14
14
|
* Provides the functionality for activation key associations.
|
15
15
|
*/
|
16
16
|
angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsController',
|
17
|
-
['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization',
|
18
|
-
function ($scope, $location, translate, Nutupane, ActivationKey, ContentHostsHelper, CurrentOrganization) {
|
17
|
+
['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization', 'Host',
|
18
|
+
function ($scope, $location, translate, Nutupane, ActivationKey, ContentHostsHelper, CurrentOrganization, Host) {
|
19
19
|
var contentHostsNutupane, params = {
|
20
20
|
'organization_id': CurrentOrganization,
|
21
21
|
'search': $location.search().search || "",
|
@@ -31,17 +31,26 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsC
|
|
31
31
|
$scope.table.working = false;
|
32
32
|
}
|
33
33
|
|
34
|
-
contentHostsNutupane = new Nutupane(
|
34
|
+
contentHostsNutupane = new Nutupane(Host, params);
|
35
|
+
contentHostsNutupane.searchTransform = function (term) {
|
36
|
+
var searchQuery, addition = "activation_key_id=" + $scope.$stateParams.activationKeyId;
|
37
|
+
if (term === "" || angular.isUndefined(term)) {
|
38
|
+
searchQuery = addition;
|
39
|
+
} else {
|
40
|
+
searchQuery = term + " and " + addition;
|
41
|
+
}
|
42
|
+
return searchQuery;
|
43
|
+
};
|
44
|
+
|
35
45
|
contentHostsNutupane.masterOnly = true;
|
36
46
|
$scope.detailsTable = contentHostsNutupane.table;
|
37
47
|
|
38
48
|
$scope.activationKey.$promise.then(function () {
|
39
|
-
params.id = $scope.activationKey.id;
|
40
49
|
contentHostsNutupane.setParams(params);
|
41
50
|
contentHostsNutupane.load();
|
42
51
|
});
|
43
52
|
|
44
|
-
$scope.
|
53
|
+
$scope.getHostStatusIcon = ContentHostsHelper.getHostStatusIcon;
|
45
54
|
|
46
55
|
$scope.memory = ContentHostsHelper.memory;
|
47
56
|
}]
|
@@ -26,21 +26,21 @@
|
|
26
26
|
</thead>
|
27
27
|
|
28
28
|
<tbody>
|
29
|
-
<tr bst-table-row ng-repeat="
|
29
|
+
<tr bst-table-row ng-repeat="host in detailsTable.rows"
|
30
30
|
ng-controller="ContentHostStatusController">
|
31
31
|
<td bst-table-cell>
|
32
|
-
<a ui-sref="content-hosts.details.info({hostId:
|
33
|
-
{{
|
32
|
+
<a ui-sref="content-hosts.details.info({hostId: host.host_id})">
|
33
|
+
{{ host.name }}
|
34
34
|
</a>
|
35
35
|
</td>
|
36
36
|
<td bst-table-cell>
|
37
|
-
<span
|
37
|
+
<span ng-class="getHostStatusIcon(host.subscription_global_status)">
|
38
38
|
</span>
|
39
39
|
</td>
|
40
|
-
<td bst-table-cell>{{
|
41
|
-
<td bst-table-cell>{{
|
42
|
-
<td bst-table-cell>{{
|
43
|
-
<td bst-table-cell>{{
|
40
|
+
<td bst-table-cell>{{ host.environment.name }}</td>
|
41
|
+
<td bst-table-cell>{{ host.content_view.name || "" }}</td>
|
42
|
+
<td bst-table-cell>{{ host.service_level }}</td>
|
43
|
+
<td bst-table-cell>{{ host.release_ver }}</td>
|
44
44
|
</tr>
|
45
45
|
</tbody>
|
46
46
|
</table>
|
@@ -21,9 +21,10 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkActionPackag
|
|
21
21
|
|
22
22
|
function successMessage(type) {
|
23
23
|
var messages = {
|
24
|
-
install: translate("
|
25
|
-
update: translate("
|
26
|
-
remove: translate("
|
24
|
+
install: translate("Successfully scheduled package installation"),
|
25
|
+
update: translate("Successfully scheduled package update"),
|
26
|
+
remove: translate("Successfully scheduled package removal"),
|
27
|
+
"update all": translate("Successfully scheduled an update of all packages")
|
27
28
|
};
|
28
29
|
return messages[type];
|
29
30
|
}
|
@@ -31,7 +32,12 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkActionPackag
|
|
31
32
|
function installParams() {
|
32
33
|
var params = $scope.nutupane.getAllSelectedResults();
|
33
34
|
params['content_type'] = $scope.content.contentType;
|
34
|
-
|
35
|
+
if ($scope.content.action === "update all") {
|
36
|
+
params['update_all'] = true;
|
37
|
+
params.content = null;
|
38
|
+
} else {
|
39
|
+
params.content = $scope.content.content.split(/ *, */);
|
40
|
+
}
|
35
41
|
params['organization_id'] = CurrentOrganization;
|
36
42
|
return params;
|
37
43
|
}
|
@@ -102,6 +108,8 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkActionPackag
|
|
102
108
|
HostBulkAction.updateContent(params, success, error);
|
103
109
|
} else if ($scope.content.action === "remove") {
|
104
110
|
HostBulkAction.removeContent(params, success, error);
|
111
|
+
} else if ($scope.content.action === "update all") {
|
112
|
+
HostBulkAction.updateContent(params, success, error);
|
105
113
|
}
|
106
114
|
|
107
115
|
return deferred.promise;
|
@@ -117,6 +125,10 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkActionPackag
|
|
117
125
|
action = $scope.content.action;
|
118
126
|
}
|
119
127
|
|
128
|
+
if (action === "update all") {
|
129
|
+
action = "update";
|
130
|
+
}
|
131
|
+
|
120
132
|
if ($scope.content.contentType === 'package_group') {
|
121
133
|
$scope.packageActionFormValues.remoteAction = 'group_' + action;
|
122
134
|
} else if ($scope.content.contentType === 'package') {
|
@@ -4,6 +4,28 @@
|
|
4
4
|
<section>
|
5
5
|
<h4 translate>Content Host Package Management</h4>
|
6
6
|
|
7
|
+
<span class="input-group-btn">
|
8
|
+
<button class="btn btn-default"
|
9
|
+
type="button"
|
10
|
+
translate
|
11
|
+
ng-hide="denied('edit_hosts')"
|
12
|
+
ng-click="confirmContentAction('update all', content)"
|
13
|
+
ng-disabled="(table.numSelected === 0)">
|
14
|
+
Update All Packages
|
15
|
+
</button>
|
16
|
+
<button class="btn btn-default dropdown-toggle"
|
17
|
+
ng-hide="!remoteExecutionPresent"
|
18
|
+
ng-disabled="(table.numSelected === 0) || !packageActionForm.$valid || content.confirm"
|
19
|
+
type="button" id="update-all-use-remote-execution" data-toggle="dropdown">
|
20
|
+
<span class="caret"></span>
|
21
|
+
</button>
|
22
|
+
<ul class="dropdown-menu" role="menu" aria-labelledby="install-use-remote-execution">
|
23
|
+
<li role="presentation"><a ng-click="performViaKatelloAgent('update all', content)" role="menuitem" tabindex="-1" href="#" translate>via Katello Agent</a></li>
|
24
|
+
<li role="presentation"><a ng-click="performViaRemoteExecution('update all', false)" role="menuitem" tabindex="-1" href="#" translate>via remote execution</a></li>
|
25
|
+
<li role="presentation"><a ng-click="performViaRemoteExecution('update all', true)" role="menuitem" tabindex="-1" href="#" translate>via remote execution - customize first</a></li>
|
26
|
+
</ul>
|
27
|
+
</span>
|
28
|
+
|
7
29
|
<form id="packageActionForm" name="packageActionForm" class="form" method="post" action="/katello/remote_execution">
|
8
30
|
<input type="hidden" name="name" ng-value="content.content"/>
|
9
31
|
<input type="hidden" name="remote_action" ng-value="packageActionFormValues.remoteAction"/>
|
@@ -13,7 +35,7 @@
|
|
13
35
|
<input type="hidden" name="customize" ng-value="packageActionFormValues.customize"/>
|
14
36
|
</form>
|
15
37
|
|
16
|
-
<form name="systemContentForm" class="form" ng-hide="content.workingMode || denied('edit_hosts')">
|
38
|
+
<form name="systemContentForm" class="form" ng-hide="content.workingMode || denied('edit_hosts')" novalidate>
|
17
39
|
|
18
40
|
<div>
|
19
41
|
<input id="package" type="radio"
|
@@ -117,9 +139,12 @@
|
|
117
139
|
<div class="confirmation_text" ng-show="content.action == 'remove'" translate>
|
118
140
|
Are you sure you want to remove {{ content.content }} from the {{ getSelectedSystemIds().length }} system(s) selected?
|
119
141
|
</div>
|
142
|
+
<div class="confirmation_text" ng-show="content.action == 'update all'" translate>
|
143
|
+
Are you sure you want to update all packages on the {{ getSelectedSystemIds().length }} system(s) selected?
|
144
|
+
</div>
|
120
145
|
|
121
146
|
<button class="btn btn-default" ng-click="performContentAction()" translate>Yes</button>
|
122
|
-
<button class="btn btn-default" ng-click="content.confirm = false" translate>No</button>
|
147
|
+
<button type="button" class="btn btn-default" ng-click="content.confirm = false" translate>No</button>
|
123
148
|
</div>
|
124
149
|
|
125
150
|
</form>
|
@@ -7,28 +7,26 @@
|
|
7
7
|
*/
|
8
8
|
angular.module('Bastion.content-hosts').service('ContentHostsHelper',
|
9
9
|
function () {
|
10
|
-
this.
|
10
|
+
this.getHostStatusIcon = function (globalStatus) {
|
11
|
+
var icons;
|
11
12
|
var colors = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
// we can remove 'valid', 'partial', and 'invalid' when http://projects.theforeman.org/issues/15347 is fixed
|
14
|
+
'valid': 'green',
|
15
|
+
'partial': 'yellow',
|
16
|
+
'invalid': 'red',
|
17
|
+
0: 'green',
|
18
|
+
1: 'yellow',
|
19
|
+
2: 'red'
|
20
|
+
};
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
1: 'yellow',
|
28
|
-
2: 'red'
|
29
|
-
};
|
22
|
+
globalStatus = colors[globalStatus] || "red";
|
23
|
+
icons = {
|
24
|
+
'green': globalStatus + ' host-status pficon pficon-ok status-ok',
|
25
|
+
'yellow': globalStatus + ' host-status pficon pficon-info status-warn',
|
26
|
+
'red': globalStatus + ' host-status pficon pficon-error-circle-o status-error'
|
27
|
+
};
|
30
28
|
|
31
|
-
return
|
29
|
+
return icons[globalStatus];
|
32
30
|
};
|
33
31
|
}
|
34
32
|
);
|