katello 3.7.1.1 → 3.8.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +8 -7
- data/app/assets/javascripts/katello/common/index.js +0 -1
- data/app/assets/javascripts/katello/sync_management/index.js +0 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +477 -0
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -2
- data/app/controllers/katello/api/v2/api_controller.rb +3 -1
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +15 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +5 -2
- data/app/controllers/katello/api/v2/errata_controller.rb +48 -34
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_packages_controller.rb +5 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
- data/app/controllers/katello/api/v2/packages_controller.rb +33 -22
- data/app/controllers/katello/api/v2/products_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -5
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -10
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +20 -12
- data/app/controllers/katello/remote_execution_controller.rb +6 -6
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +9 -37
- data/app/lib/actions/katello/content_view/promote.rb +6 -2
- data/app/lib/actions/katello/content_view_version/after_promote_hook.rb +11 -0
- data/app/lib/actions/katello/content_view_version/before_promote_hook.rb +11 -0
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -12
- data/app/lib/actions/pulp/consumer/content_install.rb +1 -1
- data/app/lib/actions/pulp/consumer/content_uninstall.rb +1 -1
- data/app/lib/actions/pulp/consumer/content_update.rb +1 -1
- data/app/lib/katello/resources/registry.rb +40 -0
- data/app/lib/katello/util/package.rb +9 -4
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
- data/app/models/katello/content_view.rb +4 -12
- data/app/models/katello/content_view_version.rb +26 -0
- data/app/models/katello/glue/candlepin/owner.rb +8 -0
- data/app/models/katello/glue/candlepin/pool.rb +11 -11
- data/app/models/katello/glue/candlepin/repository.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +1 -0
- data/app/models/katello/host/content_facet.rb +1 -2
- data/app/models/katello/kt_environment.rb +6 -0
- data/app/models/katello/product_content.rb +1 -4
- data/app/models/katello/repository.rb +2 -0
- data/app/models/katello/rpm.rb +118 -14
- data/app/services/katello/puppet_class_importer_extensions.rb +17 -20
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +1 -3
- data/app/views/katello/api/v2/common/copy.json.rabl +3 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +4 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +3 -2
- data/config/katello.yaml +89 -0
- data/config/routes.rb +0 -1
- data/config/routes/api/registry.rb +29 -0
- data/config/routes/api/v2.rb +1 -1
- data/db/migrate/20180612163403_add_foreign_key_to_hypervisor_id.rb +0 -3
- data/db/migrate/20180614184822_add_unauthenticated_pull.rb +9 -0
- data/db/migrate/20180618195941_add_description_to_repository.rb +5 -0
- data/db/seeds.d/75-job_templates.rb +2 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +3 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js +32 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-docker.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +32 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +0 -5
- data/lib/katello/engine.rb +1 -0
- data/lib/katello/permission_creator.rb +2 -0
- data/lib/katello/permissions/registry_permissions.rb +20 -0
- data/lib/katello/plugin.rb +1 -0
- data/lib/katello/tasks/clean_backend_objects.rake +3 -12
- data/lib/katello/version.rb +1 -1
- data/package.json +7 -10
- data/webpack/components/Search/Search.test.js +1 -3
- data/webpack/containers/Application/config.js +2 -9
- data/webpack/containers/Application/index.js +2 -4
- data/webpack/mockRequest.js +3 -3
- data/webpack/move_to_foreman/common/helpers.js +8 -45
- data/webpack/move_to_foreman/components/common/{EmptyState → emptyState}/index.js +3 -16
- data/webpack/move_to_foreman/components/common/table/components/Table.js +1 -1
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +2 -2
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionCell.test.js.snap +1 -1
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +1 -1
- data/webpack/move_to_pf/LoadingState/LoadingState.js +14 -27
- data/webpack/move_to_pf/LoadingState/LoadingState.test.js +4 -8
- data/webpack/move_to_pf/react-bootstrap-select/index.js +1 -12
- data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -0
- data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
- data/webpack/redux/actions/RedHatRepositories/sets.js +1 -1
- data/webpack/redux/consts.js +0 -6
- data/webpack/redux/reducers/index.js +0 -2
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +23 -14
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +0 -1
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +1 -3
- data/webpack/scenes/RedHatRepositories/index.js +3 -7
- data/webpack/scenes/RedHatRepositories/index.scss +0 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +8 -3
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +1 -30
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +28 -111
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js +1 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +1 -6
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +424 -519
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +4 -7
- data/webpack/scenes/Subscriptions/Details/index.js +3 -5
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +34 -78
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +24 -5
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -9
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +0 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +8 -20
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +1 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +7 -34
- data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +16 -9
- data/webpack/scenes/Subscriptions/Manifest/index.js +0 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +26 -5
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -1
- data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +4 -11
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +36 -31
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +12 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +27 -57
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +3 -2
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +5 -10
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +5 -10
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +4 -49
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +3 -8
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +11 -21
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +8 -5
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -2
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +3 -9
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -14
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +17 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +5 -8
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +58 -45
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +4 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +3 -16
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +365 -392
- data/webpack/scenes/Subscriptions/index.js +0 -1
- data/webpack/services/api/fixtures.js +353 -0
- data/webpack/services/api/index.js +1 -17
- data/webpack/test_setup.js +0 -2
- metadata +16 -37
- data/config/katello.yml +0 -59
- data/webpack/__mocks__/foremanReact/components/BreadcrumbBar.js +0 -3
- data/webpack/__mocks__/foremanReact/redux.js +0 -3
- data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +0 -8
- data/webpack/components/SelectOrg/SelectOrg.scss +0 -3
- data/webpack/components/SelectOrg/SelectOrgAction.js +0 -41
- data/webpack/components/SelectOrg/SelectOrgReducer.js +0 -33
- data/webpack/components/SelectOrg/SetOrganization.js +0 -116
- data/webpack/components/WithOrganization/withOrganization.js +0 -28
- data/webpack/global_test_setup.js +0 -6
- data/webpack/helpers/caret.js +0 -6
- data/webpack/move_to_pf/Select/Select.js +0 -40
- data/webpack/scenes/Products/ProductActions.js +0 -24
- data/webpack/scenes/Products/ProductConstants.js +0 -3
- data/webpack/scenes/Products/__tests__/ProductActions.test.js +0 -40
- data/webpack/scenes/Products/__tests__/products.fixtures.js +0 -90
- data/webpack/scenes/RedHatRepositories/components/EnabledRepositoryContent.js +0 -34
- data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepository.test.js +0 -36
- data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepositoryContent.test.js +0 -27
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepository.test.js.snap +0 -25
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepositoryContent.test.js.snap +0 -47
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailEnabledProducts.js +0 -54
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js +0 -29
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.scss +0 -9
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailEnabledProducts.test.js +0 -18
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailProduct.test.js +0 -13
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailEnabledProducts.test.js.snap +0 -45
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProduct.test.js.snap +0 -67
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +0 -110
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -228
- data/webpack/scenes/Tasks/helpers.js +0 -52
- data/webpack/services/api/testHelpers.js +0 -28
data/config/routes.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'katello/api/mapper_extensions'
|
2
|
+
|
3
|
+
class ActionDispatch::Routing::Mapper
|
4
|
+
include Katello::Routing::MapperExtensions
|
5
|
+
end
|
6
|
+
|
7
|
+
Katello::Engine.routes.draw do
|
8
|
+
scope :module => :api do
|
9
|
+
scope :module => :registry, :constraints => { :tag => /[0-9a-zA-Z\-_.:]*/, :digest => /[0-9a-zA-Z:]*/ } do
|
10
|
+
match '/v2/token' => 'registry_proxies#token', :via => :get
|
11
|
+
match '/v2/token' => 'registry_proxies#token', :via => :post
|
12
|
+
match '/v2/*repository/manifests/:tag' => 'registry_proxies#pull_manifest', :via => :get
|
13
|
+
match '/v2/*repository/manifests/:tag' => 'registry_proxies#push_manifest', :via => :put
|
14
|
+
match '/v2/*repository/blobs/:digest' => 'registry_proxies#pull_blob', :via => :get
|
15
|
+
match '/v2/*repository/blobs/:digest' => 'registry_proxies#check_blob', :via => :head
|
16
|
+
match '/v2/*repository/blobs/uploads' => 'registry_proxies#start_upload_blob', :via => :post
|
17
|
+
match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#chunk_upload_blob', :via => :post
|
18
|
+
match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#finish_upload_blob', :via => :put
|
19
|
+
match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#upload_blob', :via => :patch
|
20
|
+
match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#status_upload_blob', :via => :get
|
21
|
+
match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#cancel_upload_blob', :via => :delete
|
22
|
+
match '/v2/_catalog' => 'registry_proxies#catalog', :via => :get
|
23
|
+
match '/v2/*repository/tags/list' => 'registry_proxies#tags_list', :via => :get
|
24
|
+
match '/v2' => 'registry_proxies#ping', :via => :get
|
25
|
+
match '/v1/_ping' => 'registry_proxies#v1_ping', :via => :get
|
26
|
+
match '/v1/search' => 'registry_proxies#v1_search', :via => :get
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/config/routes/api/v2.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
class AddForeignKeyToHypervisorId < ActiveRecord::Migration[5.1]
|
2
2
|
def up
|
3
|
-
# Update all pools that have a hypervisor reference that's not a host before we add the FK
|
4
|
-
::Katello::Pool.where.not(hypervisor_id: nil).where.not(hypervisor_id: Host::Managed.all).update_all(hypervisor_id: nil)
|
5
|
-
|
6
3
|
add_foreign_key(:katello_pools, :hosts,
|
7
4
|
:name => 'katello_pools_hypervisor_fk', :column => 'hypervisor_id')
|
8
5
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddUnauthenticatedPull < ActiveRecord::Migration[5.1]
|
2
|
+
def up
|
3
|
+
add_column :katello_environments, :registry_unauthenticated_pull, :boolean, :default => false
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
remove_column :katello_environments, :registry_unauthenticated_pull
|
8
|
+
end
|
9
|
+
end
|
@@ -7,13 +7,10 @@ if Katello.with_remote_execution?
|
|
7
7
|
sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
|
8
8
|
# import! was renamed to import_raw! around 1.3.1
|
9
9
|
if JobTemplate.respond_to?('import_raw!')
|
10
|
-
|
10
|
+
JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
|
11
11
|
else
|
12
|
-
|
12
|
+
JobTemplate.import!(File.read(template), :default => true, :locked => true, :update => sync)
|
13
13
|
end
|
14
|
-
|
15
|
-
template.organizations << Organization.unscoped.all if template && template.organizations.empty?
|
16
|
-
template.locations << Location.unscoped.all if template && template.locations.empty?
|
17
14
|
end
|
18
15
|
end
|
19
16
|
end
|
@@ -28,15 +28,14 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkRepositorySe
|
|
28
28
|
nutupaneParams = {
|
29
29
|
'organization_id': CurrentOrganization,
|
30
30
|
'offset': 0,
|
31
|
+
'sort_by': 'name',
|
32
|
+
'sort_order': 'ASC',
|
31
33
|
'paged': true
|
32
34
|
};
|
33
35
|
|
34
|
-
nutupane = new Nutupane(RepositorySet, nutupaneParams,
|
35
|
-
'queryPaged', {disableAutoLoad: true});
|
36
|
+
nutupane = new Nutupane(RepositorySet, nutupaneParams, 'queryPaged');
|
36
37
|
$scope.controllerName = 'katello_repository_sets';
|
37
38
|
nutupane.masterOnly = true;
|
38
|
-
nutupane.setSearchKey('repoSetsSearch');
|
39
|
-
nutupane.load();
|
40
39
|
|
41
40
|
$scope.table = nutupane.table;
|
42
41
|
|
@@ -44,14 +44,11 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscription
|
|
44
44
|
});
|
45
45
|
};
|
46
46
|
|
47
|
-
|
48
|
-
$scope.contentNutupane = new Nutupane(Subscription, params,
|
49
|
-
'queryPaged', {disableAutoLoad: true});
|
47
|
+
$scope.contentNutupane = new Nutupane(Subscription, params);
|
50
48
|
$scope.controllerName = 'katello_subscriptions';
|
51
49
|
$scope.table = $scope.contentNutupane.table;
|
52
50
|
$scope.contentNutupane.setSearchKey('subscriptionSearch');
|
53
51
|
$scope.contentNutupane.masterOnly = true;
|
54
|
-
$scope.contentNutupane.load();
|
55
52
|
$scope.groupedSubscriptions = {};
|
56
53
|
|
57
54
|
$scope.$watch('table.rows', function (rows) {
|
@@ -65,7 +65,7 @@
|
|
65
65
|
class="table table-striped table-bordered">
|
66
66
|
<thead>
|
67
67
|
<tr bst-table-head row-select>
|
68
|
-
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity</span></th>
|
68
|
+
<th bst-table-column="quantity" sortable class="align-center"><span translate>Quantity (To Add)</span></th>
|
69
69
|
<th bst-table-column="attached" sortable><span translate>Attached</span></th>
|
70
70
|
<th bst-table-column="type"><span translate>Type</span></th>
|
71
71
|
<th bst-table-column="startDate" sortable><span translate>Starts</span></th>
|
@@ -30,7 +30,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostRegisterControlle
|
|
30
30
|
$scope.noCapsulesFound = _.isEmpty(data.results);
|
31
31
|
$scope.selectedCapsule = _.isEmpty(defaultCapsule) ? data.results[0] : defaultCapsule[0];
|
32
32
|
});
|
33
|
-
|
33
|
+
$scope.hideSwitcher = true;
|
34
34
|
|
35
35
|
$scope.hostname = function (url) {
|
36
36
|
if (url) {
|
@@ -18,7 +18,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostPackagesInstalled
|
|
18
18
|
var packagesNutupane;
|
19
19
|
|
20
20
|
$scope.removeSelectedPackages = function () {
|
21
|
-
var selected =
|
21
|
+
var selected = $scope.table.getSelected();
|
22
22
|
|
23
23
|
if (!$scope.working) {
|
24
24
|
$scope.working = true;
|
@@ -39,7 +39,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostAddSubscriptionsC
|
|
39
39
|
$scope.groupedSubscriptions = SubscriptionsHelper.groupByProductName(rows);
|
40
40
|
});
|
41
41
|
|
42
|
-
$scope.
|
42
|
+
$scope.amountSelectorValues = SubscriptionsHelper.getAmountSelectorValues;
|
43
43
|
$scope.showMatchHost = false;
|
44
44
|
$scope.showMatchInstalled = false;
|
45
45
|
$scope.showNoOverlap = false;
|
@@ -63,6 +63,7 @@ angular.module('Bastion.content-views').config(['$stateProvider', function ($sta
|
|
63
63
|
.state('content-view.version.details', {
|
64
64
|
url: '',
|
65
65
|
permission: 'view_content_views',
|
66
|
+
controller: 'ContentViewVersionController',
|
66
67
|
templateUrl: 'content-views/versions/views/content-view-version-details.html',
|
67
68
|
ncyBreadcrumb: {
|
68
69
|
label: '{{ version.name }}',
|
@@ -1,15 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
/**
|
2
|
+
* @ngdoc controller
|
3
|
+
* @name Bastion.content-views.versions.controller:ContentViewVersion
|
4
|
+
*
|
5
|
+
* @requires $scope
|
6
|
+
* @requires $state
|
7
|
+
* @requires $q
|
8
|
+
* @requires translate
|
9
|
+
* @requires ContentViewVersion
|
10
|
+
* @requires Notification
|
11
|
+
*
|
12
|
+
* @description
|
13
|
+
* Handles fetching of a content view version based on the route ID and putting it
|
14
|
+
* on the scope.
|
15
|
+
*/
|
16
|
+
|
17
|
+
angular.module('Bastion.content-views.versions').controller('ContentViewVersionController',
|
18
|
+
['$scope', '$state', '$q', 'translate', 'ContentViewVersion', 'Notification',
|
19
|
+
function ($scope, $state, $q, translate, ContentViewVersion, Notification) {
|
13
20
|
|
14
21
|
$scope.version = ContentViewVersion.get({id: $scope.$stateParams.versionId});
|
15
22
|
|
@@ -34,12 +41,19 @@
|
|
34
41
|
return found;
|
35
42
|
};
|
36
43
|
|
37
|
-
|
44
|
+
$scope.save = function (version) {
|
45
|
+
var deferred = $q.defer();
|
38
46
|
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
version.$update(function (response) {
|
48
|
+
deferred.resolve(response);
|
49
|
+
Notification.setSuccessMessage(translate('Content View version updated'));
|
42
50
|
|
43
|
-
|
51
|
+
}, function (response) {
|
52
|
+
deferred.reject(response);
|
53
|
+
Notification.setErrorMessage(response.data.displayMessage);
|
54
|
+
});
|
44
55
|
|
45
|
-
|
56
|
+
return deferred.promise;
|
57
|
+
};
|
58
|
+
}]
|
59
|
+
);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="details">
|
2
2
|
<div class="detail">
|
3
3
|
<span class="info-label" translate>Description</span>
|
4
|
-
<span class="info-value" bst-edit-textarea="version.description"
|
4
|
+
<span class="info-value" bst-edit-textarea="version.description" on-save="save(version)"></span>
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="detail">
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<th bst-table-column translate>Name</th>
|
6
6
|
<th bst-table-column translate>Product</th>
|
7
7
|
<th bst-table-column translate>Repository</th>
|
8
|
+
<th bst-table-column translate>Container Image Name</th>
|
8
9
|
<th bst-table-column translate>Tags</th>
|
9
10
|
</tr>
|
10
11
|
</thead>
|
@@ -14,6 +15,7 @@
|
|
14
15
|
<td bst-table-cell>{{ repository.name }}</td>
|
15
16
|
<td bst-table-cell>{{ repository.product.name }}</td>
|
16
17
|
<td bst-table-cell>{{ repository.relative_path }}</td>
|
18
|
+
<td bst-table-cell>{{ repository.container_repository_name }}</td>
|
17
19
|
<td bst-table-cell class="number-cell">{{ repository.content_counts.docker_tag || 0}}</td>
|
18
20
|
</tr>
|
19
21
|
</tbody>
|
@@ -1,30 +1,39 @@
|
|
1
1
|
<span page-title ng-model="environment">{{ 'Lifecycle Environment:' | translate }} {{ environment.name }}</span>
|
2
2
|
|
3
|
-
<div data-
|
4
|
-
<
|
5
|
-
<h4 translate>Basic Information</h4>
|
3
|
+
<div data-block="left-column">
|
4
|
+
<h4 translate>Basic Information</h4>
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
<dl class="dl-horizontal dl-horizontal-left">
|
7
|
+
<dt translate>Name</dt>
|
8
|
+
<dd bst-edit-text="environment.name"
|
9
|
+
on-save="save(environment)"
|
10
|
+
readonly="denied('edit_lifecycle_environments', environment) || environment.library">
|
11
|
+
</dd>
|
13
12
|
|
14
|
-
|
15
|
-
|
13
|
+
<dt translate>Label</dt>
|
14
|
+
<dd>{{ environment.label }}</dd>
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
<dt translate>Description</dt>
|
17
|
+
<dd bst-edit-textarea="environment.description"
|
18
|
+
on-save="save(environment)"
|
19
|
+
readonly="denied('edit_lifecycle_environments', environment) || environment.library">
|
20
|
+
</dd>
|
21
|
+
</dl>
|
22
|
+
|
23
|
+
<h4 translate>Container Image Registry</h4>
|
24
|
+
|
25
|
+
<dl class="dl-horizontal dl-horizontal-left">
|
26
|
+
<dt translate>Unauthenticated Pull</dt>
|
27
|
+
<dd bst-edit-checkbox="environment.registry_unauthenticated_pull"
|
28
|
+
formatter="booleanToYesNo"
|
29
|
+
on-save="save(environment)"
|
30
|
+
readonly="denied('edit_lifecycle_environments', environment)">
|
31
|
+
</dd>
|
32
|
+
<dt translate>Registry Name Pattern</dt>
|
33
|
+
<dd bst-edit-textarea="environment.registry_name_pattern"
|
34
|
+
on-save="save(environment)"
|
35
|
+
readonly="denied('edit_lifecycle_environments', environment)">
|
36
|
+
</dd>
|
37
|
+
</dl>
|
22
38
|
|
23
|
-
<dt translate>Description</dt>
|
24
|
-
<dd bst-edit-textarea="environment.description"
|
25
|
-
on-save="save(environment)"
|
26
|
-
readonly="denied('edit_lifecycle_environments', environment) || environment.library">
|
27
|
-
</dd>
|
28
|
-
</dl>
|
29
|
-
</div>
|
30
39
|
</div>
|
@@ -14,6 +14,12 @@
|
|
14
14
|
<dt translate>Label</dt>
|
15
15
|
<dd>{{ repository.label }}</dd>
|
16
16
|
|
17
|
+
<dt translate>Description</dt>
|
18
|
+
<dd bst-edit-text="repository.description"
|
19
|
+
on-save="save(repository)"
|
20
|
+
readonly="product.redhat || denied('edit_products', product)">
|
21
|
+
</dd>
|
22
|
+
|
17
23
|
<dt translate>Backend Identifier</dt>
|
18
24
|
<dd>{{ repository.backend_identifier }}</dd>
|
19
25
|
|
@@ -22,6 +22,14 @@
|
|
22
22
|
type="text"
|
23
23
|
required/>
|
24
24
|
</div>
|
25
|
+
|
26
|
+
<div bst-form-group label="{{ 'Description' | translate }}">
|
27
|
+
<input id="description"
|
28
|
+
name="description"
|
29
|
+
ng-model="repository.description"
|
30
|
+
type="text"/>
|
31
|
+
</div>
|
32
|
+
|
25
33
|
<div bst-form-group label="{{ 'Type' | translate }}">
|
26
34
|
<select required
|
27
35
|
id="content_type"
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
<div bst-form-group ng-show="createRepoChoices.newProduct === 'true' && contentCredentials.length !== 0"
|
46
46
|
label="{{ 'GPG Key' | translate }}">
|
47
|
-
<select class="form-control" ng-model="createRepoChoices.product.
|
47
|
+
<select class="form-control" ng-model="createRepoChoices.product.content_credential_id"
|
48
48
|
ng-options="content_credential.id as content_credential.name for content_credential in contentCredentials"/>
|
49
49
|
</div>
|
50
50
|
|
data/lib/katello/engine.rb
CHANGED
@@ -103,6 +103,7 @@ module Katello
|
|
103
103
|
initializer "katello.paths", :before => :sooner_routes_load do |app|
|
104
104
|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/v2.rb"
|
105
105
|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/rhsm.rb"
|
106
|
+
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/registry.rb"
|
106
107
|
app.routes_reloader.paths.unshift("#{Katello::Engine.root}/config/routes/overrides.rb")
|
107
108
|
end
|
108
109
|
|
@@ -73,6 +73,7 @@ module Katello
|
|
73
73
|
'katello/api/v2/content_view_puppet_modules' => [:index, :show, :auto_complete_search],
|
74
74
|
'katello/api/v2/content_view_versions' => [:index, :show, :auto_complete_search],
|
75
75
|
'katello/api/v2/content_view_components' => [:index, :show],
|
76
|
+
'katello/api/v2/packages' => [:index],
|
76
77
|
'katello/api/v2/package_groups' => [:index, :show, :auto_complete_search, :compare],
|
77
78
|
'katello/api/v2/errata' => [:index, :show, :auto_complete_search, :compare, :available_errata],
|
78
79
|
'katello/api/v2/puppet_modules' => [:index, :show, :auto_complete_search, :compare],
|
@@ -112,6 +113,7 @@ module Katello
|
|
112
113
|
@plugin.permission :edit_content_views,
|
113
114
|
{
|
114
115
|
'katello/api/v2/content_views' => [:update],
|
116
|
+
'katello/api/v2/content_view_versions' => [:update],
|
115
117
|
'katello/api/v2/content_view_filters' => [:create, :update, :destroy],
|
116
118
|
'katello/api/v2/content_view_filter_rules' => [:create, :update, :destroy],
|
117
119
|
'katello/api/v2/content_view_puppet_modules' => [:create, :update, :destroy],
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'katello/plugin.rb'
|
2
|
+
|
3
|
+
Foreman::AccessControl.permission(:create_personal_access_tokens).actions.concat [
|
4
|
+
'katello/api/registry/registry_proxies/token',
|
5
|
+
'katello/api/registry/registry_proxies/v1_ping',
|
6
|
+
'katello/api/registry/registry_proxies/ping',
|
7
|
+
'katello/api/registry/registry_proxies/v1_search',
|
8
|
+
'katello/api/registry/registry_proxies/catalog',
|
9
|
+
'katello/api/registry/registry_proxies/tags_list',
|
10
|
+
'katello/api/registry/registry_proxies/pull_manifest',
|
11
|
+
'katello/api/registry/registry_proxies/push_manifest',
|
12
|
+
'katello/api/registry/registry_proxies/pull_blob',
|
13
|
+
'katello/api/registry/registry_proxies/check_blob',
|
14
|
+
'katello/api/registry/registry_proxies/start_upload_blob',
|
15
|
+
'katello/api/registry/registry_proxies/upload_blob',
|
16
|
+
'katello/api/registry/registry_proxies/chunk_upload_blob',
|
17
|
+
'katello/api/registry/registry_proxies/finish_upload_blob',
|
18
|
+
'katello/api/registry/registry_proxies/status_upload_blob',
|
19
|
+
'katello/api/registry/registry_proxies/cancel_upload_blob'
|
20
|
+
]
|
data/lib/katello/plugin.rb
CHANGED
@@ -214,6 +214,7 @@ Foreman::Plugin.register :katello do
|
|
214
214
|
logger :cp_proxy, :enabled => true
|
215
215
|
logger :action, :enabled => true
|
216
216
|
logger :manifest_import_logger, :enabled => true
|
217
|
+
logger :registry_proxy, :enabled => true
|
217
218
|
|
218
219
|
widget 'errata_widget', :name => 'Latest Errata', :sizey => 1, :sizex => 6
|
219
220
|
widget 'content_views_widget', :name => 'Content Views', :sizey => 1, :sizex => 6
|