katello 4.1.4 → 4.2.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.

Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
  3. data/app/controllers/katello/api/v2/content_credentials_controller.rb +3 -3
  4. data/app/controllers/katello/api/v2/content_uploads_controller.rb +3 -1
  5. data/app/controllers/katello/api/v2/content_view_components_controller.rb +33 -1
  6. data/app/controllers/katello/api/v2/content_views_controller.rb +12 -0
  7. data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
  8. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -2
  9. data/app/controllers/katello/api/v2/products_controller.rb +4 -4
  10. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +3 -11
  11. data/app/controllers/katello/api/v2/repositories_controller.rb +68 -47
  12. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +0 -28
  13. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +26 -5
  14. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +26 -1
  15. data/app/lib/actions/candlepin/environment/destroy.rb +2 -0
  16. data/app/lib/actions/katello/agent_action.rb +2 -2
  17. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +3 -2
  18. data/app/lib/actions/katello/{gpg_key → content_credential}/update.rb +1 -1
  19. data/app/lib/actions/katello/content_view/publish.rb +6 -1
  20. data/app/lib/actions/katello/content_view_version/create_repos.rb +1 -1
  21. data/app/lib/actions/katello/content_view_version/incremental_update.rb +0 -47
  22. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +1 -1
  23. data/app/lib/actions/katello/repository/clone_contents.rb +1 -7
  24. data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -7
  25. data/app/lib/actions/katello/repository/create.rb +4 -8
  26. data/app/lib/actions/katello/repository/create_root.rb +1 -1
  27. data/app/lib/actions/katello/repository/destroy.rb +1 -3
  28. data/app/lib/actions/katello/repository/import_upload.rb +3 -2
  29. data/app/lib/actions/katello/repository/instance_update.rb +1 -1
  30. data/app/lib/actions/katello/repository/metadata_generate.rb +2 -8
  31. data/app/lib/actions/katello/repository/multi_clone_contents.rb +0 -1
  32. data/app/lib/actions/katello/repository/refresh_repository.rb +1 -4
  33. data/app/lib/actions/katello/repository/remove_content.rb +6 -4
  34. data/app/lib/actions/katello/repository/sync.rb +5 -25
  35. data/app/lib/actions/katello/repository/update.rb +1 -2
  36. data/app/lib/actions/katello/repository/update_http_proxy_details.rb +2 -5
  37. data/app/lib/actions/katello/repository/update_redhat_repository.rb +1 -1
  38. data/app/lib/actions/katello/repository/upload_files.rb +8 -3
  39. data/app/lib/actions/katello/repository/upload_package_group.rb +2 -11
  40. data/app/lib/actions/katello/repository/verify_checksum.rb +0 -1
  41. data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
  42. data/app/lib/actions/pulp3/orchestration/repository/create.rb +2 -2
  43. data/app/lib/actions/pulp3/repository/create.rb +3 -4
  44. data/app/lib/actions/pulp3/repository/create_remote.rb +1 -6
  45. data/app/lib/actions/pulp3/repository/repair.rb +4 -0
  46. data/app/lib/katello/errors.rb +1 -0
  47. data/app/lib/katello/http_resource.rb +26 -73
  48. data/app/lib/katello/qpid/connection.rb +1 -3
  49. data/app/lib/katello/resources/candlepin/consumer.rb +1 -1
  50. data/app/lib/katello/resources/candlepin/environment.rb +2 -0
  51. data/app/lib/katello/resources/registry.rb +7 -20
  52. data/app/lib/katello/util/http_proxy.rb +0 -3
  53. data/app/lib/katello/validators/gpg_key_content_validator.rb +1 -1
  54. data/app/models/katello/authorization/{gpg_key.rb → content_credential.rb} +1 -1
  55. data/app/models/katello/authorization/product.rb +0 -4
  56. data/app/models/katello/concerns/host_managed_extensions.rb +2 -16
  57. data/app/models/katello/concerns/organization_extensions.rb +1 -1
  58. data/app/models/katello/concerns/pulp_database_unit.rb +13 -5
  59. data/app/models/katello/concerns/smart_proxy_extensions.rb +45 -41
  60. data/app/models/katello/{gpg_key.rb → content_credential.rb} +4 -4
  61. data/app/models/katello/content_view.rb +6 -1
  62. data/app/models/katello/generic_content_unit.rb +16 -0
  63. data/app/models/katello/glue/pulp/repos.rb +9 -25
  64. data/app/models/katello/kt_environment.rb +1 -1
  65. data/app/models/katello/product.rb +4 -4
  66. data/app/models/katello/repository.rb +13 -7
  67. data/app/models/katello/repository_generic_content_unit.rb +7 -0
  68. data/app/models/katello/root_repository.rb +38 -7
  69. data/app/models/setting/content.rb +5 -0
  70. data/app/services/cert/certs.rb +16 -8
  71. data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
  72. data/app/services/katello/candlepin/consumer.rb +6 -0
  73. data/app/services/katello/component_view_presenter.rb +27 -0
  74. data/app/services/katello/pulp/repository.rb +1 -1
  75. data/app/services/katello/pulp/server.rb +2 -2
  76. data/app/services/katello/pulp3/api/core.rb +4 -0
  77. data/app/services/katello/pulp3/api/generic.rb +68 -0
  78. data/app/services/katello/pulp3/generic_content_unit.rb +29 -0
  79. data/app/services/katello/pulp3/pulp_content_unit.rb +5 -1
  80. data/app/services/katello/pulp3/repository/generic.rb +94 -0
  81. data/app/services/katello/pulp3/repository/yum.rb +4 -5
  82. data/app/services/katello/pulp3/repository.rb +27 -12
  83. data/app/services/katello/pulp3/repository_mirror.rb +2 -2
  84. data/app/services/katello/pulp3/smart_proxy_repository.rb +4 -4
  85. data/app/services/katello/registration_manager.rb +18 -7
  86. data/app/services/katello/repository_type.rb +59 -1
  87. data/app/services/katello/repository_type_manager.rb +116 -24
  88. data/app/views/katello/api/v2/content_views/base.json.rabl +4 -4
  89. data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
  90. data/app/views/smart_proxies/plugins/_pulpcore.html.erb +2 -5
  91. data/app/views/smart_proxies/pulp_status.html.erb +0 -7
  92. data/config/katello.yaml.example +0 -21
  93. data/config/routes/api/v2.rb +2 -1
  94. data/db/functions/deb_version_cmp_v01.sql +200 -0
  95. data/db/migrate/20171110082124_add_ssl_certs_to_products_and_repos.rb +5 -1
  96. data/db/migrate/20200402130013_add_repsoitory_docker_meta_tag_f_key.rb +3 -1
  97. data/db/migrate/20210624221630_katello_generic_content.rb +22 -0
  98. data/db/migrate/20210625095042_add_retain_package_versions_count.rb +9 -0
  99. data/db/migrate/20210628182553_add_generic_remote_options_to_root_repository.rb +5 -0
  100. data/db/migrate/20210714140440_remove_repo_export_permission.rb +5 -0
  101. data/db/migrate/20210721163730_change_gpg_keys_to_content_credentials.rb +8 -0
  102. data/db/migrate/20210728130748_create_function_deb_version_cmp.rb +12 -0
  103. data/db/seeds.d/111-upgrade_tasks.rb +1 -2
  104. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +7 -5
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +4 -1
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +1 -1
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +2 -1
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +25 -33
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +1 -1
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +1 -6
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +10 -2
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +9 -0
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +0 -2
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html +1 -25
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +31 -13
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +11 -3
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/aggregate-task.factory.js +3 -3
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task.factory.js +1 -1
  123. data/lib/katello/engine.rb +2 -4
  124. data/lib/katello/permission_creator.rb +6 -12
  125. data/lib/katello/plugin.rb +76 -80
  126. data/lib/katello/repository_types/python.rb +37 -0
  127. data/lib/katello/tasks/reimport.rake +0 -9
  128. data/lib/katello/tasks/repository.rake +3 -4
  129. data/lib/katello/version.rb +1 -1
  130. data/locale/action_names.rb +28 -29
  131. data/locale/bn/katello.po +699 -221
  132. data/locale/cs/katello.po +167 -59
  133. data/locale/de/katello.po +585 -352
  134. data/locale/en/katello.po +167 -59
  135. data/locale/es/katello.po +1388 -1189
  136. data/locale/fr/katello.po +1740 -1494
  137. data/locale/gu/katello.po +896 -416
  138. data/locale/hi/katello.po +892 -415
  139. data/locale/it/katello.po +371 -170
  140. data/locale/ja/katello.po +1657 -1439
  141. data/locale/katello.pot +933 -736
  142. data/locale/kn/katello.po +894 -416
  143. data/locale/ko/katello.po +515 -317
  144. data/locale/mr/katello.po +857 -415
  145. data/locale/or/katello.po +894 -416
  146. data/locale/pa/katello.po +874 -411
  147. data/locale/pt/katello.po +347 -154
  148. data/locale/pt_BR/katello.po +1398 -1215
  149. data/locale/ru/katello.po +671 -463
  150. data/locale/ta/katello.po +697 -221
  151. data/locale/te/katello.po +891 -415
  152. data/locale/zh_CN/katello.po +2029 -1845
  153. data/locale/zh_TW/katello.po +735 -407
  154. data/package.json +3 -1
  155. data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
  156. data/webpack/components/RoutedTabs/RoutedTabs.js +7 -8
  157. data/webpack/components/Table/TableWrapper.js +19 -11
  158. data/webpack/components/Table/helpers.js +1 -1
  159. data/webpack/components/extensions/HostDetails/Tabs/ContentTab.js +42 -0
  160. data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +12 -0
  161. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +4 -0
  162. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
  163. data/webpack/components/extensions/RegistrationCommands/index.js +1 -2
  164. data/webpack/components/pf3Table/formatters/selectionHeaderCellFormatter.js +2 -1
  165. data/webpack/fills_index.js +4 -1
  166. data/webpack/redux/actions/RedHatRepositories/helpers.js +2 -4
  167. data/webpack/redux/reducers/RedHatRepositories/enabled.js +4 -1
  168. data/webpack/scenes/ContentViews/ContentViewsActions.js +16 -1
  169. data/webpack/scenes/ContentViews/ContentViewsConstants.js +15 -0
  170. data/webpack/scenes/ContentViews/ContentViewsPage.js +12 -22
  171. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +4 -3
  172. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +25 -14
  173. data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +4 -2
  174. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +153 -0
  175. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +21 -10
  176. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +157 -19
  177. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +100 -108
  178. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +140 -16
  179. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +367 -0
  180. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +59 -6
  181. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +43 -0
  182. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +44 -13
  183. data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +161 -0
  184. data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterAdd.test.js +54 -0
  185. data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +124 -0
  186. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +8 -6
  187. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +7 -6
  188. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +4 -3
  189. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +71 -12
  190. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +77 -0
  191. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +13 -12
  192. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +2 -2
  193. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +17 -14
  194. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +3 -3
  195. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +2 -2
  196. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +6 -2
  197. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +61 -20
  198. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewTaskInProgressResponse.fixtures.json +71 -0
  199. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewTaskResponse.fixtures.json +75 -0
  200. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +86 -1
  201. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +713 -0
  202. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
  203. data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +184 -0
  204. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +104 -0
  205. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +71 -0
  206. data/webpack/scenes/ContentViews/Publish/ContentViewPublishSelectors.js +17 -0
  207. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +145 -0
  208. data/webpack/scenes/ContentViews/Publish/__tests__/environmentPaths.fixtures.json +352 -0
  209. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +184 -0
  210. data/webpack/scenes/ContentViews/Publish/__tests__/publishResponse.fixture.json +69 -0
  211. data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +3 -0
  212. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +75 -48
  213. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +15 -2
  214. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -10
  215. data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +22 -10
  216. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathActions.js +12 -0
  217. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathConstants.js +2 -0
  218. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathSelectors.js +16 -0
  219. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +72 -0
  220. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +8 -0
  221. data/webpack/scenes/ContentViews/components/TaskPresenter/TaskPresenter.js +85 -0
  222. data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +9 -8
  223. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +4 -25
  224. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -3
  225. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
  226. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +4 -2
  227. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +24 -0
  228. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +4 -1
  229. data/webpack/scenes/Subscriptions/index.js +1 -4
  230. metadata +74 -39
  231. data/app/lib/actions/candlepin/environment/create.rb +0 -21
  232. data/app/lib/actions/foreman/environment/destroy.rb +0 -23
  233. data/app/lib/actions/katello/content_view/environment_create.rb +0 -21
  234. data/app/lib/actions/katello/repository/export.rb +0 -85
  235. data/app/lib/actions/katello/repository/purge_empty_content.rb +0 -16
  236. data/app/lib/actions/katello/repository/upload_errata.rb +0 -38
  237. data/app/lib/katello/util/proxy_uri.rb +0 -64
  238. data/app/models/katello/rhsm_fact_importer.rb +0 -20
  239. data/app/models/katello/rhsm_fact_name.rb +0 -17
  240. data/app/models/katello/rhsm_fact_parser.rb +0 -120
