katello 4.8.0.rc1 → 4.8.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +2 -18
  3. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +7 -5
  4. data/app/controllers/katello/api/v2/repositories_controller.rb +3 -18
  5. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +13 -8
  6. data/app/lib/actions/katello/alternate_content_source/create.rb +3 -1
  7. data/app/lib/actions/katello/alternate_content_source/update.rb +3 -1
  8. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +1 -1
  9. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +11 -11
  10. data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +0 -2
  11. data/app/lib/actions/pulp3/repository/reclaim_space.rb +1 -1
  12. data/app/lib/katello/api/v2/error_handling.rb +12 -2
  13. data/app/lib/katello/concerns/base_template_scope_extensions.rb +7 -3
  14. data/app/models/katello/alternate_content_source.rb +54 -4
  15. data/app/models/katello/concerns/host_managed_extensions.rb +14 -0
  16. data/app/models/katello/glue/provider.rb +1 -1
  17. data/app/models/katello/host/content_facet.rb +2 -0
  18. data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +1 -1
  19. data/app/services/katello/pulp3/content_view_version/export_validator.rb +16 -0
  20. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
  21. data/db/migrate/20230203141353_set_new_acs_verify_ssl_default.rb +5 -0
  22. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  23. data/lib/katello/tasks/upgrades/4.8/regenerate_imported_repository_metadata.rake +33 -0
  24. data/lib/katello/version.rb +1 -1
  25. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +10 -72
  26. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -3
  27. data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +6 -5
  28. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +1 -0
  29. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +3 -2
  30. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +1 -0
  31. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +2 -0
  32. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +1 -0
  33. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -0
  34. data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +87 -0
  35. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -1
  36. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +153 -28
  37. data/webpack/scenes/Hosts/ChangeContentSource/index.js +14 -15
  38. data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +4 -0
  39. data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +4 -0
  40. metadata +6 -3
