@openshift-assisted/ui-lib 2.15.1-cim → 2.15.3-cim

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.
Files changed (72) hide show
  1. package/build/@types/cim/components/Agent/tableUtils.d.ts +5 -1
  2. package/build/@types/cim/components/Agent/tableUtils.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  4. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.d.ts.map +1 -1
  5. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.d.ts.map +1 -1
  6. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts +6 -1
  7. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts.map +1 -1
  8. package/build/@types/cim/components/Hypershift/hooks/useSupportedOCPVersions.d.ts +1 -1
  9. package/build/@types/cim/components/Hypershift/hooks/useSupportedOCPVersions.d.ts.map +1 -1
  10. package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
  11. package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
  12. package/build/@types/cim/index.d.ts +1 -0
  13. package/build/@types/cim/index.d.ts.map +1 -1
  14. package/build/@types/common/components/clusterConfiguration/index.d.ts +0 -1
  15. package/build/@types/common/components/clusterConfiguration/index.d.ts.map +1 -1
  16. package/build/@types/common/components/hosts/AITable.d.ts +3 -1
  17. package/build/@types/common/components/hosts/AITable.d.ts.map +1 -1
  18. package/build/@types/common/components/hosts/HostsTable.d.ts +2 -1
  19. package/build/@types/common/components/hosts/HostsTable.d.ts.map +1 -1
  20. package/build/@types/common/components/hosts/utils.d.ts +4 -1
  21. package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
  22. package/build/cjs/cim/components/Agent/tableUtils.js +4 -3
  23. package/build/cjs/cim/components/Agent/tableUtils.js.map +1 -1
  24. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +21 -11
  25. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  26. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js +21 -3
  27. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js.map +1 -1
  28. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js +3 -1
  29. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js.map +1 -1
  30. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js +3 -3
  31. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js.map +1 -1
  32. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +1 -1
  33. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
  34. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
  35. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
  36. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +1 -1
  37. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
  38. package/build/cjs/cim/global.css +12 -0
  39. package/build/cjs/cim/index.js +2 -0
  40. package/build/cjs/cim/index.js.map +1 -1
  41. package/build/cjs/common/components/clusterConfiguration/index.js +1 -3
  42. package/build/cjs/common/components/clusterConfiguration/index.js.map +1 -1
  43. package/build/cjs/common/components/hosts/AITable.js +54 -38
  44. package/build/cjs/common/components/hosts/AITable.js.map +1 -1
  45. package/build/cjs/common/components/hosts/HostsTable.js +8 -5
  46. package/build/cjs/common/components/hosts/HostsTable.js.map +1 -1
  47. package/build/cjs/common/components/hosts/utils.js +12 -2
  48. package/build/cjs/common/components/hosts/utils.js.map +1 -1
  49. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +6 -7
  50. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
  51. package/lib/cim/components/Agent/tableUtils.tsx +4 -3
  52. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +22 -10
  53. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.tsx +48 -3
  54. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.tsx +4 -0
  55. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.ts +6 -1
  56. package/lib/cim/components/Hypershift/hooks/useSupportedOCPVersions.ts +3 -2
  57. package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +1 -0
  58. package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +2 -0
  59. package/lib/cim/components/common/CpuArchitectureDropdown.tsx +1 -1
  60. package/lib/cim/global.css +12 -0
  61. package/lib/cim/index.ts +3 -0
  62. package/lib/common/components/clusterConfiguration/index.ts +0 -1
  63. package/lib/common/components/hosts/AITable.tsx +61 -37
  64. package/lib/common/components/hosts/HostsTable.tsx +21 -9
  65. package/lib/common/components/hosts/utils.ts +18 -2
  66. package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +10 -10
  67. package/package.json +3 -3
  68. package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts +0 -10
  69. package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts.map +0 -1
  70. package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js +0 -52
  71. package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js.map +0 -1
  72. package/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx +0 -81
@@ -1,81 +0,0 @@
1
- import React from 'react';
2
- import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
3
- import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
4
- import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
5
-
6
- import { OPENSHIFT_LIFE_CYCLE_DATES_LINK } from '../../config';
7
- import { OpenshiftVersionOptionType } from '../../types';
8
- import { SelectField, UiIcon } from '../ui';
9
- import { useTranslation } from '../../hooks/use-translation-wrapper';
10
- import { SelectFieldProps } from '../ui/formik/types';
11
-
12
- const OpenShiftLifeCycleDatesLink = () => {
13
- const { t } = useTranslation();
14
- return (
15
- <a href={OPENSHIFT_LIFE_CYCLE_DATES_LINK} target="_blank" rel="noopener noreferrer">
16
- {t('ai:Learn more')} <ExternalLinkAltIcon />
17
- </a>
18
- );
19
- };
20
-
21
- const getOpenshiftVersionHelperText =
22
- // eslint-disable-next-line react/display-name
23
- (versions: OpenshiftVersionOptionType[]) => (selectedVersionValue: string) => {
24
- const { t } = useTranslation();
25
- if (!versions.length) {
26
- return (
27
- <>
28
- <UiIcon size="sm" status="danger" icon={<ExclamationCircleIcon />} />
29
- &nbsp; {t('ai:No release image is available.')}
30
- </>
31
- );
32
- }
33
- const selectedVersion = versions.find((version) => version.value === selectedVersionValue);
34
- if (!selectedVersionValue || !selectedVersion) {
35
- return null;
36
- }
37
-
38
- if (
39
- selectedVersion.supportLevel !== 'production' &&
40
- selectedVersion.supportLevel !== 'maintenance'
41
- ) {
42
- return (
43
- <>
44
- <UiIcon size="sm" status="warning" icon={<ExclamationTriangleIcon />} />
45
- &nbsp;{t('ai:Please note that this version is not production-ready.')}&nbsp;
46
- <OpenShiftLifeCycleDatesLink />
47
- </>
48
- );
49
- }
50
-
51
- return null;
52
- };
53
-
54
- type OpenShiftVersionSelectProps = {
55
- versions: OpenshiftVersionOptionType[];
56
- onChange?: SelectFieldProps['onChange'];
57
- };
58
- const OpenShiftVersionSelect: React.FC<OpenShiftVersionSelectProps> = ({ versions, onChange }) => {
59
- const selectOptions = React.useMemo(
60
- () =>
61
- versions.map((version) => ({
62
- label: version.label,
63
- value: version.value,
64
- })),
65
- [versions],
66
- );
67
- const { t } = useTranslation();
68
- return (
69
- <SelectField
70
- label={t('ai:OpenShift version')}
71
- name="openshiftVersion"
72
- options={selectOptions}
73
- getHelperText={getOpenshiftVersionHelperText(versions)}
74
- isDisabled={versions.length === 0}
75
- isRequired
76
- onChange={onChange}
77
- />
78
- );
79
- };
80
-
81
- export default OpenShiftVersionSelect;