@@ -0,0 +1,200 @@
1
+ -- function for debian version comparison
2
+
3
+ --compare two numbers
4
+ CREATE OR REPLACE FUNCTION deb_version_cmp_num(_left text, _right text)
5
+ RETURNS integer
6
+ --return -1 if left > right
7
+ --return 0 if left = right
8
+ --return 1 if left < right
9
+ AS $$
10
+ DECLARE
11
+ lint numeric;
12
+ rint numeric;
13
+ BEGIN
14
+ --'0' and '' are compared as equal in the dpkg implementation
15
+ IF _left = '' THEN
16
+ _left = '0';
17
+ END IF;
18
+ IF _right = '' THEN
19
+ _right = '0';
20
+ END IF;
21
+ lint := CAST (_left AS numeric);
22
+ rint := CAST (_right AS numeric);
23
+ IF lint < rint THEN
24
+ RETURN -1;
25
+ ELSIF lint > rint THEN
26
+ RETURN 1;
27
+ ELSE
28
+ RETURN 0;
29
+ END IF;
30
+ END;
31
+ $$ IMMUTABLE STRICT LANGUAGE plpgsql;
32
+
33
+ --compare two strings without digits
34
+ CREATE OR REPLACE FUNCTION deb_version_cmp_al(_left text, _right text)
35
+ RETURNS integer
36
+ --return -1 if left > right
37
+ --return 0 if left = right
38
+ --return 1 if left < right
39
+ AS $$
40
+ DECLARE
41
+ lpair text ARRAY[2];
42
+ rpair text ARRAY[2];
43
+ BEGIN
44
+ --go through the string character by character and compare
45
+ lpair := ARRAY['', _left];
46
+ rpair := ARRAY['', _right];
47
+
48
+ LOOP
49
+ --for each character do:
50
+ IF lpair[2] = '' AND rpair[2] = '' THEN
51
+ --both strings are equal and remaining characters are empty
52
+ return 0;
53
+ END IF;
54
+
55
+ --get the next character into l/rpair[1]
56
+ lpair := regexp_matches(lpair[2], '(.?)(.*)');
57
+ rpair := regexp_matches(rpair[2], '(.?)(.*)');
58
+
59
+ IF lpair[1] = rpair[1] THEN
60
+ --characters are equal, continue with next character
61
+ CONTINUE;
62
+ END IF;
63
+ --tilde comes before any other character and befor the empty string
64
+ IF lpair[1] = '~' THEN
65
+ RETURN -1;
66
+ END IF;
67
+ IF rpair[1] = '~' THEN
68
+ RETURN 1;
69
+ END IF;
70
+ --next check for empty string
71
+ IF lpair[1] = '' THEN
72
+ RETURN -1;
73
+ END IF;
74
+ IF rpair[1] = '' THEN
75
+ RETURN 1;
76
+ END IF;
77
+ --else order by ascii value of character
78
+ IF lpair[1] SIMILAR TO '[a-zA-Z]' THEN
79
+ IF rpair[1] SIMILAR TO '[a-zA-Z]' AND ascii(lpair[1]) > ascii(rpair[1]) THEN
80
+ RETURN 1;
81
+ END IF;
82
+ RETURN -1;
83
+ END IF;
84
+ IF rpair[1] SIMILAR TO '[a-zA-Z]' THEN
85
+ RETURN 1;
86
+ END IF;
87
+ IF ascii(lpair[1]) < ascii(rpair[1]) THEN
88
+ RETURN -1;
89
+ END IF;
90
+ RETURN 1;
91
+ END LOOP;
92
+ END;
93
+ $$ IMMUTABLE STRICT LANGUAGE plpgsql;
94
+
95
+ CREATE OR REPLACE FUNCTION deb_version_cmp_string(lstring text, rstring text, _left text, _right text, version boolean)
96
+ RETURNS integer
97
+ --return -1 if left > right
98
+ --return 0 if left = right
99
+ --return 1 if left < right
100
+ AS $$
101
+ DECLARE
102
+ lpair text ARRAY[2];
103
+ rpair text ARRAY[2];
104
+ res integer;
105
+ BEGIN
106
+ --split of digits and non-digits part
107
+ lpair[1] := LEFT (lstring, 1);
108
+ rpair[1] := LEFT (rstring, 1);
109
+ lpair[2] := lstring;
110
+ rpair[2] := rstring;
111
+
112
+
113
+ --if first characters are digit and non-digit (this is faulty for version)
114
+ IF lpair[1] SIMILAR TO '[a-zA-Z\.\:\+\~\-]' THEN
115
+ IF version THEN
116
+ RAISE WARNING 'version % has bad syntax: version number does not start with digit', _left;
117
+ END IF;
118
+ IF rpair[1] SIMILAR TO '[0-9]' THEN
119
+ RETURN 1;
120
+ END IF;
121
+ ELSIF rpair[1] SIMILAR TO '[a-zA-Z\.\:\+\~\-]' THEN
122
+ IF version THEN
123
+ RAISE WARNING 'version % has bad syntax: version number does not start with digit', _right;
124
+ END IF;
125
+ RETURN -1;
126
+ END IF;
127
+
128
+ --compare versions
129
+ LOOP
130
+ --if no more characters to compare, strings are equal
131
+ IF lpair[2] = '' AND rpair[2] = '' THEN
132
+ return 0;
133
+ END IF;
134
+
135
+ --cut off digit part starting from beginning and rest
136
+ lpair := regexp_matches(lpair[2], '([0-9]*)(.*)');
137
+ rpair := regexp_matches(rpair[2], '([0-9]*)(.*)');
138
+
139
+ --compare digit part
140
+ res := deb_version_cmp_num(lpair[1], rpair[1]);
141
+ IF res != 0 THEN
142
+ RETURN res;
143
+ END IF;
144
+
145
+ --cut off into largest non-digit part starting from beginning and rest
146
+ lpair := regexp_matches(lpair[2], '([^0-9]*)(.*)');
147
+ rpair := regexp_matches(rpair[2], '([^0-9]*)(.*)');
148
+
149
+ --compare non-digit part
150
+ res := deb_version_cmp_al(lpair[1], rpair[1]);
151
+ IF res != 0 THEN
152
+ RETURN res;
153
+ END IF;
154
+ END LOOP;
155
+ END
156
+ $$ IMMUTABLE STRICT LANGUAGE plpgsql;
157
+
158
+
159
+ CREATE OR REPLACE FUNCTION deb_version_cmp(_left text, _right text)
160
+ RETURNS integer
161
+ --return -1 if left > right
162
+ --return 0 if left = right
163
+ --return 1 if left < right
164
+ AS $$
165
+ DECLARE
166
+ lepochver text ARRAY[2];
167
+ repochver text ARRAY[2];
168
+ lverrev text ARRAY[2];
169
+ rverrev text ARRAY[2];
170
+ res integer;
171
+ BEGIN
172
+ --split in epoch and version+revision
173
+ lepochver := regexp_matches(_left, '(?:([0-9]*):)?(.*)');
174
+ lepochver[1] := coalesce(lepochver[1], '0');
175
+ repochver := regexp_matches(_right, '(?:([0-9]*):)?(.*)');
176
+ repochver[1] := coalesce(repochver[1], '0');
177
+
178
+ --compare epoch
179
+ res := deb_version_cmp_num(lepochver[1], repochver[1]);
180
+ IF res != 0 THEN
181
+ RETURN res;
182
+ END IF;
183
+
184
+ --split in version and revision
185
+ lverrev := regexp_matches(lepochver[2], '(.*?)(?:-([a-zA-Z0-9\+\.~]*))?$');
186
+ lverrev[2] := coalesce(lverrev[2], '');
187
+ rverrev := regexp_matches(repochver[2], '(.*?)(?:-([a-zA-Z0-9\+\.~]*))?$');
188
+ rverrev[2] := coalesce(rverrev[2], '');
189
+
190
+ --compare version
191
+ res := deb_version_cmp_string(lverrev[1], rverrev[1], _left, _right, TRUE);
192
+ IF res != 0 THEN
193
+ RETURN res;
194
+ END IF;
195
+
196
+ --compare revision
197
+ res := deb_version_cmp_string(lverrev[2], rverrev[2], _left, _right, FALSE);
198
+ RETURN res;
199
+ END
200
+ $$ IMMUTABLE STRICT LANGUAGE plpgsql;
@@ -1,4 +1,8 @@
1
1
  class AddSslCertsToProductsAndRepos < ActiveRecord::Migration[4.2]
