@openshift-assisted/ui-lib 2.9.14-cim → 2.9.16-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.
- package/build/@types/cim/components/Agent/AgentStatus.d.ts.map +1 -1
- package/build/@types/cim/components/Agent/AgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/Agent/AgentsSelectionTable.d.ts.map +1 -1
- package/build/@types/cim/components/Agent/tableUtils.d.ts +11 -6
- package/build/@types/cim/components/Agent/tableUtils.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsTable.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/utils/status.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraTableToolbar.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agentStatus.d.ts +3 -2
- package/build/@types/cim/components/helpers/agentStatus.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/status.d.ts +5 -2
- package/build/@types/cim/components/helpers/status.d.ts.map +1 -1
- package/build/@types/cim/components/modals/MassApproveAgentModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/MassDeleteAgentModal.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostRowDetail.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostStatus.d.ts.map +1 -1
- package/build/@types/common/components/hosts/status.d.ts +2 -1
- package/build/@types/common/components/hosts/status.d.ts.map +1 -1
- package/build/@types/common/components/hosts/tableUtils.d.ts +1 -1
- package/build/@types/common/components/hosts/tableUtils.d.ts.map +1 -1
- package/build/@types/common/components/storage/StorageDetail.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/HostInventoryExpandable.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/HardwareStatus.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/NetworkingStatus.d.ts.map +1 -1
- package/build/cjs/cim/components/Agent/AgentStatus.js +4 -3
- package/build/cjs/cim/components/Agent/AgentStatus.js.map +1 -1
- package/build/cjs/cim/components/Agent/AgentTable.js +4 -1
- package/build/cjs/cim/components/Agent/AgentTable.js.map +1 -1
- package/build/cjs/cim/components/Agent/AgentsSelectionTable.js +4 -0
- package/build/cjs/cim/components/Agent/AgentsSelectionTable.js.map +1 -1
- package/build/cjs/cim/components/Agent/tableUtils.js +36 -38
- package/build/cjs/cim/components/Agent/tableUtils.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsTable.js +4 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsTable.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js +19 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.js +18 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/utils/status.js +3 -1
- package/build/cjs/cim/components/Hypershift/utils/status.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +20 -7
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.js +5 -2
- package/build/cjs/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js +12 -5
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js.map +1 -1
- package/build/cjs/cim/components/helpers/agentStatus.js +17 -15
- package/build/cjs/cim/components/helpers/agentStatus.js.map +1 -1
- package/build/cjs/cim/components/helpers/agents.js +2 -2
- package/build/cjs/cim/components/helpers/agents.js.map +1 -1
- package/build/cjs/cim/components/helpers/status.js +40 -22
- package/build/cjs/cim/components/helpers/status.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +2 -2
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/modals/MassApproveAgentModal.js +8 -5
- package/build/cjs/cim/components/modals/MassApproveAgentModal.js.map +1 -1
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js +40 -33
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js.map +1 -1
- package/build/cjs/common/components/hosts/HostRowDetail.js +14 -14
- package/build/cjs/common/components/hosts/HostRowDetail.js.map +1 -1
- package/build/cjs/common/components/hosts/HostStatus.js +2 -1
- package/build/cjs/common/components/hosts/HostStatus.js.map +1 -1
- package/build/cjs/common/components/hosts/status.js +54 -53
- package/build/cjs/common/components/hosts/status.js.map +1 -1
- package/build/cjs/common/components/hosts/tableUtils.js +3 -3
- package/build/cjs/common/components/hosts/tableUtils.js.map +1 -1
- package/build/cjs/common/components/storage/DisksTable.js +8 -8
- package/build/cjs/common/components/storage/DisksTable.js.map +1 -1
- package/build/cjs/common/components/storage/StorageDetail.js +3 -1
- package/build/cjs/common/components/storage/StorageDetail.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/HostInventoryExpandable.js +3 -1
- package/build/cjs/ocm/components/clusterDetail/HostInventoryExpandable.js.map +1 -1
- package/build/cjs/ocm/components/hosts/HardwareStatus.js +3 -1
- package/build/cjs/ocm/components/hosts/HardwareStatus.js.map +1 -1
- package/build/cjs/ocm/components/hosts/NetworkingStatus.js +3 -1
- package/build/cjs/ocm/components/hosts/NetworkingStatus.js.map +1 -1
- package/lib/cim/components/Agent/AgentStatus.tsx +4 -3
- package/lib/cim/components/Agent/AgentTable.tsx +4 -1
- package/lib/cim/components/Agent/AgentsSelectionTable.tsx +4 -0
- package/lib/cim/components/Agent/tableUtils.tsx +71 -37
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsTable.tsx +4 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +21 -2
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.tsx +18 -3
- package/lib/cim/components/Hypershift/utils/status.tsx +3 -1
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +20 -7
- package/lib/cim/components/InfraEnv/InfraEnvHostsTabAgentsWarning.tsx +5 -2
- package/lib/cim/components/InfraEnv/InfraTableToolbar.tsx +16 -6
- package/lib/cim/components/helpers/agentStatus.tsx +17 -16
- package/lib/cim/components/helpers/agents.ts +3 -4
- package/lib/cim/components/helpers/status.ts +44 -24
- package/lib/cim/components/helpers/toAssisted.ts +3 -3
- package/lib/cim/components/modals/MassApproveAgentModal.tsx +13 -5
- package/lib/cim/components/modals/MassDeleteAgentModal.tsx +63 -56
- package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +3 -3
- package/lib/common/components/hosts/HostRowDetail.tsx +20 -17
- package/lib/common/components/hosts/HostStatus.tsx +3 -1
- package/lib/common/components/hosts/status.tsx +227 -212
- package/lib/common/components/hosts/tableUtils.tsx +3 -3
- package/lib/common/components/storage/DisksTable.tsx +8 -8
- package/lib/common/components/storage/StorageDetail.tsx +4 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx +1 -1
- package/lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx +3 -1
- package/lib/ocm/components/hosts/HardwareStatus.tsx +3 -1
- package/lib/ocm/components/hosts/NetworkingStatus.tsx +3 -1
- package/package.json +3 -3
|
@@ -26,6 +26,7 @@ import { usePagination } from '../../../common/components/hosts/usePagination';
|
|
|
26
26
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
27
27
|
import { TFunction } from 'i18next';
|
|
28
28
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
29
|
+
import { agentStatus, bmhStatus } from '../helpers/agentStatus';
|
|
29
30
|
|
|
30
31
|
const hostnameColumn = (agents: AgentK8sResource[], t: TFunction): TableRow<Host> => {
|
|
31
32
|
return {
|
|
@@ -56,65 +57,71 @@ const statusColumn = (
|
|
|
56
57
|
agents: AgentK8sResource[],
|
|
57
58
|
bmhs: BareMetalHostK8sResource[],
|
|
58
59
|
t: TFunction,
|
|
59
|
-
): TableRow<Host> =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
): TableRow<Host> => {
|
|
61
|
+
const agentStatuses = agentStatus(t);
|
|
62
|
+
const bmhStatuses = bmhStatus(t);
|
|
63
|
+
return {
|
|
64
|
+
header: {
|
|
65
|
+
title: t('ai:Status'),
|
|
66
|
+
props: {
|
|
67
|
+
id: 'col-header-status',
|
|
68
|
+
},
|
|
69
|
+
transforms: [sortable],
|
|
64
70
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const clusterName = agent?.spec.clusterDeploymentName?.name;
|
|
70
|
-
const bmh = bmhs?.find((b) => b.metadata?.uid === host.id);
|
|
71
|
+
cell: (host) => {
|
|
72
|
+
const agent = agents.find((a) => a.metadata?.uid === host.id);
|
|
73
|
+
const clusterName = agent?.spec.clusterDeploymentName?.name;
|
|
74
|
+
const bmh = bmhs?.find((b) => b.metadata?.uid === host.id);
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
76
|
+
let bmhStatus;
|
|
77
|
+
let title: React.ReactNode = '--';
|
|
78
|
+
if (agent) {
|
|
79
|
+
title = clusterName ? (
|
|
80
|
+
<Flex>
|
|
81
|
+
<FlexItem>
|
|
82
|
+
<AgentStatus agent={agent} zIndex={7000} />
|
|
83
|
+
</FlexItem>
|
|
84
|
+
<FlexItem align={{ default: 'alignRight' }}>
|
|
85
|
+
<Popover
|
|
86
|
+
aria-label={t('ai:Cluster popover')}
|
|
87
|
+
headerContent={<div>{t('ai:Cannot be deleted')}</div>}
|
|
88
|
+
bodyContent={
|
|
89
|
+
<div>
|
|
90
|
+
{t(
|
|
91
|
+
'ai:Hosts that are bound to a cluster cannot be deleted. Remove the host from the cluster and try again.',
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
}
|
|
95
|
+
footerContent={
|
|
96
|
+
<Link to={`/multicloud/infrastructure/clusters/details/${clusterName}/`}>
|
|
97
|
+
{t('ai:Go to cluster {{clusterName}}', { clusterName })}
|
|
98
|
+
</Link>
|
|
99
|
+
}
|
|
100
|
+
>
|
|
101
|
+
<Button variant="link" icon={<InfoCircleIcon color={blueInfoColor.value} />}>
|
|
102
|
+
{t('ai:Cannot be deleted')}
|
|
103
|
+
</Button>
|
|
104
|
+
</Popover>
|
|
105
|
+
</FlexItem>
|
|
106
|
+
</Flex>
|
|
107
|
+
) : (
|
|
108
|
+
<AgentStatus agent={agent} />
|
|
109
|
+
);
|
|
110
|
+
} else if (bmh) {
|
|
111
|
+
bmhStatus = getBMHStatus(bmh, bmhStatuses);
|
|
112
|
+
title = <BMHStatus bmhStatus={bmhStatus} />;
|
|
113
|
+
}
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
115
|
+
return {
|
|
116
|
+
title,
|
|
117
|
+
props: { 'data-testid': 'host-status' },
|
|
118
|
+
sortableValue: agent
|
|
119
|
+
? getAgentStatus(agent, agentStatuses).status.title
|
|
120
|
+
: bmhStatus?.state.title || '',
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
};
|
|
118
125
|
|
|
119
126
|
const tableContent = (
|
|
120
127
|
agents: AgentK8sResource[],
|
package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx
CHANGED
|
@@ -51,9 +51,9 @@ export const ManagedNetworkingControlGroup = ({
|
|
|
51
51
|
<>
|
|
52
52
|
<span>{t('ai:User-Managed Networking')}</span>{' '}
|
|
53
53
|
<PopoverIcon
|
|
54
|
-
bodyContent={
|
|
55
|
-
"With User-Managed Networking, you'll need to provide and configure a load balancer for the API and ingress endpoints."
|
|
56
|
-
}
|
|
54
|
+
bodyContent={t(
|
|
55
|
+
"ai:With User-Managed Networking, you'll need to provide and configure a load balancer for the API and ingress endpoints.",
|
|
56
|
+
)}
|
|
57
57
|
/>
|
|
58
58
|
</>
|
|
59
59
|
}
|
|
@@ -24,6 +24,7 @@ import SectionTitle from '../ui/SectionTitle';
|
|
|
24
24
|
import { OnDiskRoleType } from './DiskRole';
|
|
25
25
|
import StorageDetail from '../storage/StorageDetail';
|
|
26
26
|
import { stringToJSON } from '../../utils';
|
|
27
|
+
import { TFunction } from 'i18next';
|
|
27
28
|
|
|
28
29
|
type HostDetailProps = {
|
|
29
30
|
host: Host;
|
|
@@ -53,12 +54,12 @@ const SectionColumn: React.FC<SectionColumnProps> = ({ children }) => (
|
|
|
53
54
|
</GridItem>
|
|
54
55
|
);
|
|
55
56
|
|
|
56
|
-
const nicsColumns = [
|
|
57
|
-
{ title: 'Name' },
|
|
58
|
-
{ title: 'MAC address' },
|
|
59
|
-
{ title: 'IPv4 address' },
|
|
60
|
-
{ title: 'IPv6 address' },
|
|
61
|
-
{ title: 'Speed' },
|
|
57
|
+
const nicsColumns = (t: TFunction) => [
|
|
58
|
+
{ title: t('ai:Name') },
|
|
59
|
+
{ title: t('ai:MAC address') },
|
|
60
|
+
{ title: t('ai:IPv4 address') },
|
|
61
|
+
{ title: t('ai:IPv6 address') },
|
|
62
|
+
{ title: t('ai:Speed') },
|
|
62
63
|
// { title: 'Vendor' }, TODO(mlibra): search HW database for humanized values
|
|
63
64
|
// { title: 'Product' },
|
|
64
65
|
];
|
|
@@ -71,6 +72,7 @@ const NICsTableRowWrapper = (props: RowWrapperProps) => (
|
|
|
71
72
|
);
|
|
72
73
|
|
|
73
74
|
const NicsTable: React.FC<NicsTableProps & WithTestID> = ({ interfaces, testId }) => {
|
|
75
|
+
const { t } = useTranslation();
|
|
74
76
|
const rows: IRow[] = interfaces
|
|
75
77
|
.sort((nicA, nicB) => nicA.name?.localeCompare(nicB.name || '') || 0)
|
|
76
78
|
.map((nic) => ({
|
|
@@ -92,12 +94,12 @@ const NicsTable: React.FC<NicsTableProps & WithTestID> = ({ interfaces, testId }
|
|
|
92
94
|
],
|
|
93
95
|
key: nic.name,
|
|
94
96
|
}));
|
|
95
|
-
|
|
97
|
+
|
|
96
98
|
return (
|
|
97
99
|
<Table
|
|
98
100
|
data-testid={testId}
|
|
99
101
|
rows={rows}
|
|
100
|
-
cells={nicsColumns}
|
|
102
|
+
cells={nicsColumns(t)}
|
|
101
103
|
variant={TableVariant.compact}
|
|
102
104
|
aria-label={t("ai:Host's network interfaces table")}
|
|
103
105
|
borders={false}
|
|
@@ -148,9 +150,9 @@ export const HostDetail = ({
|
|
|
148
150
|
|
|
149
151
|
return (
|
|
150
152
|
<Grid hasGutter>
|
|
151
|
-
<SectionTitle testId={'host-details-section'} title=
|
|
153
|
+
<SectionTitle testId={'host-details-section'} title={t('ai:Host details')} />
|
|
152
154
|
<SectionColumn>
|
|
153
|
-
<DetailItem testId={'uuid'} title=
|
|
155
|
+
<DetailItem testId={'uuid'} title={t('ai:UUID')} value={id} />
|
|
154
156
|
<DetailItem
|
|
155
157
|
testId={'manufacturer'}
|
|
156
158
|
title={t('ai:Manufacturer')}
|
|
@@ -161,7 +163,11 @@ export const HostDetail = ({
|
|
|
161
163
|
title={t('ai:Product')}
|
|
162
164
|
value={inventory.systemVendor?.productName || DASH}
|
|
163
165
|
/>
|
|
164
|
-
<DetailItem
|
|
166
|
+
<DetailItem
|
|
167
|
+
testId={'serial-number'}
|
|
168
|
+
title={t('ai:Serial number')}
|
|
169
|
+
value={rowInfo.serialNumber}
|
|
170
|
+
/>
|
|
165
171
|
</SectionColumn>
|
|
166
172
|
<SectionColumn>
|
|
167
173
|
<DetailItem
|
|
@@ -186,8 +192,8 @@ export const HostDetail = ({
|
|
|
186
192
|
/>
|
|
187
193
|
</SectionColumn>
|
|
188
194
|
<SectionColumn>
|
|
189
|
-
<DetailItem testId={'hw-type'} title=
|
|
190
|
-
<DetailItem testId={'bmc-address'} title=
|
|
195
|
+
<DetailItem testId={'hw-type'} title={t('ai:Hardware type')} value={hardwareType} />
|
|
196
|
+
<DetailItem testId={'bmc-address'} title={t('ai:BMC address')} value={bmcAddress} />
|
|
191
197
|
<DetailItem
|
|
192
198
|
testId={'boot-mode'}
|
|
193
199
|
title={t('ai:Boot mode')}
|
|
@@ -215,10 +221,7 @@ export const HostDetail = ({
|
|
|
215
221
|
updateDiskSkipFormatting={updateDiskSkipFormatting}
|
|
216
222
|
/>
|
|
217
223
|
)}
|
|
218
|
-
<SectionTitle
|
|
219
|
-
testId={'nics-section'}
|
|
220
|
-
title={`${nics.length} NIC${nics.length === 1 ? '' : 's'}`}
|
|
221
|
-
/>
|
|
224
|
+
<SectionTitle testId={'nics-section'} title={t('ai:NIC', { count: nics.length })} />
|
|
222
225
|
<GridItem>
|
|
223
226
|
<NicsTable interfaces={nics} testId={'nics-table'} />
|
|
224
227
|
</GridItem>
|
|
@@ -230,6 +230,8 @@ const HostStatus: React.FC<HostStatusProps> = ({
|
|
|
230
230
|
onEditHostname?.();
|
|
231
231
|
}, [keepOnOutsideClick, onEditHostname]);
|
|
232
232
|
|
|
233
|
+
const { t } = useTranslation();
|
|
234
|
+
|
|
233
235
|
const { title, icon, sublabel, details, noPopover } = status;
|
|
234
236
|
const titleWithProgress = getTitleWithProgress(host, status);
|
|
235
237
|
const popoverProps: WithHostStatusPopoverProps = {
|
|
@@ -251,7 +253,7 @@ const HostStatus: React.FC<HostStatusProps> = ({
|
|
|
251
253
|
{
|
|
252
254
|
<FlexItem>
|
|
253
255
|
{(autoCSR && status.key === 'added-to-existing-cluster'
|
|
254
|
-
? hostStatus.installed.icon
|
|
256
|
+
? hostStatus(t).installed.icon
|
|
255
257
|
: icon) || <UnknownIcon />}
|
|
256
258
|
</FlexItem>
|
|
257
259
|
}
|