katello 4.4.0.rc1 → 4.4.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.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +10 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -0
- data/app/lib/actions/katello/repository/errata_mail.rb +4 -5
- data/app/lib/actions/katello/repository/sync.rb +2 -2
- data/app/lib/actions/pulp3/abstract.rb +1 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +14 -4
- data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +1 -2
- data/app/lib/actions/pulp3/repository/reclaim_space.rb +3 -10
- data/app/lib/katello/util/pulpcore_content_filters.rb +2 -1
- data/app/models/katello/candlepin/repository_mapper.rb +1 -0
- data/app/models/katello/concerns/audit_comment_extensions.rb +17 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +11 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -0
- data/app/models/katello/content_view_version_export_history.rb +2 -1
- data/app/models/katello/content_view_version_import_history.rb +4 -4
- data/app/models/katello/host_available_module_stream.rb +10 -0
- data/app/models/katello/installed_package.rb +1 -0
- data/app/models/katello/root_repository.rb +14 -2
- data/app/models/setting/content.rb +9 -2
- data/app/services/katello/pulp3/api/yum.rb +4 -0
- data/app/services/katello/pulp3/repository/yum.rb +11 -4
- data/app/services/katello/pulp3/repository.rb +4 -2
- data/app/views/foreman/job_templates/remove_packages_by_search_query.erb +19 -0
- data/app/views/foreman/job_templates/update_packages_by_search_query.erb +19 -0
- data/app/views/katello/api/v2/content_views/base.json.rabl +8 -4
- data/app/views/katello/api/v2/host_module_streams/base.json.rabl +1 -0
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +2 -0
- data/db/migrate/20211019192121_create_cdn_configuration.katello.rb +11 -2
- data/db/migrate/20220209205137_expand_sync_timeout_settings.rb +23 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +10 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +17 -12
- data/lib/katello/plugin.rb +2 -0
- data/lib/katello/repository_types/ostree.rb +0 -6
- data/lib/katello/version.rb +1 -1
- data/webpack/components/Errata/index.js +57 -57
- data/webpack/components/ErratumTypeLabel.js +16 -16
- data/webpack/components/MultiSelect/index.js +2 -2
- data/webpack/components/Select/Select.js +1 -1
- data/webpack/components/SelectOrg/SelectOrgReducer.js +15 -15
- data/webpack/components/SelectOrg/SetOrganization.js +1 -1
- data/webpack/components/Table/TableHooks.js +1 -0
- data/webpack/components/Table/TableWrapper.js +4 -1
- data/webpack/components/TypeAhead/helpers/commonPropTypes.js +1 -1
- data/webpack/components/TypeAhead/helpers/helpers.js +14 -14
- data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +1 -1
- data/webpack/components/WithOrganization/withOrganization.js +3 -3
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +32 -1
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +3 -2
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +5 -3
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionContents.js +3 -3
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsActions.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsConstants.js +3 -0
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsSelectors.js +19 -0
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +241 -0
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/moduleStreamsTab.test.js +108 -0
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/modules.fixtures.json +34 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackageInstallModal.js +5 -5
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +255 -79
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +76 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +4 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +259 -9
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +22 -26
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +13 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +4 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +1 -1
- data/webpack/components/extensions/about/SystemStatuses.js +1 -1
- data/webpack/components/extensions/about/SystemStatusesReducer.js +10 -10
- data/webpack/components/pf3Table/components/Table.js +2 -2
- data/webpack/components/pf3Table/components/TableBody.js +2 -2
- data/webpack/redux/OrganizationProducts/OrganizationProductsReducer.js +15 -15
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +43 -43
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +43 -43
- data/webpack/redux/reducers/RedHatRepositories/sets.js +31 -31
- data/webpack/scenes/AnsibleCollections/AnsibleCollectionsReducer.js +26 -26
- data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsReducer.js +19 -19
- data/webpack/scenes/Content/Table/ContentTable.js +1 -1
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +2 -1
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +2 -2
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +8 -8
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +8 -8
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +46 -46
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +14 -14
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +14 -14
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +17 -17
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +19 -18
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +18 -18
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +46 -34
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +65 -48
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +1 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +2 -2
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -4
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +18 -18
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +10 -10
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +2 -2
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +7 -7
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +7 -7
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -3
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js +18 -18
- data/webpack/scenes/ModuleStreams/ModuleStreamsReducer.js +26 -26
- data/webpack/scenes/Organizations/OrganizationReducer.js +8 -8
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepositoryContent.js +4 -4
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
- data/webpack/scenes/Settings/SettingsReducer.js +14 -14
- data/webpack/scenes/Settings/Tables/TableReducer.js +23 -23
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +2 -2
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProductContent.js +15 -15
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +34 -34
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +13 -13
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/AirGappedTypeForm.js +3 -3
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/UpstreamServerTypeForm.js +3 -3
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +5 -5
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +16 -16
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +149 -149
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +41 -41
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js +6 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +12 -12
- data/webpack/services/index.js +36 -36
- data/webpack/utils/helpers.js +5 -5
- metadata +16 -6
@@ -160,19 +160,24 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
160
160
|
}
|
161
161
|
});
|
162
162
|
}
|
163
|
-
if (!
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
163
|
+
if (!Array.isArray(repository.include_tags)) {
|
164
|
+
if (!_.isEmpty(repository.include_tags)) {
|
165
|
+
repository["include_tags"] = repository.include_tags.split(",").map(function(tag) {
|
166
|
+
return tag.trim();
|
167
|
+
});
|
168
|
+
} else {
|
169
|
+
repository["include_tags"] = [];
|
170
|
+
}
|
169
171
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
172
|
+
|
173
|
+
if (!Array.isArray(repository.exclude_tags)) {
|
174
|
+
if (!_.isEmpty(repository.exclude_tags)) {
|
175
|
+
repository["exclude_tags"] = repository.exclude_tags.split(",").map(function(tag) {
|
176
|
+
return tag.trim();
|
177
|
+
});
|
178
|
+
} else {
|
179
|
+
repository["exclude_tags"] = [];
|
180
|
+
}
|
176
181
|
}
|
177
182
|
repository.$save(success, error);
|
178
183
|
};
|
data/lib/katello/plugin.rb
CHANGED
@@ -306,7 +306,9 @@ Foreman::Plugin.register :katello do
|
|
306
306
|
RemoteExecutionFeature.register(:katello_package_install, N_("Katello: Install Package"), :description => N_("Install package via Katello interface"), :provided_inputs => ['package'])
|
307
307
|
RemoteExecutionFeature.register(:katello_package_install_by_search, N_("Katello: Install packages by search query"), :description => N_("Install packages via Katello interface"), :provided_inputs => ['Package search query'])
|
308
308
|
RemoteExecutionFeature.register(:katello_package_update, N_("Katello: Update Package"), :description => N_("Update package via Katello interface"), :provided_inputs => ['package'])
|
309
|
+
RemoteExecutionFeature.register(:katello_packages_update_by_search, N_("Katello: Update Packages by search query"), :description => N_("Update packages via Katello interface"), :provided_inputs => ['Package search query'])
|
309
310
|
RemoteExecutionFeature.register(:katello_package_remove, N_("Katello: Remove Package"), :description => N_("Remove package via Katello interface"), :provided_inputs => ['package'])
|
311
|
+
RemoteExecutionFeature.register(:katello_packages_remove_by_search, N_("Katello: Remove Packages by search query"), :description => N_("Remove packages via Katello interface"), :provided_inputs => ['Package search query'])
|
310
312
|
RemoteExecutionFeature.register(:katello_group_install, N_("Katello: Install Package Group"), :description => N_("Install package group via Katello interface"), :provided_inputs => ['package'])
|
311
313
|
RemoteExecutionFeature.register(:katello_group_update, N_("Katello: Update Package Group"), :description => N_("Update package group via Katello interface"), :provided_inputs => ['package'])
|
312
314
|
RemoteExecutionFeature.register(:katello_group_remove, N_("Katello: Remove Package Group"), :description => N_("Remove package group via Katello interface"), :provided_inputs => ['package'])
|
@@ -37,12 +37,6 @@ Katello::RepositoryTypeManager.register('ostree') do
|
|
37
37
|
:type => String,
|
38
38
|
:required => false
|
39
39
|
|
40
|
-
import_attribute :parent_commit, :content_type => 'ostree_ref',
|
41
|
-
:api_param => :ostree_parent_commit,
|
42
|
-
:description => "Checksum of a parent commit",
|
43
|
-
:type => String,
|
44
|
-
:required => false
|
45
|
-
|
46
40
|
import_attribute :repository_name, :content_type => 'ostree_ref',
|
47
41
|
:api_param => :ostree_repository_name,
|
48
42
|
:description => "Name of the repository in the ostree archive",
|
data/lib/katello/version.rb
CHANGED
@@ -24,30 +24,30 @@ export const ErrataSummary = ({ type, count }) => {
|
|
24
24
|
let url;
|
25
25
|
let color;
|
26
26
|
switch (type) {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
27
|
+
case 'security':
|
28
|
+
label = __('Security');
|
29
|
+
ErrataIcon = SecurityIcon;
|
30
|
+
name = 'security advisories';
|
31
|
+
color = '#0066cc';
|
32
|
+
url = <a href="#/Content/errata?type=security"> {count} {name} </a>;
|
33
|
+
break;
|
34
|
+
case 'recommended':
|
35
|
+
case 'bugfix':
|
36
|
+
label = __('Bugfix');
|
37
|
+
ErrataIcon = BugIcon;
|
38
|
+
name = 'bug fixes';
|
39
|
+
color = '#8bc1f7';
|
40
|
+
url = <a href="#/Content/errata?type=bugfix"> {count} {name} </a>;
|
41
|
+
break;
|
42
|
+
case 'enhancement':
|
43
|
+
case 'optional':
|
44
|
+
label = __('Enhancement');
|
45
|
+
ErrataIcon = EnhancementIcon;
|
46
|
+
name = 'enhancements';
|
47
|
+
color = '#002f5d';
|
48
|
+
url = <a href="#/Content/errata?type=enhancement"> {count} {name} </a>;
|
49
|
+
break;
|
50
|
+
default:
|
51
51
|
}
|
52
52
|
if (!ErrataIcon) return null;
|
53
53
|
|
@@ -73,21 +73,21 @@ export const ErrataType = ({ type }) => {
|
|
73
73
|
let ErrataIcon;
|
74
74
|
let label;
|
75
75
|
switch (type) {
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
76
|
+
case 'security':
|
77
|
+
label = __('Security');
|
78
|
+
ErrataIcon = SecurityIcon;
|
79
|
+
break;
|
80
|
+
case 'recommended':
|
81
|
+
case 'bugfix':
|
82
|
+
label = __('Bugfix');
|
83
|
+
ErrataIcon = BugIcon;
|
84
|
+
break;
|
85
|
+
case 'enhancement':
|
86
|
+
case 'optional':
|
87
|
+
label = __('Enhancement');
|
88
|
+
ErrataIcon = EnhancementIcon;
|
89
|
+
break;
|
90
|
+
default:
|
91
91
|
}
|
92
92
|
if (!ErrataIcon) return null;
|
93
93
|
|
@@ -108,24 +108,24 @@ export const ErrataSeverity = ({ severity }) => {
|
|
108
108
|
let label;
|
109
109
|
|
110
110
|
switch (severity) {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
111
|
+
case 'Low':
|
112
|
+
color = pfBlack.value;
|
113
|
+
label = __('Low');
|
114
|
+
break;
|
115
|
+
case 'Moderate':
|
116
|
+
color = pfGold.value;
|
117
|
+
label = __('Moderate');
|
118
|
+
break;
|
119
|
+
case 'Important':
|
120
|
+
color = pfOrange.value;
|
121
|
+
label = __('Important');
|
122
|
+
break;
|
123
|
+
case 'Critical':
|
124
|
+
color = pfRed.value;
|
125
|
+
label = __('Critical');
|
126
|
+
break;
|
127
|
+
default:
|
128
|
+
label = __('N/A');
|
129
129
|
}
|
130
130
|
return <TableText wrapModifier="nowrap">{color && <SecurityIcon color={color} title={label} />} {label} </TableText>;
|
131
131
|
};
|
@@ -5,22 +5,22 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
5
5
|
|
6
6
|
const ErratumTypeLabel = ({ type }) => {
|
7
7
|
switch (type) {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
8
|
+
case 'bugfix':
|
9
|
+
return (
|
10
|
+
<p><BugIcon />{' '}{__('Bugfix')}</p>
|
11
|
+
);
|
12
|
+
case 'enhancement':
|
13
|
+
return (
|
14
|
+
<p><EnhancementIcon />{' '}{__('Enhancement')}</p>
|
15
|
+
);
|
16
|
+
case 'security':
|
17
|
+
return (
|
18
|
+
<p><SecurityIcon />{' '}{__('Security')}</p>
|
19
|
+
);
|
20
|
+
default:
|
21
|
+
return (
|
22
|
+
<p><UnknownIcon /> {type}</p>
|
23
|
+
);
|
24
24
|
}
|
25
25
|
};
|
26
26
|
|
@@ -34,12 +34,12 @@ function MultiSelect(props) {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
MultiSelect.defaultProps = {
|
37
|
-
onChange: () => {},
|
37
|
+
onChange: () => { },
|
38
38
|
defaultValues: null,
|
39
39
|
};
|
40
40
|
|
41
41
|
MultiSelect.propTypes = {
|
42
|
-
options: PropTypes.arrayOf(PropTypes.
|
42
|
+
options: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
43
43
|
onChange: PropTypes.func,
|
44
44
|
defaultValues: PropTypes.arrayOf(PropTypes.string),
|
45
45
|
};
|
@@ -28,7 +28,7 @@ export default Select;
|
|
28
28
|
|
29
29
|
Select.propTypes = {
|
30
30
|
onChange: PropTypes.func.isRequired,
|
31
|
-
options: PropTypes.arrayOf(PropTypes.
|
31
|
+
options: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
32
32
|
disabled: PropTypes.bool,
|
33
33
|
placeholder: PropTypes.string.isRequired,
|
34
34
|
value: PropTypes.string,
|
@@ -11,23 +11,23 @@ export default (state = initialState, action) => {
|
|
11
11
|
const { payload } = action;
|
12
12
|
|
13
13
|
switch (action.type) {
|
14
|
-
|
15
|
-
|
14
|
+
case GET_ORGANIZATIONS_LIST_REQUEST:
|
15
|
+
return state.set('loading', true);
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
case GET_ORGANIZATIONS_LIST_SUCCESS:
|
18
|
+
return state
|
19
|
+
.set('list', payload.results)
|
20
|
+
.set('loading', false);
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
case CHANGE_CURRENT_ORGANIZATION_SUCCESS:
|
23
|
+
return state
|
24
|
+
.set('currentId', payload)
|
25
|
+
.set('loading', false);
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
case GET_ORGANIZATIONS_LIST_FAILURE:
|
28
|
+
return state
|
29
|
+
.set('error', payload);
|
30
|
+
default:
|
31
|
+
return state;
|
32
32
|
}
|
33
33
|
};
|
@@ -87,7 +87,7 @@ class SetOrganization extends Component {
|
|
87
87
|
|
88
88
|
|
89
89
|
SetOrganization.propTypes = {
|
90
|
-
list: PropTypes.arrayOf(PropTypes.
|
90
|
+
list: PropTypes.arrayOf(PropTypes.shape({})),
|
91
91
|
loading: PropTypes.bool.isRequired,
|
92
92
|
history: PropTypes.shape({
|
93
93
|
push: PropTypes.func,
|
@@ -31,6 +31,7 @@ const TableWrapper = ({
|
|
31
31
|
activeFilters,
|
32
32
|
displaySelectAllCheckbox,
|
33
33
|
selectAll,
|
34
|
+
selectAllMode,
|
34
35
|
selectNone,
|
35
36
|
selectPage,
|
36
37
|
areAllRowsOnPageSelected,
|
@@ -285,9 +286,10 @@ TableWrapper.propTypes = {
|
|
285
286
|
])),
|
286
287
|
displaySelectAllCheckbox: PropTypes.bool,
|
287
288
|
selectedCount: PropTypes.number,
|
288
|
-
selectedResults: PropTypes.arrayOf(PropTypes.
|
289
|
+
selectedResults: PropTypes.arrayOf(PropTypes.shape({})),
|
289
290
|
clearSelectedResults: PropTypes.func,
|
290
291
|
selectAll: PropTypes.func,
|
292
|
+
selectAllMode: PropTypes.bool,
|
291
293
|
selectNone: PropTypes.func,
|
292
294
|
selectPage: PropTypes.func,
|
293
295
|
areAllRowsOnPageSelected: PropTypes.func,
|
@@ -313,6 +315,7 @@ TableWrapper.defaultProps = {
|
|
313
315
|
selectedResults: [],
|
314
316
|
clearSelectedResults: noop,
|
315
317
|
selectAll: undefined,
|
318
|
+
selectAllMode: false,
|
316
319
|
selectNone: undefined,
|
317
320
|
selectPage: undefined,
|
318
321
|
areAllRowsOnPageSelected: noop,
|
@@ -26,7 +26,7 @@ export const commonInputPropTypes = {
|
|
26
26
|
};
|
27
27
|
|
28
28
|
export const commonItemPropTypes = {
|
29
|
-
items: PropTypes.arrayOf(PropTypes.
|
29
|
+
items: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
30
30
|
activeItems: PropTypes.arrayOf(PropTypes.string).isRequired,
|
31
31
|
highlightedIndex: PropTypes.number.isRequired,
|
32
32
|
getItemProps: PropTypes.func.isRequired,
|
@@ -5,22 +5,22 @@ const keyPressHandler = (
|
|
5
5
|
selectItem, userInputValue, onSearch,
|
6
6
|
) => {
|
7
7
|
switch (e.keyCode) {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
case KEYCODES.TAB_KEY:
|
9
|
+
if (isOpen && activeItems[highlightedIndex]) {
|
10
|
+
selectItem(activeItems[highlightedIndex]);
|
11
|
+
e.preventDefault();
|
12
|
+
}
|
13
|
+
break;
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
case KEYCODES.ENTER:
|
16
|
+
if (!isOpen || !activeItems[highlightedIndex]) {
|
17
|
+
onSearch(userInputValue);
|
18
|
+
e.preventDefault();
|
19
|
+
}
|
20
|
+
break;
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
default:
|
23
|
+
break;
|
24
24
|
}
|
25
25
|
};
|
26
26
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable react/jsx-indent */
|
1
2
|
import React, { Component } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import { bindActionCreators } from 'redux';
|
@@ -46,14 +47,13 @@ function withOrganization(WrappedComponent) {
|
|
46
47
|
|
47
48
|
if (newOrgSelected) {
|
48
49
|
if (!organization.label && !organization.loading) { this.props.loadOrganization(); }
|
49
|
-
|
50
50
|
return <WrappedComponent {...this.props} />;
|
51
51
|
} else if (this.state.orgId === '') {
|
52
52
|
return (
|
53
|
-
|
53
|
+
<>
|
54
54
|
<Header title={__('Select Organization')} />
|
55
55
|
<SetOrganization />
|
56
|
-
|
56
|
+
</>);
|
57
57
|
}
|
58
58
|
return <WrappedComponent {...this.props} />;
|
59
59
|
}
|
@@ -2,7 +2,12 @@ import { API_OPERATIONS, get, put } from 'foremanReact/redux/API';
|
|
2
2
|
import { renderTaskStartedToast } from '../../../../scenes/Tasks/helpers';
|
3
3
|
import { foremanApi } from '../../../../services/api';
|
4
4
|
import { getResponseErrorMsgs } from '../../../../utils/helpers';
|
5
|
-
import {
|
5
|
+
import {
|
6
|
+
HOST_PACKAGES_INSTALL_KEY,
|
7
|
+
HOST_PACKAGES_KEY,
|
8
|
+
HOST_PACKAGES_REMOVE_KEY,
|
9
|
+
HOST_PACKAGES_UPGRADE_KEY,
|
10
|
+
} from './HostPackagesConstants';
|
6
11
|
|
7
12
|
const errorToast = (error) => {
|
8
13
|
const message = getResponseErrorMsgs(error.response);
|
@@ -25,3 +30,29 @@ export const installPackageViaKatelloAgent = (hostId, params) => put({
|
|
25
30
|
errorToast: error => errorToast(error),
|
26
31
|
params,
|
27
32
|
});
|
33
|
+
|
34
|
+
export const removePackageViaKatelloAgent = (hostId, params) => put({
|
35
|
+
type: API_OPERATIONS.PUT,
|
36
|
+
key: HOST_PACKAGES_REMOVE_KEY,
|
37
|
+
url: foremanApi.getApiUrl(`/hosts/${hostId}/packages/remove`),
|
38
|
+
handleSuccess: ({ data }) => renderTaskStartedToast(data),
|
39
|
+
errorToast: error => errorToast(error),
|
40
|
+
params,
|
41
|
+
});
|
42
|
+
|
43
|
+
export const upgradePackageViaKatelloAgent = (hostId, params) => put({
|
44
|
+
type: API_OPERATIONS.PUT,
|
45
|
+
key: HOST_PACKAGES_UPGRADE_KEY,
|
46
|
+
url: foremanApi.getApiUrl(`/hosts/${hostId}/packages/upgrade`),
|
47
|
+
handleSuccess: ({ data }) => renderTaskStartedToast(data),
|
48
|
+
errorToast: error => errorToast(error),
|
49
|
+
params,
|
50
|
+
});
|
51
|
+
|
52
|
+
export const upgradeAllViaKatelloAgent = hostId => put({
|
53
|
+
type: API_OPERATIONS.PUT,
|
54
|
+
key: HOST_PACKAGES_UPGRADE_KEY,
|
55
|
+
url: foremanApi.getApiUrl(`/hosts/${hostId}/packages/upgrade_all`),
|
56
|
+
handleSuccess: ({ data }) => renderTaskStartedToast(data),
|
57
|
+
errorToast: error => errorToast(error),
|
58
|
+
});
|
@@ -1,5 +1,8 @@
|
|
1
1
|
export const HOST_PACKAGES_KEY = 'HOST_PACKAGES';
|
2
2
|
export const HOST_PACKAGES_INSTALL_KEY = 'HOST_PACKAGES_KATELLO_AGENT_INSTALL';
|
3
|
+
export const HOST_PACKAGES_REMOVE_KEY = 'HOST_PACKAGES_REMOVE';
|
4
|
+
export const HOST_PACKAGES_UPGRADE_KEY = 'HOST_PACKAGES_UPGRADE';
|
5
|
+
export const PACKAGES_SEARCH_QUERY = 'Packages search query';
|
3
6
|
|
4
7
|
export const PACKAGES_VERSION_STATUSES = {
|
5
8
|
UPGRADABLE: 'Upgradable',
|
@@ -10,5 +13,3 @@ export const VERSION_STATUSES_TO_PARAM = {
|
|
10
13
|
[PACKAGES_VERSION_STATUSES.UPGRADABLE]: 'upgradable',
|
11
14
|
[PACKAGES_VERSION_STATUSES.UP_TO_DATE]: 'up-to-date',
|
12
15
|
};
|
13
|
-
|
14
|
-
export default HOST_PACKAGES_KEY;
|
@@ -2,19 +2,21 @@ import React from 'react';
|
|
2
2
|
import { Route, Switch, Redirect } from 'react-router-dom';
|
3
3
|
import { PackagesTab } from '../PackagesTab';
|
4
4
|
import { ErrataTab } from '../ErrataTab/ErrataTab.js';
|
5
|
+
import { ModuleStreamsTab } from '../ModuleStreamsTab/ModuleStreamsTab';
|
5
6
|
import { route } from './helpers';
|
6
7
|
|
7
8
|
const SecondaryTabRoutes = () => (
|
8
9
|
<Switch>
|
9
|
-
<Route exact path="/Content">
|
10
|
-
<Redirect to={route('errata')} />
|
11
|
-
</Route>
|
12
10
|
<Route path={route('packages')}>
|
13
11
|
<PackagesTab />
|
14
12
|
</Route>
|
15
13
|
<Route path={route('errata')}>
|
16
14
|
<ErrataTab />
|
17
15
|
</Route>
|
16
|
+
<Route path={route('module-streams')}>
|
17
|
+
<ModuleStreamsTab />
|
18
|
+
</Route>
|
19
|
+
<Redirect to={route('errata')} />
|
18
20
|
</Switch>
|
19
21
|
);
|
20
22
|
|
@@ -3,6 +3,7 @@ import { translate as __ } from 'foremanReact/common/I18n';
|
|
3
3
|
const SECONDARY_TABS = [
|
4
4
|
{ key: 'packages', title: __('Packages') },
|
5
5
|
{ key: 'errata', title: __('Errata') },
|
6
|
+
{ key: 'module-streams', title: __('Module streams') },
|
6
7
|
];
|
7
8
|
|
8
9
|
export default SECONDARY_TABS;
|
@@ -50,10 +50,10 @@ ErratumExpansionContents.propTypes = {
|
|
50
50
|
description: PropTypes.string,
|
51
51
|
summary: PropTypes.string,
|
52
52
|
solution: PropTypes.string,
|
53
|
-
bugs: PropTypes.arrayOf(PropTypes.
|
54
|
-
cves: PropTypes.arrayOf(PropTypes.
|
53
|
+
bugs: PropTypes.arrayOf(PropTypes.shape({})),
|
54
|
+
cves: PropTypes.arrayOf(PropTypes.shape({})),
|
55
55
|
packages: PropTypes.arrayOf(PropTypes.string),
|
56
|
-
module_streams: PropTypes.arrayOf(PropTypes.
|
56
|
+
module_streams: PropTypes.arrayOf(PropTypes.shape({})),
|
57
57
|
}).isRequired,
|
58
58
|
};
|
59
59
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { API_OPERATIONS, get } from 'foremanReact/redux/API';
|
2
|
+
import { foremanApi } from '../../../../../services/api';
|
3
|
+
import { getResponseErrorMsgs } from '../../../../../utils/helpers';
|
4
|
+
import { MODULE_STREAMS_KEY } from './ModuleStreamsConstants';
|
5
|
+
|
6
|
+
const errorToast = error => getResponseErrorMsgs(error.response);
|
7
|
+
|
8
|
+
export const getHostModuleStreams = (hostId, params) => get({
|
9
|
+
type: API_OPERATIONS.GET,
|
10
|
+
key: MODULE_STREAMS_KEY,
|
11
|
+
url: foremanApi.getApiUrl(`/hosts/${hostId}/module_streams`),
|
12
|
+
errorToast: error => errorToast(error),
|
13
|
+
params,
|
14
|
+
});
|
15
|
+
|
16
|
+
export default getHostModuleStreams;
|
data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsSelectors.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import {
|
2
|
+
selectAPIStatus,
|
3
|
+
selectAPIError,
|
4
|
+
selectAPIResponse,
|
5
|
+
} from 'foremanReact/redux/API/APISelectors';
|
6
|
+
import { STATUS } from 'foremanReact/constants';
|
7
|
+
import { MODULE_STREAMS_KEY } from './ModuleStreamsConstants';
|
8
|
+
|
9
|
+
export const selectModuleStream = state =>
|
10
|
+
selectAPIResponse(state, MODULE_STREAMS_KEY) ?? {};
|
11
|
+
|
12
|
+
export const selectHostId = state =>
|
13
|
+
selectAPIResponse(state, MODULE_STREAMS_KEY) ?? {};
|
14
|
+
|
15
|
+
export const selectModuleStreamStatus = state =>
|
16
|
+
selectAPIStatus(state, MODULE_STREAMS_KEY) ?? STATUS.PENDING;
|
17
|
+
|
18
|
+
export const selecModuleStreamError = state =>
|
19
|
+
selectAPIError(state, MODULE_STREAMS_KEY);
|