diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 178564b9c87..dfc2b8a308d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,8 +17,8 @@ "@mui/material": "^5.11.1", "@octokit/rest": "19.0.3", "@octokit/types": "6.40.0", - "@openshift-assisted/locales": "2.14.6-cim", - "@openshift-assisted/ui-lib": "2.14.6-cim", + "@openshift-assisted/locales": "2.14.7-cim", + "@openshift-assisted/ui-lib": "2.14.7-cim", "@patternfly-labs/react-form-wizard": "^2.4.0", "@patternfly/patternfly": "^5.4.2", "@patternfly/react-charts": "^7.4.7", @@ -5740,24 +5740,24 @@ } }, "node_modules/@openshift-assisted/locales": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.6-cim.tgz", - "integrity": "sha512-dvHooD5ONa6QFiorqv9yqz6TJsyLD+w7NQRfVdHZdkUdvgZ6CIxNttpYMy4UVHwCsY/k9zlHtinmMafZYlqQqA==", + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.7-cim.tgz", + "integrity": "sha512-EsENsoiY/CQgHv4KDXE1rOkt7RqXND2KwOuN4rmU+qeNg8WwKHG7Ev/iBhHwDUN9+ho/FMLbpwrGCFK+sGbelA==", "license": "Apache-2.0" }, "node_modules/@openshift-assisted/types": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.6-cim.tgz", - "integrity": "sha512-TAfuvNnvb8+S9Kl6kT4SGvKF+zGdnonVirVnN+RnN4/hd9Up2SiMpdR3PaUXEO3FXnie/Dp37qtkXMpAiCkcIQ==" + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.7-cim.tgz", + "integrity": "sha512-36qAfFiyvAgokca3cCxyQQNe+clk2/PwK1obaNbAzkyH17Z5OPMNSbFYTj5llZgcjme5fnJOiU/Z1sUZpNAeyw==" }, "node_modules/@openshift-assisted/ui-lib": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.6-cim.tgz", - "integrity": "sha512-PmaEXNGq9OLSAuEoOQ0cCM3GVLtmkE06jh22VPHp8DQf9uGhylzKD5xtXZS0yBMkbK9FN+kpT3mUy5hTyvp2EQ==", + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.7-cim.tgz", + "integrity": "sha512-w0x95Vt0sod1qjvcyu4frMjIVrGaNz03xoUTeI4TmyX84Vf/d+gphfI8ADDD+k9jx6EsHUS/86E1T1TQ1K1YPQ==", "license": "Apache-2.0", "dependencies": { - "@openshift-assisted/locales": "2.14.6-cim", - "@openshift-assisted/types": "2.14.6-cim", + "@openshift-assisted/locales": "2.14.7-cim", + "@openshift-assisted/types": "2.14.7-cim", "@openshift-console/dynamic-plugin-sdk": "0.0.3", "@patternfly/patternfly": "5.2.0", "@patternfly/react-code-editor": "5.2.0", @@ -37973,22 +37973,22 @@ } }, "@openshift-assisted/locales": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.6-cim.tgz", - "integrity": "sha512-dvHooD5ONa6QFiorqv9yqz6TJsyLD+w7NQRfVdHZdkUdvgZ6CIxNttpYMy4UVHwCsY/k9zlHtinmMafZYlqQqA==" + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.7-cim.tgz", + "integrity": "sha512-EsENsoiY/CQgHv4KDXE1rOkt7RqXND2KwOuN4rmU+qeNg8WwKHG7Ev/iBhHwDUN9+ho/FMLbpwrGCFK+sGbelA==" }, "@openshift-assisted/types": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.6-cim.tgz", - "integrity": "sha512-TAfuvNnvb8+S9Kl6kT4SGvKF+zGdnonVirVnN+RnN4/hd9Up2SiMpdR3PaUXEO3FXnie/Dp37qtkXMpAiCkcIQ==" + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.7-cim.tgz", + "integrity": "sha512-36qAfFiyvAgokca3cCxyQQNe+clk2/PwK1obaNbAzkyH17Z5OPMNSbFYTj5llZgcjme5fnJOiU/Z1sUZpNAeyw==" }, "@openshift-assisted/ui-lib": { - "version": "2.14.6-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.6-cim.tgz", - "integrity": "sha512-PmaEXNGq9OLSAuEoOQ0cCM3GVLtmkE06jh22VPHp8DQf9uGhylzKD5xtXZS0yBMkbK9FN+kpT3mUy5hTyvp2EQ==", + "version": "2.14.7-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.7-cim.tgz", + "integrity": "sha512-w0x95Vt0sod1qjvcyu4frMjIVrGaNz03xoUTeI4TmyX84Vf/d+gphfI8ADDD+k9jx6EsHUS/86E1T1TQ1K1YPQ==", "requires": { - "@openshift-assisted/locales": "2.14.6-cim", - "@openshift-assisted/types": "2.14.6-cim", + "@openshift-assisted/locales": "2.14.7-cim", + "@openshift-assisted/types": "2.14.7-cim", "@openshift-console/dynamic-plugin-sdk": "1.0.0", "@patternfly/patternfly": "5.2.0", "@patternfly/react-code-editor": "5.2.0", diff --git a/frontend/package.json b/frontend/package.json index 02f6e9aeee0..3f3494f8f6a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,8 +44,8 @@ "@mui/material": "^5.11.1", "@octokit/rest": "19.0.3", "@octokit/types": "6.40.0", - "@openshift-assisted/locales": "2.14.6-cim", - "@openshift-assisted/ui-lib": "2.14.6-cim", + "@openshift-assisted/locales": "2.14.7-cim", + "@openshift-assisted/ui-lib": "2.14.7-cim", "@patternfly-labs/react-form-wizard": "^2.4.0", "@patternfly/patternfly": "^5.4.2", "@patternfly/react-charts": "^7.4.7", diff --git a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/utils.ts b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/utils.ts index a9efaea398d..82fe28694dc 100644 --- a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/utils.ts +++ b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/CreateCluster/components/assisted-installer/utils.ts @@ -626,6 +626,15 @@ export const onChangeBMHHostname = async (bmh: BareMetalHostK8sResource, hostnam }, ]).promise as Promise +export const onEditHostRole = async (agent: AgentK8sResource, role?: string) => + patchResource(agent as IResource, [ + { + op: 'replace', + path: '/spec/role', + value: role, + }, + ]).promise as Promise + export const useAgentsOfAIFlow = ({ name, namespace }: { name: string; namespace: string }): AgentK8sResource[] => { const { agentsState } = useSharedAtoms() const agents = useRecoilValue(agentsState) diff --git a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/ScaleUpDialog.tsx b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/ScaleUpDialog.tsx index 5c6cd26dd0b..cbdc87d8190 100644 --- a/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/ScaleUpDialog.tsx +++ b/frontend/src/routes/Infrastructure/Clusters/ManagedClusters/components/cim/ScaleUpDialog.tsx @@ -6,6 +6,7 @@ import { onChangeHostname, onSetInstallationDiskId, onChangeBMHHostname, + onEditHostRole, } from '../../CreateCluster/components/assisted-installer/utils' import { useSharedAtoms, useRecoilValue } from '../../../../../../shared-recoil' import { IResource } from '../../../../../../resources' @@ -50,7 +51,7 @@ const ScaleUpDialog = ({ isOpen, closeDialog, clusterName }: ScaleUpDialogProps) { op: 'replace', path: '/spec/role', - value: 'worker', + value: agent.spec?.role, }, ]).promise }) @@ -76,6 +77,7 @@ const ScaleUpDialog = ({ isOpen, closeDialog, clusterName }: ScaleUpDialogProps) onChangeBMHHostname={onChangeBMHHostname} onSetInstallationDiskId={onSetInstallationDiskId} isNutanix={agentClusterInstall?.spec?.platformType === 'Nutanix'} + onEditHostRole={onEditHostRole} /> ) }