From a4972eb6ac96e889ca77621ee8a78e63902b39a5 Mon Sep 17 00:00:00 2001 From: 639852 Date: Tue, 3 Sep 2024 19:02:00 +0400 Subject: [PATCH 1/3] - Fixed minor bug --- src/components/cloud/modules/ovh vps/openInstance.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/cloud/modules/ovh vps/openInstance.vue b/src/components/cloud/modules/ovh vps/openInstance.vue index f3036744..f0fd45ed 100644 --- a/src/components/cloud/modules/ovh vps/openInstance.vue +++ b/src/components/cloud/modules/ovh vps/openInstance.vue @@ -781,7 +781,7 @@ export default defineComponent({ tariffs () { if (!this.VM?.billingPlan) return {} const tariffs = {} - const { products } = this.plans.find(({ uuid }) => uuid === this.VM.billingPlan.uuid) ?? {} + const { products = {} } = this.plans.find(({ uuid }) => uuid === this.VM.billingPlan.uuid) ?? {} const productKey = this.VM.product ?? `${this.VM.config.duration} ${this.VM.config.planCode}` Object.keys(products).forEach((key) => { From ed41e2579a194cdeb7410f9aa9d616f74560bced Mon Sep 17 00:00:00 2001 From: 639852 Date: Tue, 3 Sep 2024 20:44:07 +0400 Subject: [PATCH 2/3] - Fixed change of addons when changing ovh vps tariff --- .../cloud/modules/ovh vps/openInstance.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/cloud/modules/ovh vps/openInstance.vue b/src/components/cloud/modules/ovh vps/openInstance.vue index f0fd45ed..59050a3e 100644 --- a/src/components/cloud/modules/ovh vps/openInstance.vue +++ b/src/components/cloud/modules/ovh vps/openInstance.vue @@ -1131,7 +1131,21 @@ export default defineComponent({ try { this.isSwitchLoading = true - const { price, resources } = this.tariffs[this.planCode] + const { price, resources, meta } = this.tariffs[this.planCode] ?? {} + const backupIndex = instance.config.addons.findIndex((key) => key.includes('backup')) + const snapshotIndex = instance.config.addons.findIndex((key) => key.includes('snapshot')) + + if (backupIndex !== -1) { + const backup = meta.addons.find((key) => key.includes('backup')) + + instance.config.addons.splice(backupIndex, 1, backup) + } + + if (snapshotIndex !== -1) { + const snapshot = meta.addons.find((key) => key.includes('snapshot')) + + instance.config.addons.splice(snapshotIndex, 1, snapshot) + } instance.config.planCode = this.planCode.split(' ')[1] instance.product = this.planCode From 34d70070e81eb465bf9e096cb9a02f6730283dc5 Mon Sep 17 00:00:00 2001 From: 639852 Date: Thu, 5 Sep 2024 16:44:20 +0400 Subject: [PATCH 3/3] - Removed network manager from instance page --- src/routes/cloud/cloudPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/cloud/cloudPage.vue b/src/routes/cloud/cloudPage.vue index 26cbad9f..0c0370b1 100644 --- a/src/routes/cloud/cloudPage.vue +++ b/src/routes/cloud/cloudPage.vue @@ -331,7 +331,7 @@ export default { params: ['networkControl'], icon: 'GlobalOutlined', forVNC: true, - modules: ['ione'] + modules: [] }, { title: 'Access manager',