katello 3.0.0.rc4 → 3.0.0.rc5
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/hosts/host_and_hostgroup_edit.js +129 -47
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +9 -0
- data/app/controllers/katello/api/v2/api_controller.rb +13 -6
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +0 -2
- data/app/controllers/katello/api/v2/host_collections_controller.rb +4 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +10 -4
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +3 -3
- data/app/controllers/katello/api/v2/systems_controller.rb +4 -1
- data/app/controllers/katello/application_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +125 -3
- data/app/lib/actions/candlepin/owner/refresh_subscriptions.rb +15 -0
- data/app/lib/actions/katello/host/register.rb +2 -2
- data/app/lib/actions/katello/product/create.rb +20 -15
- data/app/lib/actions/katello/repository/clone_yum_content.rb +4 -3
- data/app/lib/actions/katello/repository/index_errata.rb +0 -3
- data/app/lib/actions/pulp/repository/purge_empty_errata.rb +2 -8
- data/app/lib/actions/pulp/repository/purge_empty_package_groups.rb +3 -5
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -2
- data/app/lib/katello/resources/candlepin.rb +0 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +7 -2
- data/app/models/katello/concerns/hostgroup_extensions.rb +6 -2
- data/app/models/katello/concerns/redhat_extensions.rb +11 -5
- data/app/models/katello/content_view.rb +0 -35
- data/app/models/katello/erratum.rb +2 -1
- data/app/models/katello/host/content_facet.rb +2 -1
- data/app/models/katello/repository.rb +26 -0
- data/app/models/katello/rhsm_fact_parser.rb +6 -2
- data/app/models/setting/katello.rb +2 -2
- data/app/overrides/add_activation_keys_input.rb +10 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -0
- data/app/views/katello/api/v2/host_collections/{_host_collection.json.rabl → base.json.rabl} +0 -0
- data/app/views/katello/api/v2/host_collections/copy.json.rabl +1 -1
- data/app/views/katello/api/v2/host_collections/create.json.rabl +1 -1
- data/app/views/katello/api/v2/host_collections/index.json.rabl +5 -1
- data/app/views/katello/api/v2/host_collections/show.json.rabl +2 -1
- data/app/views/katello/api/v2/host_collections/update.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +5 -0
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +12 -14
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +26 -0
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +24 -0
- data/config/routes/overrides.rb +2 -6
- data/db/migrate/20150930183738_migrate_content_hosts.rb +5 -0
- data/db/migrate/20160413230128_add_kickstart_repository_to_hosts_and_hostgroups.rb +9 -0
- data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +27 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-details-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js +14 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js +12 -0
- 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/sync-plans/new/new-sync-plan.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +1 -0
- data/lib/katello/engine.rb +5 -1
- data/lib/katello/tasks/clean_backend_objects.rake +6 -0
- data/lib/katello/version.rb +1 -1
- metadata +10 -5
- data/app/controllers/katello/concerns/operatingsystems_controller_extensions.rb +0 -34
- data/lib/katello/permissions/operatingsystems_permissions.rb +0 -5
@@ -48,12 +48,12 @@ angular.module('Bastion.products').controller('ProductDetailsController',
|
|
48
48
|
var readOnlyReason = null;
|
49
49
|
|
50
50
|
if (product.$resolved) {
|
51
|
-
if (
|
51
|
+
if (product.redhat) {
|
52
|
+
readOnlyReason = 'redhat';
|
53
|
+
} else if ($scope.denied('destroy_products', product)) {
|
52
54
|
readOnlyReason = 'permissions';
|
53
55
|
} else if (product['published_content_view_ids'].length > 0) {
|
54
56
|
readOnlyReason = 'published';
|
55
|
-
} else if (product.redhat) {
|
56
|
-
readOnlyReason = 'redhat';
|
57
57
|
}
|
58
58
|
}
|
59
59
|
|
@@ -20,17 +20,17 @@
|
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<span ng-switch="getReadOnlyReason(product)" bst-feature-flag="custom_products">
|
23
|
-
<i class="fa fa-question-
|
23
|
+
<i class="fa fa-question-circle" ng-switch-when="permissions"
|
24
24
|
tooltip="{{ 'You cannot remove this product because you do not have permission.' | translate }}"
|
25
25
|
tooltip-animation="false"
|
26
26
|
tooltip-append-to-body="true">
|
27
27
|
</i>
|
28
|
-
<i class="fa fa-question-
|
28
|
+
<i class="fa fa-question-circle" ng-switch-when="published"
|
29
29
|
tooltip="{{ 'You cannot remove this product because it was published to a content view.' | translate }}"
|
30
30
|
tooltip-animation="false"
|
31
31
|
tooltip-append-to-body="true">
|
32
32
|
</i>
|
33
|
-
<i class="fa fa-question-
|
33
|
+
<i class="fa fa-question-circle" ng-switch-when="redhat"
|
34
34
|
tooltip="{{ 'You cannot remove this product because it is a Red Hat product.' | translate }}"
|
35
35
|
tooltip-animation="false"
|
36
36
|
tooltip-append-to-body="true">
|
@@ -38,7 +38,7 @@
|
|
38
38
|
</span>
|
39
39
|
|
40
40
|
<button class="btn btn-default" bst-feature-flag="custom_products"
|
41
|
-
ng-
|
41
|
+
ng-disabled="!productDeletable(product)"
|
42
42
|
ng-click="openModal()">
|
43
43
|
<i class="fa fa-trash-o"></i>
|
44
44
|
{{ "Remove Product" | translate }}
|
@@ -7,13 +7,15 @@
|
|
7
7
|
* @requires GPGKey
|
8
8
|
* @requires FormUtils
|
9
9
|
* @requires translate
|
10
|
+
* @requires Setting
|
11
|
+
* @requires ApiErrorHandler
|
10
12
|
*
|
11
13
|
* @description
|
12
14
|
* Controls the creation of an empty Repository object for use by sub-controllers.
|
13
15
|
*/
|
14
16
|
angular.module('Bastion.repositories').controller('NewRepositoryController',
|
15
|
-
['$scope', 'Repository', 'GPGKey', 'FormUtils', 'translate', 'GlobalNotification',
|
16
|
-
function ($scope, Repository, GPGKey, FormUtils, translate, GlobalNotification) {
|
17
|
+
['$scope', 'Repository', 'GPGKey', 'FormUtils', 'translate', 'GlobalNotification', 'Setting', 'ApiErrorHandler',
|
18
|
+
function ($scope, Repository, GPGKey, FormUtils, translate, GlobalNotification, Setting, ApiErrorHandler) {
|
17
19
|
|
18
20
|
function success(response) {
|
19
21
|
$scope.detailsTable.rows.push(response);
|
@@ -48,6 +50,13 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
48
50
|
$scope.repository = new Repository({'product_id': $scope.$stateParams.productId, unprotected: true,
|
49
51
|
'checksum_type': null, 'download_policy': null, 'mirror_on_sync': true});
|
50
52
|
|
53
|
+
Setting.get({"search": "name = default_download_policy"},
|
54
|
+
function (data) {
|
55
|
+
$scope.repository['download_policy'] = data.results[0].value;
|
56
|
+
}, function (data) {
|
57
|
+
ApiErrorHandler.handleGETRequestErrors(data, $scope);
|
58
|
+
});
|
59
|
+
|
51
60
|
Repository.repositoryTypes({'creatable': true}, function (data) {
|
52
61
|
$scope.repositoryTypes = data;
|
53
62
|
});
|
@@ -67,6 +76,9 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
67
76
|
if (repository.content_type === 'ostree') {
|
68
77
|
repository.unprotected = false;
|
69
78
|
}
|
79
|
+
if (repository.content_type !== 'yum') {
|
80
|
+
repository['download_policy'] = '';
|
81
|
+
}
|
70
82
|
repository.$save(success, error);
|
71
83
|
};
|
72
84
|
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* @ngdoc service
|
3
|
+
* @name Bastion.settings.factory:Setting
|
4
|
+
*
|
5
|
+
* @requires BastionResource
|
6
|
+
*
|
7
|
+
* @description
|
8
|
+
* Provides a BastionResource for a Setting.
|
9
|
+
*/
|
10
|
+
angular.module('Bastion.settings').factory('Setting',
|
11
|
+
['BastionResource', function (BastionResource) {
|
12
|
+
var resource = BastionResource('/api/v2/settings/');
|
13
|
+
return resource;
|
14
|
+
}]
|
15
|
+
);
|
@@ -54,7 +54,7 @@
|
|
54
54
|
<td bst-table-cell>{{ contentHost.service_level }}</td>
|
55
55
|
<td bst-table-cell>{{ contentHost.facts.cpu['cpu_socket(s)'] }}</td>
|
56
56
|
<td bst-table-cell>{{ contentHost.facts.cpu['core(s)_per_socket'] }}</td>
|
57
|
-
<td bst-table-cell>{{
|
57
|
+
<td bst-table-cell>{{ contentHost.facts.dmi.memory['size'] }}</td>
|
58
58
|
</tr>
|
59
59
|
</tbody>
|
60
60
|
</table>
|
@@ -25,6 +25,7 @@ angular.module('Bastion.sync-plans').controller('NewSyncPlanController',
|
|
25
25
|
function success(syncPlan) {
|
26
26
|
$scope.working = false;
|
27
27
|
GlobalNotification.setSuccessMessage(translate('New sync plan successfully created.'));
|
28
|
+
$scope.nutupane.refresh();
|
28
29
|
if ($scope.product) {
|
29
30
|
$scope.product['sync_plan_id'] = syncPlan.id;
|
30
31
|
$scope.$state.go('products.details.info', {productId: $scope.product.id});
|
@@ -48,6 +48,7 @@ angular.module('Bastion.sync-plans').controller('SyncPlansController',
|
|
48
48
|
syncPlan.$remove(function () {
|
49
49
|
GlobalNotification.setSuccessMessage(translate('Sync Plan %s has been deleted.').replace('%s', syncPlan.name));
|
50
50
|
$scope.removeRow(syncPlan.id);
|
51
|
+
$scope.nutupane.refresh();
|
51
52
|
$scope.transitionTo('sync-plans.index');
|
52
53
|
});
|
53
54
|
};
|
data/lib/katello/engine.rb
CHANGED
@@ -149,6 +149,11 @@ module Katello
|
|
149
149
|
fail Foreman::Exception, N_("Organizations disabled, try allowing them in foreman/config/settings.yaml")
|
150
150
|
end
|
151
151
|
|
152
|
+
# Rendering concerns needs to be injected to controllers, Foreman::Renderer was already included
|
153
|
+
# otherwise subscription_manager_configuration_url is not available in template preview
|
154
|
+
(TemplatesController.descendants + [TemplatesController]).each do |klass|
|
155
|
+
klass.send(:include, Katello::KatelloUrlsHelper)
|
156
|
+
end
|
152
157
|
# Lib Extensions
|
153
158
|
::Foreman::Renderer.send :include, Katello::Concerns::RendererExtensions
|
154
159
|
|
@@ -170,7 +175,6 @@ module Katello
|
|
170
175
|
::DockerContainerWizardState.send :include, Katello::Concerns::DockerContainerWizardStateExtensions
|
171
176
|
|
172
177
|
#Controller extensions
|
173
|
-
::OperatingsystemsController.send :include, Katello::Concerns::OperatingsystemsControllerExtensions
|
174
178
|
::HostsController.send :include, Katello::Concerns::HostsControllerExtensions
|
175
179
|
::SmartProxiesController.send :include, Katello::Concerns::SmartProxiesControllerExtensions
|
176
180
|
::Containers::StepsController.send :include, Katello::Concerns::Containers::StepsControllerExtensions
|
@@ -58,6 +58,12 @@ namespace :katello do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
# check services first
|
62
|
+
result = ::Katello::Ping.ping
|
63
|
+
if result[:status] != ::Katello::Ping::OK_RETURN_CODE
|
64
|
+
fail "Could not connect to service: #{result[:message]}"
|
65
|
+
end
|
66
|
+
|
61
67
|
User.current = User.anonymous_admin
|
62
68
|
cleanup_systems
|
63
69
|
cleanup_host_delete_artifacts
|
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.rc5
|
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-
|
11
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -479,7 +479,6 @@ files:
|
|
479
479
|
- app/controllers/katello/concerns/containers/steps_controller_extensions.rb
|
480
480
|
- app/controllers/katello/concerns/filtered_auto_complete_search.rb
|
481
481
|
- app/controllers/katello/concerns/hosts_controller_extensions.rb
|
482
|
-
- app/controllers/katello/concerns/operatingsystems_controller_extensions.rb
|
483
482
|
- app/controllers/katello/concerns/organizations_controller_extensions.rb
|
484
483
|
- app/controllers/katello/concerns/smart_proxies_controller_extensions.rb
|
485
484
|
- app/controllers/katello/errata_controller.rb
|
@@ -535,6 +534,7 @@ files:
|
|
535
534
|
- app/lib/actions/candlepin/owner/auto_attach.rb
|
536
535
|
- app/lib/actions/candlepin/owner/create.rb
|
537
536
|
- app/lib/actions/candlepin/owner/destroy.rb
|
537
|
+
- app/lib/actions/candlepin/owner/refresh_subscriptions.rb
|
538
538
|
- app/lib/actions/candlepin/product/content_add.rb
|
539
539
|
- app/lib/actions/candlepin/product/content_create.rb
|
540
540
|
- app/lib/actions/candlepin/product/content_destroy.rb
|
@@ -1030,7 +1030,7 @@ files:
|
|
1030
1030
|
- app/views/katello/api/v2/gpg_keys/index.json.rabl
|
1031
1031
|
- app/views/katello/api/v2/gpg_keys/show.json.rabl
|
1032
1032
|
- app/views/katello/api/v2/host_collection_errata/index.json.rabl
|
1033
|
-
- app/views/katello/api/v2/host_collections/
|
1033
|
+
- app/views/katello/api/v2/host_collections/base.json.rabl
|
1034
1034
|
- app/views/katello/api/v2/host_collections/copy.json.rabl
|
1035
1035
|
- app/views/katello/api/v2/host_collections/create.json.rabl
|
1036
1036
|
- app/views/katello/api/v2/host_collections/delta_activation_keys.rabl
|
@@ -1169,6 +1169,8 @@ files:
|
|
1169
1169
|
- app/views/overrides/about/_support_documentation.html.erb
|
1170
1170
|
- app/views/overrides/about/_system_status.html.erb
|
1171
1171
|
- app/views/overrides/activation_keys/_host_environment_select.html.erb
|
1172
|
+
- app/views/overrides/activation_keys/_host_media_type_select.html.erb
|
1173
|
+
- app/views/overrides/activation_keys/_host_synced_content_select.html.erb
|
1172
1174
|
- app/views/overrides/activation_keys/_host_tab.html.erb
|
1173
1175
|
- app/views/overrides/activation_keys/_host_tab_pane.html.erb
|
1174
1176
|
- app/views/overrides/hosts/_subscription_link.html.erb
|
@@ -1332,6 +1334,8 @@ files:
|
|
1332
1334
|
- db/migrate/20160317171813_change_activation_key_column_names.rb
|
1333
1335
|
- db/migrate/20160323065901_increase_cdn_length.rb
|
1334
1336
|
- db/migrate/20160404132250_remove_katello_from_notification_name.rb
|
1337
|
+
- db/migrate/20160413230128_add_kickstart_repository_to_hosts_and_hostgroups.rb
|
1338
|
+
- db/migrate/20160426145517_move_host_description_to_host_comment.rb
|
1335
1339
|
- db/seeds.d/101-locations.rb
|
1336
1340
|
- db/seeds.d/102-organizations.rb
|
1337
1341
|
- db/seeds.d/103-provisioning_templates.rb
|
@@ -1724,6 +1728,8 @@ files:
|
|
1724
1728
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/views/repository-new.html
|
1725
1729
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repositories.module.js
|
1726
1730
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js
|
1731
|
+
- engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js
|
1732
|
+
- engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js
|
1727
1733
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-activation-keys.controller.js
|
1728
1734
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js
|
1729
1735
|
- engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js
|
@@ -1811,7 +1817,6 @@ files:
|
|
1811
1817
|
- lib/katello/permissions/host_collections_permissions.rb
|
1812
1818
|
- lib/katello/permissions/host_permissions.rb
|
1813
1819
|
- lib/katello/permissions/lifecycle_environment_permissions.rb
|
1814
|
-
- lib/katello/permissions/operatingsystems_permissions.rb
|
1815
1820
|
- lib/katello/permissions/organization_permissions.rb
|
1816
1821
|
- lib/katello/permissions/product_permissions.rb
|
1817
1822
|
- lib/katello/permissions/subscription_permissions.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Katello
|
2
|
-
module Concerns
|
3
|
-
module OperatingsystemsControllerExtensions
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
def available_kickstart_repo
|
7
|
-
host = ::Host.new
|
8
|
-
host.operatingsystem = Operatingsystem.find(params[:id])
|
9
|
-
host.architecture = Architecture.find(params[:architecture_id])
|
10
|
-
|
11
|
-
lifecycle_env = Katello::KTEnvironment.find(params[:lifecycle_environment_id])
|
12
|
-
content_view = Katello::ContentView.find(params[:content_view_id])
|
13
|
-
host.content_facet = Host::ContentFacet.new(:lifecycle_environment_id => lifecycle_env.id,
|
14
|
-
:content_view_id => content_view.id)
|
15
|
-
host.content_source = SmartProxy.find(params[:content_source_id])
|
16
|
-
|
17
|
-
if host.operatingsystem.is_a?(Redhat)
|
18
|
-
render :json => host.operatingsystem.kickstart_repo(host)
|
19
|
-
else
|
20
|
-
render :json => nil
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def action_permission
|
25
|
-
case params[:action]
|
26
|
-
when 'available_kickstart_repo'
|
27
|
-
'view'
|
28
|
-
else
|
29
|
-
super
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|