diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d7606435f59..2fc9f6b1781 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,8 +21,8 @@ "@mui/material": "^5.11.1", "@octokit/rest": "19.0.3", "@octokit/types": "6.40.0", - "@openshift-assisted/locales": "2.14.5-cim", - "@openshift-assisted/ui-lib": "2.14.5-cim", + "@openshift-assisted/locales": "2.15.1-cim", + "@openshift-assisted/ui-lib": "2.15.1-cim", "@patternfly-labs/react-form-wizard": "^2.6.0", "@patternfly/patternfly": "^5.4.2", "@patternfly/react-charts": "^7.4.7", @@ -5742,24 +5742,24 @@ } }, "node_modules/@openshift-assisted/locales": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.5-cim.tgz", - "integrity": "sha512-ZAHHRYVpCScpdIM4k7KEeOxoNVA9kj84QAIKiTTNjJhXfdJS6qPvQDesYF1zwqTpuRGUa5eZpoJrA5c1QTc89g==", + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.15.1-cim.tgz", + "integrity": "sha512-wdNtOuMQ6Jzh2vmUo+DgC6CAwgf9KcEegPqYhYZscggnC4JwKmjemEC4/gPg8pZsnanQaCoZDfHCLq6CddF43w==", "license": "Apache-2.0" }, "node_modules/@openshift-assisted/types": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.5-cim.tgz", - "integrity": "sha512-91uQAwsfLvut0goAsIN0DSuHyMcRc4JTpcztnPYpVN2DmYe42UEz9YcIqevuWvtE81UEBQ7WYagmM7als4lrZw==" + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.15.1-cim.tgz", + "integrity": "sha512-PpZ3RMh9QwhJuK3wlKzulyYg7yiW5q3YPtEBIFZAhj0PuLCUhtAH7cVvCBjIaKlRVARzcNlWDXWG1tzCPDC/yQ==" }, "node_modules/@openshift-assisted/ui-lib": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.5-cim.tgz", - "integrity": "sha512-99EsgpSDGgmNIMrfvew8G+ZWkVzba+0srKuXQfspR/KrTGRnmPxBLCKdl3wSA3g4SqEG8bUYf3r0BnFlw06wsQ==", + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.15.1-cim.tgz", + "integrity": "sha512-5q8Ojg/2dbKLPoGlOijU+UpLrzJNXPnIcULbL2mm+DqES+FT8I8dLpICYAvVkA1RnsuTepldug56scglvBjwcw==", "license": "Apache-2.0", "dependencies": { - "@openshift-assisted/locales": "2.14.5-cim", - "@openshift-assisted/types": "2.14.5-cim", + "@openshift-assisted/locales": "2.15.1-cim", + "@openshift-assisted/types": "2.15.1-cim", "@openshift-console/dynamic-plugin-sdk": "0.0.3", "@patternfly/patternfly": "5.2.0", "@patternfly/react-code-editor": "5.2.0", @@ -37981,22 +37981,22 @@ } }, "@openshift-assisted/locales": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.14.5-cim.tgz", - "integrity": "sha512-ZAHHRYVpCScpdIM4k7KEeOxoNVA9kj84QAIKiTTNjJhXfdJS6qPvQDesYF1zwqTpuRGUa5eZpoJrA5c1QTc89g==" + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/locales/-/locales-2.15.1-cim.tgz", + "integrity": "sha512-wdNtOuMQ6Jzh2vmUo+DgC6CAwgf9KcEegPqYhYZscggnC4JwKmjemEC4/gPg8pZsnanQaCoZDfHCLq6CddF43w==" }, "@openshift-assisted/types": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.14.5-cim.tgz", - "integrity": "sha512-91uQAwsfLvut0goAsIN0DSuHyMcRc4JTpcztnPYpVN2DmYe42UEz9YcIqevuWvtE81UEBQ7WYagmM7als4lrZw==" + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/types/-/types-2.15.1-cim.tgz", + "integrity": "sha512-PpZ3RMh9QwhJuK3wlKzulyYg7yiW5q3YPtEBIFZAhj0PuLCUhtAH7cVvCBjIaKlRVARzcNlWDXWG1tzCPDC/yQ==" }, "@openshift-assisted/ui-lib": { - "version": "2.14.5-cim", - "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.14.5-cim.tgz", - "integrity": "sha512-99EsgpSDGgmNIMrfvew8G+ZWkVzba+0srKuXQfspR/KrTGRnmPxBLCKdl3wSA3g4SqEG8bUYf3r0BnFlw06wsQ==", + "version": "2.15.1-cim", + "resolved": "https://registry.npmjs.org/@openshift-assisted/ui-lib/-/ui-lib-2.15.1-cim.tgz", + "integrity": "sha512-5q8Ojg/2dbKLPoGlOijU+UpLrzJNXPnIcULbL2mm+DqES+FT8I8dLpICYAvVkA1RnsuTepldug56scglvBjwcw==", "requires": { - "@openshift-assisted/locales": "2.14.5-cim", - "@openshift-assisted/types": "2.14.5-cim", + "@openshift-assisted/locales": "2.15.1-cim", + "@openshift-assisted/types": "2.15.1-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 75bc0280de6..29d8ac19c09 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -49,8 +49,8 @@ "@mui/material": "^5.11.1", "@octokit/rest": "19.0.3", "@octokit/types": "6.40.0", - "@openshift-assisted/locales": "2.14.5-cim", - "@openshift-assisted/ui-lib": "2.14.5-cim", + "@openshift-assisted/locales": "2.15.1-cim", + "@openshift-assisted/ui-lib": "2.15.1-cim", "@patternfly-labs/react-form-wizard": "^2.6.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} /> ) }