@openshift-assisted/ui-lib 2.43.5 → 2.44.1

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 (114) hide show
  1. package/build/@types/cim/components/Agent/tableUtils.d.ts +6 -2
  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/ClusterDeployment/wizardTransition.d.ts +1 -1
  5. package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
  6. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.d.ts.map +1 -1
  7. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.d.ts.map +1 -1
  8. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts +6 -1
  9. package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts.map +1 -1
  10. package/build/@types/cim/components/Hypershift/hooks/useSupportedOCPVersions.d.ts +1 -1
  11. package/build/@types/cim/components/Hypershift/hooks/useSupportedOCPVersions.d.ts.map +1 -1
  12. package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
  13. package/build/@types/cim/index.d.ts +1 -0
  14. package/build/@types/cim/index.d.ts.map +1 -1
  15. package/build/@types/common/components/clusterConfiguration/index.d.ts +0 -1
  16. package/build/@types/common/components/clusterConfiguration/index.d.ts.map +1 -1
  17. package/build/@types/common/components/hosts/AITable.d.ts +3 -1
  18. package/build/@types/common/components/hosts/AITable.d.ts.map +1 -1
  19. package/build/@types/common/components/hosts/HostsTable.d.ts +2 -1
  20. package/build/@types/common/components/hosts/HostsTable.d.ts.map +1 -1
  21. package/build/@types/common/components/hosts/types.d.ts +1 -1
  22. package/build/@types/common/components/hosts/types.d.ts.map +1 -1
  23. package/build/@types/common/components/hosts/utils.d.ts +5 -2
  24. package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
  25. package/build/@types/common/components/operators/operatorDescriptions.d.ts +4 -0
  26. package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -1
  27. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  28. package/build/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
  29. package/build/@types/common/config/constants.d.ts +16 -0
  30. package/build/@types/common/config/constants.d.ts.map +1 -1
  31. package/build/@types/common/config/docs_links.d.ts +4 -0
  32. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  33. package/build/@types/ocm/components/Routes.d.ts.map +1 -1
  34. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
  35. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
  36. package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
  37. package/build/@types/ocm/components/hosts/use-hosts-table.d.ts +1 -1
  38. package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
  39. package/build/cjs/cim/components/Agent/tableUtils.js +4 -3
  40. package/build/cjs/cim/components/Agent/tableUtils.js.map +1 -1
  41. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +16 -14
  42. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  43. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js +21 -3
  44. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js.map +1 -1
  45. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js +3 -1
  46. package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.js.map +1 -1
  47. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js +3 -3
  48. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js.map +1 -1
  49. package/build/cjs/cim/components/Hypershift/modals/AddNodePoolModal.js +1 -1
  50. package/build/cjs/cim/components/Hypershift/modals/AddNodePoolModal.js.map +1 -1
  51. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
  52. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
  53. package/build/cjs/cim/global.css +12 -0
  54. package/build/cjs/cim/index.js +2 -0
  55. package/build/cjs/cim/index.js.map +1 -1
  56. package/build/cjs/common/components/clusterConfiguration/index.js +1 -3
  57. package/build/cjs/common/components/clusterConfiguration/index.js.map +1 -1
  58. package/build/cjs/common/components/hosts/AITable.js +54 -38
  59. package/build/cjs/common/components/hosts/AITable.js.map +1 -1
  60. package/build/cjs/common/components/hosts/HostsTable.js +8 -5
  61. package/build/cjs/common/components/hosts/HostsTable.js.map +1 -1
  62. package/build/cjs/common/components/hosts/tableUtils.js +1 -1
  63. package/build/cjs/common/components/hosts/tableUtils.js.map +1 -1
  64. package/build/cjs/common/components/hosts/utils.js +23 -3
  65. package/build/cjs/common/components/hosts/utils.js.map +1 -1
  66. package/build/cjs/common/components/operators/operatorDescriptions.js +5 -1
  67. package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -1
  68. package/build/cjs/common/components/operators/operatorSpecs.js +48 -0
  69. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  70. package/build/cjs/common/components/ui/ClusterEventsToolbar.js +5 -5
  71. package/build/cjs/common/components/ui/ClusterEventsToolbar.js.map +1 -1
  72. package/build/cjs/common/config/constants.js +24 -1
  73. package/build/cjs/common/config/constants.js.map +1 -1
  74. package/build/cjs/common/config/docs_links.js +9 -1
  75. package/build/cjs/common/config/docs_links.js.map +1 -1
  76. package/build/cjs/ocm/components/Routes.js +10 -9
  77. package/build/cjs/ocm/components/Routes.js.map +1 -1
  78. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +4 -1
  79. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
  80. package/build/cjs/ocm/components/clusters/ClustersListToolbar.js +1 -1
  81. package/build/cjs/ocm/components/clusters/ClustersListToolbar.js.map +1 -1
  82. package/build/cjs/ocm/components/hosts/use-hosts-table.js +1 -1
  83. package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
  84. package/lib/cim/components/Agent/tableUtils.tsx +5 -4
  85. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +21 -18
  86. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.tsx +48 -3
  87. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsStep.tsx +4 -0
  88. package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.ts +6 -1
  89. package/lib/cim/components/Hypershift/hooks/useSupportedOCPVersions.ts +3 -2
  90. package/lib/cim/components/Hypershift/modals/AddNodePoolModal.tsx +1 -1
  91. package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +2 -0
  92. package/lib/cim/global.css +12 -0
  93. package/lib/cim/index.ts +3 -0
  94. package/lib/common/components/clusterConfiguration/index.ts +0 -1
  95. package/lib/common/components/hosts/AITable.tsx +61 -37
  96. package/lib/common/components/hosts/HostsTable.tsx +21 -9
  97. package/lib/common/components/hosts/tableUtils.tsx +1 -1
  98. package/lib/common/components/hosts/types.ts +1 -1
  99. package/lib/common/components/hosts/utils.ts +31 -4
  100. package/lib/common/components/operators/operatorDescriptions.tsx +12 -0
  101. package/lib/common/components/operators/operatorSpecs.tsx +70 -0
  102. package/lib/common/components/ui/ClusterEventsToolbar.tsx +5 -0
  103. package/lib/common/config/constants.ts +22 -0
  104. package/lib/common/config/docs_links.ts +20 -0
  105. package/lib/ocm/components/Routes.tsx +12 -10
  106. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +6 -1
  107. package/lib/ocm/components/clusters/ClustersListToolbar.tsx +1 -1
  108. package/lib/ocm/components/hosts/use-hosts-table.tsx +1 -1
  109. package/package.json +3 -3
  110. package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts +0 -10
  111. package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts.map +0 -1
  112. package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js +0 -52
  113. package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js.map +0 -1
  114. package/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx +0 -81
