@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
|
@@ -14,14 +14,14 @@ const utils_1 = require("../../utils");
|
|
|
14
14
|
const ui_1 = require("../ui");
|
|
15
15
|
const use_translation_wrapper_1 = require("../../hooks/use-translation-wrapper");
|
|
16
16
|
const diskColumns = (t, showFormat) => [
|
|
17
|
-
{ title: 'Name' },
|
|
18
|
-
{ title: 'Role' },
|
|
19
|
-
{ title: 'Limitations' },
|
|
20
|
-
showFormat ? { title: 'Format?' } : '',
|
|
21
|
-
{ title: 'Drive type' },
|
|
22
|
-
{ title: 'Size' },
|
|
23
|
-
{ title: 'Serial' },
|
|
24
|
-
{ title: 'Model' },
|
|
17
|
+
{ title: t('ai:Name') },
|
|
18
|
+
{ title: t('ai:Role') },
|
|
19
|
+
{ title: t('ai:Limitations') },
|
|
20
|
+
showFormat ? { title: t('ai:Format?') } : '',
|
|
21
|
+
{ title: t('ai:Drive type') },
|
|
22
|
+
{ title: t('ai:Size') },
|
|
23
|
+
{ title: t('ai:Serial') },
|
|
24
|
+
{ title: t('ai:Model') },
|
|
25
25
|
{
|
|
26
26
|
title: (react_1.default.createElement(react_1.default.Fragment, null,
|
|
27
27
|
"WWN ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisksTable.js","sourceRoot":"","sources":["../../../../../lib/common/components/storage/DisksTable.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,uDAOgC;AAChC,yDAQiC;AAIjC,yEAA6D;AAC7D,uFAAuD;AACvD,yDAAkE;AAClE,wGAAqH;AACrH,0FAGqC;AACrC,uCAAuC;AACvC,8BAAoC;AACpC,iFAAqE;AAYrE,MAAM,WAAW,GAAG,CAAC,CAAY,EAAE,UAAmB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BAAoB;QAEhC,8BAAC,yBAAW,OAAG;QACf,8BAAC,uBAAS,IAAC,MAAM,EAAE,UAAU,GAAI,CAC3B,CACT,CAAC;AACJ,CAAC,CAAC;AAEO,gCAAU"}
|
|
@@ -6,11 +6,13 @@ const react_core_1 = require("@patternfly/react-core");
|
|
|
6
6
|
const index_1 = require("../../index");
|
|
7
7
|
const DisksTable_1 = require("./DisksTable");
|
|
8
8
|
const SectionTitle_1 = tslib_1.__importDefault(require("../ui/SectionTitle"));
|
|
9
|
+
const use_translation_wrapper_1 = require("../../hooks/use-translation-wrapper");
|
|
9
10
|
const StorageDetail = ({ host, canEditDisks, onDiskRole, updateDiskSkipFormatting, }) => {
|
|
10
11
|
const inventory = (0, index_1.getInventory)(host);
|
|
11
12
|
const disks = inventory.disks || [];
|
|
13
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
12
14
|
return (react_1.default.createElement(react_core_1.Grid, { hasGutter: true },
|
|
13
|
-
react_1.default.createElement(SectionTitle_1.default, { testId: 'disks-section', title:
|
|
15
|
+
react_1.default.createElement(SectionTitle_1.default, { testId: 'disks-section', title: t('ai:{{count}} Disk', { count: disks.length }) }),
|
|
14
16
|
react_1.default.createElement(react_core_1.GridItem, null,
|
|
15
17
|
react_1.default.createElement(DisksTable_1.DisksTable, { testId: 'disks-table', canEditDisks: canEditDisks, host: host, disks: disks, installationDiskId: host.installationDiskId, onDiskRole: onDiskRole, updateDiskSkipFormatting: updateDiskSkipFormatting }))));
|
|
16
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageDetail.js","sourceRoot":"","sources":["../../../../../lib/common/components/storage/StorageDetail.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAAwD;AACxD,uCAA2C;AAG3C,6CAA0C;AAC1C,8EAA8C;
|
|
1
|
+
{"version":3,"file":"StorageDetail.js","sourceRoot":"","sources":["../../../../../lib/common/components/storage/StorageDetail.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAAwD;AACxD,uCAA2C;AAG3C,6CAA0C;AAC1C,8EAA8C;AAE9C,iFAAqE;AASrE,MAAM,aAAa,GAAG,CAAC,EACrB,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,wBAAwB,GACL,EAAE,EAAE;IACvB,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,IAAI,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC;IAEpC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAE/B,OAAO,CACL,8BAAC,iBAAI,IAAC,SAAS;QACb,8BAAC,sBAAY,IACX,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,CAAC,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,GACtD;QACF,8BAAC,qBAAQ;YACP,8BAAC,uBAAU,IACT,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,UAAU,EAAE,UAAU,EACtB,wBAAwB,EAAE,wBAAwB,GAClD,CACO,CACN,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|
|
@@ -33,7 +33,7 @@ const NetworkConfigurationTableBase = ({ cluster, AdditionalNTPSourcesDialogTogg
|
|
|
33
33
|
(0, tableUtils_1.hostnameColumn)(t, onEditHost, undefined, canEditHostname),
|
|
34
34
|
(0, tableUtils_1.roleColumn)(t, canEditRole, onEditRole, (0, common_1.selectSchedulableMasters)(cluster)),
|
|
35
35
|
(0, exports.networkingStatusColumn)(onEditHost),
|
|
36
|
-
(0, tableUtils_1.activeNICColumn)(cluster),
|
|
36
|
+
(0, tableUtils_1.activeNICColumn)(cluster, t),
|
|
37
37
|
(0, tableUtils_1.ipv4Column)(cluster),
|
|
38
38
|
(0, tableUtils_1.ipv6Column)(cluster),
|
|
39
39
|
(0, tableUtils_1.macAddressColumn)(cluster),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkConfigurationTableBase.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,yDAAmD;AACnD,+CAAiF;AACjF,4FAA4D;AAC5D,8FAAkF;AAClF,+EAQwD;AAExD,qFAAkF;AAClF,qFAA+E;AAC/E,wGAAwE;AAExE,mFAAmF;AACnF,oDAAwD;AAGjD,MAAM,sBAAsB,GAAG,CACpC,cAAgD,EAChC,EAAE,CAAC,CAAC;IACpB,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,sBAAQ,CAAC,EAAE;IACnD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;QACb,MAAM,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,MAAM,eAAe,GAAG,IAAA,oBAAY,EAAkB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAClF,OAAO;YACL,KAAK,EAAE,CACL,oBAAC,0BAAgB,IACf,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,YAAY,EAC5B,eAAe,EAAE,eAAe,GAChC,CACH;YACD,KAAK,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE;YACtC,aAAa,EAAE,MAAM;SACtB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAnBU,QAAA,sBAAsB,0BAmBhC;AAeH,MAAM,6BAA6B,GAAG,CAAC,EACrC,OAAO,EACP,yCAAyC,EACzC,UAAU,EACV,UAAU,EACV,WAAW,EACX,eAAe,EACf,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,WAAW,GACoB,EAAE,EAAE;IACnC,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,IAAA,8CAAuB,GAAE,CAAC;IACtE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CAAC;QACJ,IAAA,2BAAc,EAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC;QACzD,IAAA,uBAAU,EAAC,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,IAAA,iCAAwB,EAAC,OAAO,CAAC,CAAC;QACzE,IAAA,8BAAsB,EAAC,UAAU,CAAC;QAClC,IAAA,4BAAe,EAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkConfigurationTableBase.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationTableBase.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,yDAAmD;AACnD,+CAAiF;AACjF,4FAA4D;AAC5D,8FAAkF;AAClF,+EAQwD;AAExD,qFAAkF;AAClF,qFAA+E;AAC/E,wGAAwE;AAExE,mFAAmF;AACnF,oDAAwD;AAGjD,MAAM,sBAAsB,GAAG,CACpC,cAAgD,EAChC,EAAE,CAAC,CAAC;IACpB,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,sBAAQ,CAAC,EAAE;IACnD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;QACb,MAAM,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,MAAM,eAAe,GAAG,IAAA,oBAAY,EAAkB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAClF,OAAO;YACL,KAAK,EAAE,CACL,oBAAC,0BAA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AAM,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAErF,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CACvC,CAAC,EAAE,GAAG,EAAiB,EAAE,EAAE;QACzB,OAAO,CACL,oBAAC,0BAAU,IACT,IAAI,EAAE,GAAG,EACT,yCAAyC,EAAE,yCAAyC,GACpF,CACH,CAAC;IACJ,CAAC,EACD,CAAC,yCAAyC,CAAC,CAC5C,CAAC;IAEF,OAAO,CACL,oBAAC,oBAAU,kBACT,MAAM,EAAC,uBAAuB,EAC9B,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,IACpB,eAAe,GAElB,QAAQ,CACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,6BAA6B,CAAC"}
|
|
@@ -7,15 +7,17 @@ const ClusterHostsTable_1 = tslib_1.__importDefault(require("../hosts/ClusterHos
|
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
8
|
const react_core_1 = require("@patternfly/react-core");
|
|
9
9
|
require("./HostInventoryExpandable.css");
|
|
10
|
+
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
10
11
|
const ExpandableSectionTitle = ({ hostsCount, icon, }) => (react_1.default.createElement("span", null,
|
|
11
12
|
`Host inventory ${hostsCount > 0 ? `(${hostsCount})` : ''}`,
|
|
12
13
|
icon && react_1.default.createElement("span", { className: "pf-u-ml-sm" }, icon)));
|
|
13
14
|
const HostInventoryExpandable = ({ cluster }) => {
|
|
15
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
14
16
|
const [isExpanded, setIsExpanded] = (0, react_1.useState)(false);
|
|
15
17
|
const hosts = cluster.hosts || [];
|
|
16
18
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
|
|
17
19
|
const mostSevereHostStatus = (0, utils_1.getMostSevereHostStatus)(hosts);
|
|
18
|
-
const hostStatusDef = mostSevereHostStatus ? common_1.hostStatus[mostSevereHostStatus] : null;
|
|
20
|
+
const hostStatusDef = mostSevereHostStatus ? (0, common_1.hostStatus)(t)[mostSevereHostStatus] : null;
|
|
19
21
|
return (react_1.default.createElement(react_core_1.ExpandableSection, { toggleContent: react_1.default.createElement(ExpandableSectionTitle, { hostsCount: hosts.length, icon: hostStatusDef === null || hostStatusDef === void 0 ? void 0 : hostStatusDef.icon }), onToggle: () => setIsExpanded(!isExpanded), isExpanded: isExpanded, className: "host-inventory-expandable", id: "host-inventory-expandable" },
|
|
20
22
|
react_1.default.createElement(ClusterHostsTable_1.default, { cluster: cluster, skipDisabled: true })));
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostInventoryExpandable.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx"],"names":[],"mappings":";;;AAAA,uDAAwC;AACxC,4CAA6C;AAC7C,2FAA2D;AAC3D,mCAAkD;AAClD,uDAA2D;AAC3D,yCAAuC;
|
|
1
|
+
{"version":3,"file":"HostInventoryExpandable.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterDetail/HostInventoryExpandable.tsx"],"names":[],"mappings":";;;AAAA,uDAAwC;AACxC,4CAA6C;AAC7C,2FAA2D;AAC3D,mCAAkD;AAClD,uDAA2D;AAC3D,yCAAuC;AAEvC,2FAA+E;AAM/E,MAAM,sBAAsB,GAAG,CAAC,EAC9B,UAAU,EACV,IAAI,GAIL,EAAE,EAAE,CAAC,CACJ;IACG,kBAAkB,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;IAC3D,IAAI,IAAI,wCAAM,SAAS,EAAC,YAAY,IAAE,IAAI,CAAQ,CAC9C,CACR,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,EAAE,OAAO,EAAgC,EAAE,EAAE;IAC5E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;IAClC,qGAAqG;IACrG,MAAM,oBAAoB,GAAG,IAAA,+BAAuB,EAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,aAAa,GAAG,oBAAoB,CAAC,CAAC,CAAC,IAAA,mBAAU,EAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAExF,OAAO,CACL,8BAAC,8BAAiB,IAChB,aAAa,EACX,8BAAC,sBAAsB,IAAC,UAAU,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,GAAI,EAEjF,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,EAC1C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,2BAA2B,EACrC,EAAE,EAAC,2BAA2B;QAE9B,8BAAC,2BAAiB,IAAC,OAAO,EAAE,OAAO,EAAE,YAAY,SAAG,CAClC,CACrB,CAAC;AACJ,CAAC,CAAC;AACF,kBAAe,uBAAuB,CAAC"}
|
|
@@ -8,10 +8,12 @@ const common_1 = require("../../../common");
|
|
|
8
8
|
const wizardTransition_1 = require("../clusterWizard/wizardTransition");
|
|
9
9
|
const AdditionaNTPSourceDialogToggle_1 = require("./AdditionaNTPSourceDialogToggle");
|
|
10
10
|
const utils_1 = require("../../../common/utils");
|
|
11
|
+
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
11
12
|
const DELETE_MODAL_STATUS_Z_INDEX = 500;
|
|
12
13
|
const HardwareStatus = (props) => {
|
|
14
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
13
15
|
const hardwareStatus = (0, common_1.getWizardStepHostStatus)('host-discovery', wizardTransition_1.wizardStepsValidationsMap, props.host);
|
|
14
|
-
const status = common_1.hostStatus[hardwareStatus];
|
|
16
|
+
const status = (0, common_1.hostStatus)(t)[hardwareStatus];
|
|
15
17
|
const validationsInfo = (0, common_1.getWizardStepHostValidationsInfo)(props.validationsInfo, 'host-discovery', wizardTransition_1.wizardStepsValidationsMap);
|
|
16
18
|
const sublabel = (0, common_1.areOnlySoftValidationsOfWizardStepFailing)(validationsInfo, 'host-discovery', wizardTransition_1.wizardStepsValidationsMap)
|
|
17
19
|
? 'Some validations failed'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HardwareStatus.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/hosts/HardwareStatus.tsx"],"names":[],"mappings":";;;;AAAA,yDAAmD;AACnD,0DAA0B;AAC1B,4CAOyB;AAGzB,wEAA8E;AAC9E,qFAAoF;AACpF,iDAAqD;
|
|
1
|
+
{"version":3,"file":"HardwareStatus.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/hosts/HardwareStatus.tsx"],"names":[],"mappings":";;;;AAAA,yDAAmD;AACnD,0DAA0B;AAC1B,4CAOyB;AAGzB,wEAA8E;AAC9E,qFAAoF;AACpF,iDAAqD;AAErD,2FAA+E;AAS/E,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IACpD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,IAAA,gCAAuB,EAC5C,gBAAgB,EAChB,4CAAyB,EACzB,KAAK,CAAC,IAAI,CACX,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAC7C,MAAM,eAAe,GAAG,IAAA,yCA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AAA,oBAAoB,wBAgC/B;AAEF,kBAAe,EAAE,cAAc,EAAE,oBAAoB,EAApB,4BAAoB,EAAE,CAAC"}
|
|
@@ -5,9 +5,11 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
5
5
|
const common_1 = require("../../../common");
|
|
6
6
|
const wizardTransition_1 = require("../clusterWizard/wizardTransition");
|
|
7
7
|
const AdditionaNTPSourceDialogToggle_1 = require("./AdditionaNTPSourceDialogToggle");
|
|
8
|
+
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
|
|
8
9
|
const NetworkingStatus = (props) => {
|
|
10
|
+
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
9
11
|
const networkingStatus = (0, common_1.getWizardStepHostStatus)('networking', wizardTransition_1.wizardStepsValidationsMap, props.host);
|
|
10
|
-
const status = common_1.hostStatus[networkingStatus];
|
|
12
|
+
const status = (0, common_1.hostStatus)(t)[networkingStatus];
|
|
11
13
|
const validationsInfo = (0, common_1.getWizardStepHostValidationsInfo)(props.validationsInfo, 'networking', wizardTransition_1.wizardStepsValidationsMap);
|
|
12
14
|
const sublabel = (0, common_1.areOnlySoftValidationsOfWizardStepFailing)(validationsInfo, 'networking', wizardTransition_1.wizardStepsValidationsMap)
|
|
13
15
|
? 'Some validations failed'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkingStatus.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/hosts/NetworkingStatus.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,4CAOyB;AACzB,wEAA8E;AAC9E,qFAAoF;
|
|
1
|
+
{"version":3,"file":"NetworkingStatus.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/hosts/NetworkingStatus.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,4CAOyB;AACzB,wEAA8E;AAC9E,qFAAoF;AACpF,2FAA+E;AAE/E,MAAM,gBAAgB,GAAiD,CAAC,KAAK,EAAE,EAAE;IAC/E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,MAAM,gBAAgB,GAAG,IAAA,gCAAuB,EAC9C,YAAY,EACZ,4CAAyB,EACzB,KAAK,CAAC,IAAI,CACX,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,IAAA,yCAAgC,EACtD,KAAK,CAAC,eAAe,EACrB,YAAY,EACZ,4CAAyB,CAC1B,CAAC;IACF,MAAM,QAAQ,GAAG,IAAA,kDAAyC,EACxD,eAAe,EACf,YAAY,EACZ,4CAAyB,CAC1B;QACC,CAAC,CAAC,yBAAyB;QAC3B,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,CACL,8BAAC,mBAAU,oBACL,KAAK,IACT,MAAM,kCAAO,MAAM,KAAE,QAAQ,KAC7B,eAAe,EAAE,eAAe,EAChC,yCAAyC,EAAE,iEAAgC,IAC3E,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -30,15 +30,16 @@ const AgentStatus: React.FC<AgentStatusProps> = ({
|
|
|
30
30
|
wizardStepId,
|
|
31
31
|
isDay2,
|
|
32
32
|
}) => {
|
|
33
|
+
const { t } = useTranslation();
|
|
33
34
|
const [host] = getAIHosts([agent]);
|
|
34
35
|
const editHostname = onEditHostname ? () => onEditHostname(agent) : undefined;
|
|
35
36
|
const pendingApproval = !agent.spec.approved;
|
|
36
37
|
|
|
37
38
|
const hostname = getHostname(host, agent.status?.inventory || {});
|
|
38
|
-
const
|
|
39
|
+
const agentStatuses = agentStatus(t);
|
|
39
40
|
const status = wizardStepId
|
|
40
41
|
? getWizardStepAgentStatus(agent, wizardStepId, t)
|
|
41
|
-
: getAgentStatus(agent, false);
|
|
42
|
+
: getAgentStatus(agent, agentStatuses, false);
|
|
42
43
|
|
|
43
44
|
const showValidationsRunning =
|
|
44
45
|
isDay2 &&
|
|
@@ -54,7 +55,7 @@ const AgentStatus: React.FC<AgentStatusProps> = ({
|
|
|
54
55
|
AdditionalNTPSourcesDialogToggleComponent={AdditionalNTPSourcesDialogToggle}
|
|
55
56
|
autoCSR
|
|
56
57
|
additionalPopoverContent={
|
|
57
|
-
status.status ===
|
|
58
|
+
status.status.key === 'specSyncErr' ? (
|
|
58
59
|
<StackItem>
|
|
59
60
|
<SpecSyncErrAlert agent={agent} />
|
|
60
61
|
</StackItem>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import HostsTable, { DefaultExpandComponent } from '../../../common/components/hosts/HostsTable';
|
|
16
16
|
import { usePagination } from '../../../common/components/hosts/usePagination';
|
|
17
17
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
18
|
+
import { agentStatus } from '../helpers/agentStatus';
|
|
18
19
|
|
|
19
20
|
export const getAgentId = (agent: AgentK8sResource) => agent.metadata?.uid as string;
|
|
20
21
|
|
|
@@ -43,6 +44,7 @@ const AgentTable: React.FC<AgentTableProps> = ({
|
|
|
43
44
|
}) => {
|
|
44
45
|
const { t } = useTranslation();
|
|
45
46
|
const agentClusterInstalls = React.useMemo(() => [agentClusterInstall], [agentClusterInstall]);
|
|
47
|
+
const agentStatuses = agentStatus(t);
|
|
46
48
|
const [hosts, hostActions, actionResolver] = useAgentsTable(
|
|
47
49
|
{ agents, agentClusterInstalls },
|
|
48
50
|
{
|
|
@@ -55,6 +57,7 @@ const AgentTable: React.FC<AgentTableProps> = ({
|
|
|
55
57
|
roleColumn(t),
|
|
56
58
|
agentStatusColumn({
|
|
57
59
|
agents,
|
|
60
|
+
agentStatuses,
|
|
58
61
|
t,
|
|
59
62
|
}),
|
|
60
63
|
infraEnvColumn(agents, t),
|
|
@@ -63,7 +66,7 @@ const AgentTable: React.FC<AgentTableProps> = ({
|
|
|
63
66
|
memoryColumn(t),
|
|
64
67
|
disksColumn(t),
|
|
65
68
|
],
|
|
66
|
-
[agents, hostActions, t],
|
|
69
|
+
[agentStatuses, agents, hostActions.onEditHost, t],
|
|
67
70
|
);
|
|
68
71
|
|
|
69
72
|
const paginationProps = usePagination(agents.length);
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
HostsTableDetailContextProvider,
|
|
30
30
|
useHostsTableDetailContext,
|
|
31
31
|
} from '../../../common/components/hosts/HostsTableDetailContext';
|
|
32
|
+
import { agentStatus } from '../helpers/agentStatus';
|
|
32
33
|
|
|
33
34
|
export function ExpandComponent({ obj: host }: ExpandComponentProps<Host>) {
|
|
34
35
|
const { onDiskRole, canEditDisks } = useHostsTableDetailContext();
|
|
@@ -55,6 +56,7 @@ const AgentsSelectionTable: React.FC<AgentsSelectionTableProps> = ({
|
|
|
55
56
|
onSetInstallationDiskId,
|
|
56
57
|
}) => {
|
|
57
58
|
const { t } = useTranslation();
|
|
59
|
+
const agentStatuses = agentStatus(t);
|
|
58
60
|
const [{ value: selectedIDs }] =
|
|
59
61
|
useField<ClusterDeploymentHostsSelectionValues['selectedHostIds']>('selectedHostIds');
|
|
60
62
|
|
|
@@ -111,6 +113,7 @@ const AgentsSelectionTable: React.FC<AgentsSelectionTableProps> = ({
|
|
|
111
113
|
...(addAll ? [infraEnvColumn(matchingAgents, t)] : []),
|
|
112
114
|
agentStatusColumn({
|
|
113
115
|
agents: matchingAgents,
|
|
116
|
+
agentStatuses,
|
|
114
117
|
wizardStepId: 'hosts-selection',
|
|
115
118
|
t,
|
|
116
119
|
}),
|
|
@@ -123,6 +126,7 @@ const AgentsSelectionTable: React.FC<AgentsSelectionTableProps> = ({
|
|
|
123
126
|
actions.onEditRole,
|
|
124
127
|
addAll,
|
|
125
128
|
hosts,
|
|
129
|
+
agentStatuses,
|
|
126
130
|
actions.onEditHost,
|
|
127
131
|
actions.canEditHostname,
|
|
128
132
|
t,
|
|
@@ -16,17 +16,24 @@ import { AgentTableActions, ClusterDeploymentWizardStepsType } from '../ClusterD
|
|
|
16
16
|
import { hostActionResolver } from '../../../common/components/hosts/tableUtils';
|
|
17
17
|
import { getAgentClusterInstallOfAgent, getAIHosts, getInfraEnvNameOfAgent } from '../helpers';
|
|
18
18
|
import { isInstallationInProgress } from '../ClusterDeployment/helpers';
|
|
19
|
-
import { AGENT_BMH_NAME_LABEL_KEY } from '../common';
|
|
19
|
+
import { AGENT_BMH_NAME_LABEL_KEY, INFRAENV_GENERATED_AI_FLOW } from '../common';
|
|
20
20
|
import { BareMetalHostK8sResource } from '../../types/k8s/bare-metal-host';
|
|
21
21
|
import BMHStatus from './BMHStatus';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
getAgentStatus,
|
|
24
|
+
getAgentStatusKey,
|
|
25
|
+
getBMHStatus,
|
|
26
|
+
getBMHStatusKey,
|
|
27
|
+
getWizardStepAgentStatus,
|
|
28
|
+
} from '../helpers/status';
|
|
23
29
|
import { filterByHostname } from '../../../common/components/hosts/utils';
|
|
24
|
-
import { agentStatus
|
|
30
|
+
import { agentStatus } from '../helpers/agentStatus';
|
|
25
31
|
import noop from 'lodash-es/noop.js';
|
|
26
32
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
27
33
|
import { TFunction } from 'i18next';
|
|
28
34
|
import { AgentMachineK8sResource } from '../Hypershift/types';
|
|
29
35
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
36
|
+
import { HostStatus } from '../../../common/components/hosts/types';
|
|
30
37
|
|
|
31
38
|
export const agentHostnameColumn = (
|
|
32
39
|
t: TFunction,
|
|
@@ -117,7 +124,9 @@ export const discoveryTypeColumn = (
|
|
|
117
124
|
|
|
118
125
|
type AgentStatusColumnProps = {
|
|
119
126
|
agents: AgentK8sResource[];
|
|
127
|
+
agentStatuses: HostStatus<string>;
|
|
120
128
|
bareMetalHosts?: BareMetalHostK8sResource[];
|
|
129
|
+
bmhStatuses?: HostStatus<string>;
|
|
121
130
|
onEditHostname?: AgentTableActions['onEditHost'];
|
|
122
131
|
onApprove?: AgentTableActions['onApprove'];
|
|
123
132
|
wizardStepId?: ClusterDeploymentWizardStepsType;
|
|
@@ -127,7 +136,9 @@ type AgentStatusColumnProps = {
|
|
|
127
136
|
|
|
128
137
|
export const agentStatusColumn = ({
|
|
129
138
|
agents,
|
|
139
|
+
agentStatuses,
|
|
130
140
|
bareMetalHosts,
|
|
141
|
+
bmhStatuses,
|
|
131
142
|
onEditHostname,
|
|
132
143
|
onApprove,
|
|
133
144
|
wizardStepId,
|
|
@@ -158,8 +169,8 @@ export const agentStatusColumn = ({
|
|
|
158
169
|
isDay2={isDay2}
|
|
159
170
|
/>
|
|
160
171
|
);
|
|
161
|
-
} else if (bmh) {
|
|
162
|
-
bmhStatus = getBMHStatus(bmh);
|
|
172
|
+
} else if (bmh && bmhStatuses) {
|
|
173
|
+
bmhStatus = getBMHStatus(bmh, bmhStatuses);
|
|
163
174
|
title = <BMHStatus bmhStatus={bmhStatus} />;
|
|
164
175
|
}
|
|
165
176
|
|
|
@@ -169,7 +180,7 @@ export const agentStatusColumn = ({
|
|
|
169
180
|
sortableValue: agent
|
|
170
181
|
? wizardStepId
|
|
171
182
|
? getWizardStepAgentStatus(agent, wizardStepId, t).status.title
|
|
172
|
-
: getAgentStatus(agent).status.title
|
|
183
|
+
: getAgentStatus(agent, agentStatuses).status.title
|
|
173
184
|
: bmhStatus?.state.title || '',
|
|
174
185
|
};
|
|
175
186
|
},
|
|
@@ -254,11 +265,7 @@ export const infraEnvColumn = (agents: AgentK8sResource[], t: TFunction): TableR
|
|
|
254
265
|
};
|
|
255
266
|
|
|
256
267
|
export const canEditBMH = (bmh: BareMetalHostK8sResource, t: TFunction): ActionCheck => {
|
|
257
|
-
const canEdit = [
|
|
258
|
-
bmhStatus.deprovisioning.key,
|
|
259
|
-
bmhStatus.pending.key,
|
|
260
|
-
bmhStatus.registering.key,
|
|
261
|
-
].includes(getBMHStatus(bmh).state.key);
|
|
268
|
+
const canEdit = ['deprovisioning', 'pending', 'registering'].includes(getBMHStatusKey(bmh) || '');
|
|
262
269
|
|
|
263
270
|
return [
|
|
264
271
|
canEdit,
|
|
@@ -270,8 +277,12 @@ export const canEditBMH = (bmh: BareMetalHostK8sResource, t: TFunction): ActionC
|
|
|
270
277
|
];
|
|
271
278
|
};
|
|
272
279
|
|
|
273
|
-
export const canEditAgent = (
|
|
274
|
-
|
|
280
|
+
export const canEditAgent = (
|
|
281
|
+
agent: AgentK8sResource,
|
|
282
|
+
agentStatuses: HostStatus<string>,
|
|
283
|
+
t: TFunction,
|
|
284
|
+
): ActionCheck => {
|
|
285
|
+
const enabled = getAgentStatus(agent, agentStatuses).status.category !== 'Installation related';
|
|
275
286
|
return [
|
|
276
287
|
enabled,
|
|
277
288
|
enabled
|
|
@@ -283,13 +294,14 @@ export const canEditAgent = (agent: AgentK8sResource, t: TFunction): ActionCheck
|
|
|
283
294
|
export const canChangeHostname =
|
|
284
295
|
(
|
|
285
296
|
agents: AgentK8sResource[],
|
|
297
|
+
agentStatuses: HostStatus<string>,
|
|
286
298
|
bareMetalHosts: BareMetalHostK8sResource[],
|
|
287
299
|
t: TFunction,
|
|
288
300
|
): ((h: Host) => ActionCheck) =>
|
|
289
301
|
(h: Host) => {
|
|
290
302
|
const agent = agents.find((a) => a.metadata?.uid === h.id);
|
|
291
303
|
if (agent) {
|
|
292
|
-
return canEditAgent(agent, t);
|
|
304
|
+
return canEditAgent(agent, agentStatuses, t);
|
|
293
305
|
}
|
|
294
306
|
const bmh = bareMetalHosts.find((bmh) => bmh.metadata?.uid === h.id);
|
|
295
307
|
if (bmh) {
|
|
@@ -302,13 +314,12 @@ export const canUnbindAgent = (
|
|
|
302
314
|
agentClusterInstalls: AgentClusterInstallK8sResource[] | undefined,
|
|
303
315
|
agent: AgentK8sResource,
|
|
304
316
|
t: TFunction,
|
|
305
|
-
infraEnv?: InfraEnvK8sResource,
|
|
306
317
|
): ActionCheck => {
|
|
307
318
|
if (!agent?.spec.clusterDeploymentName?.name) {
|
|
308
319
|
return [false, t('ai:The agent is not bound to a cluster.')];
|
|
309
320
|
}
|
|
310
321
|
|
|
311
|
-
const
|
|
322
|
+
const statusKey = getAgentStatusKey(agent);
|
|
312
323
|
if (
|
|
313
324
|
[
|
|
314
325
|
'preparing-for-installation',
|
|
@@ -316,13 +327,13 @@ export const canUnbindAgent = (
|
|
|
316
327
|
'installing-in-progress',
|
|
317
328
|
'installing-pending-user-action',
|
|
318
329
|
'resetting-pending-user-action',
|
|
319
|
-
].includes(
|
|
330
|
+
].includes(statusKey)
|
|
320
331
|
) {
|
|
321
332
|
return [false, t('ai:It is not possible to remove a host which is being installed.')];
|
|
322
333
|
}
|
|
323
334
|
|
|
324
335
|
if (
|
|
325
|
-
['installed', 'error', 'cancelled'].includes(
|
|
336
|
+
['installed', 'error', 'cancelled'].includes(statusKey) &&
|
|
326
337
|
(agent.status?.role === 'master' || agent.status?.role === 'bootstrap')
|
|
327
338
|
) {
|
|
328
339
|
return [
|
|
@@ -346,7 +357,8 @@ export const canUnbindAgent = (
|
|
|
346
357
|
|
|
347
358
|
if (
|
|
348
359
|
!agent.metadata?.labels?.hasOwnProperty(AGENT_BMH_NAME_LABEL_KEY) &&
|
|
349
|
-
|
|
360
|
+
agent.metadata?.labels?.hasOwnProperty(INFRAENV_GENERATED_AI_FLOW) &&
|
|
361
|
+
!!agent.spec.clusterDeploymentName
|
|
350
362
|
) {
|
|
351
363
|
return [false, t('ai:It is not possible to remove this node from the cluster.')];
|
|
352
364
|
}
|
|
@@ -354,8 +366,12 @@ export const canUnbindAgent = (
|
|
|
354
366
|
return [true, undefined];
|
|
355
367
|
};
|
|
356
368
|
|
|
357
|
-
const canDeleteAgent = (
|
|
358
|
-
|
|
369
|
+
const canDeleteAgent = (
|
|
370
|
+
agent: AgentK8sResource,
|
|
371
|
+
agentStatuses: HostStatus<string>,
|
|
372
|
+
t: TFunction,
|
|
373
|
+
): ActionCheck => {
|
|
374
|
+
const enabled = getAgentStatus(agent, agentStatuses).status.category !== 'Installation related';
|
|
359
375
|
|
|
360
376
|
return [
|
|
361
377
|
enabled,
|
|
@@ -386,6 +402,7 @@ export const useAgentsTable = (
|
|
|
386
402
|
onSetInstallationDiskId,
|
|
387
403
|
} = tableActions || {};
|
|
388
404
|
const { t } = useTranslation();
|
|
405
|
+
const agentStatuses = agentStatus(t);
|
|
389
406
|
const [hosts, actions] = React.useMemo(
|
|
390
407
|
(): [Host[], HostsTableActions] => [
|
|
391
408
|
getAIHosts(agents, bmhs, infraEnv),
|
|
@@ -408,7 +425,7 @@ export const useAgentsTable = (
|
|
|
408
425
|
if (!agent) {
|
|
409
426
|
return false;
|
|
410
427
|
}
|
|
411
|
-
return canEditAgent(agent, t);
|
|
428
|
+
return canEditAgent(agent, agentStatuses, t);
|
|
412
429
|
},
|
|
413
430
|
onDeleteHost: onDeleteHost
|
|
414
431
|
? (host: Host) => {
|
|
@@ -422,7 +439,7 @@ export const useAgentsTable = (
|
|
|
422
439
|
const bmh = bmhs?.find((a) => a.metadata?.uid === host.id);
|
|
423
440
|
|
|
424
441
|
if (agent) {
|
|
425
|
-
return canDeleteAgent(agent, t);
|
|
442
|
+
return canDeleteAgent(agent, agentStatuses, t);
|
|
426
443
|
} else if (bmh) {
|
|
427
444
|
return [true, undefined];
|
|
428
445
|
}
|
|
@@ -476,7 +493,7 @@ export const useAgentsTable = (
|
|
|
476
493
|
const agent = agents.find((a) => a.metadata?.uid === host.id);
|
|
477
494
|
|
|
478
495
|
if (agent) {
|
|
479
|
-
return canUnbindAgent(agentClusterInstalls, agent, t
|
|
496
|
+
return canUnbindAgent(agentClusterInstalls, agent, t);
|
|
480
497
|
}
|
|
481
498
|
const bmh = bmhs?.find((bmh) => bmh.metadata?.uid === host.id);
|
|
482
499
|
if (bmh) {
|
|
@@ -488,6 +505,7 @@ export const useAgentsTable = (
|
|
|
488
505
|
],
|
|
489
506
|
[
|
|
490
507
|
agents,
|
|
508
|
+
t,
|
|
491
509
|
bmhs,
|
|
492
510
|
infraEnv,
|
|
493
511
|
onEditHost,
|
|
@@ -497,7 +515,7 @@ export const useAgentsTable = (
|
|
|
497
515
|
onSelect,
|
|
498
516
|
onEditBMH,
|
|
499
517
|
onUnbindHost,
|
|
500
|
-
|
|
518
|
+
agentStatuses,
|
|
501
519
|
agentClusterInstalls,
|
|
502
520
|
],
|
|
503
521
|
);
|
|
@@ -508,14 +526,15 @@ export const useAgentsTable = (
|
|
|
508
526
|
const filterByStatus = (
|
|
509
527
|
hosts: Host[],
|
|
510
528
|
agents: AgentK8sResource[],
|
|
529
|
+
agentStatuses: HostStatus<string>,
|
|
511
530
|
bareMetalHosts: BareMetalHostK8sResource[],
|
|
512
531
|
statusFilter: string[],
|
|
513
532
|
) => {
|
|
514
533
|
if (!statusFilter?.length) {
|
|
515
534
|
return hosts;
|
|
516
535
|
}
|
|
517
|
-
const statusKeys = Object.keys(
|
|
518
|
-
statusFilter.includes(
|
|
536
|
+
const statusKeys = Object.keys(agentStatuses).filter((k) =>
|
|
537
|
+
statusFilter.includes(agentStatuses[k].title),
|
|
519
538
|
);
|
|
520
539
|
return hosts.filter((h) => {
|
|
521
540
|
const agent = agents.find((a) => a.metadata?.uid === h.id);
|
|
@@ -524,10 +543,9 @@ const filterByStatus = (
|
|
|
524
543
|
if (!bmh) {
|
|
525
544
|
return false;
|
|
526
545
|
}
|
|
527
|
-
|
|
528
|
-
return statusKeys.includes(bmhStatus.state.key);
|
|
546
|
+
return statusKeys.includes(getBMHStatusKey(bmh) || '');
|
|
529
547
|
}
|
|
530
|
-
const { status } = getAgentStatus(agent);
|
|
548
|
+
const { status } = getAgentStatus(agent, agentStatuses);
|
|
531
549
|
return statusKeys.includes(status.key);
|
|
532
550
|
});
|
|
533
551
|
};
|
|
@@ -535,44 +553,60 @@ const filterByStatus = (
|
|
|
535
553
|
export const filterHosts = (
|
|
536
554
|
hosts: Host[],
|
|
537
555
|
agents: AgentK8sResource[],
|
|
556
|
+
agentStatuses: HostStatus<string>,
|
|
538
557
|
bareMetalHosts: BareMetalHostK8sResource[],
|
|
539
558
|
hostnameFilter: string | undefined,
|
|
540
559
|
statusFilter: string[],
|
|
541
560
|
) => {
|
|
542
561
|
const byHostname = filterByHostname(hosts, hostnameFilter);
|
|
543
|
-
const byStatus = filterByStatus(byHostname, agents, bareMetalHosts, statusFilter);
|
|
562
|
+
const byStatus = filterByStatus(byHostname, agents, agentStatuses, bareMetalHosts, statusFilter);
|
|
544
563
|
|
|
545
564
|
return byStatus;
|
|
546
565
|
};
|
|
547
566
|
|
|
548
567
|
type UseAgentsFilterArgs = {
|
|
549
568
|
agents: AgentK8sResource[];
|
|
569
|
+
agentStatuses: HostStatus<string>;
|
|
550
570
|
bmhs: BareMetalHostK8sResource[];
|
|
571
|
+
bmhStatuses: HostStatus<string>;
|
|
551
572
|
hosts: Host[];
|
|
552
573
|
};
|
|
553
574
|
|
|
554
575
|
export type StatusCount = Record<string, number>;
|
|
555
576
|
|
|
556
|
-
export const useAgentsFilter = ({
|
|
577
|
+
export const useAgentsFilter = ({
|
|
578
|
+
agents,
|
|
579
|
+
agentStatuses,
|
|
580
|
+
bmhs,
|
|
581
|
+
bmhStatuses,
|
|
582
|
+
hosts,
|
|
583
|
+
}: UseAgentsFilterArgs) => {
|
|
557
584
|
const [hostnameFilter, setHostnameFilter] = React.useState<string>();
|
|
558
585
|
const [statusFilter, setStatusFilter] = React.useState<string[]>([]);
|
|
559
|
-
const statusCount = Object.keys(
|
|
560
|
-
acc[
|
|
586
|
+
const statusCount = Object.keys(agentStatuses).reduce((acc, curr) => {
|
|
587
|
+
acc[agentStatuses[curr].title] = 0;
|
|
561
588
|
return acc;
|
|
562
589
|
}, {} as StatusCount);
|
|
563
590
|
hosts.forEach((host) => {
|
|
564
591
|
const agent = agents.find((a) => a.metadata?.uid === host.id);
|
|
565
592
|
const bmh = bmhs.find((bmh) => bmh.metadata?.uid === host.id);
|
|
566
593
|
if (agent) {
|
|
567
|
-
const { status } = getAgentStatus(agent);
|
|
594
|
+
const { status } = getAgentStatus(agent, agentStatuses);
|
|
568
595
|
statusCount[status.title]++;
|
|
569
596
|
} else if (bmh) {
|
|
570
|
-
const { state } = getBMHStatus(bmh);
|
|
597
|
+
const { state } = getBMHStatus(bmh, bmhStatuses);
|
|
571
598
|
statusCount[state.title]++;
|
|
572
599
|
}
|
|
573
600
|
});
|
|
574
601
|
|
|
575
|
-
const filteredHosts = filterHosts(
|
|
602
|
+
const filteredHosts = filterHosts(
|
|
603
|
+
hosts,
|
|
604
|
+
agents,
|
|
605
|
+
agentStatuses,
|
|
606
|
+
bmhs,
|
|
607
|
+
hostnameFilter,
|
|
608
|
+
statusFilter,
|
|
609
|
+
);
|
|
576
610
|
|
|
577
611
|
return {
|
|
578
612
|
statusCount,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import HostsTable, { DefaultExpandComponent } from '../../../common/components/hosts/HostsTable';
|
|
14
14
|
import { usePagination } from '../../../common/components/hosts/usePagination';
|
|
15
15
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
16
|
+
import { agentStatus } from '../helpers/agentStatus';
|
|
16
17
|
|
|
17
18
|
export const getAgentId = (agent: AgentK8sResource) => agent.metadata?.uid as string;
|
|
18
19
|
|
|
@@ -39,12 +40,14 @@ const ClusterDeploymentDetailsTable: React.FC<ClusterDeploymentDetailsTableProps
|
|
|
39
40
|
const agentClusterInstalls = React.useMemo(() => [agentClusterInstall], [agentClusterInstall]);
|
|
40
41
|
const [hosts, , actionResolver] = useAgentsTable({ agents, agentClusterInstalls });
|
|
41
42
|
const { t } = useTranslation();
|
|
43
|
+
const agentStatuses = agentStatus(t);
|
|
42
44
|
const content = React.useMemo(
|
|
43
45
|
() => [
|
|
44
46
|
hostnameColumn(t),
|
|
45
47
|
roleColumn(t),
|
|
46
48
|
agentStatusColumn({
|
|
47
49
|
agents,
|
|
50
|
+
agentStatuses,
|
|
48
51
|
t,
|
|
49
52
|
}),
|
|
50
53
|
infraEnvColumn(agents, t),
|
|
@@ -52,7 +55,7 @@ const ClusterDeploymentDetailsTable: React.FC<ClusterDeploymentDetailsTableProps
|
|
|
52
55
|
memoryColumn(t),
|
|
53
56
|
disksColumn(t),
|
|
54
57
|
],
|
|
55
|
-
[agents, t],
|
|
58
|
+
[agentStatuses, agents, t],
|
|
56
59
|
);
|
|
57
60
|
|
|
58
61
|
const paginationProps = usePagination(agents.length);
|