@@ -14,7 +14,6 @@ import { selectApiDataStatus,
14
14
  selectApiChangeContentStatus,
15
15
  selectContentHosts,
16
16
  selectContentHostsWithoutContent,
17
- selectEnvironments,
18
17
  selectContentSources,
19
18
  selectJobInvocationPath,
20
19
  selectContentViews,
@@ -45,7 +44,6 @@ const ChangeContentSourcePage = () => {
45
44
 
46
45
  const contentHosts = useSelector(selectContentHosts);
47
46
  const hostsWithoutContent = useSelector(selectContentHostsWithoutContent);
48
- const environments = useSelector(selectEnvironments);
49
47
  const contentSources = useSelector(selectContentSources);
50
48
  const jobInvocationPath = useSelector(selectJobInvocationPath);
51
49
 
@@ -53,10 +51,12 @@ const ChangeContentSourcePage = () => {
53
51
  const contentViews = useSelector(selectContentViews);
54
52
 
55
53
  const [contentSourceId, setCapsuleId] = useState('');
56
- const [environmentId, setEnvironmentId] = useState('');
57
- const [contentViewId, setContentViewId] = useState('');
54
+ const [selectedEnvironment, setSelectedEnvironment] = useState([]);
55
+ const [contentViewName, setContentViewName] = useState('');
58
56
 
57
+ const contentViewId = contentViews?.find(cv => cv.name === contentViewName)?.id;
59
58
  const noHostSpecified = getHostIds(urlParams.host_id).length === 0 && urlParams.searchParam === '';
59
+ const environmentId = selectedEnvironment[0]?.id;
60
60
 
61
61
  const handleSubmit = (e) => {
62
62
  e.preventDefault();
@@ -72,8 +72,8 @@ const ChangeContentSourcePage = () => {
72
72
 
73
73
  const handleContentSource = (id) => {
74
74
  setCapsuleId(id);
75
- setEnvironmentId('');
76
- setContentViewId('');
75
+ setSelectedEnvironment([]);
76
+ setContentViewName('');
77
77
 
78
78
  if (id) {
79
79
  dispatch(getProxy(id));
@@ -93,12 +93,12 @@ const ChangeContentSourcePage = () => {
93
93
  return ([linkHosts, linkContent]);
94
94
  };
95
95
 
96
- const handleEnvironment = (envId) => {
97
- setEnvironmentId(envId);
98
- setContentViewId('');
96
+ const handleEnvironment = (selection) => {
97
+ setSelectedEnvironment(selection);
98
+ setContentViewName('');
99
99
 
100
- if (envId) {
101
- dispatch(getContentViews(envId));
100
+ if (selection[0].id) {
101
+ dispatch(getContentViews(selection[0].id));
102
102
  }
103
103
  };
104
104
  useEffect(() => {
@@ -146,12 +146,11 @@ const ChangeContentSourcePage = () => {
146
146
 
147
147
  <ContentSourceForm
148
148
  handleSubmit={handleSubmit}
149
- environments={environments}
150
149
  handleEnvironment={handleEnvironment}
151
- environmentId={environmentId}
150
+ environments={selectedEnvironment}
152
151
  contentViews={contentViews}
153
- handleContentView={setContentViewId}
154
- contentViewId={contentViewId}
152
+ handleContentView={setContentViewName}
153
+ contentViewName={contentViewName}
155
154
  contentSources={contentSources}
156
155
  contentSourceId={contentSourceId}
157
156
  handleContentSource={handleContentSource}
@@ -3,6 +3,7 @@ import {
3
3
  selectAPIResponse,
4
4
  selectAPIError,
5
5
  } from 'foremanReact/redux/API/APISelectors';
6
+ import { STATUS } from 'foremanReact/constants';
6
7
 
7
8
  import { CHANGE_CONTENT_SOURCE_DATA, CHANGE_CONTENT_SOURCE_PROXY, CHANGE_CONTENT_SOURCE, CHANGE_CONTENT_SOURCE_VIEWS } from './constants';
8
9
 
@@ -37,6 +38,9 @@ export const selectJobInvocationPath = state =>
37
38
  export const selectContentViews = state =>
38
39
  selectAPIResponse(state, CHANGE_CONTENT_SOURCE_VIEWS).results || [];
39
40
 
41
+ export const selectContentViewsStatus = state =>
42
+ selectAPIStatus(state, CHANGE_CONTENT_SOURCE_VIEWS) || STATUS.PENDING;
43
+
40
44
  export const selectTemplate = state =>
41
45
  selectAPIResponse(state, CHANGE_CONTENT_SOURCE) || '';
42
46
 
@@ -13,3 +13,7 @@
13
13
  .margin-top-20 {
14
14
  margin-top: 20px;
15
15
  }
16
+
17
+ .set-select-width {
18
+ width: 60%
19
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0.rc1
4
+ version: 4.8.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -2160,6 +2160,7 @@ files:
2160
2160
  - db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb
2161
2161
  - db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb
2162
2162
  - db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb
2163
+ - db/migrate/20230203141353_set_new_acs_verify_ssl_default.rb
2163
2164
  - db/seeds.d/101-locations.rb
2164
2165
  - db/seeds.d/102-organizations.rb
2165
2166
  - db/seeds.d/104-proxy.rb
@@ -4412,6 +4413,7 @@ files:
4412
4413
  - lib/katello/tasks/upgrades/4.3/fix_url_auth.rake
4413
4414
  - lib/katello/tasks/upgrades/4.4/publish_import_cvvs.rake
4414
4415
  - lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake
4416
+ - lib/katello/tasks/upgrades/4.8/regenerate_imported_repository_metadata.rake
4415
4417
  - lib/katello/tasks/virt_who_report.rake
4416
4418
  - lib/katello/url_constrained_cookie_store.rb
4417
4419
  - lib/katello/version.rb
@@ -5095,6 +5097,7 @@ files:
5095
5097
  - webpack/scenes/ContentViews/components/CVBreadCrumb.js
5096
5098
  - webpack/scenes/ContentViews/components/ContentViewIcon.js
5097
5099
  - webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelect.js
5100
+ - webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js
5098
5101
  - webpack/scenes/ContentViews/components/ContentViewsCounter.js
5099
5102
  - webpack/scenes/ContentViews/components/EnvironmentLabels.js
5100
5103
  - webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPathActions.js
@@ -5376,7 +5379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
5376
5379
  - !ruby/object:Gem::Version
5377
5380
  version: 1.3.1
5378
5381
  requirements: []
5379
- rubygems_version: 3.1.2
5382
+ rubygems_version: 3.1.6
5380
5383
  signing_key:
5381
5384
  specification_version: 4
5382
5385
  summary: Content and Subscription Management plugin for Foreman