Skip to content

Commit

Permalink
feat(dedicated): update add message error for vMac if 403 response (#…
Browse files Browse the repository at this point in the history
…12815)

ref: MANAGER-14771

Signed-off-by: soufien mhelhali <[email protected]>
Co-authored-by: CDS Translator Agent <[email protected]>
  • Loading branch information
2 people authored and qpavy committed Oct 21, 2024
1 parent a66d8b2 commit 9b1938d
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import get from 'lodash/get';

import {
VMAC_CREATION_ERROR_403,
PROXMOX_LINKS,
WINDOWS_SERVER_LINKS,
} from '../ip-ip-virtual-mac.constant';

export default /* @ngInject */ (
$http,
$q,
Expand All @@ -11,7 +17,18 @@ export default /* @ngInject */ (
IpVirtualMac,
Alerter,
atInternet,
ovhFeatureFlipping,
coreConfig,
) => {
let isVmacAvailable = false;
const { ovhSubsidiary } = coreConfig.getUser();

ovhFeatureFlipping
.checkFeatureAvailability(VMAC_CREATION_ERROR_403)
.then((feature) => {
isVmacAvailable = feature.isFeatureAvailable(VMAC_CREATION_ERROR_403);
});

$scope.data = $scope.currentActionData; // service and sub
atInternet.trackPage({
name: $scope.data?.tracking,
Expand Down Expand Up @@ -62,13 +79,30 @@ export default /* @ngInject */ (
}),
);
})
.catch((reason) => {
Alerter.error(`
${$translate.instant('ip_virtualmac_add_new_failure', {
t0: $scope.data.ip.ip,
})}
<br />
${reason.message}`);
.catch(({ data, status }) => {
if (status === 403 && isVmacAvailable) {
Alerter.error(`
${$translate.instant('ip_virtualmac_add_new_failure', {
t0: $scope.data.ip.ip,
})}
<br />
${$translate.instant('ip_virtualmac_not_available_failure')}
<br />
${$translate.instant('ip_virtualmac_not_available_failure_details', {
proxmoxLink: `<a href="${PROXMOX_LINKS[ovhSubsidiary] ||
PROXMOX_LINKS.DEFAULT}">Proxmox VE</a>`,
windowsServerLink: `<a href="${WINDOWS_SERVER_LINKS[
ovhSubsidiary
] || WINDOWS_SERVER_LINKS.DEFAULT}">Windows Server</a>`,
})}`);
} else {
Alerter.error(`
${$translate.instant('ip_virtualmac_add_new_failure', {
t0: $scope.data.ip.ip,
})}
<br />
${data.message}`);
}
})
.finally(() => {
$scope.resetAction();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
export const PROXMOX_LINKS = {
FR:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043915',
DE:
'https://help.ovhcloud.com/csm/de-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043914',
IE:
'https://help.ovhcloud.com/csm/en-ie-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043909',
PL:
'https://help.ovhcloud.com/csm/pl-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043916',
ES:
'https://help.ovhcloud.com/csm/es-es-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043912',
IT:
'https://help.ovhcloud.com/csm/it-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043917',
PT:
'https://help.ovhcloud.com/csm/pt-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043918',
NL:
'https://help.ovhcloud.com/csm/en-gb-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043899',
GB:
'https://help.ovhcloud.com/csm/en-gb-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043899',
TN:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043915',
MA:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043915',
SN:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043915',
QC:
'https://help.ovhcloud.com/csm/fr-ca-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043925',
CA:
'https://help.ovhcloud.com/csm/en-ca-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043904',
US:
'https://support.us.ovhcloud.com/hc/en-us/articles/30928201993619-Configuring-the-Network-on-Proxmox-VE-with-ADVANCE-Gen-3-Servers',
DEFAULT:
'https://help.ovhcloud.com/csm/en-ie-dedicated-servers-proxmox-network-hg-scale?id=kb_article_view&sysparm_article=KB0043909',
};

export const WINDOWS_SERVER_LINKS = {
FR:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043590',
DE:
'https://help.ovhcloud.com/csm/de-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043579',
IE:
'https://help.ovhcloud.com/csm/en-ie-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043583',
PL:
'https://help.ovhcloud.com/csm/pl-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043604',
ES:
'https://help.ovhcloud.com/csm/es-es-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043584',
IT:
'https://help.ovhcloud.com/csm/it-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043589',
PT:
'https://help.ovhcloud.com/csm/pt-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043586',
NL:
'https://help.ovhcloud.com/csm/en-gb-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043582',
GB:
'https://help.ovhcloud.com/csm/en-gb-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043582',
MA:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043590',
SN:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043590',
TN:
'https://help.ovhcloud.com/csm/fr-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043590',
CA:
'https://help.ovhcloud.com/csm/en-ca-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043581',
QC:
'https://help.ovhcloud.com/csm/fr-ca-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043588',
US:
'https://support.us.ovhcloud.com/hc/en-us/articles/30937249373843-Configuring-the-Network-on-Windows-Server-with-Hyper-V-on-the-ADVANCE-Gen-3-Servers',
DEFAULT:
'https://help.ovhcloud.com/csm/en-ie-dedicated-servers-hyperv-network-hg-scale?id=kb_article_view&sysparm_article=KB0043583',
};

export const VMAC_CREATION_ERROR_403 = 'ip:vmac-creation-error';

export default {
PROXMOX_LINKS,
WINDOWS_SERVER_LINKS,
VMAC_CREATION_ERROR_403,
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import set from 'lodash/set';

export default /* @ngInject */ function IpVirtualMacService(
$http,
$q,
constants,
Poll,
) {
export default /* @ngInject */ function IpVirtualMacService($http, $q, Poll) {
const swsIpPath = '2api/sws/module/ip';
const swsProxypassPath = 'apiv6';

Expand Down Expand Up @@ -41,7 +36,9 @@ export default /* @ngInject */ function IpVirtualMacService(
})
.then(
(data) => data.data,
(http) => $q.reject(http.data),
(http) => {
return $q.reject({ data: http.data, status: http.status });
},
);

this.addIpToVirtualMac = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Block löschen",
"ip_byoip_delete_block_description": "Dieser IP-Block ist Teil eines größeren BYOIP-Blocks. Wenn Sie Ihren BYOIP-Dienst kündigen möchten, öffnen Sie <a href='{{ link }}'>Meine Dienste</a> und wählen Sie die Option zum Kündigen aus.",
"ip_table_manage_modify_ipv6block_reverse": "Reverse ändern",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "Die virtuelle MAC wird ab Dezember 2024 auf diesem Server verfügbar sein.",
"ip_virtualmac_not_available_failure_details": "Weitere Informationen zur Verwaltung von IPs und virtuellen MACs mit OVHcloud finden Sie in den Guides zur Netzwerkkonfiguration unter {{proxmoxLink}} und {{windowsServerLink}}. In diesem Dokument wird erläutert, wie Sie Ihre OVHcloud Server für die Optimierung der Netzwerkleistung in virtualisierten Umgebungen mit Proxmox VE konfigurieren und dabei Techniken wie das Routing zusätzlicher IP-Adressen über das vRack verwenden​."
}
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Delete block",
"ip_byoip_delete_block_description": "This IP block is part of a larger BYOIP block. Please go to <a href='{{ link }}'>My Services</a> and select “Cancel” if you would like to cancel your BYOIP service",
"ip_table_manage_modify_ipv6block_reverse": "Modify the reverse path",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "The virtual MAC address will be available on this server from December 2024",
"ip_virtualmac_not_available_failure_details": "For more information on managing IPs and virtual MACs with OVHcloud, please refer to the Network Configuration guides, here: {{proxmoxLink}} and here: {{windowsServerLink}}. This guide provides instructions for configuring your OVHcloud servers to optimise network performance in virtualised environments with Proxmox VE. This is done using techniques like routing additional IPs via the vRack​."
}
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Eliminar el bloque",
"ip_byoip_delete_block_description": "Este bloque de IP forma parte de un bloque BYOIP más grande. Por favor, acceda a <a href='{{ link }}'>Mis servicios</a> para cancelar su servicio BYOIP.",
"ip_table_manage_modify_ipv6block_reverse": "Cambiar el registro inverso",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "La MAC virtual estará disponible en este servidor a partir de diciembre de 2024.",
"ip_virtualmac_not_available_failure_details": "Para más información sobre la gestión de las IP y las MAC virtuales con OVHcloud, consulte la guía de configuración de red en {{proxmoxLink}} y {{windowsServerLink}}. Este documento explica cómo configurar los servidores de OVHcloud para optimizar el rendimiento de red en entornos virtualizados con Proxmox VE, utilizando técnicas como el enrutamiento de las IP adicionales a través del vRack​."
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
"ip_virtualmac_machinename": "Nom de la machine virtuelle",
"ip_virtualmac_add_new_success": "Une nouvelle MAC virtuelle a été générée et sera disponible sur l'IP {{t0}} dans quelques minutes.",
"ip_virtualmac_add_new_failure": "Une erreur est survenue lors de la génération d'une nouvelle MAC virtuelle sur l'IP {{t0}}",
"ip_virtualmac_not_available_failure": "La MAC virtuelle sera disponible sur ce serveur à partir de December 2024",
"ip_virtualmac_not_available_failure_details": "Pour plus d'informations sur la gestion des IP et des MAC virtuelles avec OVHcloud, nous vous invitons à consulter les Guide de configuration réseau sous {{proxmoxLink}} et {{windowsServerLink}}. Ce document explique comment configurer vos serveurs OVHcloud pour optimiser les performances réseau dans des environnements virtualisés avec Proxmox VE, en utilisant des techniques telles que le routage des IP supplémentaires via le vRack .",
"ip_virtualmac_add_existing_success": "L'IP {{t0}} sera associée à la MAC virtuelle existante d'ici quelques minutes.",
"ip_virtualmac_add_impossible_server": "Vous devez d'abord rattacher cette IP à un serveur",
"ip_virtualmac_add_impossible_status": "Une opération est en cours",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
"ip_virtualmac_machinename": "Nom de la machine virtuelle",
"ip_virtualmac_add_new_success": "Une nouvelle MAC virtuelle a été générée et sera disponible sur l'IP {{t0}} dans quelques minutes.",
"ip_virtualmac_add_new_failure": "Une erreur est survenue lors de la génération d'une nouvelle MAC virtuelle sur l'IP {{t0}}",
"ip_virtualmac_not_available_failure": "La MAC virtuelle sera disponible sur ce serveur à partir de December 2024",
"ip_virtualmac_not_available_failure_details": "Pour plus d'informations sur la gestion des IP et des MAC virtuelles avec OVHcloud, nous vous invitons à consulter les Guide de configuration réseau sous {{proxmoxLink}} et {{windowsServerLink}}. Ce document explique comment configurer vos serveurs OVHcloud pour optimiser les performances réseau dans des environnements virtualisés avec Proxmox VE, en utilisant des techniques telles que le routage des IP supplémentaires via le vRack .",
"ip_virtualmac_add_existing_success": "L'IP {{t0}} sera associée à la MAC virtuelle existante d'ici quelques minutes.",
"ip_virtualmac_add_impossible_server": "Vous devez d'abord rattacher cette IP à un serveur",
"ip_virtualmac_add_impossible_status": "Une opération est en cours",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Eliminare il blocco",
"ip_byoip_delete_block_description": "Questo blocco IP fa parte di un blocco BYOIP più grande. Accedi alla sezione <a href='{{ link }}'>I miei servizi</a> e seleziona `Disattivare` per annullare il servizio BYOIP.",
"ip_table_manage_modify_ipv6block_reverse": "Modificare il reverse",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "Il MAC virtuale sarà disponibile su questo server a partire da dicembre 2024.",
"ip_virtualmac_not_available_failure_details": "Per maggiori informazioni sulla gestione degli IP e dei MAC virtuali con OVHcloud, consulta la guida alla configurazione di rete su {{proxmoxLink}} e {{windowsServerLink}}. Questo documento spiega come configurare i tuoi server OVHcloud per ottimizzare le prestazioni di rete in ambienti virtualizzati con Proxmox VE, utilizzando tecniche come il routing degli IP supplementari tramite la vRack."
}
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Usuń blok",
"ip_byoip_delete_block_description": "Ten blok IP jest częścią większego bloku BYOIP. Przejdź do sekcji <a href='{{ link }}'>Moje usługi</a> i wybierz opcję „Rezygnacja”, jeśli chcesz anulować usługę BYOIP.",
"ip_table_manage_modify_ipv6block_reverse": "Zmień rewers",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "Wirtualny adres MAC będzie dostępny na tym serwerze od grudnia 2024",
"ip_virtualmac_not_available_failure_details": "Aby uzyskać więcej informacji na temat zarządzania wirtualnymi adresami IP i MAC w OVHcloud, zapoznaj się z przewodnikami konfiguracji sieci: {{proxmoxLink}} i {{windowsServerLink}}. Dokument ten wyjaśnia, jak skonfigurować serwery OVHcloud w celu zoptymalizowania wydajności sieci w środowiskach zwirtualizowanych przy użyciu Proxmox VE, za pomocą technik, takich jak routing dodatkowych adresów IP przez vRack."
}
Original file line number Diff line number Diff line change
Expand Up @@ -771,5 +771,7 @@
"ip_byoip_delete_block_title": "Eliminar o bloco",
"ip_byoip_delete_block_description": "Este bloco de IP faz parte de um maior bloco BYOIP. Aceda a <a href='{{ link }}'>Os meus serviços</a> e escolha a opção \"rescindir\" se pretender rescindir o seu serviço BYOIP",
"ip_table_manage_modify_ipv6block_reverse": "Modificar a reverse",
"ip_filter_services_title_parking": "Parking"
"ip_filter_services_title_parking": "Parking",
"ip_virtualmac_not_available_failure": "O MAC virtual estará disponível neste servidor a partir de dezembro de 2024",
"ip_virtualmac_not_available_failure_details": "Para mais informações sobre a gestão dos IP e dos MAC virtuais com a OVHcloud, consulte os Guias de configuração de rede em {{proxmoxLink}} e {{windowsServerLink}}. Este documento explica como configurar os seus servidores OVHcloud para otimizar os desempenhos de rede em ambientes virtualizados com Proxmox VE, utilizando técnicas como o encaminhamento dos IP suplementares através do vRack."
}

0 comments on commit 9b1938d

Please sign in to comment.