@openshift-migration-advisor/shared-components 0.23.0-e6249b8ada7d → 0.24.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.
- package/README.md +0 -6
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/forms/RadioButtonFormGroup.d.ts.map +1 -1
- package/dist/forms/RadioButtonFormGroup.js +2 -2
- package/dist/report/OSDistribution.d.ts.map +1 -1
- package/dist/report/OSDistribution.js +13 -5
- package/dist/report/OsSupportTiersHelpPopover.d.ts.map +1 -1
- package/dist/report/OsSupportTiersHelpPopover.js +31 -2
- package/dist/report/OsUpgradeNotice.d.ts.map +1 -1
- package/dist/report/OsUpgradeNotice.js +5 -1
- package/dist/report/SupportTierBadge.d.ts.map +1 -1
- package/dist/report/SupportTierBadge.js +2 -4
- package/dist/report/constants.d.ts +0 -2
- package/dist/report/constants.d.ts.map +1 -1
- package/dist/report/constants.js +0 -2
- package/dist/report/index.d.ts +0 -10
- package/dist/report/index.d.ts.map +1 -1
- package/dist/report/index.js +0 -8
- package/package.json +1 -1
- package/src/charts/index.ts +0 -1
- package/src/forms/RadioButtonFormGroup.tsx +3 -10
- package/src/report/OSDistribution.tsx +67 -60
- package/src/report/OsSupportTiersHelpPopover.tsx +62 -32
- package/src/report/OsUpgradeNotice.tsx +7 -1
- package/src/report/SupportTierBadge.tsx +2 -4
- package/src/report/constants.ts +0 -2
- package/src/report/index.ts +0 -56
- package/dist/report/FeatureStatusBadge.d.ts +0 -7
- package/dist/report/FeatureStatusBadge.d.ts.map +0 -1
- package/dist/report/FeatureStatusBadge.js +0 -13
- package/dist/report/HostPowerStates.d.ts +0 -9
- package/dist/report/HostPowerStates.d.ts.map +0 -1
- package/dist/report/HostPowerStates.js +0 -11
- package/dist/report/InfrastructureSummary.d.ts +0 -7
- package/dist/report/InfrastructureSummary.d.ts.map +0 -1
- package/dist/report/InfrastructureSummary.js +0 -5
- package/dist/report/PowerStateCard.d.ts +0 -17
- package/dist/report/PowerStateCard.d.ts.map +0 -1
- package/dist/report/PowerStateCard.js +0 -7
- package/dist/report/VCenterClusterDetails.d.ts +0 -10
- package/dist/report/VCenterClusterDetails.d.ts.map +0 -1
- package/dist/report/VCenterClusterDetails.js +0 -26
- package/dist/report/VmPowerStates.d.ts +0 -9
- package/dist/report/VmPowerStates.d.ts.map +0 -1
- package/dist/report/VmPowerStates.js +0 -11
- package/dist/report/infrastructureSummaryModel.d.ts +0 -82
- package/dist/report/infrastructureSummaryModel.d.ts.map +0 -1
- package/dist/report/infrastructureSummaryModel.js +0 -139
- package/dist/report/powerStates.d.ts +0 -11
- package/dist/report/powerStates.d.ts.map +0 -1
- package/dist/report/powerStates.js +0 -113
- package/src/report/FeatureStatusBadge.tsx +0 -30
- package/src/report/HostPowerStates.tsx +0 -41
- package/src/report/InfrastructureSummary.tsx +0 -56
- package/src/report/PowerStateCard.tsx +0 -73
- package/src/report/VCenterClusterDetails.tsx +0 -211
- package/src/report/VmPowerStates.tsx +0 -41
- package/src/report/__tests__/HostPowerStates.test.tsx +0 -47
- package/src/report/__tests__/InfrastructureSummary.test.tsx +0 -148
- package/src/report/__tests__/infrastructureSummaryModel.test.ts +0 -224
- package/src/report/__tests__/powerStates.test.ts +0 -70
- package/src/report/infrastructureSummaryModel.ts +0 -281
- package/src/report/powerStates.ts +0 -169
package/README.md
CHANGED
|
@@ -8,7 +8,6 @@ Includes:
|
|
|
8
8
|
- Guest OS support-tier helpers and badges
|
|
9
9
|
- Report chart primitives (`MigrationDonutChart`)
|
|
10
10
|
- Operating Systems distribution card
|
|
11
|
-
- Infrastructure summary, vCenter cluster details, and host/VM power-state cards
|
|
12
11
|
|
|
13
12
|
## Installation
|
|
14
13
|
|
|
@@ -24,15 +23,10 @@ npm install @openshift-migration-advisor/shared-components
|
|
|
24
23
|
|
|
25
24
|
```tsx
|
|
26
25
|
import {
|
|
27
|
-
buildInfrastructureSummary,
|
|
28
|
-
HostPowerStates,
|
|
29
|
-
InfrastructureSummary,
|
|
30
26
|
MigrationDonutChart,
|
|
31
27
|
OSDistribution,
|
|
32
28
|
SupportTierBadge,
|
|
33
29
|
TextInputFormGroup,
|
|
34
|
-
VCenterClusterDetails,
|
|
35
|
-
VmPowerStates,
|
|
36
30
|
} from "@openshift-migration-advisor/shared-components";
|
|
37
31
|
```
|
|
38
32
|
|
package/dist/charts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MigrationDonutChart, type MigrationDonutChartDatum, type
|
|
1
|
+
export { MigrationDonutChart, type MigrationDonutChartDatum, type MigrationDonutChartProps, } from "./MigrationDonutChart.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonFormGroup.d.ts","sourceRoot":"","sources":["../../src/forms/RadioButtonFormGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,yBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC;IAC3C,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,yBAAyB,+
|
|
1
|
+
{"version":3,"file":"RadioButtonFormGroup.d.ts","sourceRoot":"","sources":["../../src/forms/RadioButtonFormGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,UAAU,yBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC;IAC3C,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,yBAAyB,+BAoC3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FormGroup, Radio } from "@patternfly/react-core";
|
|
3
3
|
import { Controller, useFormContext } from "react-hook-form";
|
|
4
4
|
import FormFieldHelperText from "./FormFieldHelperText.js";
|
|
@@ -8,5 +8,5 @@ export default function RadioButtonFormGroup({ id, label, name, isRequired = fal
|
|
|
8
8
|
const isTouched = methods.formState.touchedFields[name];
|
|
9
9
|
const isSubmitted = methods.formState.isSubmitted;
|
|
10
10
|
const showError = error && (isTouched || isSubmitted);
|
|
11
|
-
return (_jsxs(FormGroup, { label: label, isRequired: isRequired, fieldId: id,
|
|
11
|
+
return (_jsxs(FormGroup, { label: label, isRequired: isRequired, fieldId: id, ...props, children: [_jsx(Controller, { name: name, control: methods.control, render: ({ field }) => (_jsx("div", { style: { display: "flex", gap: "16px" }, role: "radiogroup", children: options.map((option) => (_jsx(Radio, { id: option.id, name: name, label: option.label, isChecked: field.value === option.value, onChange: () => field.onChange(option.value), onBlur: field.onBlur }, option.value))) })) }), _jsx(FormFieldHelperText, { helpText: helpText, errorMessage: showError ? error?.message : undefined })] }));
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OSDistribution.d.ts","sourceRoot":"","sources":["../../src/report/OSDistribution.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OSDistribution.d.ts","sourceRoot":"","sources":["../../src/report/OSDistribution.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,EAAE,EAAO,MAAM,OAAO,CAAC;AAQrC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAyB5B,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyBlD,CAAC;AAEF,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgH1C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { css } from "@emotion/css";
|
|
3
|
-
import { Card, CardBody, CardTitle, Flex, FlexItem, MenuToggle, SearchInput, Select, SelectList, SelectOption,
|
|
3
|
+
import { Card, CardBody, CardTitle, Flex, FlexItem, MenuToggle, SearchInput, Select, SelectList, SelectOption, Toolbar, ToolbarContent, ToolbarItem, } from "@patternfly/react-core";
|
|
4
4
|
import { DesktopIcon } from "@patternfly/react-icons";
|
|
5
5
|
import { Table, Tbody, Td, Th, Thead, Tr } from "@patternfly/react-table";
|
|
6
6
|
import { CardEmptyState } from "./CardEmptyState.js";
|
|
@@ -13,9 +13,19 @@ import { OsNameCell } from "./OsUpgradeRecommendationPopover.js";
|
|
|
13
13
|
import { getSupportTierLegendLabel, ORDERED_SUPPORT_TIERS, } from "./osSupportTier.js";
|
|
14
14
|
import { SupportTierBadge } from "./SupportTierBadge.js";
|
|
15
15
|
import { ALL_TIERS_FILTER, useOsBarChartViewModel, } from "./useOsBarChartViewModel.js";
|
|
16
|
+
const filterToolbarStyle = css `
|
|
17
|
+
padding-left: 0;
|
|
18
|
+
padding-right: 0;
|
|
19
|
+
`;
|
|
20
|
+
const filterItemStyle = css `
|
|
21
|
+
flex: 1 1 0;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
`;
|
|
24
|
+
const vmsColumnStyle = css `
|
|
25
|
+
text-align: right;
|
|
26
|
+
`;
|
|
16
27
|
const tableScrollStyle = css `
|
|
17
28
|
overflow: auto;
|
|
18
|
-
max-height: 350px;
|
|
19
29
|
`;
|
|
20
30
|
export const OSDistribution = ({ osData, isExportMode = false, }) => (_jsxs(Card, { className: isExportMode ? dashboardStyles.cardPrint : dashboardStyles.card, id: "os-distribution", children: [_jsx(CardTitle, { children: _jsxs(Flex, { alignItems: { default: "alignItemsCenter" }, spaceItems: { default: "spaceItemsSm" }, children: [_jsxs(FlexItem, { children: [_jsx(DesktopIcon, {}), " Operating Systems"] }), _jsx(FlexItem, { children: _jsx(OsSupportTiersHelpPopover, {}) })] }) }), _jsx(CardBody, { children: _jsx(OSBarChart, { osData: osData, isExportMode: isExportMode }) })] }));
|
|
21
31
|
export const OSBarChart = ({ osData, isExportMode = false, }) => {
|
|
@@ -23,7 +33,5 @@ export const OSBarChart = ({ osData, isExportMode = false, }) => {
|
|
|
23
33
|
if (vm.tableRows.length === 0) {
|
|
24
34
|
return (_jsx(CardEmptyState, { title: REPORT_CARD_EMPTY_STATE_TITLES.operatingSystems }));
|
|
25
35
|
}
|
|
26
|
-
return (_jsxs(_Fragment, { children: [!isExportMode ? (_jsx(Toolbar, {
|
|
27
|
-
? tableFullWidthStyle
|
|
28
|
-
: `${tableScrollStyle} ${tableFullWidthStyle}`, children: _jsxs(Table, { "aria-label": "Operating systems", variant: "compact", children: [_jsx(Thead, { children: _jsxs(Tr, { children: [_jsx(Th, { children: "OS" }), _jsx(Th, { children: "Tier" }), _jsx(Th, { children: "VMs" })] }) }), _jsx(Tbody, { children: vm.showNoResults ? (_jsx(Tr, { children: _jsx(Td, { colSpan: 3, children: _jsx(EmptySearchResults, { title: "No matching operating system found" }) }) })) : (vm.filteredRows.map((row) => (_jsxs(Tr, { children: [_jsx(Td, { dataLabel: "OS", children: _jsx(OsNameCell, { osName: row.osName, upgradeRecommendation: row.upgradeRecommendation, isExportMode: isExportMode }) }), _jsx(Td, { dataLabel: "Tier", children: _jsx(SupportTierBadge, { tier: row.tier, isExportMode: isExportMode }) }), _jsx(Td, { dataLabel: "VMs", children: row.count })] }, row.osName)))) })] }) }) })] })] }));
|
|
36
|
+
return (_jsxs(_Fragment, { children: [!isExportMode ? (_jsx(Toolbar, { className: filterToolbarStyle, children: _jsxs(ToolbarContent, { children: [_jsx(ToolbarItem, { className: filterItemStyle, children: _jsx(SearchInput, { placeholder: "Filter by OS", value: vm.osFilter, onChange: (_event, value) => vm.setOsFilter(value), onClear: vm.clearOsFilter, "aria-label": "Filter operating systems by name" }) }), _jsx(ToolbarItem, { className: filterItemStyle, children: _jsx(Select, { isOpen: vm.isTierSelectOpen, selected: vm.tierFilter, onSelect: vm.handleTierSelect, onOpenChange: vm.setIsTierSelectOpen, toggle: (toggleRef) => (_jsx(MenuToggle, { ref: toggleRef, isExpanded: vm.isTierSelectOpen, onClick: vm.toggleTierSelectOpen, style: { width: "100%" }, children: vm.tierFilterLabel })), "aria-label": "Filter operating systems by support tier", children: _jsxs(SelectList, { children: [_jsx(SelectOption, { value: ALL_TIERS_FILTER, children: "All tiers" }), ORDERED_SUPPORT_TIERS.map((tier) => (_jsx(SelectOption, { value: tier, children: getSupportTierLegendLabel(tier) }, tier)))] }) }) })] }) })) : null, vm.showUpgradeNotice ? _jsx(OsUpgradeNotice, {}) : null, _jsx("div", { className: isExportMode ? undefined : tableScrollStyle, style: isExportMode ? undefined : { maxHeight: "350px" }, children: _jsxs(Table, { "aria-label": "Operating systems", variant: "compact", className: tableFullWidthStyle, children: [_jsx(Thead, { children: _jsxs(Tr, { children: [_jsx(Th, { children: "OS" }), _jsx(Th, { children: "Tier" }), _jsx(Th, { className: vmsColumnStyle, children: "VMs" })] }) }), _jsx(Tbody, { children: vm.showNoResults ? (_jsx(Tr, { children: _jsx(Td, { colSpan: 3, children: _jsx(EmptySearchResults, { title: "No matching operating system found" }) }) })) : (vm.filteredRows.map((row) => (_jsxs(Tr, { children: [_jsx(Td, { dataLabel: "OS", children: _jsx(OsNameCell, { osName: row.osName, upgradeRecommendation: row.upgradeRecommendation, isExportMode: isExportMode }) }), _jsx(Td, { dataLabel: "Tier", children: _jsx(SupportTierBadge, { tier: row.tier, isExportMode: isExportMode }) }), _jsx(Td, { dataLabel: "VMs", className: vmsColumnStyle, children: row.count })] }, row.osName)))) })] }) })] }));
|
|
29
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsSupportTiersHelpPopover.d.ts","sourceRoot":"","sources":["../../src/report/OsSupportTiersHelpPopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OsSupportTiersHelpPopover.d.ts","sourceRoot":"","sources":["../../src/report/OsSupportTiersHelpPopover.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAyEhC,eAAO,MAAM,yBAAyB,EAAE,EASvC,CAAC"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { css } from "@emotion/css";
|
|
3
|
+
import { Label } from "@patternfly/react-core";
|
|
3
4
|
import { ExternalLinkAltIcon } from "@patternfly/react-icons";
|
|
4
5
|
import { getSupportTierBadgeColor, getSupportTierDefinition, getSupportTierLegendLabel, ORDERED_SUPPORT_TIERS, SUPPORT_TIER_LEARN_MORE_URL, } from "./osSupportTier.js";
|
|
5
6
|
import PopoverIcon from "./PopoverIcon.js";
|
|
6
|
-
const
|
|
7
|
+
const tierListStyle = css `
|
|
8
|
+
list-style: none;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--pf-t--global--spacer--400);
|
|
14
|
+
`;
|
|
15
|
+
const tierItemStyle = css `
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: var(--pf-t--global--spacer--100);
|
|
19
|
+
`;
|
|
20
|
+
const tierBadgeStyle = css `
|
|
21
|
+
width: fit-content;
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
align-self: flex-start;
|
|
24
|
+
`;
|
|
25
|
+
const tierDescriptionStyle = css `
|
|
26
|
+
margin: 0;
|
|
27
|
+
color: var(--pf-t--global--text--color--regular);
|
|
28
|
+
`;
|
|
29
|
+
const learnMoreLinkStyle = css `
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--pf-t--global--spacer--xs);
|
|
33
|
+
margin-top: var(--pf-t--global--spacer--400);
|
|
34
|
+
`;
|
|
35
|
+
const OsSupportTiersHelpBody = () => (_jsxs("div", { children: [_jsx("ul", { className: tierListStyle, children: ORDERED_SUPPORT_TIERS.map((tier) => (_jsxs("li", { className: tierItemStyle, children: [_jsx(Label, { className: tierBadgeStyle, color: getSupportTierBadgeColor(tier), isCompact: true, children: getSupportTierLegendLabel(tier) }), _jsx("p", { className: tierDescriptionStyle, children: getSupportTierDefinition(tier) })] }, tier))) }), _jsxs("a", { "aria-label": "Learn more about operating system support tiers", className: learnMoreLinkStyle, href: SUPPORT_TIER_LEARN_MORE_URL, target: "_blank", rel: "noopener noreferrer", children: ["Learn more ", _jsx(ExternalLinkAltIcon, {})] })] }));
|
|
7
36
|
export const OsSupportTiersHelpPopover = () => (_jsx(PopoverIcon, { noVerticalAlign: true, maxWidth: "40rem", headerContent: "Guest OS support tiers", bodyContent: _jsx(OsSupportTiersHelpBody, {}), buttonOuiaId: "guest-os-support-tiers-help", "aria-label": "Guest OS support tiers help" }));
|
|
8
37
|
OsSupportTiersHelpPopover.displayName = "OsSupportTiersHelpPopover";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OsUpgradeNotice.d.ts","sourceRoot":"","sources":["../../src/report/OsUpgradeNotice.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OsUpgradeNotice.d.ts","sourceRoot":"","sources":["../../src/report/OsUpgradeNotice.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,eAAO,MAAM,eAAe,EAAE,EAiB7B,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
2
3
|
import { Content, Flex, FlexItem, Icon } from "@patternfly/react-core";
|
|
3
4
|
import { InfoCircleIcon } from "@patternfly/react-icons";
|
|
4
|
-
|
|
5
|
+
const noticeStyle = css `
|
|
6
|
+
margin-bottom: var(--pf-t--global--spacer--200);
|
|
7
|
+
`;
|
|
8
|
+
export const OsUpgradeNotice = () => (_jsxs(Flex, { alignItems: { default: "alignItemsCenter" }, spaceItems: { default: "spaceItemsSm" }, className: noticeStyle, children: [_jsx(FlexItem, { children: _jsx(Icon, { status: "info", children: _jsx(InfoCircleIcon, {}) }) }), _jsx(FlexItem, { children: _jsx(Content, { component: "p", style: { fontWeight: 500 }, children: "Some operating systems may need upgrades before migration" }) })] }));
|
|
5
9
|
OsUpgradeNotice.displayName = "OsUpgradeNotice";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportTierBadge.d.ts","sourceRoot":"","sources":["../../src/report/SupportTierBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SupportTierBadge.d.ts","sourceRoot":"","sources":["../../src/report/SupportTierBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAW5B,UAAU,qBAAqB;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAYD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiBtD,CAAC"}
|
|
@@ -2,19 +2,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { css } from "@emotion/css";
|
|
3
3
|
import { Label, Tooltip } from "@patternfly/react-core";
|
|
4
4
|
import { getSupportTierBadgeColor, getSupportTierBadgeInlineStyle, getSupportTierDefinition, getSupportTierLegendLabel, } from "./osSupportTier.js";
|
|
5
|
-
const exportBadgeStyle =
|
|
5
|
+
const exportBadgeStyle = css `
|
|
6
6
|
display: inline-block;
|
|
7
7
|
padding: var(--pf-t--global--spacer--xs) var(--pf-t--global--spacer--sm);
|
|
8
8
|
border-radius: var(--pf-t--global--border--radius--pill);
|
|
9
9
|
font-size: var(--pf-t--global--font--size--body--sm);
|
|
10
10
|
line-height: var(--pf-t--global--font--line-height--body);
|
|
11
11
|
white-space: nowrap;
|
|
12
|
-
background-color: ${backgroundColor};
|
|
13
|
-
color: ${color};
|
|
14
12
|
`;
|
|
15
13
|
const ExportSupportTierBadge = ({ tier }) => {
|
|
16
14
|
const { backgroundColor, color } = getSupportTierBadgeInlineStyle(tier);
|
|
17
|
-
return (_jsx("span", { className: exportBadgeStyle
|
|
15
|
+
return (_jsx("span", { className: exportBadgeStyle, style: { backgroundColor, color }, children: getSupportTierLegendLabel(tier) }));
|
|
18
16
|
};
|
|
19
17
|
export const SupportTierBadge = ({ tier, isExportMode = false, }) => {
|
|
20
18
|
if (isExportMode) {
|
|
@@ -19,7 +19,5 @@ export declare const REPORT_CARD_EMPTY_STATE_TITLES: {
|
|
|
19
19
|
readonly operatingSystems: "Operating system data not collected";
|
|
20
20
|
readonly migrationStatus: "Migration status data not collected";
|
|
21
21
|
readonly issuesBreakdown: "Issues breakdown data not collected";
|
|
22
|
-
readonly hostPowerStates: "Host power state data not collected";
|
|
23
|
-
readonly vmPowerStates: "VM power state data not collected";
|
|
24
22
|
};
|
|
25
23
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/report/constants.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,WAA6B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,WAA+B,CAAC;AAE9D,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/report/constants.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,WAA6B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,WAA+B,CAAC;AAE9D,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;CAcjC,CAAC"}
|
package/dist/report/constants.js
CHANGED
|
@@ -20,6 +20,4 @@ export const REPORT_CARD_EMPTY_STATE_TITLES = {
|
|
|
20
20
|
operatingSystems: "Operating system data not collected",
|
|
21
21
|
migrationStatus: "Migration status data not collected",
|
|
22
22
|
issuesBreakdown: "Issues breakdown data not collected",
|
|
23
|
-
hostPowerStates: "Host power state data not collected",
|
|
24
|
-
vmPowerStates: "VM power state data not collected",
|
|
25
23
|
};
|
package/dist/report/index.d.ts
CHANGED
|
@@ -3,11 +3,6 @@ export { chartColorFailure, chartColorSuccess, REPORT_CARD_EMPTY_STATE_TITLES, }
|
|
|
3
3
|
export { DashboardEmptyStateBase, type DashboardEmptyStateBaseProps, } from "./DashboardEmptyStateBase.js";
|
|
4
4
|
export { dashboardStyles, tableFullWidthStyle } from "./dashboardStyles.js";
|
|
5
5
|
export { EmptySearchResults, type EmptySearchResultsProps, } from "./EmptySearchResults.js";
|
|
6
|
-
export { FeatureStatusBadge, type FeatureStatusBadgeProps, } from "./FeatureStatusBadge.js";
|
|
7
|
-
export { HostPowerStates, type HostPowerStatesProps, } from "./HostPowerStates.js";
|
|
8
|
-
export { InfrastructureSummary, type InfrastructureSummaryProps, } from "./InfrastructureSummary.js";
|
|
9
|
-
export type { ClusterDetailRow, ClusterDetailsModel, FeatureStatus, HostCapability, InfrastructureSummaryModel, InventoryCluster, InventoryDatastore, InventoryHost, InventoryInfra, InventoryNetwork, InventoryVms, NetworkLabel, } from "./infrastructureSummaryModel.js";
|
|
10
|
-
export { booleanToFeatureStatus, buildClusterDetailRows, buildClusterDetails, buildInfrastructureSummary, countVCenters, formatVSphereVersion, hostCapabilityStatus, visibleNetworks, vsanStatus, } from "./infrastructureSummaryModel.js";
|
|
11
6
|
export { OSBarChart, OSDistribution } from "./OSDistribution.js";
|
|
12
7
|
export { OsSupportTiersHelpPopover } from "./OsSupportTiersHelpPopover.js";
|
|
13
8
|
export { OsUpgradeNotice } from "./OsUpgradeNotice.js";
|
|
@@ -15,11 +10,6 @@ export { OsNameCell, OsUpgradeRecommendationPopover, } from "./OsUpgradeRecommen
|
|
|
15
10
|
export type { OSDistributionEntry, SupportTierBadgeStyle, } from "./osSupportTier.js";
|
|
16
11
|
export { getSupportTierBadgeColor, getSupportTierBadgeInlineStyle, getSupportTierDefinition, getSupportTierLegendLabel, getSupportTierSortOrder, hasOsUpgradeNotice, ORDERED_SUPPORT_TIERS, resolveSupportTier, SUPPORT_TIER_BADGE_COLORS, SUPPORT_TIER_BADGE_INLINE_STYLES, SUPPORT_TIER_DEFINITIONS, SUPPORT_TIER_LABELS, SUPPORT_TIER_LEARN_MORE_URL, SupportTier, } from "./osSupportTier.js";
|
|
17
12
|
export { default as PopoverIcon } from "./PopoverIcon.js";
|
|
18
|
-
export { PowerStateCard, type PowerStateCardProps, } from "./PowerStateCard.js";
|
|
19
|
-
export type { PowerStateChartModel } from "./powerStates.js";
|
|
20
|
-
export { buildHostPowerStateChart, buildVmPowerStateChart, HOST_POWER_COLORS, VM_POWER_COLORS, } from "./powerStates.js";
|
|
21
13
|
export { SupportTierBadge } from "./SupportTierBadge.js";
|
|
22
14
|
export { ALL_TIERS_FILTER, type OsBarChartViewModel, type OsTableRow, useOsBarChartViewModel, } from "./useOsBarChartViewModel.js";
|
|
23
|
-
export { VCenterClusterDetails, type VCenterClusterDetailsProps, } from "./VCenterClusterDetails.js";
|
|
24
|
-
export { VmPowerStates, type VmPowerStatesProps, } from "./VmPowerStates.js";
|
|
25
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/report/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/report/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,UAAU,EACV,8BAA8B,GAC/B,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,EAChC,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,sBAAsB,GACvB,MAAM,6BAA6B,CAAC"}
|
package/dist/report/index.js
CHANGED
|
@@ -3,19 +3,11 @@ export { chartColorFailure, chartColorSuccess, REPORT_CARD_EMPTY_STATE_TITLES, }
|
|
|
3
3
|
export { DashboardEmptyStateBase, } from "./DashboardEmptyStateBase.js";
|
|
4
4
|
export { dashboardStyles, tableFullWidthStyle } from "./dashboardStyles.js";
|
|
5
5
|
export { EmptySearchResults, } from "./EmptySearchResults.js";
|
|
6
|
-
export { FeatureStatusBadge, } from "./FeatureStatusBadge.js";
|
|
7
|
-
export { HostPowerStates, } from "./HostPowerStates.js";
|
|
8
|
-
export { InfrastructureSummary, } from "./InfrastructureSummary.js";
|
|
9
|
-
export { booleanToFeatureStatus, buildClusterDetailRows, buildClusterDetails, buildInfrastructureSummary, countVCenters, formatVSphereVersion, hostCapabilityStatus, visibleNetworks, vsanStatus, } from "./infrastructureSummaryModel.js";
|
|
10
6
|
export { OSBarChart, OSDistribution } from "./OSDistribution.js";
|
|
11
7
|
export { OsSupportTiersHelpPopover } from "./OsSupportTiersHelpPopover.js";
|
|
12
8
|
export { OsUpgradeNotice } from "./OsUpgradeNotice.js";
|
|
13
9
|
export { OsNameCell, OsUpgradeRecommendationPopover, } from "./OsUpgradeRecommendationPopover.js";
|
|
14
10
|
export { getSupportTierBadgeColor, getSupportTierBadgeInlineStyle, getSupportTierDefinition, getSupportTierLegendLabel, getSupportTierSortOrder, hasOsUpgradeNotice, ORDERED_SUPPORT_TIERS, resolveSupportTier, SUPPORT_TIER_BADGE_COLORS, SUPPORT_TIER_BADGE_INLINE_STYLES, SUPPORT_TIER_DEFINITIONS, SUPPORT_TIER_LABELS, SUPPORT_TIER_LEARN_MORE_URL, SupportTier, } from "./osSupportTier.js";
|
|
15
11
|
export { default as PopoverIcon } from "./PopoverIcon.js";
|
|
16
|
-
export { PowerStateCard, } from "./PowerStateCard.js";
|
|
17
|
-
export { buildHostPowerStateChart, buildVmPowerStateChart, HOST_POWER_COLORS, VM_POWER_COLORS, } from "./powerStates.js";
|
|
18
12
|
export { SupportTierBadge } from "./SupportTierBadge.js";
|
|
19
13
|
export { ALL_TIERS_FILTER, useOsBarChartViewModel, } from "./useOsBarChartViewModel.js";
|
|
20
|
-
export { VCenterClusterDetails, } from "./VCenterClusterDetails.js";
|
|
21
|
-
export { VmPowerStates, } from "./VmPowerStates.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openshift-migration-advisor/shared-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Shared React UI components for Migration Advisor apps (report charts, forms, OS support tiers)",
|
|
5
5
|
"author": "Montse Ortega <mortegag@redhat.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
package/src/charts/index.ts
CHANGED
|
@@ -33,19 +33,12 @@ export default function RadioButtonFormGroup({
|
|
|
33
33
|
const showError = error && (isTouched || isSubmitted);
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<FormGroup
|
|
37
|
-
label={label}
|
|
38
|
-
isRequired={isRequired}
|
|
39
|
-
fieldId={id}
|
|
40
|
-
role="radiogroup"
|
|
41
|
-
isInline
|
|
42
|
-
{...props}
|
|
43
|
-
>
|
|
36
|
+
<FormGroup label={label} isRequired={isRequired} fieldId={id} {...props}>
|
|
44
37
|
<Controller
|
|
45
38
|
name={name}
|
|
46
39
|
control={methods.control}
|
|
47
40
|
render={({ field }) => (
|
|
48
|
-
|
|
41
|
+
<div style={{ display: "flex", gap: "16px" }} role="radiogroup">
|
|
49
42
|
{options.map((option) => (
|
|
50
43
|
<Radio
|
|
51
44
|
key={option.value}
|
|
@@ -57,7 +50,7 @@ export default function RadioButtonFormGroup({
|
|
|
57
50
|
onBlur={field.onBlur}
|
|
58
51
|
/>
|
|
59
52
|
))}
|
|
60
|
-
|
|
53
|
+
</div>
|
|
61
54
|
)}
|
|
62
55
|
/>
|
|
63
56
|
<FormFieldHelperText
|
|
@@ -11,8 +11,6 @@ import {
|
|
|
11
11
|
Select,
|
|
12
12
|
SelectList,
|
|
13
13
|
SelectOption,
|
|
14
|
-
Stack,
|
|
15
|
-
StackItem,
|
|
16
14
|
Toolbar,
|
|
17
15
|
ToolbarContent,
|
|
18
16
|
ToolbarItem,
|
|
@@ -38,9 +36,22 @@ import {
|
|
|
38
36
|
useOsBarChartViewModel,
|
|
39
37
|
} from "./useOsBarChartViewModel.js";
|
|
40
38
|
|
|
39
|
+
const filterToolbarStyle = css`
|
|
40
|
+
padding-left: 0;
|
|
41
|
+
padding-right: 0;
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
const filterItemStyle = css`
|
|
45
|
+
flex: 1 1 0;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const vmsColumnStyle = css`
|
|
50
|
+
text-align: right;
|
|
51
|
+
`;
|
|
52
|
+
|
|
41
53
|
const tableScrollStyle = css`
|
|
42
54
|
overflow: auto;
|
|
43
|
-
max-height: 350px;
|
|
44
55
|
`;
|
|
45
56
|
|
|
46
57
|
interface OSDistributionProps {
|
|
@@ -95,9 +106,9 @@ export const OSBarChart: FC<OSBarChartProps> = ({
|
|
|
95
106
|
return (
|
|
96
107
|
<>
|
|
97
108
|
{!isExportMode ? (
|
|
98
|
-
<Toolbar
|
|
109
|
+
<Toolbar className={filterToolbarStyle}>
|
|
99
110
|
<ToolbarContent>
|
|
100
|
-
<ToolbarItem>
|
|
111
|
+
<ToolbarItem className={filterItemStyle}>
|
|
101
112
|
<SearchInput
|
|
102
113
|
placeholder="Filter by OS"
|
|
103
114
|
value={vm.osFilter}
|
|
@@ -106,7 +117,7 @@ export const OSBarChart: FC<OSBarChartProps> = ({
|
|
|
106
117
|
aria-label="Filter operating systems by name"
|
|
107
118
|
/>
|
|
108
119
|
</ToolbarItem>
|
|
109
|
-
<ToolbarItem>
|
|
120
|
+
<ToolbarItem className={filterItemStyle}>
|
|
110
121
|
<Select
|
|
111
122
|
isOpen={vm.isTierSelectOpen}
|
|
112
123
|
selected={vm.tierFilter}
|
|
@@ -117,7 +128,7 @@ export const OSBarChart: FC<OSBarChartProps> = ({
|
|
|
117
128
|
ref={toggleRef}
|
|
118
129
|
isExpanded={vm.isTierSelectOpen}
|
|
119
130
|
onClick={vm.toggleTierSelectOpen}
|
|
120
|
-
|
|
131
|
+
style={{ width: "100%" }}
|
|
121
132
|
>
|
|
122
133
|
{vm.tierFilterLabel}
|
|
123
134
|
</MenuToggle>
|
|
@@ -140,60 +151,56 @@ export const OSBarChart: FC<OSBarChartProps> = ({
|
|
|
140
151
|
</Toolbar>
|
|
141
152
|
) : null}
|
|
142
153
|
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
{vm.showUpgradeNotice ? <OsUpgradeNotice /> : null}
|
|
155
|
+
|
|
156
|
+
<div
|
|
157
|
+
className={isExportMode ? undefined : tableScrollStyle}
|
|
158
|
+
style={isExportMode ? undefined : { maxHeight: "350px" }}
|
|
159
|
+
>
|
|
160
|
+
<Table
|
|
161
|
+
aria-label="Operating systems"
|
|
162
|
+
variant="compact"
|
|
163
|
+
className={tableFullWidthStyle}
|
|
164
|
+
>
|
|
165
|
+
<Thead>
|
|
166
|
+
<Tr>
|
|
167
|
+
<Th>OS</Th>
|
|
168
|
+
<Th>Tier</Th>
|
|
169
|
+
<Th className={vmsColumnStyle}>VMs</Th>
|
|
170
|
+
</Tr>
|
|
171
|
+
</Thead>
|
|
172
|
+
<Tbody>
|
|
173
|
+
{vm.showNoResults ? (
|
|
174
|
+
<Tr>
|
|
175
|
+
<Td colSpan={3}>
|
|
176
|
+
<EmptySearchResults title="No matching operating system found" />
|
|
177
|
+
</Td>
|
|
178
|
+
</Tr>
|
|
179
|
+
) : (
|
|
180
|
+
vm.filteredRows.map((row) => (
|
|
181
|
+
<Tr key={row.osName}>
|
|
182
|
+
<Td dataLabel="OS">
|
|
183
|
+
<OsNameCell
|
|
184
|
+
osName={row.osName}
|
|
185
|
+
upgradeRecommendation={row.upgradeRecommendation}
|
|
186
|
+
isExportMode={isExportMode}
|
|
187
|
+
/>
|
|
188
|
+
</Td>
|
|
189
|
+
<Td dataLabel="Tier">
|
|
190
|
+
<SupportTierBadge
|
|
191
|
+
tier={row.tier}
|
|
192
|
+
isExportMode={isExportMode}
|
|
193
|
+
/>
|
|
194
|
+
</Td>
|
|
195
|
+
<Td dataLabel="VMs" className={vmsColumnStyle}>
|
|
196
|
+
{row.count}
|
|
197
|
+
</Td>
|
|
163
198
|
</Tr>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<EmptySearchResults title="No matching operating system found" />
|
|
170
|
-
</Td>
|
|
171
|
-
</Tr>
|
|
172
|
-
) : (
|
|
173
|
-
vm.filteredRows.map((row) => (
|
|
174
|
-
<Tr key={row.osName}>
|
|
175
|
-
<Td dataLabel="OS">
|
|
176
|
-
<OsNameCell
|
|
177
|
-
osName={row.osName}
|
|
178
|
-
upgradeRecommendation={row.upgradeRecommendation}
|
|
179
|
-
isExportMode={isExportMode}
|
|
180
|
-
/>
|
|
181
|
-
</Td>
|
|
182
|
-
<Td dataLabel="Tier">
|
|
183
|
-
<SupportTierBadge
|
|
184
|
-
tier={row.tier}
|
|
185
|
-
isExportMode={isExportMode}
|
|
186
|
-
/>
|
|
187
|
-
</Td>
|
|
188
|
-
<Td dataLabel="VMs">{row.count}</Td>
|
|
189
|
-
</Tr>
|
|
190
|
-
))
|
|
191
|
-
)}
|
|
192
|
-
</Tbody>
|
|
193
|
-
</Table>
|
|
194
|
-
</div>
|
|
195
|
-
</StackItem>
|
|
196
|
-
</Stack>
|
|
199
|
+
))
|
|
200
|
+
)}
|
|
201
|
+
</Tbody>
|
|
202
|
+
</Table>
|
|
203
|
+
</div>
|
|
197
204
|
</>
|
|
198
205
|
);
|
|
199
206
|
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
Content,
|
|
4
|
-
Label,
|
|
5
|
-
Stack,
|
|
6
|
-
StackItem,
|
|
7
|
-
} from "@patternfly/react-core";
|
|
1
|
+
import { css } from "@emotion/css";
|
|
2
|
+
import { Label } from "@patternfly/react-core";
|
|
8
3
|
import { ExternalLinkAltIcon } from "@patternfly/react-icons";
|
|
9
4
|
import type { FC } from "react";
|
|
10
5
|
import {
|
|
@@ -16,32 +11,67 @@ import {
|
|
|
16
11
|
} from "./osSupportTier.js";
|
|
17
12
|
import PopoverIcon from "./PopoverIcon.js";
|
|
18
13
|
|
|
14
|
+
const tierListStyle = css`
|
|
15
|
+
list-style: none;
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: var(--pf-t--global--spacer--400);
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const tierItemStyle = css`
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: var(--pf-t--global--spacer--100);
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const tierBadgeStyle = css`
|
|
30
|
+
width: fit-content;
|
|
31
|
+
max-width: 100%;
|
|
32
|
+
align-self: flex-start;
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
const tierDescriptionStyle = css`
|
|
36
|
+
margin: 0;
|
|
37
|
+
color: var(--pf-t--global--text--color--regular);
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
const learnMoreLinkStyle = css`
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--pf-t--global--spacer--xs);
|
|
44
|
+
margin-top: var(--pf-t--global--spacer--400);
|
|
45
|
+
`;
|
|
46
|
+
|
|
19
47
|
const OsSupportTiersHelpBody: FC = () => (
|
|
20
|
-
<
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
<div>
|
|
49
|
+
<ul className={tierListStyle}>
|
|
50
|
+
{ORDERED_SUPPORT_TIERS.map((tier) => (
|
|
51
|
+
<li key={tier} className={tierItemStyle}>
|
|
52
|
+
<Label
|
|
53
|
+
className={tierBadgeStyle}
|
|
54
|
+
color={getSupportTierBadgeColor(tier)}
|
|
55
|
+
isCompact
|
|
56
|
+
>
|
|
57
|
+
{getSupportTierLegendLabel(tier)}
|
|
58
|
+
</Label>
|
|
59
|
+
<p className={tierDescriptionStyle}>
|
|
60
|
+
{getSupportTierDefinition(tier)}
|
|
61
|
+
</p>
|
|
62
|
+
</li>
|
|
63
|
+
))}
|
|
64
|
+
</ul>
|
|
65
|
+
<a
|
|
66
|
+
aria-label="Learn more about operating system support tiers"
|
|
67
|
+
className={learnMoreLinkStyle}
|
|
68
|
+
href={SUPPORT_TIER_LEARN_MORE_URL}
|
|
69
|
+
target="_blank"
|
|
70
|
+
rel="noopener noreferrer"
|
|
71
|
+
>
|
|
72
|
+
Learn more <ExternalLinkAltIcon />
|
|
73
|
+
</a>
|
|
74
|
+
</div>
|
|
45
75
|
);
|
|
46
76
|
|
|
47
77
|
export const OsSupportTiersHelpPopover: FC = () => (
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { css } from "@emotion/css";
|
|
1
2
|
import { Content, Flex, FlexItem, Icon } from "@patternfly/react-core";
|
|
2
3
|
import { InfoCircleIcon } from "@patternfly/react-icons";
|
|
3
4
|
import type { FC } from "react";
|
|
4
5
|
|
|
6
|
+
const noticeStyle = css`
|
|
7
|
+
margin-bottom: var(--pf-t--global--spacer--200);
|
|
8
|
+
`;
|
|
9
|
+
|
|
5
10
|
export const OsUpgradeNotice: FC = () => (
|
|
6
11
|
<Flex
|
|
7
12
|
alignItems={{ default: "alignItemsCenter" }}
|
|
8
13
|
spaceItems={{ default: "spaceItemsSm" }}
|
|
14
|
+
className={noticeStyle}
|
|
9
15
|
>
|
|
10
16
|
<FlexItem>
|
|
11
17
|
<Icon status="info">
|
|
@@ -13,7 +19,7 @@ export const OsUpgradeNotice: FC = () => (
|
|
|
13
19
|
</Icon>
|
|
14
20
|
</FlexItem>
|
|
15
21
|
<FlexItem>
|
|
16
|
-
<Content component="p">
|
|
22
|
+
<Content component="p" style={{ fontWeight: 500 }}>
|
|
17
23
|
Some operating systems may need upgrades before migration
|
|
18
24
|
</Content>
|
|
19
25
|
</FlexItem>
|