Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import React from 'react';
import { DataGridTextCell } from '@ovh-ux/manager-react-components';
import { useGetVrack } from '@/hooks/useGetVrack';
import { OdsLink } from '@ovhcloud/ods-components/react';
import { SkeletonCell } from './skeletonCell';
import { DedicatedServer } from '@/data/types/server.type';

export const DSVrack = (server: DedicatedServer) => {
const { vrack, isLoading, error } = useGetVrack({ server: server.name });
import { useGetVrack } from '@/hooks/useGetVrack';
import { useVrackUrl } from '@/hooks/useVrackUrl';
import type { DedicatedServer } from '@/data/types/server.type';

export const DSVrack = ({name}: DedicatedServer) => {
const { vrack = [], isLoading, error } = useGetVrack({ server: name });
const vrackUrl = useVrackUrl(vrack[0]);
return (
<SkeletonCell isLoading={isLoading} error={error}>
{vrack?.[0] ? (
<DataGridTextCell>
<span className="whitespace-nowrap">{vrack[0]}</span>
</DataGridTextCell>
{vrack[0] ? (
<OdsLink color="primary" label={vrack[0]} href={vrackUrl} />
) : (
<>-</>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useContext, useEffect, useState } from 'react';
import { ShellContext } from '@ovh-ux/manager-react-shell-client';

export const useVrackUrl = (vRack: string) => {
const { navigation } = useContext(ShellContext).shell;

const [url, setUrl] = useState('');

useEffect(() => {
if (vRack) {
navigation
.getURL('dedicated', `#/vrack/${vRack}`, {})
.then((data: string) => {
setUrl(data);
});
}
}, [navigation, vRack]);

return url;
};
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
data-ng-if="!$ctrl.networkInformations.vrackServices || $ctrl.networkInformations.vrackServices.currentState.productStatus !== $ctrl.VRACK_SERVICES_STATUS.DISABLED"
data-ng-class="{
'oui-badge_success': $ctrl.networkInformations.status === $ctrl.NETWORK_STATUS.ASSOCIATED,
'oui-badge_info': $ctrl.networkInformations.status === $ctrl.NETWORK_STATUS.TO_CONFIGURE,
'oui-badge_error': $ctrl.networkInformations.status === $ctrl.NETWORK_STATUS.TO_CONFIGURE,
'oui-badge_warning': [$ctrl.NETWORK_STATUS.DISSOCIATING, $ctrl.NETWORK_STATUS.ASSOCIATING].includes($ctrl.networkInformations.status)
}"
data-translate="{{ 'netapp_dashboard_network_configuration_status_' + $ctrl.networkInformations.status }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} GB",
"netapp_dashboard_network_configuration": "Netzwerkkonfiguration",
"netapp_dashboard_network_configuration_status": "Status",
"netapp_dashboard_network_configuration_status_to_configure": "Bereit zum Konfigurieren",
"netapp_dashboard_network_configuration_status_to_configure": "Nutzerkonfiguration erforderlich",
"netapp_dashboard_network_configuration_status_associating": "Wird bereitgestellt",
"netapp_dashboard_network_configuration_status_dissociating": "Wird getrennt",
"netapp_dashboard_network_configuration_status_associated": "Eingesetzt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{quota}}GB",
"netapp_dashboard_network_configuration": "Network configuration",
"netapp_dashboard_network_configuration_status": "Status",
"netapp_dashboard_network_configuration_status_to_configure": "Ready to configure",
"netapp_dashboard_network_configuration_status_to_configure": "Require user configuration",
"netapp_dashboard_network_configuration_status_associating": "Deploying...",
"netapp_dashboard_network_configuration_status_dissociating": "Detaching...",
"netapp_dashboard_network_configuration_status_associated": "Running",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} GB",
"netapp_dashboard_network_configuration": "Configuración de la red",
"netapp_dashboard_network_configuration_status": "Estado",
"netapp_dashboard_network_configuration_status_to_configure": "Listo para configurar",
"netapp_dashboard_network_configuration_status_to_configure": "Configuración del usuario requerida",
"netapp_dashboard_network_configuration_status_associating": "Despliegue en proceso",
"netapp_dashboard_network_configuration_status_dissociating": "Desvinculación en proceso",
"netapp_dashboard_network_configuration_status_associated": "Desplegado",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} Go",
"netapp_dashboard_network_configuration": "Configuration du réseau",
"netapp_dashboard_network_configuration_status": "Statut",
"netapp_dashboard_network_configuration_status_to_configure": "Prêt à configurer",
"netapp_dashboard_network_configuration_status_to_configure": "Configuration utilisateur requise",
"netapp_dashboard_network_configuration_status_associating": "En cours de déploiement",
"netapp_dashboard_network_configuration_status_dissociating": "Dissociation en cours",
"netapp_dashboard_network_configuration_status_associated": "Déployé",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} Go",
"netapp_dashboard_network_configuration": "Configuration du réseau",
"netapp_dashboard_network_configuration_status": "Statut",
"netapp_dashboard_network_configuration_status_to_configure": "Prêt à configurer",
"netapp_dashboard_network_configuration_status_to_configure": "Configuration utilisateur requise",
"netapp_dashboard_network_configuration_status_associating": "En cours de déploiement",
"netapp_dashboard_network_configuration_status_dissociating": "Dissociation en cours",
"netapp_dashboard_network_configuration_status_associated": "Déployé",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} GB",
"netapp_dashboard_network_configuration": "Configurazione di rete",
"netapp_dashboard_network_configuration_status": "Stato",
"netapp_dashboard_network_configuration_status_to_configure": "Pronto per la configurazione",
"netapp_dashboard_network_configuration_status_to_configure": "Configurazione utente necessaria",
"netapp_dashboard_network_configuration_status_associating": "Deploy in corso...",
"netapp_dashboard_network_configuration_status_dissociating": "Dissociazione in corso...",
"netapp_dashboard_network_configuration_status_associated": "Implementato",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{quota}}",
"netapp_dashboard_network_configuration": "Konfiguracja sieci",
"netapp_dashboard_network_configuration_status": "Status",
"netapp_dashboard_network_configuration_status_to_configure": "Gotowe do konfiguracji",
"netapp_dashboard_network_configuration_status_to_configure": "Wymagana konfiguracja użytkownika",
"netapp_dashboard_network_configuration_status_associating": "W trakcie wdrażania",
"netapp_dashboard_network_configuration_status_dissociating": "Odłączanie w toku",
"netapp_dashboard_network_configuration_status_associated": "Wdrożone",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"netapp_dashboard_information_quota_formatted": "{{ quota }} GB",
"netapp_dashboard_network_configuration": "Configuração da rede",
"netapp_dashboard_network_configuration_status": "Estado",
"netapp_dashboard_network_configuration_status_to_configure": "Pronto a configurar",
"netapp_dashboard_network_configuration_status_to_configure": "Requer configuração do utilizador",
"netapp_dashboard_network_configuration_status_associating": "Implementação em curso",
"netapp_dashboard_network_configuration_status_dissociating": "Separação em curso",
"netapp_dashboard_network_configuration_status_associated": "Implementado",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.oui-table {
th.oui-table__header {
.oui-datagrid {
.min-w-13 {
min-width: 13rem;
}
}
Loading
Loading