From 1f68258e113f83b114d327f9fd6ca66f8a4a1611 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Delon Date: Fri, 15 Nov 2024 17:12:30 +0100 Subject: [PATCH] feat(dedicated): raidlevel should always be number ref: MANAGER-15833 Signed-off-by: Jean-Baptiste Delon --- .../ovh/server-installation-ovh.constants.js | 14 ++++++------- .../ovh/server-installation-ovh.controller.js | 20 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.constants.js b/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.constants.js index 4c2d029741b6..7a69a3e0aee7 100644 --- a/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.constants.js +++ b/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.constants.js @@ -2,13 +2,13 @@ export const MOUNT_POINTS = 'defghijklmnopqrstuvwxyza'; export const MAX_MOUNT_POINTS = 24; export const TEMPLATE_OS_SOFTWARE_RAID_LIST = { - 1: ['0'], - 2: ['0', '1'], - 3: ['0', '1', '5'], - 4: ['0', '1', '5', '10'], - 5: ['0', '1', '5', '6', '10'], - 6: ['0', '1', '5', '6', '10'], - 7: ['0', '1', '5', '6', '7', '10'], + 1: [0], + 2: [0, 1], + 3: [0, 1, 5], + 4: [0, 1, 5, 10], + 5: [0, 1, 5, 6, 10], + 6: [0, 1, 5, 6, 10], + 7: [0, 1, 5, 6, 7, 10], }; export default { diff --git a/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.controller.js b/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.controller.js index 4b088a626854..4a523374f78e 100644 --- a/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.controller.js +++ b/packages/manager/modules/bm-server-components/src/general-information/installation/ovh/server-installation-ovh.controller.js @@ -86,14 +86,14 @@ export default class ServerInstallationOvhCtrl { '/sys', ], - warningRaid0: '0', - warningRaid1: '1', - warningRaid5: '5', - warningRaid6: '6', - warningRaid7: '7', - warningRaid10: '10', - warningRaid50: '50', - warningRaid60: '60', + warningRaid0: 0, + warningRaid1: 1, + warningRaid5: 5, + warningRaid6: 6, + warningRaid7: 7, + warningRaid10: 10, + warningRaid50: 50, + warningRaid60: 60, warningNone: 'none', warningSwap: 'swap', warningReiserfs: 'reiserfs', @@ -2082,7 +2082,7 @@ export default class ServerInstallationOvhCtrl { fileSystem: partition.fileSystem, mountPoint: partition.mountPoint, size: partition.partitionSize, - raidLevel: Number(partition.raid), // jbd: to be improved + raidLevel: partition.raid, extras: {}, }; if ( @@ -2130,7 +2130,7 @@ export default class ServerInstallationOvhCtrl { storage.hardwareRaid.push({ arrays: this.$scope.installation.hardwareRaid.arrays, disks: disks.length, - raidLevel: Number(this.$scope.installation.hardwareRaid.raid), // jbd: to be improved + raidLevel: this.$scope.installation.hardwareRaid.raid, }); } if (this.$scope.installation.customInstall) {