@@ -80,6 +80,7 @@ export type AITableProps<R> = ReturnType<typeof usePagination> & {
80
80
  actionResolver?: ActionsResolver<R>;
81
81
  canSelectAll?: boolean;
82
82
  variant?: TableProps['variant'];
83
+ alreadySorted?: boolean;
83
84
  };
84
85
 
85
86
  // eslint-disable-next-line
@@ -103,8 +104,21 @@ const AITable = <R extends any>({
103
104
  perPageOptions,
104
105
  canSelectAll,
105
106
  variant,
107
+ alreadySorted,
106
108
  }: WithTestID & AITableProps<R>) => {
107
109
  const itemIDs = React.useMemo(() => data.map(getDataId), [data, getDataId]);
110
+ const [openRows, setOpenRows] = React.useState<OpenRows>({});
111
+
112
+ const sortByRef = React.useRef<ISortBy>();
113
+ const [sortBy, setSortBy] = React.useState<ISortBy>({
114
+ index: onSelect ? 1 : 0,
115
+ direction: SortByDirection.asc,
116
+ });
117
+
118
+ const dataRef = React.useRef(data);
119
+ if (dataRef.current !== data) {
120
+ dataRef.current = data;
121
+ }
108
122
 
109
123
  React.useEffect(() => {
110
124
  if (selectedIDs && setSelectedIDs) {
@@ -121,16 +135,29 @@ const AITable = <R extends any>({
121
135
  }
122
136
  }, [data, setSelectedIDs, selectedIDs, getDataId]);
123
137
 
124
- const [openRows, setOpenRows] = React.useState<OpenRows>({});
125
- const [sortBy, setSortBy] = React.useState<ISortBy>({
126
- index: onSelect ? 1 : 0,
127
- direction: SortByDirection.asc,
128
- });
138
+ React.useEffect(() => {
139
+ if (alreadySorted) {
140
+ sortByRef.current = sortBy;
141
+ setSortBy({
142
+ index: -1,
143
+ direction: SortByDirection.asc,
144
+ });
145
+ } else {
146
+ if (sortBy.index === -1 && sortByRef.current) {
147
+ setSortBy(sortByRef.current);
148
+ }
149
+ }
150
+ // eslint-disable-next-line react-hooks/exhaustive-deps
151
+ }, [alreadySorted]);
152
+
153
+ React.useEffect(() => {
154
+ if (!alreadySorted) {
155
+ sortByRef.current = sortBy;
156
+ } else if (alreadySorted && sortBy.index !== -1) {
157
+ sortByRef.current = sortBy;
158
+ }
159
+ }, [sortBy, alreadySorted]);
129
160
 
130
- const dataRef = React.useRef(data);
131
- if (dataRef.current !== data) {
132
- dataRef.current = data;
133
- }
134
161
  const onSelectAll = React.useCallback(
135
162
  (isChecked: boolean) => {
136
163
  setSelectedIDs?.(isChecked ? dataRef.current.map(getDataId) : []);
@@ -169,33 +196,27 @@ const AITable = <R extends any>({
169
196
  return [newContent, columns];
170
197
  }, [canSelectAll, content, getDataId, onSelect, onSelectAll]);
171
198
 
172
- const hostRows = React.useMemo(() => {
173
- const rows = (data || [])
174
- .map<IRow>((obj) => {
175
- const id = getDataId(obj);
176
- const cells = contentWithAdditions.filter((c) => !!c.cell).map((c) => c.cell?.(obj));
177
- const isOpen = !!openRows[id];
178
- return {
179
- isOpen,
180
- cells,
181
- key: `${id}-master`,
182
- id,
183
- actions: actionResolver ? actionResolver(obj) : undefined,
184
- nestedComponent: ExpandComponent ? <ExpandComponent obj={obj} /> : undefined,
185
- };
186
- })
187
- .slice((page - 1) * perPage, page * perPage);
188
- return rows;
189
- }, [
190
- data,
191
- page,
192
- perPage,
193
- ExpandComponent,
194
- getDataId,
195
- contentWithAdditions,
196
- openRows,
197
- actionResolver,
198
- ]);
199
+ const getRows = React.useCallback(
200
+ (data: R[]) =>
201
+ (data || [])
202
+ .map<IRow>((obj) => {
203
+ const id = getDataId(obj);
204
+ const cells = contentWithAdditions.filter((c) => !!c.cell).map((c) => c.cell?.(obj));
205
+ const isOpen = !!openRows[id];
206
+ return {
207
+ isOpen,
208
+ cells,
209
+ key: `${id}-master`,
210
+ id,
211
+ actions: actionResolver ? actionResolver(obj) : undefined,
212
+ nestedComponent: ExpandComponent ? <ExpandComponent obj={obj} /> : undefined,
213
+ };
214
+ })
215
+ .slice((page - 1) * perPage, page * perPage),
216
+ [page, perPage, getDataId, contentWithAdditions, openRows, actionResolver, ExpandComponent],
217
+ );
218
+
219
+ const hostRows = React.useMemo(() => getRows(data), [data, getRows]);
199
220
 
200
221
  const rows = React.useMemo(() => {
201
222
  if (hostRows.length) {
@@ -223,10 +244,13 @@ const AITable = <R extends any>({
223
244
  }, []);
224
245
 
225
246
  const sortedRows = React.useMemo(() => {
247
+ if (alreadySorted && sortBy.index === -1) {
248
+ return getRows(data);
249
+ }
226
250
  return rows.sort(
227
251
  rowSorter(sortBy, (row: IRow, index = 0) => row.cells?.[index] as string | HumanizedSortable),
228
252
  );
229
- }, [rows, sortBy]);
253
+ }, [alreadySorted, sortBy, rows, getRows, data]);
230
254
 
231
255
  return (
232
256
  <>
@@ -60,20 +60,32 @@ type HostsTableProps = ReturnType<typeof usePagination> &
60
60
  | 'variant'
61
61
  > & {
62
62
  hosts: Host[];
63
+ alreadySorted?: boolean;
63
64
  skipDisabled?: boolean;
64
65
  children: React.ReactNode;
65
66
  };
66
67
 
67
- const HostsTable = ({ hosts, skipDisabled, ...rest }: HostsTableProps & WithTestID) => {
68
- const data = React.useMemo(
69
- () =>
70
- (hosts || [])
71
- .filter((host) => !skipDisabled || host.status !== 'disabled')
72
- .sort((a, b) => (a.createdAt && b.createdAt && a.createdAt < b.createdAt ? -1 : 1)),
73
- [hosts, skipDisabled],
74
- );
68
+ const HostsTable = ({
69
+ hosts,
70
+ skipDisabled,
71
+ alreadySorted,
72
+ ...rest
73
+ }: HostsTableProps & WithTestID) => {
74
+ const data = React.useMemo(() => {
75
+ const filteredHosts = (hosts || []).filter(
76
+ (host) => !skipDisabled || host.status !== 'disabled',
77
+ );
78
+
79
+ return alreadySorted
80
+ ? filteredHosts
81
+ : filteredHosts.sort((a, b) =>
82
+ a.createdAt && b.createdAt && a.createdAt < b.createdAt ? -1 : 1,
83
+ );
84
+ }, [hosts, skipDisabled, alreadySorted]);
75
85
 
76
- return <AITable<Host> getDataId={getHostId} data={data} {...rest} />;
86
+ return (
87
+ <AITable<Host> getDataId={getHostId} data={data} alreadySorted={alreadySorted} {...rest} />
88
+ );
77
89
  };
78
90
 
79
91
  export default HostsTable;
@@ -80,7 +80,7 @@ export const hostnameColumn = (
80
80
  inventory={inventory}
81
81
  onEditHostname={editHostname}
82
82
  hosts={hosts}
83
- readonly={canEditHostname ? !canEditHostname() : false}
83
+ readonly={canEditHostname ? !canEditHostname(host) : false}
84
84
  />
85
85
  ),
86
86
  props: { 'data-testid': 'host-name' },
@@ -47,7 +47,7 @@ export type HostsTableActions = {
47
47
  onEditBMH?: (host: Host) => void;
48
48
  canEditBMH?: (host: Host) => ActionCheck;
49
49
  onSelect?: (host: Host, selected: boolean) => void;
50
- canEditHostname?: () => boolean;
50
+ canEditHostname?: (host?: Host) => boolean;
51
51
  canUnbindHost?: (host: Host) => ActionCheck;
52
52
  onUnbindHost?: (host: Host) => void;
53
53
  onExcludedODF?: (
@@ -80,8 +80,19 @@ export const canEditRole = (
80
80
  isSNO?: boolean,
81
81
  ) => canEditHost(clusterStatus, status) && !isSNO;
82
82
 
83
- export const canEditHostname = (clusterStatus: Cluster['status']) =>
84
- ['insufficient', 'adding-hosts', 'ready', 'pending-for-input'].includes(clusterStatus);
83
+ export const canEditHostname = (clusterStatus: Cluster['status'], host?: Host) => {
84
+ // First check if the cluster status allows hostname editing
85
+ if (!['insufficient', 'adding-hosts', 'ready', 'pending-for-input'].includes(clusterStatus)) {
86
+ return false;
87
+ }
88
+
89
+ // For Day2 hosts, also check the host status
90
+ if (host && host.kind === 'AddToExistingClusterHost') {
91
+ return canHostnameBeChanged(host.status);
92
+ }
93
+
94
+ return true;
95
+ };
85
96
 
86
97
  export const canEditDisks = canEditHost;
87
98
 
@@ -196,7 +207,7 @@ export const getInventory = (host: Host) => {
196
207
 
197
208
  export const filterByHostname = (hosts: Host[], hostnameFilter: string | undefined) => {
198
209
  if (!hostnameFilter) {
199
- return hosts;
210
+ return { hosts, sorted: false };
200
211
  }
201
212
  const hostsWithHostname = hosts.map((host) => {
202
213
  const { inventory: inventoryString = '' } = host;
@@ -209,12 +220,28 @@ export const filterByHostname = (hosts: Host[], hostnameFilter: string | undefin
209
220
  });
210
221
 
211
222
  const fuse = new Fuse(hostsWithHostname, {
223
+ includeScore: true,
212
224
  ignoreLocation: true,
213
225
  threshold: 0.3,
214
226
  keys: ['hostname'],
215
227
  });
216
228
 
217
- return fuse.search(hostnameFilter).map(({ item }) => item.host);
229
+ const filteredHosts = fuse.search(hostnameFilter);
230
+
231
+ const sortedHosts = filteredHosts
232
+ .sort((a, b) => (a.score || 0) - (b.score || 0))
233
+ .map(({ item }) => item.host);
234
+
235
+ const sorted =
236
+ filteredHosts.length > 1 &&
237
+ filteredHosts.some(
238
+ (result, index) => index > 0 && (result.score || 0) !== (filteredHosts[0].score || 0),
239
+ );
240
+
241
+ return {
242
+ hosts: sortedHosts,
243
+ sorted,
244
+ };
218
245
  };
219
246
 
220
247
  export const getFailingHostValidations = (validationsInfo: HostValidationsInfo) =>
@@ -56,3 +56,15 @@ export const DESCRIPTION_SERVICEMESH =
56
56
 
57
57
  export const DESCRIPTION_LVM =
58
58
  'Storage virtualization that offers a more flexible approach for disk space management.';
59
+
60
+ export const DESCRIPTION_CLUSTER_OBSERVABILITY =
61
+ 'Provides observability and monitoring capabilities for your OpenShift cluster.';
62
+
63
+ export const DESCRIPTION_NUMA_RESOURCES =
64
+ 'Provides NUMA-aware scheduling to improve workload performance on NUMA systems.';
65
+
66
+ export const DESCRIPTION_OADP =
67
+ 'Backup and restore OpenShift cluster resources and persistent volumes.';
68
+
69
+ export const DESCRIPTION_METALLB =
70
+ 'Provides load balancer services for bare metal OpenShift clusters.';
@@ -23,20 +23,28 @@ import {
23
23
  OPERATOR_NAME_FENCE_AGENTS_REMEDIATION,
24
24
  OPERATOR_NAME_NODE_MAINTENANCE,
25
25
  OPERATOR_NAME_KUBE_DESCHEDULER,
26
+ OPERATOR_NAME_CLUSTER_OBSERVABILITY,
27
+ OPERATOR_NAME_NUMA_RESOURCES,
28
+ OPERATOR_NAME_OADP,
29
+ OPERATOR_NAME_METALLB,
26
30
  } from '../../config/constants';
27
31
  import { ExternalLink } from '../ui';
28
32
  import {
29
33
  AUTHORINO_OPERATOR_LINK,
30
34
  CNV_LINK,
31
35
  FENCE_AGENTS_REMEDIATION_LINK,
36
+ getClusterObservabilityLink,
32
37
  getKmmDocsLink,
33
38
  getKubeDeschedulerLink,
34
39
  getLsoLink,
35
40
  getLvmsDocsLink,
36
41
  getMceDocsLink,
42
+ getMetalLbLink,
37
43
  getNmstateLink,
38
44
  getNodeFeatureDiscoveryLink,
45
+ getNumaResourcesLink,
39
46
  getNvidiaGpuLink,
47
+ getOadpLink,
40
48
  MTV_LINK,
41
49
  NODE_HEALTHCHECK_LINK,
42
50
  NODE_MAINTENANCE_LINK,
@@ -74,6 +82,10 @@ import {
74
82
  DESCRIPTION_SERVERLESS,
75
83
  DESCRIPTION_SERVICEMESH,
76
84
  DESCRIPTION_LVM,
85
+ DESCRIPTION_CLUSTER_OBSERVABILITY,
86
+ DESCRIPTION_NUMA_RESOURCES,
87
+ DESCRIPTION_OADP,
88
+ DESCRIPTION_METALLB,
77
89
  } from './operatorDescriptions';
78
90
 
79
91
  // TODO check if it's unused and it can be deleted in favor of "isMajorMinorVersionEqualOrGreater"
@@ -178,6 +190,20 @@ export const getOperatorSpecs = (
178
190
  ),
179
191
  supportLevel: getFeatureSupportLevel('ODF'),
180
192
  },
193
+ {
194
+ operatorKey: OPERATOR_NAME_OADP,
195
+ title: 'OADP',
196
+ featureId: 'OADP',
197
+ descriptionText: DESCRIPTION_OADP,
198
+ Description: ({ openshiftVersion, searchTerm }) => (
199
+ <>
200
+ <HighlightedText text={DESCRIPTION_OADP} searchTerm={searchTerm} />{' '}
201
+ <ExternalLink href={getOadpLink(openshiftVersion)}>Learn more</ExternalLink>
202
+ </>
203
+ ),
204
+ notStandalone: true,
205
+ supportLevel: getFeatureSupportLevel('OADP'),
206
+ },
181
207
  ],
182
208
  [categories[Category.VIRT]]: [
183
209
  {
@@ -302,6 +328,20 @@ export const getOperatorSpecs = (
302
328
  notStandalone: true,
303
329
  supportLevel: getFeatureSupportLevel('SERVICEMESH'),
304
330
  },
331
+ {
332
+ operatorKey: OPERATOR_NAME_METALLB,
333
+ title: 'MetalLB',
334
+ featureId: 'METALLB',
335
+ descriptionText: DESCRIPTION_METALLB,
336
+ Description: ({ openshiftVersion, searchTerm }) => (
337
+ <>
338
+ <HighlightedText text={DESCRIPTION_METALLB} searchTerm={searchTerm} />{' '}
339
+ <ExternalLink href={getMetalLbLink(openshiftVersion)}>Learn more</ExternalLink>
340
+ </>
341
+ ),
342
+ notStandalone: true,
343
+ supportLevel: getFeatureSupportLevel('METALLB'),
344
+ },
305
345
  ],
306
346
  [categories[Category.REMEDIATION]]: [
307
347
  {
@@ -420,6 +460,22 @@ export const getOperatorSpecs = (
420
460
  notStandalone: true,
421
461
  supportLevel: getFeatureSupportLevel('NODE_MAINTENANCE'),
422
462
  },
463
+ {
464
+ operatorKey: OPERATOR_NAME_CLUSTER_OBSERVABILITY,
465
+ title: 'Cluster Observability',
466
+ featureId: 'CLUSTER_OBSERVABILITY',
467
+ descriptionText: DESCRIPTION_CLUSTER_OBSERVABILITY,
468
+ Description: ({ openshiftVersion, searchTerm }) => (
469
+ <>
470
+ <HighlightedText text={DESCRIPTION_CLUSTER_OBSERVABILITY} searchTerm={searchTerm} />{' '}
471
+ <ExternalLink href={getClusterObservabilityLink(openshiftVersion)}>
472
+ Learn more
473
+ </ExternalLink>
474
+ </>
475
+ ),
476
+ notStandalone: true,
477
+ supportLevel: getFeatureSupportLevel('CLUSTER_OBSERVABILITY'),
478
+ },
423
479
  ],
424
480
  [categories[Category.SCHEDULING]]: [
425
481
  {
@@ -451,6 +507,20 @@ export const getOperatorSpecs = (
451
507
  notStandalone: true,
452
508
  supportLevel: getFeatureSupportLevel('KUBE_DESCHEDULER'),
453
509
  },
510
+ {
511
+ operatorKey: OPERATOR_NAME_NUMA_RESOURCES,
512
+ title: 'NUMA Resources',
513
+ featureId: 'NUMA_RESOURCES',
514
+ descriptionText: DESCRIPTION_NUMA_RESOURCES,
515
+ Description: ({ openshiftVersion, searchTerm }) => (
516
+ <>
517
+ <HighlightedText text={DESCRIPTION_NUMA_RESOURCES} searchTerm={searchTerm} />{' '}
518
+ <ExternalLink href={getNumaResourcesLink(openshiftVersion)}>Learn more</ExternalLink>
519
+ </>
520
+ ),
521
+ notStandalone: true,
522
+ supportLevel: getFeatureSupportLevel('NUMA_RESOURCES'),
523
+ },
454
524
  ],
455
525
  };
456
526
  };
@@ -244,6 +244,7 @@ const ClusterEventsToolbar = ({
244
244
  onClick={onHostToggle}
245
245
  isExpanded={isHostExpanded}
246
246
  badge={hostChips.length && <Badge isRead>{hostChips.length}</Badge>}
247
+ data-testid="cluster-events-hosts-dropdown-button"
247
248
  >
248
249
  <Placeholder text="Hosts" />
249
250
  </MenuToggle>
@@ -253,6 +254,7 @@ const ClusterEventsToolbar = ({
253
254
  <DropdownList>
254
255
  <DropdownItem
255
256
  id={`checkbox-${CLUSTER_LEVEL}`}
257
+ data-testid="cluster-level-events-filter-option"
256
258
  hasCheckbox
257
259
  isSelected={getSelections().includes(CLUSTER_LEVEL)}
258
260
  key={CLUSTER_LEVEL}
@@ -262,6 +264,7 @@ const ClusterEventsToolbar = ({
262
264
  </DropdownItem>
263
265
  <DropdownItem
264
266
  id={`checkbox-${DELETED_HOSTS}`}
267
+ data-testid="deleted-hosts-filter-option"
265
268
  hasCheckbox
266
269
  isSelected={getSelections().includes(DELETED_HOSTS)}
267
270
  key={DELETED_HOSTS}
@@ -272,6 +275,7 @@ const ClusterEventsToolbar = ({
272
275
  {...sortedHosts.map((host) => (
273
276
  <DropdownItem
274
277
  id={`checkbox-${host.id}`}
278
+ data-testid={`host-${host.id}-filter-option`}
275
279
  hasCheckbox
276
280
  isSelected={getSelections().includes(host.id)}
277
281
  key={host.id}
@@ -314,6 +318,7 @@ const ClusterEventsToolbar = ({
314
318
  badge={
315
319
  filters.severities?.length && <Badge isRead>{filters.severities.length}</Badge>
316
320
  }
321
+ data-testid="cluster-events-severity-dropdown-button"
317
322
  >
318
323
  <Placeholder text="Severity" />
319
324
  </MenuToggle>
@@ -150,6 +150,10 @@ export const hostValidationLabels = (t: TFunction): { [key in HostValidationId]:
150
150
  'fence-agents-remediation-requirements-satisfied': t('ai:Fence Agents Remediation requirements'),
151
151
  'node-maintenance-requirements-satisfied': t('ai:Node Maintenance requirements'),
152
152
  'kube-descheduler-requirements-satisfied': t('ai:Kube Descheduler requirements'),
153
+ 'cluster-observability-requirements-satisfied': t('ai:Cluster Observability requirements'),
154
+ 'numa-resources-requirements-satisfied': t('ai:NUMA Resources requirements'),
155
+ 'oadp-requirements-satisfied': t('ai:OADP requirements'),
156
+ 'metallb-requirements-satisfied': t('ai:MetalLB requirements'),
153
157
  });
154
158
 
155
159
  export const hostValidationFailureHints = (
@@ -217,6 +221,10 @@ export const hostValidationFailureHints = (
217
221
  'fence-agents-remediation-requirements-satisfied': '',
218
222
  'node-maintenance-requirements-satisfied': '',
219
223
  'kube-descheduler-requirements-satisfied': '',
224
+ 'cluster-observability-requirements-satisfied': '',
225
+ 'numa-resources-requirements-satisfied': '',
226
+ 'oadp-requirements-satisfied': '',
227
+ 'metallb-requirements-satisfied': '',
220
228
  });
221
229
 
222
230
  export const clusterValidationLabels = (
@@ -246,6 +254,10 @@ export const clusterValidationLabels = (
246
254
  'cnv-requirements-satisfied': t('ai:CNV requirements'),
247
255
  'mce-requirements-satisfied': t('ai:MCE requirements'),
248
256
  'platform-requirements-satisfied': t('ai:Platform requirements'),
257
+ 'cluster-observability-requirements-satisfied': t('ai:Cluster Observability requirements'),
258
+ 'numa-resources-requirements-satisfied': t('ai:NUMA Resources requirements'),
259
+ 'oadp-requirements-satisfied': t('ai:OADP requirements'),
260
+ 'metallb-requirements-satisfied': t('ai:MetalLB requirements'),
249
261
  });
250
262
 
251
263
  export const clusterValidationGroupLabels = (
@@ -326,13 +338,23 @@ export const OPERATOR_NAME_SELF_NODE_REMEDIATION = 'self-node-remediation';
326
338
  export const OPERATOR_NAME_FENCE_AGENTS_REMEDIATION = 'fence-agents-remediation';
327
339
  export const OPERATOR_NAME_NODE_MAINTENANCE = 'node-maintenance';
328
340
  export const OPERATOR_NAME_KUBE_DESCHEDULER = 'kube-descheduler';
341
+ export const OPERATOR_NAME_CLUSTER_OBSERVABILITY = 'cluster-observability';
342
+ export const OPERATOR_NAME_NUMA_RESOURCES = 'numaresources';
343
+ export const OPERATOR_NAME_OADP = 'oadp';
344
+ export const OPERATOR_NAME_METALLB = 'metallb';
329
345
 
330
346
  export const singleClusterOperators = [
331
347
  OPERATOR_NAME_CNV,
332
348
  OPERATOR_NAME_MTV,
333
349
  OPERATOR_NAME_NMSTATE,
350
+ OPERATOR_NAME_NODE_HEALTHCHECK,
334
351
  OPERATOR_NAME_NODE_MAINTENANCE,
352
+ OPERATOR_NAME_FENCE_AGENTS_REMEDIATION,
335
353
  OPERATOR_NAME_KUBE_DESCHEDULER,
354
+ OPERATOR_NAME_CLUSTER_OBSERVABILITY,
355
+ OPERATOR_NAME_NUMA_RESOURCES,
356
+ OPERATOR_NAME_OADP,
357
+ OPERATOR_NAME_METALLB,
336
358
  ];
337
359
 
338
360
  export const singleClusterBundles = ['virtualization'];
@@ -199,3 +199,23 @@ export const SERVERLESS_OPERATOR_LINK =
199
199
 
200
200
  export const KUBECONFIG_INFO_LINK =
201
201
  'https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/cli_tools/openshift-cli-oc#about-switches-between-cli-profiles_managing-cli-profiles';
202
+
203
+ export const getOadpLink = (ocpVersion?: string) =>
204
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
205
+ ocpVersion,
206
+ )}/html/backup_and_restore/oadp-application-backup-and-restore`;
207
+
208
+ export const getMetalLbLink = (ocpVersion?: string) =>
209
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
210
+ ocpVersion,
211
+ )}/html/networking_operators/metallb-operator`;
212
+
213
+ export const getClusterObservabilityLink = (ocpVersion?: string) =>
214
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
215
+ ocpVersion,
216
+ )}/html/cluster_observability_operator/cluster-observability-operator-overview`;
217
+
218
+ export const getNumaResourcesLink = (ocpVersion?: string) =>
219
+ `https://docs.redhat.com/en/documentation/openshift_container_platform/${getDocsOpenshiftVersion(
220
+ ocpVersion,
221
+ )}/html/scalability_and_performance/cnf-numa-aware-scheduling`;
@@ -30,15 +30,18 @@ export const UILibRoutes = ({
30
30
  useFeatureDetection(allEnabledFeatures);
31
31
 
32
32
  const routes = (
33
- <Routes>
34
- <Route path="assisted-installer/clusters" element={<Outlet />}>
35
- <Route path="~new" element={<NewClusterPage />} />
36
- <Route path=":clusterId" element={<ClusterPage />} />
37
- <Route index element={<Clusters />} />
38
- </Route>
39
- {children}
40
- <Route path="*" element={<Navigate to="assisted-installer/clusters" />} />
41
- </Routes>
33
+ <>
34
+ <Routes>
35
+ <Route path="assisted-installer/clusters" element={<Outlet />}>
36
+ <Route path="~new" element={<NewClusterPage />} />
37
+ <Route path=":clusterId" element={<ClusterPage />} />
38
+ <Route index element={<Clusters />} />
39
+ </Route>
40
+ {children}
41
+ <Route path="*" element={<Navigate to="assisted-installer/clusters" />} />
42
+ </Routes>
43
+ {additionalComponents}
44
+ </>
42
45
  );
43
46
 
44
47
  return (
@@ -51,7 +54,6 @@ export const UILibRoutes = ({
51
54
  ) : (
52
55
  routes
53
56
  )}
54
- {additionalComponents}
55
57
  </Provider>
56
58
  );
57
59
  };
@@ -89,7 +89,12 @@ const NetworkConfigurationForm: React.FC<{
89
89
  try {
90
90
  await ClustersAPI.updateInstallConfig(
91
91
  cluster.id,
92
- JSON.stringify(JSON.stringify({ featureSet: 'TechPreviewNoUpgrade' })),
92
+ JSON.stringify(
93
+ JSON.stringify({
94
+ featureSet: 'CustomNoUpgrade',
95
+ featureGates: ['NoRegistryClusterOperations=true'],
96
+ }),
97
+ ),
93
98
  );
94
99
  } catch (e) {
95
100
  handleApiError(e, () =>
@@ -188,7 +188,7 @@ const ClustersListToolbar: React.FC<ClustersListToolbarProps> = ({
188
188
  isDisabled={clustersUIState === ResourceUIState.RELOADING}
189
189
  >
190
190
  <Tooltip content="Refresh">
191
- <SyncIcon />
191
+ <SyncIcon data-testid="refresh-clusters-icon" />
192
192
  </Tooltip>
193
193
  </ToolbarButton>
194
194
  </ToolbarGroup>
@@ -263,7 +263,7 @@ export const useHostsTable = (cluster: Cluster) => {
263
263
  canDelete: (host: Host) => !isViewerMode && canDeleteUtil(cluster.status, host.status),
264
264
  canEditHost: (host: Host) => !isViewerMode && canEditHostUtil(cluster.status, host.status),
265
265
  canReset: (host: Host) => !isViewerMode && canResetUtil(cluster.status, host.status),
266
- canEditHostname: () => !isViewerMode && canEditHostnameUtil(cluster.status),
266
+ canEditHostname: (host?: Host) => !isViewerMode && canEditHostnameUtil(cluster.status, host),
267
267
  }),
268
268
  [cluster, isViewerMode, isSingleClusterFeatureEnabled],
269
269
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.43.5",
4
- "@openshift-assisted/types": "2.43.5",
3
+ "@openshift-assisted/locales": "2.44.1",
4
+ "@openshift-assisted/types": "2.44.1",
5
5
  "@openshift-console/dynamic-plugin-sdk": "0.0.3",
6
6
  "@patternfly/patternfly": "5.2.0",
7
7
  "@patternfly/react-code-editor": "5.2.0",
@@ -140,5 +140,5 @@
140
140
  ]
141
141
  }
142
142
  },
143
- "version": "2.43.5"
143
+ "version": "2.44.1"
144
144
  }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { OpenshiftVersionOptionType } from '../../types';
3
- import { SelectFieldProps } from '../ui/formik/types';
4
- type OpenShiftVersionSelectProps = {
5
- versions: OpenshiftVersionOptionType[];
6
- onChange?: SelectFieldProps['onChange'];
7
- };
8
- declare const OpenShiftVersionSelect: React.FC<OpenShiftVersionSelectProps>;
9
- export default OpenShiftVersionSelect;
10
- //# sourceMappingURL=OpenShiftVersionSelect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenShiftVersionSelect.d.ts","sourceRoot":"","sources":["../../../../../lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA4CtD,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzC,CAAC;AACF,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAqBjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}