katello 3.0.0.rc5 → 3.0.0.rc7
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/controllers/katello/api/v2/api_controller.rb +3 -2
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +4 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +5 -3
- data/app/controllers/katello/api/v2/host_packages_controller.rb +3 -2
- data/app/lib/actions/katello/host/destroy.rb +1 -0
- data/app/lib/actions/katello/repository/destroy.rb +8 -7
- data/app/lib/actions/pulp/repository/presenters/{iso_presenter.rb → file_presenter.rb} +2 -2
- data/app/lib/actions/pulp/repository/sync.rb +1 -1
- data/app/lib/katello/bulk_actions.rb +6 -6
- data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
- data/app/lib/katello/errors.rb +6 -0
- data/app/models/katello/concerns/operatingsystem_extensions.rb +8 -0
- data/app/models/katello/concerns/redhat_extensions.rb +6 -4
- data/app/models/katello/glue/pulp/repo.rb +3 -3
- data/app/views/foreman/unattended/snippets/_subscription_manager_registration.erb +2 -2
- data/app/views/foreman/unattended/userdata-katello.erb +22 -2
- data/app/views/overrides/activation_keys/_host_tab.html.erb +1 -1
- data/app/views/smart_proxies/plugins/_pulp.html.erb +3 -1
- data/app/views/smart_proxies/plugins/_pulp_node.html.erb +3 -1
- data/db/migrate/20150930183738_migrate_content_hosts.rb +18 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +31 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +27 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata-filter.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +12 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +2 -1
- data/lib/katello/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 636bd960fc851d7cfc7cad566463d5f9d12ecd31
|
4
|
+
data.tar.gz: 6e0d3f04c2ea64cc9e4d587b634e901328023f99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95efc1f9e60ae63131a696dc04cc59887f84c59b0da8cca8682af6d94b560267f5b6f2e0a11c66dd249be71438dc88f3de65f0d3b720730db10042e63403cfb
|
7
|
+
data.tar.gz: 7f797259505a86902c5335fed36f1affb78e84f75bcbc0f35709887f6907067c555e17312e75883269a101bfd6cf32e93efc6255a6a87499b5b19f0f2ce0a8c4
|
@@ -57,8 +57,9 @@ module Katello
|
|
57
57
|
sort_attr = params[:sort_by] || default_sort_by
|
58
58
|
|
59
59
|
if sort_attr
|
60
|
-
|
61
|
-
|
60
|
+
sort_order = (params[:sort_order] || default_sort_order).to_s.downcase
|
61
|
+
sort_order = default_sort_order unless ['desc', 'asc'].include?(sort_order)
|
62
|
+
query = query.order(sort_attr => sort_order.to_sym)
|
62
63
|
elsif options[:custom_sort]
|
63
64
|
query = options[:custom_sort].call(query)
|
64
65
|
end
|
@@ -113,8 +113,11 @@ module Katello
|
|
113
113
|
|
114
114
|
def process_errata_ids(select_all_params)
|
115
115
|
if select_all_params[:included][:ids].blank?
|
116
|
+
select_all_params[:excluded][:ids] ||= [] if select_all_params[:excluded][:ids].nil?
|
116
117
|
current_errata_ids = @filter.erratum_rules.map(&:errata_id) + select_all_params[:excluded][:ids]
|
117
|
-
|
118
|
+
query = Erratum
|
119
|
+
query = query.where('errata_id not in (?)', current_errata_ids) unless current_errata_ids.empty?
|
120
|
+
query.in_repositories(@filter.applicable_repos).pluck(:errata_id)
|
118
121
|
else
|
119
122
|
[]
|
120
123
|
end
|
@@ -20,9 +20,11 @@ module Katello
|
|
20
20
|
param :composite_version_id, :identifier, :desc => N_("Filter versions that are components in the specified composite version"), :required => false
|
21
21
|
param_group :search, Api::V2::ApiController
|
22
22
|
def index
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
options = {
|
24
|
+
:includes => [:content_view, :environments, :composite_content_views, :history => :task],
|
25
|
+
:custom_sort => lambda { |query| query.order("#{ContentViewVersion.table_name}.major desc, #{ContentViewVersion.table_name}.minor desc") }
|
26
|
+
}
|
27
|
+
respond(:collection => scoped_search(index_relation.uniq, nil, nil, options))
|
26
28
|
end
|
27
29
|
|
28
30
|
def index_relation
|
@@ -91,8 +91,9 @@ module Katello
|
|
91
91
|
def find_editable_host_with_facet
|
92
92
|
@host = resource_finder(::Host::Managed.authorized("edit_hosts"), params[:host_id])
|
93
93
|
fail HttpErrors::NotFound, _("Couldn't find host with host id '%s'") % params[:host_id] if @host.nil?
|
94
|
-
|
95
|
-
|
94
|
+
if @host.content_facet.try(:uuid).nil?
|
95
|
+
fail HttpErrors::NotFound, _("Host has not been registered with subscription-manager.") % params[:host_id]
|
96
|
+
end
|
96
97
|
@host
|
97
98
|
end
|
98
99
|
|
@@ -22,15 +22,16 @@ module Actions
|
|
22
22
|
|
23
23
|
plan_action(ContentViewPuppetModule::Destroy, repository) if repository.puppet?
|
24
24
|
plan_action(Pulp::Repository::Destroy, pulp_id: repository.pulp_id)
|
25
|
-
|
26
|
-
|
25
|
+
sequence do
|
26
|
+
plan_action(Product::ContentDestroy, repository)
|
27
|
+
plan_action(Repository::DestroyMedium, repository)
|
27
28
|
|
28
|
-
|
29
|
+
view_env = repository.content_view.content_view_environment(repository.environment)
|
30
|
+
repository.destroy! if planned_destroy
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
plan_action(ContentView::UpdateEnvironment, repository.content_view, repository.environment)
|
32
|
+
if !skip_environment_update && ::SETTINGS[:katello][:use_cp] && view_env
|
33
|
+
plan_action(ContentView::UpdateEnvironment, repository.content_view, repository.environment)
|
34
|
+
end
|
34
35
|
end
|
35
36
|
|
36
37
|
plan_self(:user_id => ::User.current.id, :planned_destroy => planned_destroy)
|
@@ -2,7 +2,7 @@ module Actions
|
|
2
2
|
module Pulp
|
3
3
|
module Repository
|
4
4
|
module Presenters
|
5
|
-
class
|
5
|
+
class FilePresenter < AbstractSyncPresenter
|
6
6
|
def progress
|
7
7
|
total_bytes == 0 ? 0.01 : finished_bytes.to_f / total_bytes
|
8
8
|
end
|
@@ -12,7 +12,7 @@ module Actions
|
|
12
12
|
def humanized_details
|
13
13
|
ret = []
|
14
14
|
ret << _("Cancelled.") if cancelled?
|
15
|
-
ret << _("New
|
15
|
+
ret << _("New Files: %s") % num_isos
|
16
16
|
ret.join("\n")
|
17
17
|
end
|
18
18
|
|
@@ -86,7 +86,7 @@ module Actions
|
|
86
86
|
elsif repo.try(:yum?)
|
87
87
|
Presenters::YumPresenter.new(self)
|
88
88
|
elsif repo.try(:file?)
|
89
|
-
Presenters::
|
89
|
+
Presenters::FilePresenter.new(self)
|
90
90
|
elsif repo.try(:docker?)
|
91
91
|
Presenters::DockerPresenter.new(self)
|
92
92
|
elsif repo.try(:ostree?)
|
@@ -7,14 +7,14 @@ module Katello
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def install_packages(packages)
|
10
|
-
fail Errors::
|
10
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
11
11
|
perform_bulk_action do |consumer_group|
|
12
12
|
consumer_group.install_package(packages)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def uninstall_packages(packages)
|
17
|
-
fail Errors::
|
17
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
18
18
|
perform_bulk_action do |consumer_group|
|
19
19
|
consumer_group.uninstall_package(packages)
|
20
20
|
end
|
@@ -22,28 +22,28 @@ module Katello
|
|
22
22
|
|
23
23
|
def update_packages(packages = nil)
|
24
24
|
# if no packages are provided, a full system update will be performed (e.g ''yum update' equivalent)
|
25
|
-
fail Errors::
|
25
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
26
26
|
perform_bulk_action do |consumer_group|
|
27
27
|
consumer_group.update_package(packages)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
def install_package_groups(groups)
|
32
|
-
fail Errors::
|
32
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
33
33
|
perform_bulk_action do |consumer_group|
|
34
34
|
consumer_group.install_package_group(groups)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
def update_package_groups(groups)
|
39
|
-
fail Errors::
|
39
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
40
40
|
perform_bulk_action do |consumer_group|
|
41
41
|
consumer_group.install_package_group(groups)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
def uninstall_package_groups(groups)
|
46
|
-
fail Errors::
|
46
|
+
fail Errors::EmptyBulkActionException if self.consumer_ids.empty?
|
47
47
|
perform_bulk_action do |consumer_group|
|
48
48
|
consumer_group.uninstall_package_group(groups)
|
49
49
|
end
|
@@ -10,7 +10,8 @@ module Katello
|
|
10
10
|
def kickstart_attributes_with_katello
|
11
11
|
kickstart_attributes_without_katello
|
12
12
|
|
13
|
-
|
13
|
+
content_view = @host.try(:content_facet).try(:content_view) || @host.try(:content_view)
|
14
|
+
if content_view && @host.operatingsystem.is_a?(Redhat) &&
|
14
15
|
@host.operatingsystem.kickstart_repos(@host).first.present?
|
15
16
|
@mediapath ||= @host.operatingsystem.mediumpath(@host)
|
16
17
|
end
|
data/app/lib/katello/errors.rb
CHANGED
@@ -35,6 +35,12 @@ module Katello
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
class EmptyBulkActionException < StandardError
|
39
|
+
def message
|
40
|
+
_("No hosts registered with subscription-manager found in selection.")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
38
44
|
class ConnectionRefusedException < StandardError; end
|
39
45
|
|
40
46
|
class MaxHostsReachedException < StandardError; end
|
@@ -40,6 +40,14 @@ module Katello
|
|
40
40
|
self.architectures << Architecture.where(:name => "x86_64").first_or_create
|
41
41
|
self.family = "Redhat"
|
42
42
|
end
|
43
|
+
|
44
|
+
def atomic?
|
45
|
+
name.match(/.*atomic.*/i)
|
46
|
+
end
|
43
47
|
end
|
44
48
|
end
|
45
49
|
end
|
50
|
+
|
51
|
+
class ::Operatingsystem::Jail < Safemode::Jail
|
52
|
+
allow :atomic?
|
53
|
+
end
|
@@ -44,8 +44,10 @@ module Katello
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def medium_uri_with_content_uri(host, url = nil)
|
47
|
-
|
48
|
-
|
47
|
+
kickstart_repo = host.try(:content_facet).try(:kickstart_repository) || host.try(:kickstart_repository)
|
48
|
+
|
49
|
+
if host.try(:content_source) && kickstart_repo.present?
|
50
|
+
return URI.parse(kickstart_repo.full_path(host.content_source))
|
49
51
|
else
|
50
52
|
medium_uri_without_content_uri(host, url)
|
51
53
|
end
|
@@ -63,8 +65,8 @@ module Katello
|
|
63
65
|
end
|
64
66
|
|
65
67
|
def distribution_repositories(host)
|
66
|
-
content_view = host.content_facet.try(:content_view)
|
67
|
-
lifecycle_environment = host.content_facet.try(:lifecycle_environment)
|
68
|
+
content_view = host.try(:content_facet).try(:content_view) || host.try(:content_view)
|
69
|
+
lifecycle_environment = host.try(:content_facet).try(:lifecycle_environment) || host.try(:lifecycle_environment)
|
68
70
|
|
69
71
|
if content_view && lifecycle_environment
|
70
72
|
Katello::Repository.in_environment(lifecycle_environment).in_content_views([content_view]).
|
@@ -159,7 +159,7 @@ module Katello
|
|
159
159
|
|
160
160
|
def importer_feed_url(capsule = false)
|
161
161
|
if capsule
|
162
|
-
self.full_path
|
162
|
+
self.full_path(nil, true)
|
163
163
|
else
|
164
164
|
self.url
|
165
165
|
end
|
@@ -827,9 +827,9 @@ module Katello
|
|
827
827
|
end
|
828
828
|
end
|
829
829
|
|
830
|
-
def full_path(smart_proxy = nil)
|
830
|
+
def full_path(smart_proxy = nil, force_https = false)
|
831
831
|
pulp_uri = URI.parse(smart_proxy ? smart_proxy.url : SETTINGS[:katello][:pulp][:url])
|
832
|
-
scheme = (self.unprotected ? 'http' : 'https'
|
832
|
+
scheme = (self.unprotected && !force_https) ? 'http' : 'https'
|
833
833
|
if docker?
|
834
834
|
"#{pulp_uri.host.downcase}:5000/#{pulp_id}"
|
835
835
|
elsif file?
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if @host.params['kt_activation_keys'] %>
|
2
2
|
# add subscription manager
|
3
|
-
<% if @host.operatingsystem.
|
3
|
+
<% if @host.operatingsystem.atomic? %>
|
4
4
|
curl -s <%= subscription_manager_configuration_url(@host, false) %> | IS_ATOMIC=true bash
|
5
5
|
<% else %>
|
6
6
|
yum -t -y -e 0 install subscription-manager
|
@@ -10,7 +10,7 @@
|
|
10
10
|
echo "Registering the System"
|
11
11
|
subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= @host.params['kt_activation_keys'] %>"
|
12
12
|
|
13
|
-
<% unless @host.operatingsystem.
|
13
|
+
<% unless @host.operatingsystem.atomic? %>
|
14
14
|
echo "Installing Katello Agent"
|
15
15
|
yum -t -y -e 0 install katello-agent
|
16
16
|
chkconfig goferd on
|
@@ -6,11 +6,28 @@ oses:
|
|
6
6
|
- CentOS 7
|
7
7
|
- Fedora 19
|
8
8
|
- Fedora 20
|
9
|
+
- Fedora 21
|
10
|
+
- Fedora 22
|
11
|
+
- Fedora 23
|
9
12
|
-%>
|
10
13
|
#cloud-config
|
11
14
|
hostname: <%= @host.shortname %>
|
12
15
|
fqdn: <%= @host %>
|
13
16
|
manage_etc_hosts: true
|
17
|
+
|
18
|
+
groups:
|
19
|
+
- admin
|
20
|
+
|
21
|
+
users:
|
22
|
+
- default
|
23
|
+
- name: admin
|
24
|
+
primary-group: admin
|
25
|
+
groups: users
|
26
|
+
shell: /bin/bash
|
27
|
+
sudo: ['ALL=(ALL) ALL']
|
28
|
+
lock-passwd: false
|
29
|
+
passwd: <%= @host.root_pass %>
|
30
|
+
|
14
31
|
<%# Allow user to specify additional SSH key as host paramter -%>
|
15
32
|
<% if @host.params['sshkey'].present? || @host.params['remote_execution_ssh_keys'].present? -%>
|
16
33
|
ssh_authorized_keys:
|
@@ -34,13 +51,16 @@ write_files:
|
|
34
51
|
snippet 'freeipa_register'
|
35
52
|
end %>
|
36
53
|
<% end -%>
|
54
|
+
<% unless @host.operatingsystem.atomic? -%>
|
37
55
|
# update all the base packages from the updates repository
|
38
56
|
yum -t -y -e 0 update
|
57
|
+
<% end -%>
|
39
58
|
<%
|
40
59
|
# safemode renderer does not support unary negation
|
60
|
+
non_atomic = @host.operatingsystem.atomic? ? false : true
|
41
61
|
pm_set = @host.puppetmaster.empty? ? false : true
|
42
|
-
puppet_enabled = pm_set || @host.params['force-puppet']
|
43
|
-
salt_enabled = @host.params['salt_master'] ? true : false
|
62
|
+
puppet_enabled = non_atomic && (pm_set || @host.params['force-puppet'])
|
63
|
+
salt_enabled = non_atomic && (@host.params['salt_master'] ? true : false)
|
44
64
|
%>
|
45
65
|
<% if salt_enabled %>
|
46
66
|
yum -t -y -e 0 install salt-minion
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<h3><%= _('Pulp') %></h3>
|
3
|
-
|
3
|
+
</div>
|
4
|
+
<%= show_feature_version('pulp') %>
|
5
|
+
<div class="row">
|
4
6
|
<div class="pulp_status" data-ajax-url="<%= pulp_status_smart_proxy_path(@smart_proxy) %>">
|
5
7
|
<%= spinner %>
|
6
8
|
</div>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<h3><%= _('Pulp node') %></h3>
|
3
|
-
|
3
|
+
</div>
|
4
|
+
<%= show_feature_version('pulpnode') %>
|
5
|
+
<div class="row">
|
4
6
|
<div class="pulp_status" data-ajax-url="<%= pulp_status_smart_proxy_path(@smart_proxy) %>">
|
5
7
|
<%= spinner %>
|
6
8
|
</div>
|
@@ -15,6 +15,12 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
15
15
|
:dependent => :restrict_with_exception, :inverse_of => :organization
|
16
16
|
end
|
17
17
|
|
18
|
+
class SmartProxy < ActiveRecord::Base
|
19
|
+
self.table_name = "smart_proxies"
|
20
|
+
|
21
|
+
belongs_to :content_host, :class_name => "MigrateContentHosts::ContentHost", :inverse_of => :capsule
|
22
|
+
end
|
23
|
+
|
18
24
|
class KTEnvironment < ActiveRecord::Base
|
19
25
|
self.table_name = "katello_environments"
|
20
26
|
|
@@ -120,11 +126,14 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
120
126
|
|
121
127
|
has_many :system_activation_keys, :class_name => "MigrateContentHosts::SystemActivationKey", :dependent => :destroy
|
122
128
|
has_many :activation_keys, :through => :system_activation_keys
|
123
|
-
has_many :
|
129
|
+
has_many :system_host_collections, :class_name => "MigrateContentHosts::SystemHostCollections", :dependent => :destroy
|
130
|
+
has_many :host_collections, :through => :system_host_collections
|
124
131
|
has_many :applicable_errata, :through => :system_errata, :class_name => "MigrateContentHosts::Erratum", :source => :erratum
|
125
132
|
has_many :system_errata, :class_name => "MigrateContentHosts::SystemErratum", :dependent => :destroy, :inverse_of => :system
|
126
133
|
has_many :bound_repositories, :through => :system_repositories, :class_name => "MigrateContentHosts::Repository", :source => :repository
|
127
134
|
has_many :system_repositories, :class_name => "MigrateContentHosts::SystemRepository", :dependent => :destroy, :inverse_of => :system
|
135
|
+
|
136
|
+
has_one :capsule, :class_name => "MigrateContentHosts::SmartProxy", :inverse_of => :content_host, :foreign_key => :content_host_id, :dependent => :nullify
|
128
137
|
end
|
129
138
|
|
130
139
|
class ContentFacet < ActiveRecord::Base
|
@@ -135,7 +144,7 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
135
144
|
belongs_to :lifecycle_environment, :inverse_of => :content_facets, :class_name => "MigrateContentHosts::KTEnvironment"
|
136
145
|
|
137
146
|
has_many :content_facet_repositories, :class_name => "MigrateContentHosts::ContentFacetRepository", :dependent => :destroy, :inverse_of => :content_facets
|
138
|
-
has_many :bound_repositories, :through => :content_facet_repositories, :class_name => "MigrateContentHosts::Repository", :source => :
|
147
|
+
has_many :bound_repositories, :through => :content_facet_repositories, :class_name => "MigrateContentHosts::Repository", :source => :repository
|
139
148
|
has_many :applicable_errata, :through => :content_facet_errata, :class_name => "MigrateContentHosts::Erratum", :source => :erratum
|
140
149
|
has_many :content_facet_errata, :class_name => "MigrateContentHosts::ContentFacetErratum", :dependent => :destroy, :inverse_of => :content_facet
|
141
150
|
end
|
@@ -209,7 +218,7 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
209
218
|
systems_to_remove.each do |system|
|
210
219
|
logger.info("Content Host #{system.uuid} doesn't have candlepin information, unregistering.")
|
211
220
|
if (system_proxy = SmartProxy.find_by_content_host_id(system.id))
|
212
|
-
system_proxy.
|
221
|
+
system_proxy.content_host_id = nil
|
213
222
|
system_proxy.save
|
214
223
|
end
|
215
224
|
systems.delete(system)
|
@@ -284,6 +293,7 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
284
293
|
end
|
285
294
|
|
286
295
|
# rubocop:disable MethodLength
|
296
|
+
# rubocop:disable AbcSize
|
287
297
|
def up
|
288
298
|
if User.where(:login => User::ANONYMOUS_API_ADMIN).first.nil?
|
289
299
|
logger.warn("Foreman anonymous admin does not exist, skipping content host migration.")
|
@@ -325,7 +335,11 @@ class MigrateContentHosts < ActiveRecord::Migration
|
|
325
335
|
create_subscription_facet(host, system)
|
326
336
|
|
327
337
|
elsif hosts.where(:organization_id => system.environment.organization.id).empty? # host is not in the correct org
|
328
|
-
|
338
|
+
if hosts[0].organization
|
339
|
+
logger.warn("Found host with hostname #{hostname} but it's in org #{hosts[0].organization.name} instead of #{system.environment.organization.name}.")
|
340
|
+
else
|
341
|
+
logger.warn("Found host with hostname #{hostname} but it is not in an org, and should be in #{system.environment.organization.name}.")
|
342
|
+
end
|
329
343
|
host = hosts.first
|
330
344
|
|
331
345
|
create_content_facet(host, system) unless host.content_facet
|
@@ -20,7 +20,6 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
|
|
20
20
|
var urlMatcher = $urlMatcherFactory.compile("/smart_proxies/:capsuleId");
|
21
21
|
var capsuleId = urlMatcher.exec($location.path()).capsuleId;
|
22
22
|
|
23
|
-
|
24
23
|
function processError(response) {
|
25
24
|
if (response.data && response.data.displayMessage) {
|
26
25
|
$scope.syncErrorMessages = [response.data.displayMessage];
|
@@ -1,15 +1,15 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
* @ngdoc object
|
3
|
+
* @name Bastion.capsule-content.config
|
4
|
+
*
|
5
|
+
* @requires $stateProvider
|
6
|
+
* @requires $urlRouterProvider
|
7
|
+
*
|
8
|
+
* @description
|
9
|
+
* Used for systems level configuration such as setting up the ui state machine.
|
10
|
+
*/
|
10
11
|
angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
|
11
|
-
|
12
|
-
// Catch the url to prevent the router to perform redirect.
|
12
|
+
//Catch the url to prevent the router to perform redirect.
|
13
13
|
$urlRouterProvider.when('/smart_proxies/:proxyId', ['$match', '$stateParams', function ($match, $stateParams) {
|
14
14
|
$stateParams.pageName = 'smart_proxies/detail';
|
15
15
|
return true;
|
@@ -25,5 +25,26 @@ angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterP
|
|
25
25
|
$window.location.href = $location.path();
|
26
26
|
}
|
27
27
|
});
|
28
|
+
}]);
|
28
29
|
|
30
|
+
/**
|
31
|
+
* @ngdoc run
|
32
|
+
* @name Bastion.capsule-content.run
|
33
|
+
*
|
34
|
+
* @requires $rootScope
|
35
|
+
* @requires $window
|
36
|
+
* @requires $timeout
|
37
|
+
*
|
38
|
+
* @description
|
39
|
+
* Ensure foreman's setTab() function is called on capsule content pages.
|
40
|
+
*/
|
41
|
+
angular.module('Bastion.capsule-content').run(['$rootScope', '$window', '$timeout', function ($rootScope, $window, $timeout) {
|
42
|
+
var smartProxiesRegex = new RegExp("/smart_proxies/.+#.+");
|
43
|
+
$rootScope.$on('$locationChangeStart', function (event, newUrl) {
|
44
|
+
if (newUrl.match(smartProxiesRegex)) {
|
45
|
+
$timeout(function () {
|
46
|
+
$window.setTab();
|
47
|
+
});
|
48
|
+
}
|
49
|
+
});
|
29
50
|
}]);
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
|
2
2
|
|
3
3
|
<section ng-hide="denied('edit_hosts', host)" bst-feature-flag="remote_actions">
|
4
|
-
<div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
|
5
4
|
<h4 translate>Package Actions</h4>
|
6
5
|
<p bst-alert="info" ng-hide="contentHost.katello_agent_installed">
|
7
6
|
<span translate>
|
@@ -53,7 +53,7 @@
|
|
53
53
|
<td bst-table-cell colspan="8"></td>
|
54
54
|
</tr>
|
55
55
|
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
|
56
|
-
<td bst-table-cell>{{ subscription
|
56
|
+
<td bst-table-cell>{{ subscription.quantity_consumed }}</td>
|
57
57
|
<td bst-table-cell>
|
58
58
|
<a ui-sref="subscriptions.details.info({subscriptionId: subscription.subscription_id})">
|
59
59
|
{{ subscription | subscriptionConsumedFilter }}
|
@@ -16,7 +16,14 @@
|
|
16
16
|
angular.module('Bastion.content-views').controller('ContentViewDetailsController',
|
17
17
|
['$scope', 'ContentView', 'ContentViewVersion', 'Nutupane', 'AggregateTask', 'translate', 'ApiErrorHandler',
|
18
18
|
function ($scope, ContentView, ContentViewVersion, Nutupane, AggregateTask, translate, ApiErrorHandler) {
|
19
|
+
var nutupane, contentViewId = $scope.$stateParams.contentViewId;
|
19
20
|
|
21
|
+
if ($scope.contentView) {
|
22
|
+
contentViewId = $scope.contentView.id;
|
23
|
+
}
|
24
|
+
|
25
|
+
nutupane = new Nutupane(ContentViewVersion, {'content_view_id': contentViewId});
|
26
|
+
nutupane.masterOnly = true;
|
20
27
|
|
21
28
|
function saveSuccess() {
|
22
29
|
$scope.successMessages = [translate('Content View updated.')];
|
@@ -60,15 +67,21 @@ angular.module('Bastion.content-views').controller('ContentViewDetailsController
|
|
60
67
|
function taskUpdated(version, task) {
|
61
68
|
var taskTypes = $scope.taskTypes;
|
62
69
|
|
63
|
-
if (!task.pending
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
70
|
+
if (!task.pending) {
|
71
|
+
$scope.pendingVersionTask = false;
|
72
|
+
|
73
|
+
if (task.result === 'success') {
|
74
|
+
if (task.label === taskTypes.promotion) {
|
75
|
+
$scope.successMessages.push(promotionMessage(version, task));
|
76
|
+
} else if (task.label === taskTypes.publish) {
|
77
|
+
$scope.successMessages.push(publishMessage(version));
|
78
|
+
} else if (task.label === taskTypes.deletion) {
|
79
|
+
$scope.successMessages.push(deletionMessage(version, task));
|
80
|
+
$scope.reloadVersions();
|
81
|
+
}
|
71
82
|
}
|
83
|
+
} else {
|
84
|
+
$scope.pendingVersionTask = true;
|
72
85
|
}
|
73
86
|
}
|
74
87
|
|
@@ -101,6 +114,10 @@ angular.module('Bastion.content-views').controller('ContentViewDetailsController
|
|
101
114
|
|
102
115
|
$scope.successMessages = [];
|
103
116
|
$scope.errorMessages = [];
|
117
|
+
|
118
|
+
$scope.detailsTable = nutupane.table;
|
119
|
+
$scope.pendingVersionTask = false;
|
120
|
+
|
104
121
|
$scope.panel = {
|
105
122
|
error: false,
|
106
123
|
loading: true
|
@@ -132,14 +149,8 @@ angular.module('Bastion.content-views').controller('ContentViewDetailsController
|
|
132
149
|
};
|
133
150
|
|
134
151
|
$scope.reloadVersions = function () {
|
135
|
-
|
136
|
-
|
137
|
-
'content_view_id': contentViewId
|
138
|
-
});
|
139
|
-
|
140
|
-
nutupane.masterOnly = true;
|
141
|
-
|
142
|
-
$scope.detailsTable = nutupane.table;
|
152
|
+
$scope.detailsTable.rows = [];
|
153
|
+
nutupane.refresh();
|
143
154
|
};
|
144
155
|
|
145
156
|
$scope.$watch('detailsTable.rows', function () {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<form name="errataForm" class="form-horizontal">
|
2
2
|
|
3
|
+
<div data-block="messages" bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
|
3
4
|
<div ng-include="'content-views/details/filters/views/date-type-errata.html'"></div>
|
4
5
|
|
5
6
|
<div bst-form-buttons
|
@@ -3,6 +3,10 @@
|
|
3
3
|
<section class="nutupane-details" ng-cloak bst-container-scroll>
|
4
4
|
<div ng-show="panel.error" bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
|
5
5
|
|
6
|
+
<div bst-alert="info" ng-show="pendingVersionTask">
|
7
|
+
<span translate>Many Content View actions are disabled while a version task is in progress.</span>
|
8
|
+
</div>
|
9
|
+
|
6
10
|
<div ng-hide="panel.error">
|
7
11
|
<header class="details-header row">
|
8
12
|
<h2 class="col-sm-6" ng-hide="contentView.composite">{{ contentView.name }}</h2>
|
@@ -10,20 +14,23 @@
|
|
10
14
|
|
11
15
|
<div class="col-sm-6">
|
12
16
|
<div class="fr">
|
13
|
-
<
|
17
|
+
<button class="btn btn-primary" ng-click="$state.go('content-views.details.publish')"
|
18
|
+
ng-disabled="pendingVersionTask"
|
14
19
|
ng-hide="denied('publish_content_views', contentView)">
|
15
20
|
<i class="fa fa-paste"></i>
|
16
21
|
<span translate>Publish New Version</span>
|
17
|
-
</
|
22
|
+
</button>
|
18
23
|
|
19
|
-
<
|
24
|
+
<button class="btn btn-default"
|
25
|
+
ng-disabled="pendingVersionTask"
|
20
26
|
ng-hide="denied('create_content_views')"
|
21
27
|
ng-click="showCopy = true">
|
22
28
|
<i class="fa fa-copy"></i>
|
23
29
|
<span translate>Copy View</span>
|
24
|
-
</
|
30
|
+
</button>
|
25
31
|
|
26
|
-
<button class="btn btn-default"
|
32
|
+
<button class="btn btn-default" ng-click="$state.go('content-views.details.deletion')"
|
33
|
+
ng-disabled="pendingVersionTask"
|
27
34
|
ng-hide="denied('destroy_content_views', contentView)">
|
28
35
|
<i class="fa fa-trash-o"></i>
|
29
36
|
{{ "Remove View" | translate }}
|
@@ -73,18 +73,18 @@
|
|
73
73
|
</td>
|
74
74
|
<td class="col-sm-2">
|
75
75
|
<button class="btn btn-default"
|
76
|
-
|
76
|
+
ng-click="$state.go('content-views.details.promotion', {contentViewId: contentView.id, versionId: version.id})"
|
77
77
|
ng-hide="denied('promote_or_remove_content_views', contentView)"
|
78
|
-
ng-disabled="taskInProgress(version) || taskFailed(version)">
|
78
|
+
ng-disabled="taskInProgress(version) || taskFailed(version) || pendingVersionTask">
|
79
79
|
<i class="fa fa-share-alt"></i>
|
80
80
|
<span translate>
|
81
81
|
Promote
|
82
82
|
</span>
|
83
83
|
</button>
|
84
84
|
<button class="btn btn-default"
|
85
|
-
|
85
|
+
ng-click="$state.go('content-views.details.version-deletion.environments', {contentViewId: contentView.id, versionId: version.id})"
|
86
86
|
ng-hide="denied('promote_or_remove_content_views', contentView)"
|
87
|
-
ng-disabled="taskInProgress(version) || taskFailed(version)">
|
87
|
+
ng-disabled="taskInProgress(version) || taskFailed(version) || pendingVersionTask">
|
88
88
|
<i class="fa fa-trash-o"></i>
|
89
89
|
<span translate>
|
90
90
|
Remove
|
data/lib/katello/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.rc7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -709,7 +709,7 @@ files:
|
|
709
709
|
- app/lib/actions/pulp/repository/import_upload.rb
|
710
710
|
- app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb
|
711
711
|
- app/lib/actions/pulp/repository/presenters/docker_presenter.rb
|
712
|
-
- app/lib/actions/pulp/repository/presenters/
|
712
|
+
- app/lib/actions/pulp/repository/presenters/file_presenter.rb
|
713
713
|
- app/lib/actions/pulp/repository/presenters/ostree_presenter.rb
|
714
714
|
- app/lib/actions/pulp/repository/presenters/puppet_presenter.rb
|
715
715
|
- app/lib/actions/pulp/repository/presenters/yum_presenter.rb
|