2
+ class FakeGpgKey < ApplicationRecord
3
+ self.table_name = 'katello_gpg_keys'
4
+ end
5
+
2
6
  def up
3
7
  add_column :katello_products, :ssl_ca_cert_id, :integer, :null => true
4
8
  add_index :katello_products, :ssl_ca_cert_id
@@ -25,7 +29,7 @@ class AddSslCertsToProductsAndRepos < ActiveRecord::Migration[4.2]
25
29
  add_foreign_key :katello_repositories, :katello_gpg_keys, :name => "katello_repositories_ssl_client_key_id_fk", :column => :ssl_client_key_id, :primary_key => :id
26
30
 
27
31
  add_column :katello_gpg_keys, :content_type, :string, :null => false, :default => "gpg_key", :limit => 255
28
- Katello::GpgKey.update_all(:content_type => "gpg_key")
32
+ FakeGpgKey.update_all(:content_type => "gpg_key")
29
33
  end
30
34
 
31
35
  def down
@@ -17,7 +17,9 @@ class AddRepsoitoryDockerMetaTagFKey < ActiveRecord::Migration[5.2]
17
17
  add_index :katello_repository_docker_meta_tags, [:repository_id, :docker_meta_tag_id], :unique => true, :name => 'repository_docker_meta_tags_rid_dmtid'
