katello 3.9.0.rc1 → 3.9.0.rc2
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/lib/katello/validators/root_repository_unique_attribute_validator.rb +1 -1
- data/app/models/setting/content.rb +37 -11
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/api-error-handler.service.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +6 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -6
- data/lib/katello/engine.rb +0 -4
- data/lib/katello/version.rb +1 -1
- metadata +2 -3
- data/app/helpers/katello/concerns/settings_helper_extensions.rb +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6b967f06b8ebbd4d5c372ac7050103056ef3ce7
|
4
|
+
data.tar.gz: 200524bd0eeb8414e2fde6f9b83a25a5a3e2a132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca4ef8d5bb1adb3fed0aea35a251bc421aef8c79a85b0dcdef212baf2ecbdd0301c7dbfa0edb166978fb637e3fbfd7e15ccb5648b753c056be970494b32c4a73
|
7
|
+
data.tar.gz: 519c7b6e9f4817efa2e8fedebdc6e6117228a15f3cdf196e3904458938c1fdc845535aa3a00ab70aec4e8bf242bd87840f7e5bd7b664b40a33ab7c1a11c66e87
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class RootRepositoryUniqueAttributeValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
|
-
exists = RootRepository.where(attribute => value).where("id != ?", record.id || -1).exists?
|
5
|
+
exists = RootRepository.where(:product_id => record.product_id, attribute => value).where("id != ?", record.id || -1).exists?
|
6
6
|
|
7
7
|
if record.send("#{attribute}_changed?") && record.custom? && exists
|
8
8
|
record.errors[attribute] << _("has already been taken for this product.")
|
@@ -13,25 +13,46 @@ class Setting::Content < Setting
|
|
13
13
|
self.transaction do
|
14
14
|
[
|
15
15
|
self.set('katello_default_provision', N_("Default provisioning template for Operating Systems created from synced content"),
|
16
|
-
'Kickstart default', N_('Default synced OS provisioning template')
|
17
|
-
|
18
|
-
|
16
|
+
'Kickstart default', N_('Default synced OS provisioning template'),
|
17
|
+
nil, :collection => proc { katello_template_setting_values("provision") }
|
18
|
+
),
|
19
|
+
self.set('katello_default_finish',
|
20
|
+
N_("Default finish template for new Operating Systems created from synced content"),
|
21
|
+
'Kickstart default finish', N_('Default synced OS finish template'),
|
22
|
+
nil, :collection => proc { katello_template_setting_values("finish") }
|
23
|
+
),
|
19
24
|
self.set('katello_default_user_data', N_("Default user data for new Operating Systems created from synced content"),
|
20
|
-
'Kickstart default user data', N_('Default synced OS user-data')
|
25
|
+
'Kickstart default user data', N_('Default synced OS user-data'),
|
26
|
+
nil, :collection => proc { katello_template_setting_values("user_data") }
|
27
|
+
),
|
21
28
|
self.set('katello_default_PXELinux', N_("Default PXELinux template for new Operating Systems created from synced content"),
|
22
|
-
'Kickstart default PXELinux', N_('Default synced OS PXELinux template')
|
29
|
+
'Kickstart default PXELinux', N_('Default synced OS PXELinux template'),
|
30
|
+
nil, :collection => proc { katello_template_setting_values("PXELinux") }
|
31
|
+
),
|
23
32
|
self.set('katello_default_PXEGrub', N_("Default PXEGrub template for new Operating Systems created from synced content"),
|
24
|
-
'Kickstart default PXEGrub', N_('Default synced OS PXEGrub template')
|
33
|
+
'Kickstart default PXEGrub', N_('Default synced OS PXEGrub template'),
|
34
|
+
nil, :collection => proc { katello_template_setting_values("PXEGrub") }
|
35
|
+
),
|
25
36
|
self.set('katello_default_PXEGrub2', N_("Default PXEGrub2 template for new Operating Systems created from synced content"),
|
26
|
-
'Kickstart default PXEGrub2', N_('Default synced OS PXEGrub2 template')
|
37
|
+
'Kickstart default PXEGrub2', N_('Default synced OS PXEGrub2 template'),
|
38
|
+
nil, :collection => proc { katello_template_setting_values("PXEGrub2") }
|
39
|
+
),
|
27
40
|
self.set('katello_default_iPXE', N_("Default iPXE template for new Operating Systems created from synced content"),
|
28
|
-
'Kickstart default iPXE', N_('Default synced OS iPXE template')
|
41
|
+
'Kickstart default iPXE', N_('Default synced OS iPXE template'),
|
42
|
+
nil, :collection => proc { katello_template_setting_values("iPXE") }
|
43
|
+
),
|
29
44
|
self.set('katello_default_ptable', N_("Default partitioning table for new Operating Systems created from synced content"),
|
30
|
-
'Kickstart default', N_('Default synced OS partition table')
|
45
|
+
'Kickstart default', N_('Default synced OS partition table'),
|
46
|
+
nil, :collection => proc { Hash[Template.all.where(:type => "Ptable").map { |tmp| [tmp[:name], tmp[:name]] }] }
|
47
|
+
),
|
31
48
|
self.set('katello_default_kexec', N_("Default kexec template for new Operating Systems created from synced content"),
|
32
|
-
'Discovery Red Hat kexec', N_('Default synced OS kexec template')
|
49
|
+
'Discovery Red Hat kexec', N_('Default synced OS kexec template'),
|
50
|
+
nil, :collection => proc { katello_template_setting_values("kexec") }
|
51
|
+
),
|
33
52
|
self.set('katello_default_atomic_provision', N_("Default provisioning template for new Atomic Operating Systems created from synced content"),
|
34
|
-
'Atomic Kickstart default', N_('Default synced OS Atomic template')
|
53
|
+
'Atomic Kickstart default', N_('Default synced OS Atomic template'),
|
54
|
+
nil, :collection => proc { katello_template_setting_values("provision") }
|
55
|
+
),
|
35
56
|
self.set('manifest_refresh_timeout', N_('Timeout when refreshing a manifest (in seconds)'), 60 * 20, N_("Manifest refresh timeout")),
|
36
57
|
self.set('content_action_accept_timeout', N_("Time in seconds to wait for a Host to pickup a remote action"),
|
37
58
|
20, N_('Accept action timeout')),
|
@@ -83,6 +104,11 @@ class Setting::Content < Setting
|
|
83
104
|
end
|
84
105
|
true
|
85
106
|
end
|
107
|
+
|
108
|
+
def self.katello_template_setting_values(name)
|
109
|
+
templates = ProvisioningTemplate.where(:template_kind => TemplateKind.where(:name => name))
|
110
|
+
templates.each_with_object({}) { |tmpl, hash| hash[tmpl.name] = tmpl.name }
|
111
|
+
end
|
86
112
|
end
|
87
113
|
|
88
114
|
# If the database is not migrated yet, the system will not be able to load
|
@@ -3,12 +3,11 @@ object @resource
|
|
3
3
|
extends 'katello/api/v2/common/identifier'
|
4
4
|
|
5
5
|
attributes :pulp_id => :backend_identifier
|
6
|
-
attributes :relative_path
|
6
|
+
attributes :relative_path, :container_repository_name, :full_path
|
7
7
|
|
8
8
|
glue(@object.root) do
|
9
9
|
attributes :content_type, :url, :arch, :content_id
|
10
10
|
attributes :major, :minor
|
11
|
-
attributes :container_repository_name
|
12
11
|
|
13
12
|
child :product do |_product|
|
14
13
|
attributes :id, :cp_id, :name
|
@@ -19,7 +19,6 @@ glue(@resource.root) do
|
|
19
19
|
attributes :ssl_client_key_id
|
20
20
|
|
21
21
|
attributes :product_type
|
22
|
-
attributes :ostree_branch_names => :ostree_branches
|
23
22
|
attributes :upstream_username
|
24
23
|
attributes :ostree_upstream_sync_policy, :ostree_upstream_sync_depth
|
25
24
|
attributes :compute_ostree_upstream_sync_depth => :computed_ostree_upstream_sync_depth
|
@@ -45,6 +44,7 @@ glue(@resource.root) do
|
|
45
44
|
end
|
46
45
|
end
|
47
46
|
|
47
|
+
attributes :ostree_branch_names => :ostree_branches
|
48
48
|
attributes :relative_path
|
49
49
|
attributes :promoted? => :promoted
|
50
50
|
attributes :content_view_version_id, :library_instance_id
|
@@ -32,6 +32,11 @@
|
|
32
32
|
var defaultErrorMessage = translate('Something went wrong when saving the resource.');
|
33
33
|
handleError(response, $scope, defaultErrorMessage);
|
34
34
|
};
|
35
|
+
|
36
|
+
this.handleDELETERequestErrors = function (response, $scope) {
|
37
|
+
var defaultErrorMessage = translate('Something went wrong when deleting the resource.');
|
38
|
+
handleError(response, $scope, defaultErrorMessage);
|
39
|
+
};
|
35
40
|
}
|
36
41
|
|
37
42
|
angular.module('Bastion.common').service('ApiErrorHandler', ApiErrorHandler);
|
@@ -25,7 +25,7 @@ angular.module('Bastion.content-credentials').controller('ContentCredentialsCont
|
|
25
25
|
};
|
26
26
|
|
27
27
|
var nutupane = new Nutupane(ContentCredential, params);
|
28
|
-
$scope.controllerName = '
|
28
|
+
$scope.controllerName = 'katello_gpg_keys';
|
29
29
|
$scope.table = nutupane.table;
|
30
30
|
$scope.panel = {loading: false};
|
31
31
|
$scope.removeRow = nutupane.removeRow;
|
@@ -15,7 +15,7 @@
|
|
15
15
|
var nutupane = new Nutupane(ContentCredential, {
|
16
16
|
id: $scope.$stateParams.contentCredentialId
|
17
17
|
}, 'products');
|
18
|
-
$scope.controllerName = '
|
18
|
+
$scope.controllerName = 'katello_gpg_keys';
|
19
19
|
nutupane.masterOnly = true;
|
20
20
|
|
21
21
|
$scope.panel = $scope.panel || {error: false, loading: false};
|
@@ -15,7 +15,7 @@
|
|
15
15
|
var nutupane = new Nutupane(ContentCredential, {
|
16
16
|
id: $scope.$stateParams.contentCredentialId
|
17
17
|
}, 'repositories');
|
18
|
-
$scope.controllerName = '
|
18
|
+
$scope.controllerName = 'katello_gpg_keys';
|
19
19
|
nutupane.masterOnly = true;
|
20
20
|
|
21
21
|
$scope.panel = $scope.panel || {error: false, loading: false};
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* Provides the functionality for the product details action pane.
|
15
15
|
*/
|
16
16
|
angular.module('Bastion.products').controller('ProductDetailsController',
|
17
|
-
['$scope', '$state', '$uibModal', 'translate', 'Product', 'Notification', 'ApiErrorHandler', function ($scope, $state, $uibModal, translate, Product, Notification, ApiErrorHandler) {
|
17
|
+
['$rootScope', '$scope', '$state', '$uibModal', 'translate', 'Product', 'Notification', 'ApiErrorHandler', function ($rootScope, $scope, $state, $uibModal, translate, Product, Notification, ApiErrorHandler) {
|
18
18
|
$scope.page = {
|
19
19
|
error: false,
|
20
20
|
loading: true
|
@@ -33,8 +33,11 @@ angular.module('Bastion.products').controller('ProductDetailsController',
|
|
33
33
|
|
34
34
|
$scope.removeProduct = function (product) {
|
35
35
|
product.$delete(function (data) {
|
36
|
-
$scope
|
37
|
-
|
36
|
+
$scope.transitionTo('products').then(function() {
|
37
|
+
$rootScope.$broadcast('productDelete', data.id);
|
38
|
+
});
|
39
|
+
}, function (data) {
|
40
|
+
ApiErrorHandler.handleDELETERequestErrors(data, $scope);
|
38
41
|
});
|
39
42
|
};
|
40
43
|
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
angular.module('Bastion.products').controller('ProductsController',
|
22
22
|
['$scope', '$state', '$sce', '$location', '$uibModal', 'translate', 'Nutupane', 'Product', 'ProductBulkAction', 'CurrentOrganization', 'Notification',
|
23
23
|
function ($scope, $state, $sce, $location, $uibModal, translate, Nutupane, Product, ProductBulkAction, CurrentOrganization, Notification) {
|
24
|
-
var nutupane, nutupaneParams,
|
24
|
+
var nutupane, nutupaneParams, taskLink, getBulkParams, bulkError, params;
|
25
25
|
|
26
26
|
getBulkParams = function () {
|
27
27
|
return {
|
@@ -60,11 +60,12 @@ angular.module('Bastion.products').controller('ProductsController',
|
|
60
60
|
$scope.table = nutupane.table;
|
61
61
|
|
62
62
|
$scope.$on('productDelete', function (event, taskId) {
|
63
|
-
var message;
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
var message = translate("Product delete operation has been initiated in the background.");
|
64
|
+
Notification.setSuccessMessage(message, {
|
65
|
+
link: {
|
66
|
+
children: translate("Click to view task"),
|
67
|
+
href: translate("/foreman_tasks/tasks/%taskId").replace('%taskId', taskId)
|
68
|
+
}});
|
68
69
|
});
|
69
70
|
|
70
71
|
$scope.unsetProductDeletionTaskId = function () {
|
data/lib/katello/engine.rb
CHANGED
@@ -202,10 +202,6 @@ module Katello
|
|
202
202
|
::Api::V2::HostgroupsController.send :include, Katello::Concerns::Api::V2::HostgroupsControllerExtensions
|
203
203
|
::Api::V2::SmartProxiesController.send :include, Katello::Concerns::Api::V2::SmartProxiesControllerExtensions
|
204
204
|
|
205
|
-
::SettingsController.class_eval do
|
206
|
-
helper Katello::Concerns::SettingsHelperExtensions
|
207
|
-
end
|
208
|
-
|
209
205
|
Katello::EventQueue.register_event(Katello::Events::ImportHostApplicability::EVENT_TYPE, Katello::Events::ImportHostApplicability)
|
210
206
|
Katello::EventQueue.register_event(Katello::Events::ImportPool::EVENT_TYPE, Katello::Events::ImportPool)
|
211
207
|
|
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.9.0.
|
4
|
+
version: 3.9.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -532,7 +532,6 @@ files:
|
|
532
532
|
- app/helpers/katello/concerns/dashboard_helper_extensions.rb
|
533
533
|
- app/helpers/katello/concerns/foreman_docker/container_steps_helper_extensions.rb
|
534
534
|
- app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb
|
535
|
-
- app/helpers/katello/concerns/settings_helper_extensions.rb
|
536
535
|
- app/helpers/katello/concerns/smart_proxy_helper_extensions.rb
|
537
536
|
- app/helpers/katello/errata_mailer_helper.rb
|
538
537
|
- app/helpers/katello/hosts_and_hostgroups_helper.rb
|
@@ -1,60 +0,0 @@
|
|
1
|
-
module Katello
|
2
|
-
module Concerns
|
3
|
-
module SettingsHelperExtensions
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
module Overrides
|
7
|
-
# rubocop:disable MethodLength
|
8
|
-
def value(setting)
|
9
|
-
return super(setting) unless [
|
10
|
-
'default_download_policy',
|
11
|
-
'katello_default_finish',
|
12
|
-
'katello_default_iPXE',
|
13
|
-
'katello_default_provision',
|
14
|
-
'katello_default_ptable',
|
15
|
-
'katello_default_PXELinux',
|
16
|
-
'katello_default_PXEGrub',
|
17
|
-
'katello_default_PXEGrub2',
|
18
|
-
'katello_default_user_data',
|
19
|
-
'katello_default_kexec',
|
20
|
-
'katello_default_atomic_provision'
|
21
|
-
].include?(setting.name)
|
22
|
-
|
23
|
-
case setting.name
|
24
|
-
when "default_download_policy"
|
25
|
-
edit_select(setting, :value, :select_values => Hash[::Runcible::Models::YumImporter::DOWNLOAD_POLICIES.collect { |p| [p, p] }].to_json)
|
26
|
-
when "katello_default_finish"
|
27
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("finish"))
|
28
|
-
when "katello_default_iPXE"
|
29
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("iPXE"))
|
30
|
-
when "katello_default_provision", "katello_default_atomic_provision"
|
31
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("provision"))
|
32
|
-
when "katello_default_ptable"
|
33
|
-
edit_select(setting, :value, :select_values => Hash[Template.all.where(:type => "Ptable").map { |tmp| [tmp[:name], tmp[:name]] }].to_json)
|
34
|
-
when "katello_default_PXELinux"
|
35
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("PXELinux"))
|
36
|
-
when "katello_default_PXEGrub"
|
37
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("PXEGrub"))
|
38
|
-
when "katello_default_PXEGrub2"
|
39
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("PXEGrub2"))
|
40
|
-
when "katello_default_user_data"
|
41
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("user_data"))
|
42
|
-
when "katello_default_kexec"
|
43
|
-
edit_select(setting, :value, :select_values => katello_template_setting_values("kexec"))
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
included do
|
49
|
-
prepend Overrides
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def katello_template_setting_values(name)
|
55
|
-
templates = ProvisioningTemplate.where(:template_kind => TemplateKind.where(:name => name))
|
56
|
-
templates.each_with_object({}) { |tmpl, hash| hash[tmpl.name] = tmpl.name }.to_json
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|