katello 4.3.0.rc1 → 4.3.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/api_controller.rb +4 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -0
- data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -0
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +2 -2
- data/app/controllers/katello/api/v2/root_controller.rb +10 -19
- data/app/controllers/katello/concerns/api/v2/bulk_extensions.rb +3 -13
- data/app/controllers/katello/remote_execution_controller.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -5
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/pulp/repository/sync.rb +0 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +16 -4
- data/app/lib/katello/resources/cdn.rb +10 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +7 -4
- data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -2
- data/app/models/katello/content_view_version.rb +1 -6
- data/app/models/katello/glue/pulp/repo.rb +1 -2
- data/app/models/katello/host_tracer.rb +2 -0
- data/app/models/katello/repository.rb +2 -30
- data/app/models/katello/root_repository.rb +3 -43
- data/app/presenters/katello/host_package_presenter.rb +21 -0
- data/app/services/katello/bulk_items_helper.rb +35 -0
- data/app/services/katello/smart_proxy_helper.rb +10 -1
- data/app/views/foreman/job_templates/install_errata.erb +8 -6
- data/app/views/foreman/job_templates/resolve_traces.erb +4 -5
- data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +3 -5
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +7 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +4 -0
- data/app/views/katello/api/v2/{organizations/cdn_configuration.rabl → cdn_configurations/show.json.rabl} +4 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +8 -0
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
- data/app/views/katello/api/v2/host_packages/base.json.rabl +2 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +0 -3
- data/config/routes/api/v2.rb +0 -10
- data/db/migrate/20211115215210_drop_ostree_branches.rb +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -8
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -1
- data/lib/katello/permission_creator.rb +0 -1
- data/lib/katello/plugin.rb +0 -10
- data/lib/katello/tasks/reset.rake +2 -2
- data/lib/katello/version.rb +1 -1
- data/webpack/components/Packages/index.js +63 -0
- data/webpack/components/Search/Search.js +7 -1
- data/webpack/components/SelectAllCheckbox/index.js +2 -2
- data/webpack/components/Table/MainTable.scss +7 -1
- data/webpack/components/Table/TableHooks.js +10 -19
- data/webpack/components/Table/TableWrapper.js +0 -2
- data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +3 -3
- data/webpack/components/extensions/HostDetails/HostDetailsConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/HostDetailsSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/HostErrata/HostErrataConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesActions.js +11 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/HostPackages/HostPackagesSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab.js +119 -25
- data/webpack/components/extensions/HostDetails/Tabs/HostTracesConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.js +127 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab.scss +11 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +30 -4
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +73 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +2 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsSelectors.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +347 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.scss +7 -0
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab.js +38 -31
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/bookmarks.fixtures.json +12 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/contentOverrides.fixtures.json +227 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +423 -2
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +28 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +91 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySets.fixtures.json +120 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +307 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/resolveErrata.fixtures.json +35 -0
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +55 -9
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +28 -14
- data/webpack/containers/Application/overrides.scss +31 -9
- data/webpack/global_index.js +4 -2
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/Content/ContentConfig.js +23 -7
- data/webpack/scenes/ContentCredentials/ContentCredentialActions.js +18 -0
- data/webpack/scenes/ContentCredentials/ContentCredentialConstants.js +2 -0
- data/webpack/scenes/ContentCredentials/ContentCredentialSelectors.js +12 -0
- data/webpack/scenes/ContentCredentials/__tests__/contentCredentials.fixtures.js +73 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -1
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +3 -3
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +7 -2
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.scss +7 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +9 -9
- data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +6 -6
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +39 -37
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReview.js +35 -33
- data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +7 -5
- data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +2 -6
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +13 -14
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +18 -9
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/Add/__tests__/cvFilterCreateResult.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewErrataByDateDetails.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +3 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvAllRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErratumFilterDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailModuleAffectedRepos.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvFilterDetailWithAffectedRepos.fixtures.json +1 -8
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilterDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +44 -28
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +46 -8
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +19 -3
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +5 -3
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +5 -2
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +7 -4
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +59 -53
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +24 -17
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +1 -4
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionRepositoryCell.js +8 -3
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +1 -4
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsCounts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionRepositories.fixtures.json +1 -18
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +5 -5
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +0 -4
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +66 -53
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +40 -28
- data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +3 -3
- data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +14 -14
- data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +6 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +53 -12
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +12 -6
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +6 -6
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +6 -5
- data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +2 -2
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +26 -27
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +18 -6
- data/webpack/scenes/ContentViews/components/WizardHeader.js +44 -0
- data/webpack/scenes/ContentViews/components/contentViewIcon.scss +13 -2
- data/webpack/scenes/Organizations/OrganizationActions.js +22 -24
- data/webpack/scenes/Organizations/OrganizationConstants.js +1 -3
- data/webpack/scenes/Organizations/OrganizationReducer.js +0 -7
- data/webpack/scenes/Organizations/OrganizationSelectors.js +16 -0
- data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +1 -21
- data/webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js +0 -20
- data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +34 -23
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +151 -14
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +150 -31
- data/webpack/scenes/Subscriptions/Manifest/index.js +14 -3
- data/webpack/utils/dateTimeHelpers.js +7 -0
- data/webpack/utils/helpers.js +1 -1
- metadata +45 -43
- data/app/controllers/katello/api/v2/ostree_branches_controller.rb +0 -16
- data/app/lib/actions/pulp/repository/presenters/ostree_presenter.rb +0 -91
- data/app/models/katello/ostree_branch.rb +0 -12
- data/app/models/katello/repository_ostree_branch.rb +0 -7
- data/app/services/katello/pulp/ostree_branch.rb +0 -14
- data/app/services/katello/pulp/repository/ostree.rb +0 -48
- data/app/views/katello/api/v2/ostree_branches/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/ostree_branches/index.json.rabl +0 -7
- data/app/views/katello/api/v2/ostree_branches/show.json.rabl +0 -5
- data/app/views/katello/api/v2/root/resource_list.json.rabl +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +0 -26
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +0 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +0 -77
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch.controller.js +0 -31
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-repositories.html +0 -72
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch.html +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +0 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +0 -67
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +0 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +0 -50
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +0 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/ostree-upstream-sync-policy.service.js +0 -26
- data/webpack/components/extensions/HostDetails/Tabs/SubscriptionTab.js +0 -12
- data/webpack/scenes/Content/Details/ContentCounts.js +0 -42
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -108
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +0 -158
@@ -75,7 +75,6 @@
|
|
75
75
|
"name": "yums"
|
76
76
|
},
|
77
77
|
"content_counts": {
|
78
|
-
"ostree_branch": 0,
|
79
78
|
"docker_manifest": 0,
|
80
79
|
"docker_tag": 0,
|
81
80
|
"rpm": 22,
|
@@ -95,7 +94,6 @@
|
|
95
94
|
"name": "test"
|
96
95
|
},
|
97
96
|
"content_counts": {
|
98
|
-
"ostree_branch": 0,
|
99
97
|
"docker_manifest": 0,
|
100
98
|
"docker_tag": 0,
|
101
99
|
"rpm": 8,
|
@@ -115,7 +113,6 @@
|
|
115
113
|
"name": "test"
|
116
114
|
},
|
117
115
|
"content_counts": {
|
118
|
-
"ostree_branch": 0,
|
119
116
|
"docker_manifest": 1,
|
120
117
|
"docker_tag": 1,
|
121
118
|
"rpm": 0,
|
@@ -135,7 +132,6 @@
|
|
135
132
|
"name": "test"
|
136
133
|
},
|
137
134
|
"content_counts": {
|
138
|
-
"ostree_branch": 0,
|
139
135
|
"docker_manifest": 0,
|
140
136
|
"docker_tag": 0,
|
141
137
|
"rpm": 0,
|
@@ -155,7 +151,6 @@
|
|
155
151
|
"name": "test"
|
156
152
|
},
|
157
153
|
"content_counts": {
|
158
|
-
"ostree_branch": 0,
|
159
154
|
"docker_manifest": 0,
|
160
155
|
"docker_tag": 0,
|
161
156
|
"rpm": 0,
|
@@ -268,7 +263,6 @@
|
|
268
263
|
},
|
269
264
|
"content_label": "Default_Organization_test_testYums",
|
270
265
|
"content_counts": {
|
271
|
-
"ostree_branch": 0,
|
272
266
|
"docker_manifest": 0,
|
273
267
|
"docker_manifest_list": 0,
|
274
268
|
"docker_tag": 0,
|
@@ -336,7 +330,6 @@
|
|
336
330
|
},
|
337
331
|
"content_label": "Default_Organization_yums_test",
|
338
332
|
"content_counts": {
|
339
|
-
"ostree_branch": 0,
|
340
333
|
"docker_manifest": 0,
|
341
334
|
"docker_manifest_list": 0,
|
342
335
|
"docker_tag": 0,
|
@@ -372,4 +365,4 @@
|
|
372
365
|
"updated_at": "2021-02-23 20:57:19 -0500"
|
373
366
|
}
|
374
367
|
]
|
375
|
-
}
|
368
|
+
}
|
data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json
CHANGED
@@ -52,7 +52,6 @@
|
|
52
52
|
"name": "test"
|
53
53
|
},
|
54
54
|
"content_counts": {
|
55
|
-
"ostree_branch": 0,
|
56
55
|
"docker_manifest": 0,
|
57
56
|
"docker_tag": 0,
|
58
57
|
"rpm": 8,
|
@@ -72,7 +71,6 @@
|
|
72
71
|
"name": "test"
|
73
72
|
},
|
74
73
|
"content_counts": {
|
75
|
-
"ostree_branch": 0,
|
76
74
|
"docker_manifest": 0,
|
77
75
|
"docker_tag": 0,
|
78
76
|
"rpm": 8,
|
@@ -144,4 +142,4 @@
|
|
144
142
|
"updated_at": "2021-04-01 11:35:39 -0400"
|
145
143
|
}
|
146
144
|
]
|
147
|
-
}
|
145
|
+
}
|
@@ -3,7 +3,10 @@ import useDeepCompareEffect from 'use-deep-compare-effect';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
4
|
import { STATUS } from 'foremanReact/constants';
|
5
5
|
import PropTypes from 'prop-types';
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
Form, FormGroup, TextArea, ActionGroup, Button,
|
8
|
+
Modal, ModalVariant, Alert, TextContent, AlertActionCloseButton,
|
9
|
+
} from '@patternfly/react-core';
|
7
10
|
import { translate as __ } from 'foremanReact/common/I18n';
|
8
11
|
|
9
12
|
import {
|
@@ -24,7 +27,8 @@ const ContentViewVersionPromote = ({
|
|
24
27
|
}) => {
|
25
28
|
const [description, setDescription] = useState('');
|
26
29
|
const [userCheckedItems, setUserCheckedItems] = useState([]);
|
27
|
-
const [
|
30
|
+
const [alertDismissed, setAlertDismissed] = useState(false);
|
31
|
+
const [loading, setLoading] = useState(false);
|
28
32
|
const [forcePromote, setForcePromote] = useState([]);
|
29
33
|
const environmentPathResponse = useSelector(selectEnvironmentPaths);
|
30
34
|
const environmentPathStatus = useSelector(selectEnvironmentPathsStatus);
|
@@ -39,7 +43,7 @@ const ContentViewVersionPromote = ({
|
|
39
43
|
const dispatch = useDispatch();
|
40
44
|
|
41
45
|
const onPromote = () => {
|
42
|
-
|
46
|
+
setLoading(true);
|
43
47
|
dispatch(promoteContentViewVersion({
|
44
48
|
id: versionIdToPromote,
|
45
49
|
description,
|
@@ -55,9 +59,9 @@ const ContentViewVersionPromote = ({
|
|
55
59
|
dispatch(getContentViewVersions(cvId));
|
56
60
|
}
|
57
61
|
if (promoteError) {
|
58
|
-
|
62
|
+
setLoading(false);
|
59
63
|
}
|
60
|
-
}, [promoteResponse, promoteResolved, promoteError,
|
64
|
+
}, [promoteResponse, promoteResolved, promoteError, setLoading, setIsOpen, dispatch, cvId]);
|
61
65
|
|
62
66
|
const envPathFlat = useMemo(() => {
|
63
67
|
if (!environmentPathLoading) {
|
@@ -88,6 +92,8 @@ const ContentViewVersionPromote = ({
|
|
88
92
|
setForcePromote(userCheckedItems.filter(item => !isValid(item)));
|
89
93
|
}, [userCheckedItems, setForcePromote, isValid]);
|
90
94
|
|
95
|
+
const submitDisabled = loading || userCheckedItems.length === 0;
|
96
|
+
|
91
97
|
return (
|
92
98
|
<Modal
|
93
99
|
title={__(`Promote version ${versionNameToPromote}`)}
|
@@ -98,9 +104,13 @@ const ContentViewVersionPromote = ({
|
|
98
104
|
}}
|
99
105
|
appendTo={document.body}
|
100
106
|
>
|
101
|
-
{
|
102
|
-
|
103
|
-
<Form
|
107
|
+
{loading ?
|
108
|
+
<Loading loadingText={__('Please wait while the task starts..')} /> :
|
109
|
+
<Form onSubmit={(e) => {
|
110
|
+
e.preventDefault();
|
111
|
+
onPromote();
|
112
|
+
}}
|
113
|
+
>
|
104
114
|
<FormGroup label="Description" fieldId="description">
|
105
115
|
<TextArea
|
106
116
|
isRequired
|
@@ -112,28 +122,34 @@ const ContentViewVersionPromote = ({
|
|
112
122
|
onChange={value => setDescription(value)}
|
113
123
|
/>
|
114
124
|
</FormGroup>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<
|
125
|
+
{!alertDismissed && forcePromote.length > 0 && (
|
126
|
+
<Alert
|
127
|
+
variant="info"
|
128
|
+
isInline
|
129
|
+
title={__('Force promotion')}
|
130
|
+
actionClose={<AlertActionCloseButton onClose={() => setAlertDismissed(true)} />}
|
131
|
+
>
|
132
|
+
<TextContent>
|
133
|
+
{forcePromote.length > 1 ? __('Selected environments ') : __('Selected environment ')}
|
134
|
+
<ComponentEnvironments environments={forcePromote} />
|
135
|
+
{forcePromote.length > 1 ?
|
136
|
+
__(' are out of the environment path order. The recommended practice is to promote the next environment in the path.') :
|
137
|
+
__(' is out of the environment path order. The recommended practice is to promote the next environment in the path.')
|
138
|
+
}
|
139
|
+
</TextContent>
|
140
|
+
</Alert>)}
|
141
|
+
<EnvironmentPaths
|
142
|
+
userCheckedItems={userCheckedItems}
|
143
|
+
setUserCheckedItems={setUserCheckedItems}
|
144
|
+
promotedEnvironments={versionEnvironments}
|
145
|
+
publishing={false}
|
146
|
+
/>
|
147
|
+
<ActionGroup style={{ margin: 0 }}>
|
132
148
|
<Button
|
133
149
|
aria-label="promote_content_view"
|
134
150
|
variant="primary"
|
135
|
-
isDisabled={
|
136
|
-
|
151
|
+
isDisabled={submitDisabled}
|
152
|
+
type="submit"
|
137
153
|
>
|
138
154
|
{__('Promote')}
|
139
155
|
</Button>
|
@@ -142,7 +158,7 @@ const ContentViewVersionPromote = ({
|
|
142
158
|
</Button>
|
143
159
|
</ActionGroup>
|
144
160
|
</Form>
|
145
|
-
|
161
|
+
}
|
146
162
|
</Modal>
|
147
163
|
);
|
148
164
|
};
|
@@ -14,7 +14,6 @@ const repoLabels = {
|
|
14
14
|
docker_manifest_list: ['container manifest lists', 'container manifest list', 'content/docker_manifest_lists'],
|
15
15
|
docker_tag: ['container tags', 'container tag', 'content/docker_tags'],
|
16
16
|
file: ['files', 'file', 'content/files'],
|
17
|
-
ostree_branch: ['ostree branches', 'ostree branch', 'content/ostree_branches'],
|
18
17
|
package_group: ['package groups', 'package group', 'package_groups'],
|
19
18
|
srpm: ['source RPMs', 'source RPM', 'source_rpms'], // no link?
|
20
19
|
};
|
@@ -46,6 +45,8 @@ const ContentCounts = ({ productId, repoId, counts }) => {
|
|
46
45
|
if (config) {
|
47
46
|
const { pluralLowercase, singularLowercase, pluralLabel } = config.names;
|
48
47
|
info = [pluralLowercase, singularLowercase, pluralLabel];
|
48
|
+
} else if (!info) {
|
49
|
+
info = ['unknown units', 'unknown unit', ''];
|
49
50
|
}
|
50
51
|
// package and rpm are the same
|
51
52
|
if (type !== 'package' && count > 0) allCounts.push(appendCount(type, count, info, productId, repoId));
|
@@ -95,7 +95,7 @@ const ContentViewRepositories = ({ cvId, details }) => {
|
|
95
95
|
{ title: <Bullseye><RepoIcon type={contentType} /></Bullseye> },
|
96
96
|
{ title: <a href={urlBuilder(`products/${productId}/repositories`, '', id)}>{name}</a> },
|
97
97
|
productName,
|
98
|
-
{ title: <LastSync {...{ lastSyncWords, lastSync }} /> },
|
98
|
+
{ title: <LastSync {...{ startedAt: lastSync?.started_at, lastSyncWords, lastSync }} /> },
|
99
99
|
{ title: <ContentCounts {...{ counts, productId }} repoId={id} /> },
|
100
100
|
{
|
101
101
|
title: <AddedStatusLabel added={addedToCV || statusSelected === ADDED} />,
|
@@ -1,10 +1,21 @@
|
|
1
1
|
import React, { Fragment } from 'react';
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
CheckCircleIcon,
|
4
|
+
ExclamationTriangleIcon,
|
5
|
+
ExclamationCircleIcon,
|
6
|
+
InProgressIcon,
|
7
|
+
} from '@patternfly/react-icons';
|
8
|
+
import { Tooltip, TooltipPosition } from '@patternfly/react-core';
|
9
|
+
|
3
10
|
import { foremanUrl } from 'foremanReact/common/helpers';
|
4
11
|
import PropTypes from 'prop-types';
|
12
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
5
13
|
import InactiveText from '../../components/InactiveText';
|
14
|
+
import { makeReadableDate } from '../../../../utils/dateTimeHelpers';
|
6
15
|
|
7
|
-
const LastSync = ({
|
16
|
+
const LastSync = ({
|
17
|
+
lastSyncWords, lastSync, emptyMessage, startedAt,
|
18
|
+
}) => {
|
8
19
|
if (lastSync && lastSyncWords) {
|
9
20
|
let Icon;
|
10
21
|
let color = 'black';
|
@@ -26,16 +37,42 @@ const LastSync = ({ lastSyncWords, lastSync, emptyMessage }) => {
|
|
26
37
|
Icon = Fragment;
|
27
38
|
}
|
28
39
|
|
40
|
+
if (startedAt) {
|
41
|
+
return (
|
42
|
+
<Tooltip
|
43
|
+
position={TooltipPosition.top}
|
44
|
+
content={makeReadableDate(startedAt)}
|
45
|
+
>
|
46
|
+
<a
|
47
|
+
href={foremanUrl(`/foreman_tasks/tasks/${id}/`)}
|
48
|
+
style={{
|
49
|
+
display: 'inline-flex', alignItems: 'center', margin: 0,
|
50
|
+
}}
|
51
|
+
>
|
52
|
+
<Icon style={{ color, marginRight: '5px' }} />
|
53
|
+
<span>{lastSyncWords}{__(' ago')}</span>
|
54
|
+
</a >
|
55
|
+
</Tooltip >
|
56
|
+
);
|
57
|
+
}
|
58
|
+
|
29
59
|
return (
|
30
|
-
<a
|
31
|
-
|
32
|
-
|
33
|
-
|
60
|
+
<a
|
61
|
+
href={foremanUrl(`/foreman_tasks/tasks/${id}/`)}
|
62
|
+
style={{
|
63
|
+
display: 'flex', alignItems: 'center',
|
64
|
+
}}
|
65
|
+
>
|
66
|
+
<Icon style={{ color, marginRight: '5px' }} />
|
67
|
+
<span>{lastSyncWords}{__(' ago')}</span>
|
68
|
+
</a >);
|
34
69
|
}
|
70
|
+
|
35
71
|
return <InactiveText text={emptyMessage} />;
|
36
72
|
};
|
37
73
|
|
38
74
|
LastSync.propTypes = {
|
75
|
+
startedAt: PropTypes.string,
|
39
76
|
lastSyncWords: PropTypes.string,
|
40
77
|
lastSync: PropTypes.shape({
|
41
78
|
id: PropTypes.string, // API returns string
|
@@ -45,8 +82,9 @@ LastSync.propTypes = {
|
|
45
82
|
};
|
46
83
|
|
47
84
|
LastSync.defaultProps = {
|
48
|
-
|
49
|
-
|
85
|
+
startedAt: undefined,
|
86
|
+
lastSyncWords: undefined,
|
87
|
+
lastSync: undefined,
|
50
88
|
emptyMessage: 'Not Synced',
|
51
89
|
};
|
52
90
|
|
data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json
CHANGED
@@ -62,7 +62,6 @@
|
|
62
62
|
},
|
63
63
|
"content_label": "Orion_Lagoon_Nebula_Butterfly",
|
64
64
|
"content_counts": {
|
65
|
-
"ostree_branch": 0,
|
66
65
|
"docker_manifest": 0,
|
67
66
|
"docker_manifest_list": 0,
|
68
67
|
"docker_tag": 0,
|
@@ -131,7 +130,6 @@
|
|
131
130
|
},
|
132
131
|
"content_label": "Orion_Lagoon_Nebula_Coma",
|
133
132
|
"content_counts": {
|
134
|
-
"ostree_branch": 1,
|
135
133
|
"docker_manifest": 2,
|
136
134
|
"docker_manifest_list": 2,
|
137
135
|
"docker_tag": 0,
|
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
} from '@patternfly/react-core';
|
9
9
|
import { translate as __ } from 'foremanReact/common/I18n';
|
10
10
|
import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
11
|
+
import ContentConfig from './../../../Content/ContentConfig';
|
11
12
|
|
12
13
|
const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
13
14
|
const {
|
@@ -19,6 +20,14 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
19
20
|
ansible_collection_count: ansibleCollectionCount,
|
20
21
|
} = cvVersion;
|
21
22
|
|
23
|
+
const genericContentTypes = {};
|
24
|
+
|
25
|
+
ContentConfig().forEach((type) => {
|
26
|
+
const countLabel = `${type.names.singularLabel}_count`;
|
27
|
+
genericContentTypes[countLabel.replace(/([-_]\w)/g, g => g[1].toUpperCase())] = [cvVersion[countLabel], type.names.pluralLowercase];
|
28
|
+
});
|
29
|
+
const genericContentCountsStyle = { whiteSpace: 'pre-line' };
|
30
|
+
|
22
31
|
return (
|
23
32
|
<React.Fragment>
|
24
33
|
{(moduleStreamCount > 0 &&
|
@@ -53,12 +62,19 @@ const ContentViewVersionContent = ({ cvId, versionId, cvVersion }) => {
|
|
53
62
|
<a href={urlBuilder(`content_views/${cvId}#/versions/${versionId}/ansibleCollections`, '')}>{`${ansibleCollectionCount} Collections`}</a><br />
|
54
63
|
</>
|
55
64
|
}
|
65
|
+
<>
|
66
|
+
<span style={genericContentCountsStyle}>
|
67
|
+
{Object.keys(genericContentTypes).filter(typeCountKey => genericContentTypes[typeCountKey][0] > 0).map(typeCountKey => `${genericContentTypes[typeCountKey][0]} ${genericContentTypes[typeCountKey][1]}\n`)}
|
68
|
+
</span>
|
69
|
+
</>
|
56
70
|
{(moduleStreamCount === 0 && debCount === 0 &&
|
57
71
|
dockerManifestCount === 0 && dockerTagCount === 0 &&
|
58
72
|
fileCount === 0 && ansibleCollectionCount === 0 &&
|
59
|
-
|
60
|
-
|
61
|
-
|
73
|
+
Object.keys(genericContentTypes).map(typeCountKey =>
|
74
|
+
genericContentTypes[typeCountKey][0]).reduce((pv, cv) => pv + cv) === 0 &&
|
75
|
+
<TextContent>
|
76
|
+
<Text component={TextVariants.small}>{__('N/A')}</Text>
|
77
|
+
</TextContent>
|
62
78
|
)
|
63
79
|
}
|
64
80
|
</React.Fragment>
|
@@ -13,12 +13,12 @@ const ContentViewVersionEnvironments = ({ environments }) => {
|
|
13
13
|
|
14
14
|
return environments.map(env => (
|
15
15
|
<React.Fragment key={env.id}>
|
16
|
-
<Flex>
|
16
|
+
<Flex style={{ margin: '4px 0' }} >
|
17
17
|
<FlexItem>
|
18
18
|
<Label isTruncated color="purple" href={`/lifecycle_environments/${env.id}`}>{env.name}</Label>
|
19
19
|
</FlexItem>
|
20
20
|
<FlexItem>
|
21
|
-
<InactiveText text={` ${env.publish_date} ago`}
|
21
|
+
<InactiveText text={` ${env.publish_date} ago`} />
|
22
22
|
</FlexItem>
|
23
23
|
</Flex>
|
24
24
|
</React.Fragment>));
|
@@ -36,10 +36,12 @@ const ContentViewVersionErrata = ({ cvId, versionId, errataCounts }) => {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
return (
|
39
|
-
|
40
|
-
<a href={urlBuilder(`content_views/${cvId}#/versions/${versionId}/errata`, '')}>
|
39
|
+
<>
|
40
|
+
<a href={urlBuilder(`content_views/${cvId}#/versions/${versionId}/errata`, '')}>
|
41
|
+
{total || 0}{' '}
|
42
|
+
</a>
|
41
43
|
( <ErrataLinkwithIcon /> )
|
42
|
-
|
44
|
+
</>
|
43
45
|
);
|
44
46
|
};
|
45
47
|
|
@@ -7,6 +7,7 @@ import { urlBuilder } from 'foremanReact/common/urlHelpers';
|
|
7
7
|
import { STATUS } from 'foremanReact/constants';
|
8
8
|
import { Link } from 'react-router-dom';
|
9
9
|
import PropTypes from 'prop-types';
|
10
|
+
import { selectIntervals } from 'foremanReact/redux/middlewares/IntervalMiddleware/IntervalSelectors.js';
|
10
11
|
|
11
12
|
import TableWrapper from '../../../../components/Table/TableWrapper';
|
12
13
|
import InactiveText from '../../components/InactiveText';
|
@@ -25,6 +26,7 @@ import TaskPresenter from '../../components/TaskPresenter/TaskPresenter';
|
|
25
26
|
import { startPollingTask } from '../../../Tasks/TaskActions';
|
26
27
|
import RemoveCVVersionWizard from './Delete/RemoveCVVersionWizard';
|
27
28
|
import { hasPermission } from '../../helpers';
|
29
|
+
import { pollTaskKey } from '../../../Tasks/helpers';
|
28
30
|
|
29
31
|
const ContentViewVersions = ({ cvId, details }) => {
|
30
32
|
const response = useSelector(state => selectCVVersions(state, cvId));
|
@@ -46,6 +48,7 @@ const ContentViewVersions = ({ cvId, details }) => {
|
|
46
48
|
const [deleteVersion, setDeleteVersion] = useState(false);
|
47
49
|
const [currentStep, setCurrentStep] = useState(1);
|
48
50
|
const { permissions } = details;
|
51
|
+
const intervals = useSelector(state => selectIntervals(state));
|
49
52
|
|
50
53
|
const columnHeaders = [
|
51
54
|
__('Version'),
|
@@ -82,7 +85,7 @@ const ContentViewVersions = ({ cvId, details }) => {
|
|
82
85
|
];
|
83
86
|
}, [cvId]);
|
84
87
|
|
85
|
-
const buildActiveTaskCells = useCallback((cvVersion) => {
|
88
|
+
const buildActiveTaskCells = useCallback((cvVersion, pollIntervals) => {
|
86
89
|
const {
|
87
90
|
version,
|
88
91
|
description,
|
@@ -91,7 +94,7 @@ const ContentViewVersions = ({ cvId, details }) => {
|
|
91
94
|
} = cvVersion;
|
92
95
|
const { task } = activeHistory[0];
|
93
96
|
const { result } = task || {};
|
94
|
-
if (result !== 'error') {
|
97
|
+
if (result !== 'error' && !pollIntervals[pollTaskKey(task.id)]) {
|
95
98
|
dispatch(startPollingTask(task.id, task));
|
96
99
|
}
|
97
100
|
|
@@ -122,7 +125,7 @@ const ContentViewVersions = ({ cvId, details }) => {
|
|
122
125
|
} = cvVersion;
|
123
126
|
|
124
127
|
const cells = activeHistory.length ?
|
125
|
-
buildActiveTaskCells(cvVersion) :
|
128
|
+
buildActiveTaskCells(cvVersion, intervals) :
|
126
129
|
buildCells(cvVersion);
|
127
130
|
newRows.push({
|
128
131
|
cvVersionId: versionId,
|
@@ -139,7 +142,7 @@ const ContentViewVersions = ({ cvId, details }) => {
|
|
139
142
|
const newRows = buildRows();
|
140
143
|
setRows(newRows);
|
141
144
|
}
|
142
|
-
}, [response, results, buildActiveTaskCells, buildCells, dispatch, loading, setRows]);
|
145
|
+
}, [response, results, buildActiveTaskCells, buildCells, dispatch, loading, setRows, intervals]);
|
143
146
|
|
144
147
|
const onPromote = ({ cvVersionId, cvVersionName, cvVersionEnvironments }) => {
|
145
148
|
setVersionIdToPromote(cvVersionId);
|
data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
1
|
+
import React, { useContext, useState } from 'react';
|
2
2
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
3
|
-
import { Alert, Checkbox, EmptyState, EmptyStateVariant, Title, EmptyStateBody } from '@patternfly/react-core';
|
3
|
+
import { Alert, Checkbox, EmptyState, EmptyStateVariant, Title, EmptyStateBody, AlertActionCloseButton } from '@patternfly/react-core';
|
4
4
|
import { TableVariant, TableComposable, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
|
5
5
|
import { translate as __ } from 'foremanReact/common/I18n';
|
6
6
|
import DeleteContext from '../DeleteContext';
|
7
7
|
|
8
8
|
const CVEnvironmentSelectionForm = () => {
|
9
|
+
const [alertDismissed, setAlertDismissed] = useState(false);
|
9
10
|
const {
|
10
11
|
versionNameToRemove, versionEnvironments, selectedEnvSet,
|
11
12
|
setAffectedActivationKeys, setAffectedHosts, deleteFlow,
|
@@ -51,55 +52,60 @@ const CVEnvironmentSelectionForm = () => {
|
|
51
52
|
'You can delete this version completely and it will no longer be available for promotion.');
|
52
53
|
return (
|
53
54
|
<>
|
54
|
-
{deleteFlow &&
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
{!alertDismissed && deleteFlow &&
|
56
|
+
<Alert
|
57
|
+
variant="warning"
|
58
|
+
isInline
|
59
|
+
title={__('Warning')}
|
60
|
+
actionClose={<AlertActionCloseButton onClose={() => setAlertDismissed(true)} />}
|
61
|
+
>
|
62
|
+
<p style={{ marginBottom: '0.5em' }}>{versionDeleteInfo}</p>
|
63
|
+
</Alert>
|
58
64
|
}
|
59
65
|
{(!deleteFlow &&
|
60
66
|
(removeDeletionFlow || areAllSelected() || versionEnvironments.length === 0))
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
/>
|
71
|
-
</Alert>)}
|
72
|
-
{(versionEnvironments.length !== 0) &&
|
73
|
-
<TableComposable variant={TableVariant.compact}>
|
74
|
-
<Thead>
|
75
|
-
<Tr>
|
76
|
-
<Td
|
77
|
-
select={{
|
78
|
-
rowIndex: 0,
|
79
|
-
onSelect: onSelectAll,
|
80
|
-
isSelected: areAllSelected() || deleteFlow || removeDeletionFlow,
|
81
|
-
disable: deleteFlow || removeDeletionFlow,
|
82
|
-
}}
|
67
|
+
&& (
|
68
|
+
<Alert variant="warning" isInline title={__('Warning')}>
|
69
|
+
<p style={{ marginBottom: '0.5em' }}>{removeDeletionFlow ? versionDeleteInfo : versionRemovalInfo}</p>
|
70
|
+
<Checkbox
|
71
|
+
id="delete_version"
|
72
|
+
label={__('Delete version')}
|
73
|
+
isChecked={removeDeletionFlow}
|
74
|
+
onChange={checked => setRemoveDeletionFlow(checked)}
|
75
|
+
style={{ margin: 0 }}
|
83
76
|
/>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
77
|
+
</Alert>)}
|
78
|
+
{(versionEnvironments.length !== 0) &&
|
79
|
+
<TableComposable variant={TableVariant.compact}>
|
80
|
+
<Thead>
|
81
|
+
<Tr>
|
82
|
+
<Td
|
83
|
+
select={{
|
84
|
+
rowIndex: 0,
|
85
|
+
onSelect: onSelectAll,
|
86
|
+
isSelected: areAllSelected() || deleteFlow || removeDeletionFlow,
|
87
|
+
disable: deleteFlow || removeDeletionFlow,
|
88
|
+
}}
|
89
|
+
/>
|
90
|
+
{columnHeaders.map(col =>
|
91
|
+
<Th key={col}>{col}</Th>)}
|
92
|
+
</Tr>
|
93
|
+
</Thead>
|
94
|
+
<Tbody>
|
95
|
+
{versionEnvironments?.map(({
|
96
|
+
id, name, activation_key_count: akCount,
|
97
|
+
host_count: hostCount,
|
98
|
+
}, rowIndex) =>
|
93
99
|
(
|
94
100
|
<Tr key={`${name}_${id}`}>
|
95
101
|
<Td
|
96
102
|
key={`${name}__${id}_select`}
|
97
103
|
select={{
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
104
|
+
rowIndex,
|
105
|
+
onSelect: (event, isSelected) => onSelect(event, isSelected, id),
|
106
|
+
isSelected: selectedEnvSet.has(id) || deleteFlow || removeDeletionFlow,
|
107
|
+
disable: deleteFlow || removeDeletionFlow,
|
108
|
+
}}
|
103
109
|
/>
|
104
110
|
<Td>
|
105
111
|
{name}
|
@@ -108,18 +114,18 @@ const CVEnvironmentSelectionForm = () => {
|
|
108
114
|
<Td>{akCount}</Td>
|
109
115
|
</Tr>
|
110
116
|
))
|
111
|
-
|
112
|
-
|
113
|
-
|
117
|
+
}
|
118
|
+
</Tbody>
|
119
|
+
</TableComposable>}
|
114
120
|
{(versionEnvironments.length === 0) &&
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
<EmptyState variant={EmptyStateVariant.xs}>
|
122
|
+
<Title headingLevel="h4" size="md">
|
123
|
+
{__('This version has not been promoted to any environments.')}
|
124
|
+
</Title>
|
125
|
+
<EmptyStateBody>
|
126
|
+
{versionEnvironmentsEmptyInfo}
|
127
|
+
</EmptyStateBody>
|
128
|
+
</EmptyState>}
|
123
129
|
</>
|
124
130
|
);
|
125
131
|
};
|