18
18
 
19
19
  Katello::RepositoryDockerTag.where.not(:repository_id => Katello::Repository.select(:id)).delete_all
20
- Katello::RepositoryDockerTag.where.not(:docker_tag_id => Katello::DockerTag.select(:id)).delete_all
20
+ # rubocop:disable Layout/LineLength
21
+ Katello::RepositoryDockerTag.delete_by('katello_repository_docker_tags.id IN (SELECT katello_repository_docker_tags.id FROM katello_repository_docker_tags LEFT JOIN katello_docker_tags d ON katello_repository_docker_tags.docker_tag_id = d.id GROUP BY katello_repository_docker_tags.id HAVING (count(d.id) = 0))')
22
+ # rubocop:enable Layout/LineLength
21
23
 
22
24
  add_foreign_key :katello_repository_docker_tags, :katello_repositories, :column => :repository_id
23
25
  add_foreign_key :katello_repository_docker_tags, :katello_docker_tags, :column => :docker_tag_id
@@ -0,0 +1,22 @@
1
+ class KatelloGenericContent < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table "katello_generic_content_units" do |t|
4
+ t.string 'name'
5
+ t.string 'version'
6
+ t.string 'pulp_id'
7
+ t.string 'content_type'
8
+ t.timestamps
9
+ end
10
+
11
+ create_table "katello_repository_generic_content_units" do |t|
12
+ t.references :generic_content_unit, :null => false, index: { :name => 'index_katello_repo_generic_content_unit' }
13
+ t.references :repository, index: false
14
+ t.timestamps
15
+ end
16
+
17
+ add_index :katello_repository_generic_content_units, [:generic_content_unit_id, :repository_id], :unique => true, :name => 'repository_generic_content_unit_ids'
18
+
19
+ add_foreign_key "katello_repository_generic_content_units", "katello_generic_content_units", :column => "generic_content_unit_id"
20
+ add_foreign_key "katello_repository_generic_content_units", "katello_repositories", :column => "repository_id"
21
+ end
22
+ end
@@ -0,0 +1,9 @@
1
+ class AddRetainPackageVersionsCount < ActiveRecord::Migration[5.2]
2
+ def up
3
+ add_column :katello_root_repositories, :retain_package_versions_count, :integer
4
+ end
5
+
6
+ def down
7
+ remove_column :katello_root_repositories, :retain_package_versions_count
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddGenericRemoteOptionsToRootRepository < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :katello_root_repositories, :generic_remote_options, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveRepoExportPermission < ActiveRecord::Migration[6.0]
2
+ def change
3
+ Permission.where(:name => 'export_products').destroy_all
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ class ChangeGpgKeysToContentCredentials < ActiveRecord::Migration[6.0]
2
+ def change
3
+ rename_table :katello_gpg_keys, :katello_content_credentials
4
+
5
+ permissions = Permission.where(:resource_type => 'Katello::GpgKey')
6
+ permissions.update_all(:resource_type => 'Katello::ContentCredential')
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ class CreateFunctionDebVersionCmp < ActiveRecord::Migration[6.0]
2
+ def up
3
+ create_function :deb_version_cmp
4
+ end
5
+
6
+ def down
7
+ drop_function :deb_version_cmp
8
+ drop_function :deb_version_cmp_al
9
+ drop_function :deb_version_cmp_num
10
+ drop_function :deb_version_cmp_string
11
+ end
12
+ end
@@ -4,7 +4,6 @@ UpgradeTask.define_tasks(:katello) do
4
4
  {:name => 'katello:clean_backend_objects', :long_running => true, :skip_failure => true, :always_run => true},
