katello 3.17.3 → 3.18.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +38 -21
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -15
- data/app/controllers/katello/api/v2/api_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +31 -14
- data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +65 -36
- data/app/controllers/katello/api/v2/content_views_controller.rb +27 -25
- data/app/controllers/katello/api/v2/environments_controller.rb +8 -8
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +5 -5
- data/app/controllers/katello/api/v2/host_collections_controller.rb +19 -16
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +17 -0
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +8 -5
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +8 -9
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +9 -2
- data/app/controllers/katello/concerns/api/v2/authorization.rb +9 -5
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +21 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +2 -1
- data/app/helpers/katello/katello_urls_helper.rb +5 -2
- data/app/lib/actions/candlepin/product/content_create.rb +2 -0
- data/app/lib/actions/candlepin/product/content_update.rb +2 -0
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -6
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +2 -6
- data/app/lib/actions/katello/content_view/publish.rb +3 -4
- data/app/lib/actions/katello/content_view_version/import.rb +4 -3
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +18 -3
- data/app/lib/actions/katello/host/update_system_purpose.rb +31 -0
- data/app/lib/actions/katello/organization/manifest_delete.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_import.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +0 -1
- data/app/lib/actions/katello/product/content_create.rb +7 -6
- data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -1
- data/app/lib/actions/katello/repository/import_upload.rb +2 -1
- data/app/lib/actions/katello/repository/update.rb +4 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +0 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
- data/app/lib/actions/pulp3/content_view_version/create_importer.rb +7 -3
- data/app/lib/actions/pulp3/content_view_version/export.rb +2 -1
- data/app/lib/actions/pulp3/content_view_version/import.rb +7 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +15 -10
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +16 -10
- data/app/lib/actions/pulp3/repository/commit_upload.rb +2 -1
- data/app/lib/actions/pulp3/repository/delete.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +2 -2
- data/app/lib/katello/resources/candlepin/owner.rb +5 -0
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
- data/app/lib/katello/resources/registry.rb +3 -3
- data/app/models/katello/authorization/activation_key.rb +4 -0
- data/app/models/katello/authorization/content_view.rb +13 -0
- data/app/models/katello/authorization/content_view_component.rb +15 -0
- data/app/models/katello/authorization/gpg_key.rb +12 -4
- data/app/models/katello/authorization/lifecycle_environment.rb +8 -0
- data/app/models/katello/authorization/sync_plan.rb +16 -0
- data/app/models/katello/concerns/organization_extensions.rb +4 -5
- data/app/models/katello/concerns/redhat_extensions.rb +2 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -3
- data/app/models/katello/content_view_component.rb +2 -0
- data/app/models/katello/content_view_version_export_history.rb +2 -0
- data/app/models/katello/glue/candlepin/pool.rb +9 -14
- data/app/models/katello/glue/pulp/repo.rb +8 -0
- data/app/models/katello/gpg_key.rb +1 -1
- data/app/models/katello/root_repository.rb +26 -1
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -12
- data/app/services/katello/candlepin/event_handler.rb +2 -0
- data/app/services/katello/candlepin/message_handler.rb +34 -0
- data/app/services/katello/candlepin/upstream_consumer.rb +28 -0
- data/app/services/katello/host_status_manager.rb +9 -0
- data/app/services/katello/pulp3/api/apt.rb +57 -0
- data/app/services/katello/pulp3/api/core.rb +8 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +4 -3
- data/app/services/katello/pulp3/content_view_version/import.rb +5 -15
- data/app/services/katello/pulp3/deb.rb +38 -0
- data/app/services/katello/pulp3/erratum.rb +1 -2
- data/app/services/katello/pulp3/pulp_content_unit.rb +5 -0
- data/app/services/katello/pulp3/repository/ansible_collection.rb +9 -0
- data/app/services/katello/pulp3/repository/apt.rb +63 -0
- data/app/services/katello/pulp3/repository/docker.rb +4 -0
- data/app/services/katello/pulp3/repository/yum.rb +2 -1
- data/app/services/katello/pulp3/repository.rb +11 -9
- data/app/services/katello/pulp3/repository_mirror.rb +9 -4
- data/app/services/katello/pulp3/task.rb +3 -3
- data/app/services/katello/pulp3/task_group.rb +0 -6
- data/app/views/dashboard/_subscription_widget.html.erb +0 -5
- data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/app/views/overrides/organizations/_index_row_override.html.erb +1 -1
- data/config/routes/api/v2.rb +2 -0
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +2 -5
- data/db/migrate/20201008204114_add_os_versions_to_katello_root_repositories.rb +5 -0
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +23 -0
- data/db/migrate/20201012192035_add_metadata_to_katello_content_view_version_export_history.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +8 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +112 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +78 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +2 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +16 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +6 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +168 -155
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +17 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +125 -113
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +15 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +46 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
- data/lib/katello/engine.rb +1 -0
- data/lib/katello/permission_creator.rb +68 -59
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +4 -1
- data/lib/katello/repository_types/deb.rb +9 -1
- data/lib/katello/tasks/pulp3_content_switchover.rake +1 -3
- data/lib/katello/tasks/pulp3_migration_stats.rake +21 -0
- data/lib/katello/tasks/reports.rake +1 -4
- data/lib/katello/tasks/reset.rake +2 -1
- data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +18 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +54 -47
- data/locale/bn/katello.po +165 -26
- data/locale/cs/katello.po +164 -24
- data/locale/de/katello.po +165 -26
- data/locale/en/katello.po +164 -23
- data/locale/es/katello.po +165 -25
- data/locale/fr/katello.po +165 -25
- data/locale/gu/katello.po +165 -26
- data/locale/hi/katello.po +165 -26
- data/locale/it/katello.po +165 -25
- data/locale/ja/katello.po +165 -26
- data/locale/katello.pot +1036 -802
- data/locale/kn/katello.po +165 -26
- data/locale/ko/katello.po +165 -25
- data/locale/mr/katello.po +165 -26
- data/locale/or/katello.po +165 -26
- data/locale/pa/katello.po +165 -26
- data/locale/pt/katello.po +164 -23
- data/locale/pt_BR/katello.po +165 -25
- data/locale/ru/katello.po +165 -25
- data/locale/ta/katello.po +165 -26
- data/locale/te/katello.po +165 -26
- data/locale/zh_CN/katello.po +165 -25
- data/locale/zh_TW/katello.po +165 -26
- data/webpack/components/ActionableDetail.js +2 -1
- data/webpack/components/Search/Search.js +1 -1
- data/webpack/components/Table/MainTable.js +6 -2
- data/webpack/components/Table/TableWrapper.js +46 -9
- data/webpack/scenes/ContentViews/ContentViewSelectors.js +7 -3
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +2 -9
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +25 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +14 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +56 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +169 -0
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +47 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoAddedStatus.js +17 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +23 -0
- data/webpack/scenes/ContentViews/Details/Repositories/SelectableDropdown.js +49 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +154 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +131 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +16 -8
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +17 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +19 -2
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +9 -1
- data/webpack/scenes/Subscriptions/Manifest/index.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +8 -2
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -13
- metadata +69 -26
|
@@ -14,194 +14,207 @@
|
|
|
14
14
|
* @requires Architecture
|
|
15
15
|
* @requires YumContentUnits
|
|
16
16
|
* @requires HttpProxyPolicy
|
|
17
|
+
* @requires OSVersions
|
|
17
18
|
*
|
|
18
19
|
* @description
|
|
19
20
|
* Provides the functionality for the repository details info page.
|
|
20
21
|
*/
|
|
21
22
|
angular.module('Bastion.repositories').controller('RepositoryDetailsInfoController',
|
|
22
|
-
['$scope', '$q', 'translate', 'Notification', 'ContentCredential', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', 'YumContentUnits', 'OstreeUpstreamSyncPolicy', 'Architecture', 'HttpProxy', 'HttpProxyPolicy',
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
['$scope', '$q', 'translate', 'Notification', 'ContentCredential', 'CurrentOrganization', 'Checksum', 'DownloadPolicy', 'YumContentUnits', 'OstreeUpstreamSyncPolicy', 'Architecture', 'HttpProxy', 'HttpProxyPolicy', 'OSVersions',
|
|
24
|
+
function ($scope, $q, translate, Notification, ContentCredential, CurrentOrganization, Checksum, DownloadPolicy, YumContentUnits, OstreeUpstreamSyncPolicy, Architecture, HttpProxy, HttpProxyPolicy, OSVersions) {
|
|
25
|
+
$scope.organization = CurrentOrganization;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
$scope.progress = {uploading: false};
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
$scope.repository.$promise.then(function () {
|
|
30
|
+
$scope.uploadURL = 'katello/api/v2/repositories/' + $scope.repository.id + '/upload_content';
|
|
31
|
+
});
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
$scope.gpgKeys = function () {
|
|
34
|
+
var deferred = $q.defer();
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
ContentCredential.queryUnpaged(function (contentCredentials) {
|
|
37
|
+
var results = contentCredentials.results;
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
results = results.filter(function(obj) {
|
|
40
|
+
if (obj.content_type === "gpg_key") {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
results.unshift({id: null, name: ''});
|
|
47
|
+
deferred.resolve(results);
|
|
43
48
|
});
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
50
|
+
return deferred.promise;
|
|
51
|
+
};
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
$scope.certs = function () {
|
|
54
|
+
var deferred = $q.defer();
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
ContentCredential.queryUnpaged(function (contentCredentials) {
|
|
57
|
+
var results = contentCredentials.results;
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
results = results.filter(function(obj) {
|
|
60
|
+
if (obj.content_type === "cert") {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
});
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
66
|
+
results.unshift({id: null, name: ''});
|
|
67
|
+
deferred.resolve(results);
|
|
63
68
|
});
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
name: translate('Default'),
|
|
82
|
-
value: null
|
|
70
|
+
return deferred.promise;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
$scope.architectures = function () {
|
|
74
|
+
var deferred = $q.defer();
|
|
75
|
+
Architecture.queryUnpaged(function (architectures) {
|
|
76
|
+
var results = architectures.results;
|
|
77
|
+
results.map(function(i) {
|
|
78
|
+
i.id = i.name;
|
|
79
|
+
});
|
|
80
|
+
results.unshift({
|
|
81
|
+
id: 'noarch',
|
|
82
|
+
name: translate('No restriction'),
|
|
83
|
+
value: null
|
|
84
|
+
});
|
|
85
|
+
deferred.resolve(results);
|
|
83
86
|
});
|
|
84
|
-
deferred.
|
|
85
|
-
}
|
|
86
|
-
return deferred.promise;
|
|
87
|
-
};
|
|
87
|
+
return deferred.promise;
|
|
88
|
+
};
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
$scope.save = function (repository, saveUpstreamAuth) {
|
|
91
|
+
var deferred = $q.defer();
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
if (!saveUpstreamAuth) {
|
|
94
|
+
delete repository.upstream_username;
|
|
95
|
+
delete repository.upstream_password;
|
|
96
|
+
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
} else {
|
|
102
|
-
repository["docker_tags_whitelist"] = [];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
repository.$update(function (response) {
|
|
106
|
-
deferred.resolve(response);
|
|
107
|
-
if (!_.isEmpty(response["docker_tags_whitelist"])) {
|
|
108
|
-
repository.commaTagsWhitelist = repository["docker_tags_whitelist"].join(", ");
|
|
98
|
+
if (!_.isEmpty(repository.commaTagsWhitelist)) {
|
|
99
|
+
repository["docker_tags_whitelist"] = repository.commaTagsWhitelist.split(",").map(function(tag) {
|
|
100
|
+
return tag.trim();
|
|
101
|
+
});
|
|
109
102
|
} else {
|
|
110
|
-
repository
|
|
103
|
+
repository["docker_tags_whitelist"] = [];
|
|
111
104
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
/* eslint-disable camelcase */
|
|
106
|
+
repository.os_versions = $scope.osVersionsParam();
|
|
107
|
+
repository.$update(function (response) {
|
|
108
|
+
deferred.resolve(response);
|
|
109
|
+
if (!_.isEmpty(response["docker_tags_whitelist"])) {
|
|
110
|
+
repository.commaTagsWhitelist = repository["docker_tags_whitelist"].join(", ");
|
|
111
|
+
} else {
|
|
112
|
+
repository.commaTagsWhitelist = null;
|
|
113
|
+
}
|
|
114
|
+
Notification.setSuccessMessage(translate('Repository Saved.'));
|
|
115
|
+
}, function (response) {
|
|
116
|
+
deferred.reject(response);
|
|
117
|
+
Notification.setErrorMessage(translate("An error occurred saving the Repository: ") + response.data.displayMessage);
|
|
117
118
|
});
|
|
118
|
-
});
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
return deferred.promise;
|
|
121
|
+
};
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
$scope.uploadContent = function (content) {
|
|
124
|
+
var returnData, error, uploaded;
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
if (content) {
|
|
127
|
+
try {
|
|
128
|
+
returnData = angular.fromJson(angular.element(content).html());
|
|
129
|
+
} catch (err) {
|
|
130
|
+
returnData = content;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (!returnData) {
|
|
134
|
+
returnData = content;
|
|
135
|
+
}
|
|
132
136
|
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
if (returnData !== null && returnData.status === 'success') {
|
|
138
|
+
uploaded = returnData.filenames.join(', ');
|
|
139
|
+
Notification.setSuccessMessage(translate('Successfully uploaded content: ') + uploaded);
|
|
140
|
+
$scope.repository.$get();
|
|
141
|
+
} else {
|
|
142
|
+
error = returnData.displayMessage;
|
|
143
|
+
Notification.setErrorMessage(translate('Error during upload: ') + error);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
$scope.progress.uploading = false;
|
|
135
147
|
}
|
|
148
|
+
};
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
$scope.repository.$get();
|
|
150
|
+
$scope.uploadError = function (error, content) {
|
|
151
|
+
if (angular.isString(content) && content.indexOf("Request Entity Too Large")) {
|
|
152
|
+
error = translate('File too large. Please use the CLI instead.');
|
|
141
153
|
} else {
|
|
142
|
-
error =
|
|
143
|
-
Notification.setErrorMessage(translate('Error during upload: ') + error);
|
|
154
|
+
error = content;
|
|
144
155
|
}
|
|
145
|
-
|
|
156
|
+
Notification.setErrorMessage(translate('Error during upload: ') + error);
|
|
146
157
|
$scope.progress.uploading = false;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
$scope.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
$scope.handleFiles = function (element) {
|
|
161
|
+
var reader = new FileReader();
|
|
162
|
+
$scope.uploadedFile = true;
|
|
163
|
+
reader.addEventListener("loadend", function() {
|
|
164
|
+
var data = reader.result;
|
|
165
|
+
$scope.repository.ansible_collection_requirements = data;
|
|
166
|
+
$scope.$apply();
|
|
167
|
+
});
|
|
168
|
+
reader.readAsText(element.files[0]);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
$scope.checksums = Checksum.checksums;
|
|
172
|
+
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
|
173
|
+
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
|
174
|
+
$scope.ignorableYumContentUnits = YumContentUnits.units;
|
|
175
|
+
|
|
176
|
+
$scope.checksumTypeDisplay = function (checksum) {
|
|
177
|
+
return Checksum.checksumType(checksum);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
$scope.downloadPolicyDisplay = function (downloadPolicy) {
|
|
181
|
+
return DownloadPolicy.downloadPolicyName(downloadPolicy);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
$scope.clearUpstreamAuth = function () {
|
|
185
|
+
$scope.repository['upstream_password'] = null;
|
|
186
|
+
$scope.repository['upstream_auth_exists'] = false;
|
|
187
|
+
$scope.repository['upstream_username'] = null;
|
|
188
|
+
$scope.save($scope.repository);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
$scope.policies = HttpProxyPolicy.policies;
|
|
192
|
+
$scope.proxies = [];
|
|
193
|
+
|
|
194
|
+
$scope.displayHttpProxyPolicyName = function (policy) {
|
|
195
|
+
return HttpProxyPolicy.displayHttpProxyPolicyName(policy);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
$scope.displayHttpProxyName = function (proxyId) {
|
|
199
|
+
return HttpProxyPolicy.displayHttpProxyName($scope.proxies, proxyId);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
$scope.osVersionsOptions = function () {
|
|
203
|
+
$scope.selectedOSVersion = $scope.formatOSVersions();
|
|
204
|
+
return OSVersions.getOSVersionsOptions();
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
$scope.formatOSVersions = function () {
|
|
208
|
+
return OSVersions.formatOSVersions($scope.repository.os_versions);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
$scope.osVersionsParam = function () {
|
|
212
|
+
return OSVersions.osVersionsParam($scope.selectedOSVersion);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
HttpProxy.queryUnpaged(function (proxies) {
|
|
216
|
+
$scope.proxies = proxies.results;
|
|
168
217
|
});
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
$scope.checksums = Checksum.checksums;
|
|
173
|
-
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
|
174
|
-
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
|
175
|
-
$scope.ignorableYumContentUnits = YumContentUnits.units;
|
|
176
|
-
|
|
177
|
-
$scope.checksumTypeDisplay = function (checksum) {
|
|
178
|
-
return Checksum.checksumType(checksum);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
$scope.downloadPolicyDisplay = function (downloadPolicy) {
|
|
182
|
-
return DownloadPolicy.downloadPolicyName(downloadPolicy);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
$scope.clearUpstreamAuth = function () {
|
|
186
|
-
$scope.repository['upstream_password'] = null;
|
|
187
|
-
$scope.repository['upstream_auth_exists'] = false;
|
|
188
|
-
$scope.repository['upstream_username'] = null;
|
|
189
|
-
$scope.save($scope.repository);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
$scope.policies = HttpProxyPolicy.policies;
|
|
193
|
-
$scope.proxies = [];
|
|
194
|
-
|
|
195
|
-
$scope.displayHttpProxyPolicyName = function (policy) {
|
|
196
|
-
return HttpProxyPolicy.displayHttpProxyPolicyName(policy);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
$scope.displayHttpProxyName = function (proxyId) {
|
|
200
|
-
return HttpProxyPolicy.displayHttpProxyName($scope.proxies, proxyId);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
HttpProxy.queryUnpaged(function (proxies) {
|
|
204
|
-
$scope.proxies = proxies.results;
|
|
205
|
-
});
|
|
206
|
-
}]
|
|
218
|
+
|
|
219
|
+
}]
|
|
207
220
|
);
|
|
@@ -36,14 +36,29 @@
|
|
|
36
36
|
<h4 translate>Sync Settings</h4>
|
|
37
37
|
<dl class="dl-horizontal dl-horizontal-left">
|
|
38
38
|
<span ng-show="repository.content_type === 'yum'" >
|
|
39
|
-
<dt
|
|
40
|
-
|
|
39
|
+
<dt>
|
|
40
|
+
<span translate>Restrict to architecture</span>
|
|
41
|
+
<i class="pficon-info" title="{{ 'The repository will be enabled by default on content hosts with the selected architecture.' | translate }}"></i>
|
|
42
|
+
</dt>
|
|
43
|
+
<dd bst-edit-select="repository.arch==='noarch'?'No restriction':repository.arch"
|
|
41
44
|
selector="repository.arch"
|
|
42
45
|
options="architectures()"
|
|
43
46
|
on-save="save(repository)">
|
|
44
47
|
</dd>
|
|
45
48
|
</span>
|
|
46
49
|
|
|
50
|
+
<span ng-show="repository.content_type === 'yum'" >
|
|
51
|
+
<dt>
|
|
52
|
+
<span translate>Restrict to <br />OS version</span>
|
|
53
|
+
<i class="pficon-info" title="{{ 'The repository will be enabled by default on content hosts with the selected OS version.' | translate }}"></i>
|
|
54
|
+
</dt>
|
|
55
|
+
<dd bst-edit-select="repository.os_versions.length ? formatOSVersions() : 'No restriction'"
|
|
56
|
+
selector="selectedOSVersion"
|
|
57
|
+
options="osVersionsOptions()"
|
|
58
|
+
on-save="save(repository)">
|
|
59
|
+
</dd>
|
|
60
|
+
</span>
|
|
61
|
+
|
|
47
62
|
<dt ng-show="repository.content_type !== 'docker'" translate>Upstream URL</dt>
|
|
48
63
|
<dt ng-show="repository.content_type === 'docker'" translate>Registry URL</dt>
|
|
49
64
|
<dd bst-edit-text="repository.url"
|