Skip to content

Commit

Permalink
feat(hub): rewrote hub in react (#13689)
Browse files Browse the repository at this point in the history
ref: MANAGER-14935

Signed-off-by: Jacques Larique <[email protected]>
Co-authored-by: Omar ALKABOUSS MOUSSANA <[email protected]>
  • Loading branch information
JacquesLarique and Omar ALKABOUSS MOUSSANA authored Oct 22, 2024
1 parent e563b34 commit 2c56e42
Show file tree
Hide file tree
Showing 230 changed files with 12,840 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/manager/apps/hub-react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @ovh-ux/manager-hub-app

> OVHcloud Dashboard control panel.
20 changes: 20 additions & 0 deletions packages/manager/apps/hub-react/cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const isCI = process.env.CI;

module.exports = {
default: {
paths: ['e2e/features/**/*.feature'],
require: [
'../../../../playwright-helpers/bdd-setup.ts',
'e2e/**/*.step.ts',
],
requireModule: ['ts-node/register'],
format: [
'summary',
isCI ? 'progress' : 'progress-bar',
!isCI && ['html', 'e2e/reports/cucumber-results-report.html'],
!isCI && ['usage-json', 'e2e/reports/cucumber-usage-report.json'],
].filter(Boolean),
formatOptions: { snippetInterface: 'async-await' },
retry: 1,
},
};
22 changes: 22 additions & 0 deletions packages/manager/apps/hub-react/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html class="h-full" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="mobile-web-app-capable" content="yes" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>OVHcloud</title>
<link rel="shortcut icon" href="images/favicon.png" />
<link rel="apple-touch-icon" href="images/touchicon-180.png" />
</head>
<body class="h-full overflow-hidden m-0">
<noscript>
<strong>
We're sorry but this application doesn't work properly without
JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
</body>
</html>
68 changes: 68 additions & 0 deletions packages/manager/apps/hub-react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "@ovh-ux/manager-hub-react-app",
"version": "0.0.0",
"private": true,
"description": "OVHcloud Dashboard control panel.",
"repository": {
"type": "git",
"url": "git+https://github.com/ovh/manager.git",
"directory": "packages/manager/apps/hub-react"
},
"license": "BSD-3-Clause",
"author": "OVH SAS",
"scripts": {
"build": "tsc && vite build",
"dev": "tsc && vite",
"start": "lerna exec --stream --scope='@ovh-ux/manager-hub-react-app' --include-dependencies -- npm run build --if-present",
"start:dev": "lerna exec --stream --scope='@ovh-ux/manager-hub-react-app' --include-dependencies -- npm run dev --if-present",
"start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-hub-react-app' --include-dependencies -- npm run dev:watch --if-present",
"test": "vitest run",
"test:e2e": "tsc && node ../../../../scripts/run-playwright-bdd.js",
"test:e2e:ci": "tsc && node ../../../../scripts/run-playwright-bdd.js --ci",
"test:watch": "vitest watch"
},
"dependencies": {
"@ovh-ux/manager-config": "^7.3.3",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-models": "^1.14.13",
"@ovh-ux/manager-react-components": "^1.31.0",
"@ovh-ux/manager-react-shell-client": "^0.7.0",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
"@ovh-ux/request-tagger": "^0.3.0",
"@ovhcloud/ods-common-core": "17.2.1",
"@ovhcloud/ods-common-theming": "17.2.1",
"@ovhcloud/ods-components": "17.2.1",
"@ovhcloud/ods-theme-blue-jeans": "17.2.1",
"@tanstack/react-query": "^5.51.21",
"axios": "^1.1.2",
"clsx": "^1.2.1",
"i18next": "^23.8.2",
"i18next-http-backend": "^2.4.2",
"punycode": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.3.0"
},
"devDependencies": {
"@cucumber/cucumber": "^10.3.1",
"@ovh-ux/manager-vite-config": "^0.8.0",
"@playwright/test": "^1.41.2",
"@tanstack/react-query-devtools": "^5.51.21",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^14.1.2",
"@types/punycode": "^2.1.4",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.2.0",
"element-internals-polyfill": "^1.3.10",
"tailwindcss": "^3.4.4",
"typescript": "^5.1.6",
"vite": "^5.2.13",
"vitest": "^1.2.0"
},
"regions": [
"CA",
"EU",
"US"
]
}
20 changes: 20 additions & 0 deletions packages/manager/apps/hub-react/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
workers: 3,
fullyParallel: false,
timeout: 30 * 1000,
reporter: [['html', { open: 'on-failure' }]],
expect: {
timeout: 20000,
},
use: {
// Collect trace when retrying the failed test.
trace: 'retain-on-failure',
},
testMatch: '**/*.e2e.ts',
webServer: {
command: 'yarn run dev',
url: 'http://localhost:9000/',
},
});
6 changes: 6 additions & 0 deletions packages/manager/apps/hub-react/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Mehr Aktionen für diesen Dienst",
"billing_autorenew_service_enable_autorenew": "Automatische Zahlung aktivieren",
"billing_services_actions_menu_pay_bill": "Meine Rechnung begleichen",
"billing_services_actions_menu_manage_renew": "Verlängerung konfigurieren",
"billing_services_actions_menu_exchange_update_accounts": "Verlängerung der Accounts konfigurieren",
"billing_services_actions_menu_anticipate_renew": "Vorauszahlen",
"billing_services_actions_menu_resiliate": "Meine Vertragsbindung kündigen",
"billing_services_actions_menu_resiliate_my_engagement": "Meine Vertragsbindung kündigen",
"billing_services_actions_menu_renew_label": "Dienst verlängern: {{ serviceName }} (Neues Fenster)",
"billing_services_actions_menu_renew": "Dienst verlängern",
"billing_services_actions_menu_exchange_update": "Abrechnung bearbeiten",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "MX Plan sofort löschen",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Enterprise Cloud Databases sofort löschen",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Hosting sofort löschen",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Mein SQL Private Hosting kündigen",
"billing_services_actions_menu_resiliate_WEBCOACH": "WebCoach löschen",
"billing_services_actions_menu_sms_credit": "Guthaben hinzufügen",
"billing_services_actions_menu_sms_renew": "Automatische Aufladung konfigurieren",
"billing_services_actions_menu_resiliate_cancel": "Kündigung der Dienstes stornieren",
"billing_services_actions_menu_see_dashboard": "Dienstdetails anzeigen",
"billing_services_actions_menu_commit": "Meine Abonnementlaufzeit verwalten",
"billing_services_actions_menu_commit_cancel": "Abonnementbestellung mit fester Laufzeit stornieren"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Further actions on this service ",
"billing_autorenew_service_enable_autorenew": "Enable automatic payment",
"billing_services_actions_menu_pay_bill": "Pay my bill",
"billing_services_actions_menu_manage_renew": "Configure renewal",
"billing_services_actions_menu_exchange_update_accounts": "Configure renewal for accounts",
"billing_services_actions_menu_anticipate_renew": "Bring forward payment",
"billing_services_actions_menu_resiliate": "Cancel subscription",
"billing_services_actions_menu_resiliate_my_engagement": "Cancel subscription",
"billing_services_actions_menu_renew_label": "Renew the following service: {{ serviceName }} (New window)",
"billing_services_actions_menu_renew": "Renew service",
"billing_services_actions_menu_exchange_update": "Modify billing",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Delete MX Plan immediately",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Delete Enterprise Cloud Database immediately",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Delete web hosting plan immediately",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Delete my Private SQL hosting service",
"billing_services_actions_menu_resiliate_WEBCOACH": "Delete my Web Coach",
"billing_services_actions_menu_sms_credit": "Add credits",
"billing_services_actions_menu_sms_renew": "Configure automatic reloading",
"billing_services_actions_menu_resiliate_cancel": "Stop cancellation of service",
"billing_services_actions_menu_see_dashboard": "View service details",
"billing_services_actions_menu_commit": "Manage my commitment",
"billing_services_actions_menu_commit_cancel": "Cancel subscription request"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Más acciones sobre este servicio",
"billing_autorenew_service_enable_autorenew": "Activar el pago automático",
"billing_services_actions_menu_pay_bill": "Abonar la factura",
"billing_services_actions_menu_manage_renew": "Configurar la renovación",
"billing_services_actions_menu_exchange_update_accounts": "Configurar la renovación de las cuentas",
"billing_services_actions_menu_anticipate_renew": "Adelantar el pago",
"billing_services_actions_menu_resiliate": "Cancelar mi compromiso",
"billing_services_actions_menu_resiliate_my_engagement": "Cancelar mi compromiso",
"billing_services_actions_menu_renew_label": "Renovar el servicio: {{ serviceName }} (nueva ventana)",
"billing_services_actions_menu_renew": "Renovar el servicio",
"billing_services_actions_menu_exchange_update": "Modificar la facturación",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Eliminar inmediatamente el MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Eliminar inmediatamente Enterprise Cloud Databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Eliminar inmediatamente el alojamiento",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Eliminar mi alojamiento SQL Privado",
"billing_services_actions_menu_resiliate_WEBCOACH": "Eliminar mi WebCoach",
"billing_services_actions_menu_sms_credit": "Añadir crédito",
"billing_services_actions_menu_sms_renew": "Configurar la recarga automática",
"billing_services_actions_menu_resiliate_cancel": "Cancelar la baja del servicio",
"billing_services_actions_menu_see_dashboard": "Ver el detalle del servicio",
"billing_services_actions_menu_commit": "Gestionar mi compromiso de permanencia",
"billing_services_actions_menu_commit_cancel": "Cancelar la solicitud de contratación con compromiso de permanencia"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Plus d'actions sur ce service",
"billing_autorenew_service_enable_autorenew": "Activer le paiement automatique",
"billing_services_actions_menu_pay_bill": "Régler ma facture",
"billing_services_actions_menu_manage_renew": "Configurer le renouvellement",
"billing_services_actions_menu_exchange_update_accounts": "Configurer le renouvellement des comptes",
"billing_services_actions_menu_anticipate_renew": "Anticiper le paiement",
"billing_services_actions_menu_resiliate": "Résilier",
"billing_services_actions_menu_resiliate_my_engagement": "Résilier mon engagement",
"billing_services_actions_menu_renew_label": "Renouveler le service : {{ serviceName }} (Nouvelle fenêtre)",
"billing_services_actions_menu_renew": "Renouveler le service",
"billing_services_actions_menu_exchange_update": "Modifier la facturation",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Supprimer immédiatement le MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Supprimer immédiatement l'enterprise cloud databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Supprimer immédiatement l'hébergement",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Supprimer mon hébergement SQL privé",
"billing_services_actions_menu_resiliate_WEBCOACH": "Supprimer mon WebCoach",
"billing_services_actions_menu_sms_credit": "Ajouter des crédits",
"billing_services_actions_menu_sms_renew": "Configurer la recharge automatique",
"billing_services_actions_menu_resiliate_cancel": "Annuler la résiliation du service",
"billing_services_actions_menu_see_dashboard": "Voir le détail du service",
"billing_services_actions_menu_commit": "Gérer mon engagement",
"billing_services_actions_menu_commit_cancel": "Annuler la demande d'engagement"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Plus d'actions sur ce service",
"billing_autorenew_service_enable_autorenew": "Activer le paiement automatique",
"billing_services_actions_menu_pay_bill": "Régler ma facture",
"billing_services_actions_menu_manage_renew": "Configurer le renouvellement",
"billing_services_actions_menu_exchange_update_accounts": "Configurer le renouvellement des comptes",
"billing_services_actions_menu_anticipate_renew": "Anticiper le paiement",
"billing_services_actions_menu_resiliate": "Résilier",
"billing_services_actions_menu_resiliate_my_engagement": "Résilier mon engagement",
"billing_services_actions_menu_renew_label": "Renouveler le service : {{ serviceName }} (Nouvelle fenêtre)",
"billing_services_actions_menu_renew": "Renouveler le service",
"billing_services_actions_menu_exchange_update": "Modifier la facturation",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Supprimer immédiatement le MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Supprimer immédiatement l'enterprise cloud databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Supprimer immédiatement l'hébergement",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Supprimer mon hébergement SQL privé",
"billing_services_actions_menu_resiliate_WEBCOACH": "Supprimer mon WebCoach",
"billing_services_actions_menu_sms_credit": "Ajouter des crédits",
"billing_services_actions_menu_sms_renew": "Configurer la recharge automatique",
"billing_services_actions_menu_resiliate_cancel": "Annuler la résiliation du service",
"billing_services_actions_menu_see_dashboard": "Voir le détail du service",
"billing_services_actions_menu_commit": "Gérer mon engagement",
"billing_services_actions_menu_commit_cancel": "Annuler la demande d'engagement"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Più azioni per questo servizio",
"billing_autorenew_service_enable_autorenew": "Attiva il pagamento automatico",
"billing_services_actions_menu_pay_bill": "Paga la tua fattura",
"billing_services_actions_menu_manage_renew": "Configura il rinnovo",
"billing_services_actions_menu_exchange_update_accounts": "Configura il rinnovo degli account",
"billing_services_actions_menu_anticipate_renew": "Anticipa il pagamento",
"billing_services_actions_menu_resiliate": "Rescindi l’impegno contrattuale",
"billing_services_actions_menu_resiliate_my_engagement": "Rescindi l’impegno contrattuale",
"billing_services_actions_menu_renew_label": "Rinnova il servizio: {{ serviceName }} (Nuova finestra)",
"billing_services_actions_menu_renew": "Rinnova il servizio",
"billing_services_actions_menu_exchange_update": "Modifica la fatturazione",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Elimina subito MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Elimina subito Enterprise Cloud Databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Elimina subito l'hosting",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Elimina l'hosting SQL Privato",
"billing_services_actions_menu_resiliate_WEBCOACH": "Elimina il tuo WebCoach",
"billing_services_actions_menu_sms_credit": "Aggiungi credito",
"billing_services_actions_menu_sms_renew": "Imposta la ricarica automatica",
"billing_services_actions_menu_resiliate_cancel": "Annulla la disattivazione del servizio",
"billing_services_actions_menu_see_dashboard": "Mostra i dettagli del server",
"billing_services_actions_menu_commit": "Gestisci il tuo impegno contrattuale",
"billing_services_actions_menu_commit_cancel": "Annulla la richiesta di sottoscrizione di un impegno contrattuale"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Więcej operacji dla tej usługi",
"billing_autorenew_service_enable_autorenew": "Włącz płatność automatyczną",
"billing_services_actions_menu_pay_bill": "Ureguluj należności",
"billing_services_actions_menu_manage_renew": "Skonfiguruj odnowienie",
"billing_services_actions_menu_exchange_update_accounts": "Skonfiguruj odnowienie kont",
"billing_services_actions_menu_anticipate_renew": "Prognoza płatności",
"billing_services_actions_menu_resiliate": "Rezygnacja z umowy terminowej",
"billing_services_actions_menu_resiliate_my_engagement": "Rezygnacja z umowy terminowej",
"billing_services_actions_menu_renew_label": "Odnowienie usługi: {{serviceName}} (Nowe okno)",
"billing_services_actions_menu_renew": "Odnów usługę",
"billing_services_actions_menu_exchange_update": "Zmień płatności",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Usuń natychmiast MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Usuń natychmiast Enterprise Cloud Databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Usuń natychmiast hosting",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Usuń serwer Private SQL",
"billing_services_actions_menu_resiliate_WEBCOACH": "Usuń moje narzędzie WebCoach",
"billing_services_actions_menu_sms_credit": "Zasil konto",
"billing_services_actions_menu_sms_renew": "Skonfiguruj automatyczne doładowanie",
"billing_services_actions_menu_resiliate_cancel": "Anuluj rezygnację z usługi",
"billing_services_actions_menu_see_dashboard": "Wyświetl szczegółowe informacje o usłudze",
"billing_services_actions_menu_commit": "Zarządzanie usługą z opcją umowy terminowej",
"billing_services_actions_menu_commit_cancel": "Anuluj zamówienie usługi z opcją umowy terminowej"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"billing_services_actions_menu_label": "Mais ações neste serviço",
"billing_autorenew_service_enable_autorenew": "Ativar pagamento automático",
"billing_services_actions_menu_pay_bill": "Pagar a minha fatura",
"billing_services_actions_menu_manage_renew": "Configurar a renovação",
"billing_services_actions_menu_exchange_update_accounts": "Configurar a renovação das contas",
"billing_services_actions_menu_anticipate_renew": "Antecipar o pagamento",
"billing_services_actions_menu_resiliate": "Rescindir o meu compromisso",
"billing_services_actions_menu_resiliate_my_engagement": "Rescindir o meu compromisso",
"billing_services_actions_menu_renew_label": "Renovar o serviço: {{ serviceName }} (nova janela)",
"billing_services_actions_menu_renew": "Renovar o serviço",
"billing_services_actions_menu_exchange_update": "Alterar a faturação",
"billing_services_actions_menu_resiliate_EMAIL_DOMAIN": "Eliminar imediatamente o MX Plan",
"billing_services_actions_menu_resiliate_ENTERPRISE_CLOUD_DATABASE": "Eliminar imediatamente o Enterprise Cloud Databases",
"billing_services_actions_menu_resiliate_HOSTING_WEB": "Eliminar imediatamente o alojamento",
"billing_services_actions_menu_resiliate_HOSTING_PRIVATE_DATABASE": "Eliminar o meu alojamento SQL Privado",
"billing_services_actions_menu_resiliate_WEBCOACH": "Eliminar o meu WebCoach",
"billing_services_actions_menu_sms_credit": "Adicionar créditos",
"billing_services_actions_menu_sms_renew": "Configurar a recarga automática",
"billing_services_actions_menu_resiliate_cancel": "Anular a rescisão do serviço",
"billing_services_actions_menu_see_dashboard": "Ver os detalhes do serviço",
"billing_services_actions_menu_commit": "Gerir o meu compromisso",
"billing_services_actions_menu_commit_cancel": "Anular o pedido de compromisso"
}
Loading

0 comments on commit 2c56e42

Please sign in to comment.