5
5
  {:name => 'katello:upgrades:4.0:remove_ostree_puppet_content'},
6
6
  {:name => 'katello:upgrades:4.1:sync_noarch_content'},
7
- {:name => 'katello:upgrades:4.1:fix_invalid_pools'},
8
- {:name => 'katello:upgrades:4.1:update_content_import_export_perms'}
7
+ {:name => 'katello:upgrades:4.1:fix_invalid_pools'}
9
8
  ]
10
9
  end
@@ -20,7 +20,7 @@
20
20
  angular.module('Bastion').value('CurrentOrganization', "<%= Organization.current.id if Organization.current %>");
21
21
  angular.module('Bastion').value('simpleContentAccessEnabled', <%= Organization.current.simple_content_access? if Organization.current %>);
22
22
  angular.module('Bastion').value('foreman', tfm);
23
- angular.module('Bastion').value('repositoryTypes', angular.fromJson('<%= Katello::RepositoryTypeManager.repository_types.values.to_json.html_safe %>'));
23
+ angular.module('Bastion').value('repositoryTypes', angular.fromJson('<%= Katello::RepositoryTypeManager.enabled_repository_types.values.to_json.html_safe %>'));
24
24
  angular.module('Bastion').value('deleteHostOnUnregister', angular.fromJson('<%= Setting[:unregister_delete_host] %>'));
