katello 5.0.0.rc2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ca/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/cs/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/de/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/el/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/en/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/en_US/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/es/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/fr/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/gl/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/gu/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/hi/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/id/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/it/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/ja/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/ka/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/kn/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ko/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/mr/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/or/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/pa/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/pl/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/pt/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/ro/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ru/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/sl/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ta/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/te/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/tr/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/vi/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/zh/katello.js +41 -2
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +42 -3
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +42 -3
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -10
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +18 -18
- data/app/views/katello/api/v2/content_facet/base.json.rabl +19 -19
- data/app/views/katello/api/v2/content_view_environments/show.json.rabl +10 -10
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +5 -5
- data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +5 -5
- data/db/migrate/20260402151630_add_content_view_environment_to_hostgroup_content_facet.rb +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
- data/lib/katello/tasks/upgrades/4.20/clean_cve_with_no_cvv.rake +4 -4
- data/lib/katello/version.rb +1 -1
- data/lib/rubocop/cop/katello/cve_abbreviation.rb +82 -0
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +41 -2
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +41 -2
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +41 -2
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +41 -2
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +42 -3
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +42 -3
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +41 -2
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +41 -2
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +41 -2
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +41 -2
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +41 -2
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +41 -2
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +42 -3
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +41 -2
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +42 -3
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +41 -2
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +41 -2
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +41 -2
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +41 -2
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +41 -2
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +42 -3
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +42 -3
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +42 -3
- data/locale/katello.pot +315 -257
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +41 -2
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +42 -3
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +41 -2
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +41 -2
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +41 -2
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +41 -2
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +41 -2
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +41 -2
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +41 -2
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +41 -2
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +42 -3
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +41 -2
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +41 -2
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +42 -3
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +41 -2
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +41 -2
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +41 -2
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +41 -2
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +41 -2
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +41 -2
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +41 -2
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +41 -2
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +41 -2
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +42 -3
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +42 -3
- data/package.json +2 -2
- data/webpack/ForemanColumnExtensions/index.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/AssignHostCVModal.js +3 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +5 -5
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/OrderableAssignments.js +5 -5
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/AssignHostCVModal.test.js +17 -17
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/BulkAssignCVEnvsModal.js +4 -8
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/__tests__/BulkAssignCVEnvsModal.test.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkAssignCVEnvsModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/BulkChangeHostCollectionsModal.js +5 -10
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +6 -24
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/BulkManageTracesModal.js +4 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkManageTracesModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/03_ReviewFooter.js +2 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/BulkRepositorySetsWizard.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/BulkSystemPurposeModal.js +5 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkSystemPurposeModal/index.js +2 -1
- data/webpack/components/extensions/Hosts/BulkActions/__tests__/bulkSystemPurposeModal.test.js +6 -1
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +6 -6
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -1
- data/webpack/containers/Application/config.js +1 -1
- data/webpack/eslint-rules/no-cve-abbreviation.js +121 -0
- data/webpack/global_index.js +6 -6
- data/webpack/redux/reducers/index.js +0 -2
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +2 -2
- data/webpack/scenes/ActivationKeys/Details/components/AssignAKCVModal.js +3 -3
- data/webpack/scenes/ActivationKeys/Details/components/CreateAKCVModal.js +1 -1
- data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCard.js → CvEnvDetailsCard.js} +9 -9
- data/webpack/scenes/ActivationKeys/Details/components/{CVEDetailsCreateCard.js → CvEnvDetailsCreateCard.js} +10 -10
- data/webpack/scenes/ActivationKeys/Details/components/__tests__/{CVEDetailsCreateCard.test.js → CvEnvDetailsCreateCard.test.js} +8 -8
- data/webpack/scenes/ContainerImages/Booted/BootedContainerImagesPage.js +2 -2
- data/webpack/scenes/ContainerImages/ContainerImagesPage.js +59 -52
- data/webpack/scenes/ContainerImages/ContainerImagesPage.scss +27 -4
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +9 -9
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/CdnTabContent.js +44 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +179 -307
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModalConstants.js +5 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +64 -70
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +5 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js +61 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js +357 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +129 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +69 -110
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +6 -2
- data/webpack/scenes/Subscriptions/Manifest/index.js +16 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +79 -145
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -35
- data/webpack/scenes/Subscriptions/SubscriptionsColumns.js +90 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +297 -217
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +40 -30
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +11 -8
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsConstants.js +0 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +104 -205
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +12 -8
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +245 -241
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +61 -27
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +487 -73
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +22 -4
- data/webpack/utils/contentViewEnvironmentLabel.js +3 -3
- data/webpack/utils/helpers.js +2 -2
- metadata +15 -20
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +0 -39
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +0 -47
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +0 -223
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -31
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -297
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -244
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -47
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionNameFormatter.js +0 -23
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +0 -32
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +0 -169
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js +0 -41
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/index.js +0 -2
- data/webpack/scenes/Subscriptions/index.js +0 -57
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/prefer-default-export */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
|
-
import entitlementsValueFormatter from '../../../../components/pf3Table/formatters/entitlementsValueFormatter.js';
|
|
5
|
-
import { entitlementsInlineEditFormatter } from '../../../../components/pf3Table/formatters/EntitlementsInlineEditFormatter';
|
|
6
|
-
import { subscriptionTypeFormatter } from './SubscriptionTypeFormatter';
|
|
7
|
-
import { subscriptionNameFormatter } from './SubscriptionNameFormatter';
|
|
8
|
-
import {
|
|
9
|
-
headerFormatter,
|
|
10
|
-
cellFormatter,
|
|
11
|
-
selectionHeaderCellFormatter,
|
|
12
|
-
collapseableAndSelectionCellFormatter,
|
|
13
|
-
} from '../../../../components/pf3Table';
|
|
14
|
-
|
|
15
|
-
function getEntitlementsFormatter(inlineEditController, canManageSubscriptionAllocations) {
|
|
16
|
-
if (canManageSubscriptionAllocations) {
|
|
17
|
-
return entitlementsInlineEditFormatter(inlineEditController);
|
|
18
|
-
}
|
|
19
|
-
return entitlementsValueFormatter;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Helper function to format dates consistently
|
|
23
|
-
const formatDate = (dateString) => {
|
|
24
|
-
if (!dateString) return <td>—</td>;
|
|
25
|
-
const date = new Date(dateString);
|
|
26
|
-
if (Number.isNaN(date.getTime())) return <td>—</td>;
|
|
27
|
-
return <td>{date.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' })}</td>;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// Helper function to format SKU
|
|
31
|
-
const skuFormatter = (value, { rowData }) => {
|
|
32
|
-
if (!rowData.upstream_pool_id) {
|
|
33
|
-
return <td>—</td>;
|
|
34
|
-
}
|
|
35
|
-
return cellFormatter(value, { rowData });
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const textFormatter = (value, additionalData) => {
|
|
39
|
-
if (!value) return <td>—</td>;
|
|
40
|
-
return cellFormatter(value, additionalData);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const createSubscriptionsTableSchema = (
|
|
44
|
-
inlineEditController,
|
|
45
|
-
selectionController,
|
|
46
|
-
groupingController,
|
|
47
|
-
hasPermission,
|
|
48
|
-
) => [
|
|
49
|
-
{
|
|
50
|
-
property: 'select',
|
|
51
|
-
header: {
|
|
52
|
-
label: __('Select all rows'),
|
|
53
|
-
formatters: [
|
|
54
|
-
label => selectionHeaderCellFormatter(selectionController, label, hasPermission),
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
cell: {
|
|
58
|
-
formatters: [
|
|
59
|
-
(value, additionalData) => {
|
|
60
|
-
// eslint-disable-next-line no-param-reassign
|
|
61
|
-
additionalData.disabled = !hasPermission || !additionalData.rowData.upstream_pool_id;
|
|
62
|
-
|
|
63
|
-
return collapseableAndSelectionCellFormatter(
|
|
64
|
-
groupingController,
|
|
65
|
-
selectionController,
|
|
66
|
-
additionalData,
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
property: 'id',
|
|
74
|
-
header: {
|
|
75
|
-
label: __('Name'),
|
|
76
|
-
formatters: [headerFormatter],
|
|
77
|
-
},
|
|
78
|
-
cell: {
|
|
79
|
-
formatters: [subscriptionNameFormatter],
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
property: 'type',
|
|
84
|
-
header: {
|
|
85
|
-
label: __('Type'),
|
|
86
|
-
formatters: [headerFormatter],
|
|
87
|
-
},
|
|
88
|
-
cell: {
|
|
89
|
-
formatters: [subscriptionTypeFormatter],
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
property: 'product_id',
|
|
94
|
-
header: {
|
|
95
|
-
label: __('SKU'),
|
|
96
|
-
formatters: [headerFormatter],
|
|
97
|
-
},
|
|
98
|
-
cell: {
|
|
99
|
-
formatters: [skuFormatter],
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
property: 'contract_number',
|
|
104
|
-
header: {
|
|
105
|
-
label: __('Contract'),
|
|
106
|
-
formatters: [headerFormatter],
|
|
107
|
-
},
|
|
108
|
-
cell: {
|
|
109
|
-
formatters: [textFormatter],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
property: 'start_date',
|
|
114
|
-
header: {
|
|
115
|
-
label: __('Start date'),
|
|
116
|
-
formatters: [headerFormatter],
|
|
117
|
-
},
|
|
118
|
-
cell: {
|
|
119
|
-
formatters: [(value, { rowData }) => formatDate(rowData.start_date)],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
property: 'end_date',
|
|
124
|
-
header: {
|
|
125
|
-
label: __('End date'),
|
|
126
|
-
formatters: [headerFormatter],
|
|
127
|
-
},
|
|
128
|
-
cell: {
|
|
129
|
-
formatters: [(value, { rowData }) => formatDate(rowData.end_date)],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
property: 'virt_who',
|
|
134
|
-
header: {
|
|
135
|
-
label: __('Requires virt-who'),
|
|
136
|
-
formatters: [headerFormatter],
|
|
137
|
-
},
|
|
138
|
-
cell: {
|
|
139
|
-
formatters: [
|
|
140
|
-
(value, { rowData }) => {
|
|
141
|
-
if (rowData.virt_who === null || rowData.virt_who === undefined) {
|
|
142
|
-
return <td>—</td>;
|
|
143
|
-
}
|
|
144
|
-
return <td>{rowData.virt_who ? __('True') : __('False')}</td>;
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
property: 'quantity',
|
|
151
|
-
header: {
|
|
152
|
-
label: __('Entitlements'),
|
|
153
|
-
formatters: [headerFormatter],
|
|
154
|
-
},
|
|
155
|
-
cell: {
|
|
156
|
-
formatters: [getEntitlementsFormatter(inlineEditController, hasPermission)],
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
property: 'product_host_count',
|
|
161
|
-
header: {
|
|
162
|
-
label: __('Hosts'),
|
|
163
|
-
formatters: [headerFormatter],
|
|
164
|
-
},
|
|
165
|
-
cell: {
|
|
166
|
-
formatters: [cellFormatter],
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
];
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import { subscriptionTypeFormatter } from '../SubscriptionTypeFormatter';
|
|
4
|
-
|
|
5
|
-
describe('subscriptionTypeFormatter', () => {
|
|
6
|
-
const renderFormatter = (rowData) => {
|
|
7
|
-
const content = (
|
|
8
|
-
<table>
|
|
9
|
-
<tbody>
|
|
10
|
-
<tr>{subscriptionTypeFormatter(null, { rowData })}</tr>
|
|
11
|
-
</tbody>
|
|
12
|
-
</table>
|
|
13
|
-
);
|
|
14
|
-
return render(content);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
it('renders physical subscriptions', () => {
|
|
18
|
-
renderFormatter({ virt_only: false });
|
|
19
|
-
expect(screen.getByText('Physical')).toBeInTheDocument();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('renders temporary subscriptions', () => {
|
|
23
|
-
renderFormatter({ unmapped_guest: true });
|
|
24
|
-
expect(screen.getByText('Temporary')).toBeInTheDocument();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('renders virtual subscriptions', () => {
|
|
28
|
-
renderFormatter({});
|
|
29
|
-
expect(screen.getByText('Virtual')).toBeInTheDocument();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('renders link to a host', () => {
|
|
33
|
-
renderFormatter({ hypervisor: { name: 'host.example.com', id: 83 } });
|
|
34
|
-
|
|
35
|
-
expect(screen.getByText('Guests of')).toBeInTheDocument();
|
|
36
|
-
expect(screen.getByRole('link', { name: 'host.example.com' })).toHaveAttribute(
|
|
37
|
-
'href',
|
|
38
|
-
'/new/hosts/83/',
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { bindActionCreators } from 'redux';
|
|
2
|
-
import { connect } from 'react-redux';
|
|
3
|
-
import * as subscriptionActions from './SubscriptionActions';
|
|
4
|
-
import * as taskActions from '../Tasks/TaskActions';
|
|
5
|
-
import * as manifestActions from './Manifest/ManifestActions';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
selectSubscriptionsState,
|
|
9
|
-
selectSearchQuery,
|
|
10
|
-
selectDeleteButtonDisabled,
|
|
11
|
-
selectSubscriptionsTask,
|
|
12
|
-
selectActivePermissions,
|
|
13
|
-
selectIsTaskPending,
|
|
14
|
-
selectHasUpstreamConnection,
|
|
15
|
-
selectDeleteModalOpened,
|
|
16
|
-
} from './SubscriptionsSelectors';
|
|
17
|
-
import { selectIsPollingTask } from '../Tasks/TaskSelectors';
|
|
18
|
-
import { selectOrganizationState, selectIsManifestImported } from '../Organizations/OrganizationSelectors';
|
|
19
|
-
import pingUpstreamSubscriptions from './UpstreamSubscriptions/UpstreamSubscriptionsActions';
|
|
20
|
-
import reducer from './SubscriptionReducer';
|
|
21
|
-
import { SUBSCRIPTIONS } from './SubscriptionConstants';
|
|
22
|
-
import SubscriptionsPage from './SubscriptionsPage';
|
|
23
|
-
|
|
24
|
-
// map state to props
|
|
25
|
-
const mapStateToProps = (state) => {
|
|
26
|
-
const subscriptions = selectSubscriptionsState(state);
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
subscriptions,
|
|
30
|
-
activePermissions: selectActivePermissions(state),
|
|
31
|
-
isManifestImported: selectIsManifestImported(state),
|
|
32
|
-
hasUpstreamConnection: selectHasUpstreamConnection(state),
|
|
33
|
-
task: selectSubscriptionsTask(state),
|
|
34
|
-
isTaskPending: selectIsTaskPending(state),
|
|
35
|
-
isPollingTask: selectIsPollingTask(state, SUBSCRIPTIONS),
|
|
36
|
-
searchQuery: selectSearchQuery(state),
|
|
37
|
-
deleteModalOpened: selectDeleteModalOpened(state),
|
|
38
|
-
deleteButtonDisabled: selectDeleteButtonDisabled(state),
|
|
39
|
-
organization: selectOrganizationState(state),
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// map action dispatchers to props
|
|
44
|
-
const actions = {
|
|
45
|
-
pingUpstreamSubscriptions,
|
|
46
|
-
...subscriptionActions,
|
|
47
|
-
...taskActions,
|
|
48
|
-
...manifestActions,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);
|
|
52
|
-
|
|
53
|
-
// export reducers
|
|
54
|
-
export const subscriptions = reducer;
|
|
55
|
-
|
|
56
|
-
// export connected component
|
|
57
|
-
export default connect(mapStateToProps, mapDispatchToProps)(SubscriptionsPage);
|