25
25
  angular.module('Bastion').value('contentDisconnected', angular.fromJson('<%= Setting[:content_disconnected] %>'));
26
26
  angular.module('Bastion').value('globalContentProxy', angular.fromJson('<%= Setting[:content_default_http_proxy].empty? ? nil.to_json : Setting[:content_default_http_proxy].to_json.html_safe %>'));
@@ -47,8 +47,7 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
47
47
 
48
48
  if (isTaskInProgress(syncTask)) {
49
49
  state = syncState.SYNCING;
50
- }
51
- if (syncTask && syncTask.result !== 'success') {
50
+ } else if (syncTask && syncTask.result !== 'success') {
52
51
  state = syncState.FAILURE;
53
52
  } else {
54
53
  state = syncState.DEFAULT;
@@ -83,7 +82,7 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
83
82
  }
84
83
 
85
84
  CapsuleContent.syncStatus(params).$promise.then(function (syncStatus) {
86
- var errorCount, errorMessage;
85
+ var errorCount, errorMessage, activeOrFailedTask;
87
86
  $scope.syncStatus = syncStatus;
88
87
  if (syncStatus['last_sync_time'] === null) {
89
88
  $scope.syncStatus['last_sync_time'] = translate('Never');
@@ -91,10 +90,13 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
91
90
 
92
91
  if (syncStatus['active_sync_tasks'].length > 0) {
93
92
  $scope.syncTask = aggregateTasks(syncStatus['active_sync_tasks']);
93
+ activeOrFailedTask = pickLastTask(syncStatus['active_sync_tasks']);
94
94
 
95
95
  } else if (syncStatus['last_failed_sync_tasks'].length > 0) {
96
+ activeOrFailedTask = pickLastTask(syncStatus['last_failed_sync_tasks']);
97
+ $scope.syncTask = activeOrFailedTask;
96
98
  errorCount = $scope.syncTask.humanized.errors.length;
97
- $scope.syncTask = pickLastTask(syncStatus['last_failed_sync_tasks']);
99
+
98
100
  if (errorCount > 0) {
99
101
  errorMessage = $scope.syncTask.humanized.errors[0];
100
102
  if (errorCount > 2) {
@@ -105,7 +107,7 @@ angular.module('Bastion.capsule-content').controller('CapsuleContentController',
105
107
  Notification.setErrorMessage(errorMessage);
106
108
  }
107
109
  }
108
- $scope.syncState.set(stateFromTask($scope.syncTask));
110
+ $scope.syncState.set(stateFromTask(activeOrFailedTask));
109
111
  }, function (response) {
110
112
  $scope.syncStatus = {
111
113
  'active_sync_tasks': [],
@@ -101,7 +101,10 @@
101
101
  <td bst-table-cell>{{ erratum.title }}</td>
102
102
  <td class="small" bst-table-cell>{{ erratum.issued }}</td>
103
103
  <td class="small" bst-table-cell class="number-cell">
104
- <span> {{ erratum.affected_hosts_count }} </span>
104
+ <a href="{{ '/content_hosts?search=installable_errata%3D' + erratum.errata_id }}">
105
+ <span> {{ erratum.affected_hosts_count }} </span>
106
+ <span class="fa fa-external-link"/>
107
+ </a>
105
108
  </td>
106
109
  </tr>
107
110
  </tbody>
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
 
15
15
  <nav data-block="item-actions">
16
- <button type="button" class="btn btn-primary" ng-hide="denied('publish_content_views', contentView) || contentView.import_only"
16
+ <button type="button" class="btn btn-primary" ng-hide="denied('publish_content_views', contentView) || contentView.import_only"
17
17
  ui-sref="content-view.publish">
18
18
  <span translate>Publish New Version</span>
19
19
  </button>
@@ -37,7 +37,7 @@ angular.module('Bastion.errata').controller('ApplyErrataController',
37
37
  $scope.errataActionFormValues = {
38
38
  authenticityToken: $window.AUTH_TOKEN.replace(/&quot;/g, ''),
39
39
  errata: IncrementalUpdate.getErrataIds().join(','),
40
- bulkHostIds: angular.toJson({ included: { ids: IncrementalUpdate.getBulkContentHosts().included.ids }}),
40
+ hostIds: IncrementalUpdate.getBulkContentHosts().included.ids.join(','),
41
41
  customize: false
42
42
  };
43
43
 
@@ -18,7 +18,7 @@
18
18
  <form id="errataActionForm" method="post" action="/katello/remote_execution">
19
19
  <input type="hidden" name="remote_action" value="errata_install"/>
20
20
  <input type="hidden" name="name" ng-value="errataActionFormValues.errata"/>
21
- <input type="hidden" name="bulk_host_ids" ng-value="errataActionFormValues.bulkHostIds"/>
21
+ <input type="hidden" name="host_ids" ng-value="errataActionFormValues.hostIds"/>
22
22
  <input type="hidden" name="customize" ng-value="errataActionFormValues.customize"/>
23
23
  <input type="hidden" name="authenticity_token" ng-value="errataActionFormValues.authenticityToken"/>
24
24
  <input type="hidden" name="install_all" ng-value="table.allResultsSelected" />
@@ -132,3 +132,4 @@
132
132
  </button>
133
133
  </form>
134
134
  </section>
135
+
@@ -725,6 +725,10 @@ msgstr ""
725
725
  msgid "An error occurred:"
726
726
  msgstr ""
727
727
 
728
+ #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
729
+ msgid "Ansible Collection Authorization"
730
+ msgstr ""
731
+
728
732
  #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
729
733
  msgid "Ansible Collections"
730
734
  msgstr ""
@@ -1286,7 +1290,6 @@ msgstr ""
1286
1290
 
1287
1291
  #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js
1288
1292
  #: app/assets/javascripts/bastion_katello/products/bulk/products-bulk-http-proxy-modal.controller.js
1289
- #: app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js
1290
1293
  #: app/assets/javascripts/bastion_katello/products/products.controller.js
1291
1294
  msgid "Click to view task"
1292
1295
  msgstr ""
@@ -2378,11 +2381,16 @@ msgid "Group"
2378
2381
  msgstr ""
2379
2382
 
2380
2383
  #: app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html
2381
- msgid "Group Install"
2384
+ msgid "Group Install (Deprecated)"
2385
+ msgstr ""
2386
+
2387
+ #: app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html
2388
+ #: app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html
2389
+ msgid "Group package actions are being deprecated, and will be removed in a future version."
2382
2390
  msgstr ""
2383
2391
 
2384
2392
  #: app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html
2385
- msgid "Group Remove"
2393
+ msgid "Group Remove (Deprecated)"
2386
2394
  msgstr ""
2387
2395
 
2388
2396
  #: app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html
@@ -3568,11 +3576,14 @@ msgstr ""
3568
3576
  msgid "Package Filter:"
3569
3577
  msgstr ""
3570
3578
 
3571
- #: app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html
3572
3579
  #: app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js
3573
3580
  msgid "Package Group"
3574
3581
  msgstr ""
3575
3582
 
3583
+ #: app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html
3584
+ msgid "Package Group (Deprecated)"
3585
+ msgstr ""
3586
+
3576
3587
  #: app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-group-filter.html
3577
3588
  msgid "Package Group Filter:"
3578
3589
  msgstr ""
@@ -3663,10 +3674,6 @@ msgstr ""
3663
3674
  msgid "Packages are automatically Applicable if they are Upgradable"
3664
3675
  msgstr ""
3665
3676
 
3666
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html
3667
- msgid "Packages are corrupt, often leading to an error \"Package does not match intended download\" or \"Hash Sum mismatch\"."
3668
- msgstr ""
3669
-
3670
3677
  #: app/assets/javascripts/bastion_katello/errata/details/views/erratum-packages.html
3671
3678
  msgid "Packages for Errata:"
3672
3679
  msgstr ""
@@ -3720,10 +3727,6 @@ msgstr ""
3720
3727
  msgid "Performing host package actions is disabled because Katello is not configured for Remote Execution or Katello Agent."
3721
3728
  msgstr ""
3722
3729
 
3723
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html
3724
- msgid "Performs a complete sync, verifying the checksum of all packages afterwards. Any missing or corrupt package will be re-downloaded. This option will take the longest amount of time. Choose this option if:"
3725
- msgstr ""
3726
-
3727
3730
  #: app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html
3728
3731
  msgid "Physical"
3729
3732
  msgstr ""
@@ -4077,10 +4080,6 @@ msgstr ""
4077
4080
  msgid "Remote execution plugin is required to be able to run any helpers."
4078
4081
  msgstr ""
4079
4082
 
4080
- #: app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js
4081
- msgid "Removal of selected repositories initiated successfully."
4082
- msgstr ""
4083
-
4084
4083
  #: app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html
4085
4084
  #: app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html
4086
4085
  #: app/assets/javascripts/bastion_katello/content-views/deletion/views/content-view-deletion.html
@@ -4494,6 +4493,11 @@ msgstr ""
4494
4493
  msgid "Result"
4495
4494
  msgstr ""
4496
4495
 
4496
+ #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
4497
+ #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
4498
+ msgid "Retain package versions"
4499
+ msgstr ""
4500
+
4497
4501
  #: app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html
4498
4502
  #: app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html
4499
4503
  msgid "Role"
@@ -4605,7 +4609,7 @@ msgid "Select the Lifecycle Environments you would like to remove Version {{ ver
4605
4609
  msgstr ""
4606
4610
 
4607
4611
  #: app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html
4608
- msgid "Selecting \"Complete Sync\" will cause only Yum repositories of the selected product to be synced. Selecting \"Validate Content\" will cause only Yum repositories using the \"Immediate\" download policy to be synced."
4612
+ msgid "Selecting \"Complete Sync\" will cause only Yum repositories of the selected product to be synced."
4609
4613
  msgstr ""
4610
4614
 
4611
4615
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
@@ -4725,10 +4729,6 @@ msgstr ""
4725
4729
  msgid "Source RPMs"
4726
4730
  msgstr ""
4727
4731
 
4728
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html
4729
- msgid "Specific packages are throwing a 404 from the package-manager."
4730
- msgstr ""
4731
-
4732
4732
  #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
4733
4733
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
4734
4734
  #: app/assets/javascripts/bastion_katello/products/details/views/product-info.html
@@ -5136,6 +5136,10 @@ msgid ""
5136
5136
  " See the <a href=\"/content_views\">content views page</a> to manage and promote a content view."
5137
5137
  msgstr ""
5138
5138
 
5139
+ #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
5140
+ msgid "The maximum number of versions of each package to keep."
5141
+ msgstr ""
5142
+
5139
5143
  #: app/assets/javascripts/bastion_katello/organizations/views/organization-selector.html
5140
5144
  msgid "The page you are attempting to access requires selecting a specific organization."
5141
5145
  msgstr ""
@@ -5632,10 +5636,6 @@ msgstr ""
5632
5636
  msgid "Username of the upstream repository user for authentication. Leave empty if repository does not require authentication."
5633
5637
  msgstr ""
5634
5638
 
5635
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html
5636
- msgid "Validate Content Sync"
5637
- msgstr ""
5638
-
5639
5639
  #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
5640
5640
  msgid "Variant"
5641
5641
  msgstr ""
@@ -5776,10 +5776,6 @@ msgstr ""
5776
5776
  msgid "When Auto Attach is disabled, registering systems will be attached to all associated subscriptions."
5777
5777
  msgstr ""
5778
5778
 
5779
- #: app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync-options.html
5780
- msgid "When validating content, repositories using the \"On Demand\" download policy will download all packages within the repository."
5781
- msgstr ""
5782
-
5783
5779
  #: app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html
5784
5780
  msgid "Whitespace-separated list of components to sync from (leave clear to sync all). Example: main"
5785
5781
  msgstr ""
@@ -5824,10 +5820,6 @@ msgstr ""
5824
5820
  msgid "You can upload a requirements.yml file below to auto-fill contents or paste contents of requirement.yml here"
5825
5821
  msgstr ""
5826
5822
 
5827
- #: app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html
5828
- msgid "You cannot remove these repositories because they belong to a Red Hat product."
5829
- msgstr ""
5830
-
5831
5823
  #: app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html
5832
5824
  msgid "You cannot remove these repositories because you do not have permission."
5833
5825
  msgstr ""
@@ -12,7 +12,7 @@
12
12
 
13
13
  <div class="help-block">
14
14
  <span translate>
15
- Selecting "Complete Sync" will cause only Yum repositories of the selected product to be synced. Selecting "Validate Content" will cause only Yum repositories using the "Immediate" download policy to be synced.
15
+ Selecting "Complete Sync" will cause only Yum repositories of the selected product to be synced.
16
16
  </span>
17
17
  </div>
18
18
 
@@ -65,10 +65,7 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
65
65
  var success, error, params = getParams(), removalPromise;
66
66
 
67
67
  success = function (response) {
68
- var message = translate('Removal of selected repositories initiated successfully.');
69
- var link = ("/foreman_tasks/tasks/%taskId").replace('%taskId', response.task.id);
70
- var alertBody = { children: translate("Click to view task"), href: link };
71
- Notification.setSuccessMessage(message, {link: alertBody});
68
+ $state.go('product.tasks.details', {taskId: response.task.id});
72
69
  };
73
70
 
74
71
  error = function (response) {
@@ -97,8 +94,6 @@ angular.module('Bastion.products').controller('ProductRepositoriesController',
97
94
  if (product.$resolved) {
98
95
  if ($scope.denied('destroy_products', product)) {
99
96
  readOnlyReason = 'permissions';
100
- } else if (product.redhat) {
101
- readOnlyReason = 'redhat';
102
97
  }
103
98
  }
104
99
 
@@ -27,7 +27,8 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
27
27
 
28
28
  $scope.repository.$promise.then(function () {
29
29
  $scope.uploadURL = 'katello/api/v2/repositories/' + $scope.repository.id + '/upload_content';
30
- $scope.repository['ignore_srpms'] = $scope.repository['ignorable_content'].includes("srpm");
30
+ $scope.repository['ignore_srpms'] = $scope.repository['ignorable_content'] && $scope.repository['ignorable_content'].includes("srpm");
31
+ $scope.repository['ansible_collection_auth_exists'] = $scope.repository['ansible_collection_auth_url'] && $scope.repository['ansible_collection_auth_token'];
31
32
  });
32
33
 
33
34
  $scope.gpgKeys = function () {
@@ -113,7 +114,7 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
113
114
  repository.os_versions = $scope.osVersionsParam();
114
115
  repository.$update(function (response) {
115
116
  deferred.resolve(response);
116
- $scope.repository.ignore_srpms = $scope.repository.ignorable_content.includes("srpm");
117
+ $scope.repository.ignore_srpms = $scope.repository.ignorable_content && $scope.repository.ignorable_content.includes("srpm");
117
118
  if (!_.isEmpty(response["docker_tags_whitelist"])) {
118
119
  repository.commaTagsWhitelist = repository["docker_tags_whitelist"].join(", ");
119
120
  } else {
@@ -195,6 +196,13 @@ angular.module('Bastion.repositories').controller('RepositoryDetailsInfoControll
195
196
  $scope.save($scope.repository);
196
197
  };
197
198
 
199
+ $scope.clearAnsibleCollectionAuth = function () {
200
+ $scope.repository['ansible_collection_auth_url'] = null;
201
+ $scope.repository['ansible_collection_auth_token'] = null;
202
+ $scope.repository['ansible_collection_auth_exists'] = false;
203
+ $scope.save($scope.repository);
204
+ };
205
+
198
206
  $scope.policies = HttpProxyPolicy.policies;
199
207
  $scope.proxies = [];
200
208
 
@@ -29,6 +29,15 @@ angular.module('Bastion.components.formatters').filter('upstreamPasswordFilter',
29
29
  };
30
30
  }]);
31
31
 
32
+ angular.module('Bastion.components.formatters').filter('ansibleAuthFilter', [function () {
33
+ return function (displayValue, repository) {
34
+ if (repository["ansible_collection_auth_url"] && repository["ansible_collection_auth_token"]) {
35
+ return '%(auth_url) / ********'.replace('%(auth_url)', repository["ansible_collection_auth_url"]);
36
+ }
37
+ return null;
38
+ };
39
+ }]);
40
+
32
41
  angular.module('Bastion.components.formatters').filter('httpProxyDetailsFilter', ['HttpProxyPolicy', function (HttpProxyPolicy) {
33
42
  return function (displayValue, repository) {
34
43
  var message = '%(proxyPolicy)'.replace('%(proxyPolicy)', HttpProxyPolicy.displayHttpProxyPolicyName(repository["http_proxy_policy"]));