From 8c8a4641ffa62f86c40f54be19a02d1877954b6e Mon Sep 17 00:00:00 2001 From: LIDRISSI Hamid Date: Wed, 16 Oct 2024 15:38:49 +0200 Subject: [PATCH] feat(pci-load-balancer): create health monitor section DTCORE-2655 health minitor datagrid DTCORE-2656 health monitor edition DTCORE-2657 health monitor deletion DTCORE-2658 health monitor creation Signed-off-by: LIDRISSI Hamid --- .../Messages_de_DE.json | 5 + .../Messages_en_GB.json | 5 + .../Messages_es_ES.json | 5 + .../Messages_fr_CA.json | 5 + .../Messages_fr_FR.json | 5 + .../Messages_it_IT.json | 5 + .../Messages_pl_PL.json | 5 + .../Messages_pt_PT.json | 5 + .../Messages_de_DE.json | 7 + .../Messages_en_GB.json | 7 + .../Messages_es_ES.json | 7 + .../Messages_fr_CA.json | 7 + .../Messages_fr_FR.json | 7 + .../Messages_it_IT.json | 7 + .../Messages_pl_PL.json | 7 + .../Messages_pt_PT.json | 7 + .../Messages_de_DE.json | 5 + .../Messages_en_GB.json | 5 + .../Messages_es_ES.json | 5 + .../Messages_fr_CA.json | 5 + .../Messages_fr_FR.json | 5 + .../Messages_it_IT.json | 5 + .../Messages_pl_PL.json | 5 + .../Messages_pt_PT.json | 5 + .../Messages_de_DE.json | 18 + .../Messages_en_GB.json | 18 + .../Messages_es_ES.json | 18 + .../Messages_fr_CA.json | 18 + .../Messages_fr_FR.json | 18 + .../Messages_it_IT.json | 18 + .../Messages_pl_PL.json | 18 + .../Messages_pt_PT.json | 18 + .../Messages_de_DE.json | 11 + .../Messages_en_GB.json | 11 + .../Messages_es_ES.json | 11 + .../Messages_fr_CA.json | 11 + .../Messages_fr_FR.json | 11 + .../Messages_it_IT.json | 11 + .../Messages_pl_PL.json | 11 + .../Messages_pt_PT.json | 11 + .../src/api/data/health-monitor.ts | 119 ++++++ .../src/api/hook/useHealthMonitor.tsx | 122 ++++++ .../components/detail/TileLine.component.tsx | 4 +- .../form/HealthMonitorForm.page.tsx | 379 ++++++++++++++++++ .../src/components/form/Label.component.tsx | 15 +- .../apps/pci-load-balancer/src/constants.ts | 91 +++++ .../pci-load-balancer/src/helpers/index.ts | 5 + .../pages/detail/pools/detail/Detail.page.tsx | 12 +- .../detail/health-monitor/HealthMonitor.tsx | 216 ++++++++++ .../create/HealthMonitorCreate.page.tsx | 103 +++++ .../delete/DeleteHealthMonitor.page.tsx | 103 +++++ .../edit/HealthMonitorEdit.page.tsx | 107 +++++ .../src/pages/listing/Listing.page.tsx | 2 +- .../apps/pci-load-balancer/src/routes.tsx | 42 ++ .../QuantitySelector.component.tsx | 41 +- 55 files changed, 1703 insertions(+), 26 deletions(-) create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_de_DE.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_en_GB.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_es_ES.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_CA.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_FR.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_it_IT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pl_PL.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pt_PT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_de_DE.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_en_GB.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_es_ES.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_CA.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_FR.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_it_IT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pl_PL.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pt_PT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_de_DE.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_en_GB.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_es_ES.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_CA.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_FR.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_it_IT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pl_PL.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pt_PT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_de_DE.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_en_GB.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_es_ES.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_CA.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_FR.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_it_IT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pl_PL.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pt_PT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_de_DE.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_en_GB.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_es_ES.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_CA.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_FR.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_it_IT.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pl_PL.json create mode 100644 packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pt_PT.json create mode 100644 packages/manager/apps/pci-load-balancer/src/api/data/health-monitor.ts create mode 100644 packages/manager/apps/pci-load-balancer/src/api/hook/useHealthMonitor.tsx create mode 100644 packages/manager/apps/pci-load-balancer/src/components/form/HealthMonitorForm.page.tsx create mode 100644 packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/HealthMonitor.tsx create mode 100644 packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/create/HealthMonitorCreate.page.tsx create mode 100644 packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/delete/DeleteHealthMonitor.page.tsx create mode 100644 packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/edit/HealthMonitorEdit.page.tsx diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_de_DE.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_de_DE.json new file mode 100644 index 000000000000..62d8a2276f70 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_de_DE.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Einen Health Monitor hinzufügen", + "octavia_load_balancer_health_monitor_create_submit_label": "Hinzufügen", + "octavia_load_balancer_health_monitor_create_success": "Ihr Health Monitor {{name}} wurde erstellt!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_en_GB.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_en_GB.json new file mode 100644 index 000000000000..666f6c7e068c --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_en_GB.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Add a health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Add", + "octavia_load_balancer_health_monitor_create_success": "Your {{name}} health monitor has been created!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_es_ES.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_es_ES.json new file mode 100644 index 000000000000..79855d405a55 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_es_ES.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Añadir un health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Añadir", + "octavia_load_balancer_health_monitor_create_success": "¡El health monitor {{name}} se ha creado correctamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_CA.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_CA.json new file mode 100644 index 000000000000..9d446df6b675 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_CA.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Ajouter un health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Ajouter", + "octavia_load_balancer_health_monitor_create_success": "Votre health monitor {{name}} a été crée avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_FR.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_FR.json new file mode 100644 index 000000000000..9d446df6b675 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_fr_FR.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Ajouter un health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Ajouter", + "octavia_load_balancer_health_monitor_create_success": "Votre health monitor {{name}} a été crée avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_it_IT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_it_IT.json new file mode 100644 index 000000000000..aa4ba6c57cb7 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_it_IT.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Aggiungere un health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Aggiungi", + "octavia_load_balancer_health_monitor_create_success": "L’health monitor {{name}} è stato creato correttamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pl_PL.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pl_PL.json new file mode 100644 index 000000000000..0391f18fb0df --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pl_PL.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Dodaj health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Dodaj", + "octavia_load_balancer_health_monitor_create_success": "Twój health monitor {{name}} został utworzony!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pt_PT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pt_PT.json new file mode 100644 index 000000000000..28261420b738 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-create/Messages_pt_PT.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_create_title": "Adicionar um health monitor", + "octavia_load_balancer_health_monitor_create_submit_label": "Adicionar", + "octavia_load_balancer_health_monitor_create_success": "O seu health monitor {{name}} foi criado com sucesso!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_de_DE.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_de_DE.json new file mode 100644 index 000000000000..5e181a4af48a --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_de_DE.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Den Health Monitor löschen", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Sind Sie sicher, dass Sie Ihren Health Monitor {{healthMonitor}} aus dem Pool {{pool}} löschen möchten?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Abbrechen", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Löschen", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Ihr Health Monitor „{{healthMonitor}}“ aus dem Pool „{{pool}}“ wurde gelöscht!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_en_GB.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_en_GB.json new file mode 100644 index 000000000000..544247fa0ba0 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_en_GB.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Delete your health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Are you sure you want to delete your {{healthMonitor}} Health Monitor from the {{pool}} pool?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Cancel", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Delete", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Your \"{{healthMonitor}}\" health monitor from \"{{pool}}\" pool has been deleted!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_es_ES.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_es_ES.json new file mode 100644 index 000000000000..4119e7cfadd1 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_es_ES.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Eliminar el health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "¿Está seguro de que desea eliminar el health monitor {{healthMonitor}} del pool {{pool}}?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Cancelar", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Eliminar", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "¡Su Health Monitor \"{{healthMonitor}}\" del pool \"{{pool}}\" se ha eliminado correctamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_CA.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_CA.json new file mode 100644 index 000000000000..5c865b54faff --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_CA.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Supprimer votre health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Voulez-vous vraiment supprimer votre Health monitor {{healthMonitor}} du pool {{pool}} ?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Annuler", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Supprimer", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Votre health monitor \"{{healthMonitor}}\" du pool \"{{pool}}\" a été supprimé avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_FR.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_FR.json new file mode 100644 index 000000000000..5c865b54faff --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_fr_FR.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Supprimer votre health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Voulez-vous vraiment supprimer votre Health monitor {{healthMonitor}} du pool {{pool}} ?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Annuler", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Supprimer", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Votre health monitor \"{{healthMonitor}}\" du pool \"{{pool}}\" a été supprimé avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_it_IT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_it_IT.json new file mode 100644 index 000000000000..744df9bcd643 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_it_IT.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Eliminare l’health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Vuoi davvero eliminare il tuo health monitor {{healthMonitor}} dal pool {{pool}}?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Annullare", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Elimina", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Il tuo health monitor \"{{healthMonitor}}\" del pool \"{{pool}}\" è stato eliminato correttamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pl_PL.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pl_PL.json new file mode 100644 index 000000000000..45e7274b7067 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pl_PL.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Usuń Twój health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Czy na pewno chcesz usunąć Twój health monitor {{healthMonitor}} z puli {{pool}}?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Anuluj", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Usuń", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "Twój health monitor „{{healthMonitor}}” z puli „{{pool}}” został usunięty!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pt_PT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pt_PT.json new file mode 100644 index 000000000000..b936f88292a1 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-delete/Messages_pt_PT.json @@ -0,0 +1,7 @@ +{ + "octavia_load_balancer_health_monitor_detail_overview_delete_title": "Eliminar o seu health monitor", + "octavia_load_balancer_health_monitor_detail_overview_delete_description": "Tem a certeza de que quer eliminar o seu Health monitor {{healthMonitor}} do pool {{pool}}?", + "octavia_load_balancer_health_monitor_detail_overview_delete_cancel": "Anular", + "octavia_load_balancer_health_monitor_detail_overview_delete_confirm": "Eliminar", + "octavia_load_balancer_health_monitor_detail_overview_delete_success": "O seu health monitor \"{{healthMonitor}}\" do pool \"{{pool}}\" foi eliminado com sucesso!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_de_DE.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_de_DE.json new file mode 100644 index 000000000000..7e664522d83e --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_de_DE.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Den Health Monitor bearbeiten", + "octavia_load_balancer_health_monitor_edit_submit_label": "Bearbeiten", + "octavia_load_balancer_health_monitor_edit_success": "Ihr Health Monitor {{name}} wurde erfolgreich geändert!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_en_GB.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_en_GB.json new file mode 100644 index 000000000000..4c5e575e512b --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_en_GB.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Edit health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Edit", + "octavia_load_balancer_health_monitor_edit_success": "Your {{name}} health monitor has been changed!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_es_ES.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_es_ES.json new file mode 100644 index 000000000000..358406a6a0c4 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_es_ES.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Editar el health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Editar", + "octavia_load_balancer_health_monitor_edit_success": "¡El health monitor {{name}} se ha modificado correctamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_CA.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_CA.json new file mode 100644 index 000000000000..23417dd8299a --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_CA.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Editer le health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Editer", + "octavia_load_balancer_health_monitor_edit_success": "Votre health monitor {{name}} a été modifié avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_FR.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_FR.json new file mode 100644 index 000000000000..23417dd8299a --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_fr_FR.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Editer le health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Editer", + "octavia_load_balancer_health_monitor_edit_success": "Votre health monitor {{name}} a été modifié avec succès !" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_it_IT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_it_IT.json new file mode 100644 index 000000000000..6d12846ac109 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_it_IT.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Modificare l'health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Modifica", + "octavia_load_balancer_health_monitor_edit_success": "Il tuo health monitor {{name}} è stato modificato correttamente!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pl_PL.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pl_PL.json new file mode 100644 index 000000000000..43eb6e33057c --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pl_PL.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Edytuj health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Edytuj", + "octavia_load_balancer_health_monitor_edit_success": "Twój health monitor {{name}} został zmodyfikowany!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pt_PT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pt_PT.json new file mode 100644 index 000000000000..ec04bba71e7a --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-edit/Messages_pt_PT.json @@ -0,0 +1,5 @@ +{ + "octavia_load_balancer_health_monitor_edit_title": "Editar o health monitor", + "octavia_load_balancer_health_monitor_edit_submit_label": "Editar", + "octavia_load_balancer_health_monitor_edit_success": "O seu health monitor {{name}} foi modificado com sucesso!" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_de_DE.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_de_DE.json new file mode 100644 index 000000000000..7cb1c88417ad --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_de_DE.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "Der Health Monitor wird verwendet, um die Integrität der Mitglieder Ihres Pools zu bestimmen. Die Integritätsprüfungen werden regelmäßig für jedes Mitglied des Pools ausgeführt und anhand der Ergebnisse wird bestimmt, ob das Mitglied neue Verbindungen erhält. Für jeden Pool kann nur ein Health Monitor definiert werden.", + "octavia_load_balancer_health_monitor_form_description_2": "Entdecken Sie weitere Optionen über Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Optionen entdecken", + "octavia_load_balancer_health_monitor_form_name": "Name", + "octavia_load_balancer_health_monitor_form_name_help": "Darf ausschließlich Zahlen, Buchstaben, Unterstriche, Gedankenstriche und Punkte enthalten.", + "octavia_load_balancer_health_monitor_form_type": "Typ", + "octavia_load_balancer_health_monitor_form_type_default": "Typ auswählen", + "octavia_load_balancer_health_monitor_form_expected_code": "Erwarteter Code", + "octavia_load_balancer_health_monitor_form_expected_code_help": "HTTP-Code als erfolgreich eingestuft", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Erwartete HTTP-Statuscodes bei erfolgreichem Health Check. Es muss sich um eine einzelne Ziffer, eine durch Kommas getrennte Liste von Ziffern oder ein Intervall (zwei Ziffern mit einem Trennstrich dazwischen) handeln.", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Die Anzahl der zulässigen Verbindungsfehler, bevor das Mitglied als fehlerhaft markiert wird. Muss eine Zahl zwischen 1 und 10 sein. Der Standardwert ist 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervall zwischen zwei Tests des Health Monitors. Muss größer als das Timeout sein.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Die Anzahl der zulässigen Verbindungsfehler, bevor das Mitglied als inaktiv markiert wird. Muss eine Zahl zwischen 1 und 10 sein.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "Die Zeit, nach der ein Health Check stoppt. Muss eine Zahl größer oder gleich 0 und kleiner als die Periodizität sein.", + "octavia_load_balancer_health_monitor_form_cancel": "Abbrechen", + "octavia_load_balancer_health_monitor_form_submit": "Bearbeiten" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_en_GB.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_en_GB.json new file mode 100644 index 000000000000..3794b524ca3c --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_en_GB.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "The health monitor is used to assess the health of your pool members. Regular health checks are performed on each pool member to decide if they can receive new connections. Only one health monitor can be assigned to each pool.", + "octavia_load_balancer_health_monitor_form_description_2": "Explore additional options via Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Explore options", + "octavia_load_balancer_health_monitor_form_name": "Name", + "octavia_load_balancer_health_monitor_form_name_help": "May contain numbers, letters, underscores, dashes and full stops only.", + "octavia_load_balancer_health_monitor_form_type": "Type", + "octavia_load_balancer_health_monitor_form_type_default": "Select a type", + "octavia_load_balancer_health_monitor_form_expected_code": "Expected code", + "octavia_load_balancer_health_monitor_form_expected_code_help": "The HTTP code that indicates a successful status", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "The HTTP status codes that indicate the health check is successful. It must be either a single number, a list of numbers separated by commas, or an interval (two numbers separated by a hyphen).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Once the connection failures exceed the set limit, the member is flagged as an error. Must be a number between 1 and 10. The default value is 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Interval between 2 Health Monitor tests. Must be greater than timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "The limit of connection failures to consider a member as inactive. Must be a number between 1 and 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "The time at which a health check ends. Number must be greater than or equal to 0 and less than the recurrence limit.", + "octavia_load_balancer_health_monitor_form_cancel": "Cancel", + "octavia_load_balancer_health_monitor_form_submit": "Edit" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_es_ES.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_es_ES.json new file mode 100644 index 000000000000..67fd22dea9e7 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_es_ES.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "El health monitor se utiliza para determinar la integridad de los miembros del pool. Los controles de integridad se ejecutan periódicamente en cada miembro del pool y los resultados de las comprobaciones se utilizan para determinar si el miembro recibe nuevas conexiones. Solo se puede definir un health monitor para cada pool.", + "octavia_load_balancer_health_monitor_form_description_2": "Descubra opciones adicionales en Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Descubrir las opciones", + "octavia_load_balancer_health_monitor_form_name": "Nombre", + "octavia_load_balancer_health_monitor_form_name_help": "Solo debe contener números, letras, guiones, guiones bajos o puntos.", + "octavia_load_balancer_health_monitor_form_type": "Tipo", + "octavia_load_balancer_health_monitor_form_type_default": "Elija un tipo", + "octavia_load_balancer_health_monitor_form_expected_code": "Código esperado", + "octavia_load_balancer_health_monitor_form_expected_code_help": "El código HTTP considerado un éxito", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Los códigos de estado HTTP esperados en caso de éxito del health check. Debe ser un solo dígito, una lista de dígitos separados por comas o un intervalo (dos dígitos separados por un guión).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Número de errores de conexión permitidos antes de marcar el miembro como error. Debe ser un número entre 1 y 10. El valor predeterminado es 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervalo entre 2 pruebas del Health Monitor. Debe ser mayor que el timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Número de errores de conexión permitidos antes de marcar el miembro como inactivo. Debe ser un número entre 1 y 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "El tiempo después del cual un health check se detiene. Debe ser un número mayor o igual que 0 y menor que la periodicidad", + "octavia_load_balancer_health_monitor_form_cancel": "Cancelar", + "octavia_load_balancer_health_monitor_form_submit": "Editar" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_CA.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_CA.json new file mode 100644 index 000000000000..83a1f0987d27 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_CA.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "Le health monitor est utilisé pour déterminer l'intégrité des membres de votre pool. Des contrôles d'intégrité sont exécutés régulièrement sur chaque membre du pool et le résultat de ces contrôles est utilisé pour déterminer si le membre reçoit de nouvelles connexions. Un seul health monitor peut être défini pour chaque pool.", + "octavia_load_balancer_health_monitor_form_description_2": "Découvrez des options additionnelles via Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Découvrir des options", + "octavia_load_balancer_health_monitor_form_name": "Nom", + "octavia_load_balancer_health_monitor_form_name_help": "Doit uniquement contenir des nombres, lettres, underscores, tirets ou points.", + "octavia_load_balancer_health_monitor_form_type": "Type", + "octavia_load_balancer_health_monitor_form_type_default": "Choisissez un type", + "octavia_load_balancer_health_monitor_form_expected_code": "Code attendu", + "octavia_load_balancer_health_monitor_form_expected_code_help": "Le code HTTP considéré comme un succès", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Les codes d'état HTTP attendus en cas de réussite du health check. Il doit s'agir d'un seul chiffre, d'une liste de chiffres séparés par des virgules ou d'un intervalle (deux chiffres séparés par un trait d'union).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Le nombre d'échecs de connexion autorisé avant de marquer le membre comme erreur. Doit être un nombre compris entre 1 et 10. La valeur par défaut est 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervalle entre 2 tests du Health Monitor. Doit être supérieur au timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Le nombre d'échecs de connexion autorisés avant de marquer le membre comme inactif. Doit être un nombre compris entre 1 et 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "Le temps après lequel un health check s'arrête. Doit être un nombre supérieur ou égal à 0 et inférieur à la périodicité", + "octavia_load_balancer_health_monitor_form_cancel": "Annuler", + "octavia_load_balancer_health_monitor_form_submit": "Editer" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_FR.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_FR.json new file mode 100644 index 000000000000..83a1f0987d27 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_fr_FR.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "Le health monitor est utilisé pour déterminer l'intégrité des membres de votre pool. Des contrôles d'intégrité sont exécutés régulièrement sur chaque membre du pool et le résultat de ces contrôles est utilisé pour déterminer si le membre reçoit de nouvelles connexions. Un seul health monitor peut être défini pour chaque pool.", + "octavia_load_balancer_health_monitor_form_description_2": "Découvrez des options additionnelles via Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Découvrir des options", + "octavia_load_balancer_health_monitor_form_name": "Nom", + "octavia_load_balancer_health_monitor_form_name_help": "Doit uniquement contenir des nombres, lettres, underscores, tirets ou points.", + "octavia_load_balancer_health_monitor_form_type": "Type", + "octavia_load_balancer_health_monitor_form_type_default": "Choisissez un type", + "octavia_load_balancer_health_monitor_form_expected_code": "Code attendu", + "octavia_load_balancer_health_monitor_form_expected_code_help": "Le code HTTP considéré comme un succès", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Les codes d'état HTTP attendus en cas de réussite du health check. Il doit s'agir d'un seul chiffre, d'une liste de chiffres séparés par des virgules ou d'un intervalle (deux chiffres séparés par un trait d'union).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Le nombre d'échecs de connexion autorisé avant de marquer le membre comme erreur. Doit être un nombre compris entre 1 et 10. La valeur par défaut est 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervalle entre 2 tests du Health Monitor. Doit être supérieur au timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Le nombre d'échecs de connexion autorisés avant de marquer le membre comme inactif. Doit être un nombre compris entre 1 et 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "Le temps après lequel un health check s'arrête. Doit être un nombre supérieur ou égal à 0 et inférieur à la périodicité", + "octavia_load_balancer_health_monitor_form_cancel": "Annuler", + "octavia_load_balancer_health_monitor_form_submit": "Editer" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_it_IT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_it_IT.json new file mode 100644 index 000000000000..265beed1c804 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_it_IT.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "L'health monitor è utilizzato per determinare l'integrità dei membri del pool. Su ogni membro del pool vengono eseguiti regolarmente controlli di integrità e il loro risultato viene utilizzato per determinare se il membro riceve nuove connessioni. Per ogni pool può essere definito un solo health monitor.", + "octavia_load_balancer_health_monitor_form_description_2": "Scopri le opzioni aggiuntive tramite Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Scopri le opzioni", + "octavia_load_balancer_health_monitor_form_name": "Nome", + "octavia_load_balancer_health_monitor_form_name_help": "Può contenere esclusivamente numeri, lettere, underscore, trattini o punti.", + "octavia_load_balancer_health_monitor_form_type": "Tipo", + "octavia_load_balancer_health_monitor_form_type_default": "Scegli un tipo", + "octavia_load_balancer_health_monitor_form_expected_code": "Codice atteso", + "octavia_load_balancer_health_monitor_form_expected_code_help": "Il codice HTTP considerato un successo", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "I codici di stato HTTP attesi in caso di riuscita dell'health check. Deve essere una sola cifra, un elenco di cifre separate da virgole o un intervallo (due cifre separate da un trattino).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Numero di connessioni non andate a buon fine consentite prima di contrassegnare il membro in errore. Deve essere un numero compreso tra 1 e 10. Il valore predefinito è 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervallo tra 2 test dell’health monitor. Deve essere superiore al timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Numero di connessioni non andate a buon fine consentite prima di contrassegnare il membro come inattivo. Deve essere un numero compreso tra 1 e 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "Il tempo dopo il quale un health check si interrompe. Deve essere un numero maggiore o uguale a 0 e minore della periodicità", + "octavia_load_balancer_health_monitor_form_cancel": "Annullare", + "octavia_load_balancer_health_monitor_form_submit": "Modifica" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pl_PL.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pl_PL.json new file mode 100644 index 000000000000..588f92870cb2 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pl_PL.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "Health monitor służy do określania kondycji członków puli. Kontrole kondycji są regularnie wykonywane w odniesieniu do każdego członka puli, a wyniki kontroli pozwalają określić, czy członek otrzymuje nowe połączenia. Dla każdej puli można zdefiniować tylko jeden health monitor.", + "octavia_load_balancer_health_monitor_form_description_2": "Odkryj dodatkowe opcje w interfejsie Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Sprawdź opcje", + "octavia_load_balancer_health_monitor_form_name": "Nazwa", + "octavia_load_balancer_health_monitor_form_name_help": "Może zawierać jedynie cyfry, litery, podkreślenia, myślniki lub kropki.", + "octavia_load_balancer_health_monitor_form_type": "Typ", + "octavia_load_balancer_health_monitor_form_type_default": "Wybierz typ", + "octavia_load_balancer_health_monitor_form_expected_code": "Oczekiwanie na kod", + "octavia_load_balancer_health_monitor_form_expected_code_help": "Kod HTTP uznany za pozytywny", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Kody statusu HTTP oczekiwane w przypadku pozytywnego wyniku health check. Musi to być pojedyncza cyfra, lista cyfr rozdzielonych przecinkami lub zakres cyfr (dwie cyfry oddzielone myślnikiem).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "Dozwolona liczba błędów połączenia przed oznaczeniem członka jako błędu. Liczba musi się mieścić w przedziale 1 - 10. Domyślna wartość to 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Odstęp między 2 testami health monitor. Musi być większy niż timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "Dozwolona liczba błędów połączenia przed oznaczeniem członka jako nieaktywnego. Liczba musi się mieścić w przedziale 1 - 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "Czas, po którym health check zostaje zatrzymany. Musi być liczbą większą lub równą 0 i mniejszą niż okresowość", + "octavia_load_balancer_health_monitor_form_cancel": "Anuluj", + "octavia_load_balancer_health_monitor_form_submit": "Edytuj" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pt_PT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pt_PT.json new file mode 100644 index 000000000000..385eaa63998e --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor-form/Messages_pt_PT.json @@ -0,0 +1,18 @@ +{ + "octavia_load_balancer_health_monitor_form_description_1": "O health monitor é utilizado para determinar a integridade dos membros do seu pool. São efetuadas verificações de integridade de forma regular em cada membro do pool, e o resultado dessas verificações é usado para determinar se o membro recebe novas conexões. Só pode ser definido um health monitor para cada pool.", + "octavia_load_balancer_health_monitor_form_description_2": "Descubra opções adicionais através do Horizon.", + "octavia_load_balancer_health_monitor_form_description_link": "Descobrir opções", + "octavia_load_balancer_health_monitor_form_name": "Nome", + "octavia_load_balancer_health_monitor_form_name_help": "Deve apenas conter algarismos, letras, underscores, traços ou pontos.", + "octavia_load_balancer_health_monitor_form_type": "Tipo", + "octavia_load_balancer_health_monitor_form_type_default": "Escolha um tipo", + "octavia_load_balancer_health_monitor_form_expected_code": "Código esperado", + "octavia_load_balancer_health_monitor_form_expected_code_help": "O código HTTP considerado um sucesso", + "octavia_load_balancer_health_monitor_form_expected_code_tooltip": "Os códigos de estado HTTP esperados em caso de sucesso do health check. Deve ser um único algarismo, uma lista de algarismos separados por vírgula ou um intervalo (dois dígitos separados por um hífen).", + "octavia_load_balancer_health_monitor_form_max_retries_down_tooltip": "O número de falhas de ligação permitido antes de marcar o membro como erro. Deve ser um número entre 1 e 10. O valor padrão é 3. ", + "octavia_load_balancer_health_monitor_form_delay_tooltip": "Intervalo entre 2 testes do Health Monitor. Deve ser superior ao timeout.", + "octavia_load_balancer_health_monitor_form_max_retries_tooltip": "O número de falhas de ligação permitido antes de marcar o membro como inativo. Deve ser um número entre 1 e 10.", + "octavia_load_balancer_health_monitor_form_timeout_tooltip": "O tempo após o qual um health check termina. Deve ser um número igual ou superior a 0 e inferior à periodicidade", + "octavia_load_balancer_health_monitor_form_cancel": "Anular", + "octavia_load_balancer_health_monitor_form_submit": "Editar" +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_de_DE.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_de_DE.json new file mode 100644 index 000000000000..a51b519fcafa --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_de_DE.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Verwaltung", + "octavia_load_balancer_health_monitor_overview_management_edit": "Bearbeiten", + "octavia_load_balancer_health_monitor_overview_management_delete": "Löschen", + "octavia_load_balancer_health_monitor_overview_info_title": "Informationen", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Name", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Typ", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Erwarteter Code", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "Der Name Ihres Health Monitors wurde geändert." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_en_GB.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_en_GB.json new file mode 100644 index 000000000000..b617cbc4ad6e --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_en_GB.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Management", + "octavia_load_balancer_health_monitor_overview_management_edit": "Edit", + "octavia_load_balancer_health_monitor_overview_management_delete": "Delete", + "octavia_load_balancer_health_monitor_overview_info_title": "Information", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Name", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Type", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Expected code", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "The name of your Health Monitor has been changed." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_es_ES.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_es_ES.json new file mode 100644 index 000000000000..dd5c06d39cc9 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_es_ES.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Gestión", + "octavia_load_balancer_health_monitor_overview_management_edit": "Editar", + "octavia_load_balancer_health_monitor_overview_management_delete": "Eliminar", + "octavia_load_balancer_health_monitor_overview_info_title": "Información", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nombre", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Tipo", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Código esperado", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "El nombre de su Health Monitor se ha modificado correctamente." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_CA.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_CA.json new file mode 100644 index 000000000000..8891d9d37316 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_CA.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Gestion", + "octavia_load_balancer_health_monitor_overview_management_edit": "Editer", + "octavia_load_balancer_health_monitor_overview_management_delete": "Supprimer", + "octavia_load_balancer_health_monitor_overview_info_title": "Informations", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nom", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Type", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Code attendu", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "Le nom de votre Health Monitor a bien été modifié." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_FR.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_FR.json new file mode 100644 index 000000000000..8891d9d37316 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_fr_FR.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Gestion", + "octavia_load_balancer_health_monitor_overview_management_edit": "Editer", + "octavia_load_balancer_health_monitor_overview_management_delete": "Supprimer", + "octavia_load_balancer_health_monitor_overview_info_title": "Informations", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nom", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Type", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Code attendu", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "Le nom de votre Health Monitor a bien été modifié." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_it_IT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_it_IT.json new file mode 100644 index 000000000000..da822e885a5e --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_it_IT.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Gestione", + "octavia_load_balancer_health_monitor_overview_management_edit": "Modifica", + "octavia_load_balancer_health_monitor_overview_management_delete": "Elimina", + "octavia_load_balancer_health_monitor_overview_info_title": "Informazioni", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nome", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Tipo", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Codice atteso", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "Il nome del tuo health monitor è stato modificato correttamente." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pl_PL.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pl_PL.json new file mode 100644 index 000000000000..978461d332d2 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pl_PL.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Zarządzanie", + "octavia_load_balancer_health_monitor_overview_management_edit": "Edytuj", + "octavia_load_balancer_health_monitor_overview_management_delete": "Usuń", + "octavia_load_balancer_health_monitor_overview_info_title": "Informacje", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nazwa", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Typ", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Oczekiwanie na kod", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "Nazwa health monitora została zmieniona." +} diff --git a/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pt_PT.json b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pt_PT.json new file mode 100644 index 000000000000..364e5c509555 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/public/translations/octavia-load-balancer-health-monitor/Messages_pt_PT.json @@ -0,0 +1,11 @@ +{ + "octavia_load_balancer_health_monitor_overview_management_title": "Gestão", + "octavia_load_balancer_health_monitor_overview_management_edit": "Editar", + "octavia_load_balancer_health_monitor_overview_management_delete": "Eliminar", + "octavia_load_balancer_health_monitor_overview_info_title": "Informações", + "octavia_load_balancer_health_monitor_detail_overview_info_name": "Nome", + "octavia_load_balancer_health_monitor_detail_overview_info_type": "Tipo", + "octavia_load_balancer_health_monitor_detail_overview_info_url_path": "URL Path", + "octavia_load_balancer_health_monitor_detail_overview_info_expected_code": "Código esperado", + "octavia_load_balancer_health_monitor_detail_overview_edit_name_success": "O nome do seu Health Monitor foi modificado com sucesso." +} diff --git a/packages/manager/apps/pci-load-balancer/src/api/data/health-monitor.ts b/packages/manager/apps/pci-load-balancer/src/api/data/health-monitor.ts new file mode 100644 index 000000000000..cb678235a4c9 --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/api/data/health-monitor.ts @@ -0,0 +1,119 @@ +import { v6 } from '@ovh-ux/manager-core-api'; +import { + LoadBalancerOperatingStatusEnum, + LoadBalancerProvisioningStatusEnum, +} from './load-balancer'; + +export type THealthMonitorType = 'tcp' | 'udp' | 'http' | 'https' | 'sctp'; +export type THealthMonitor = { + id: string; + name: string; + operatingStatus: LoadBalancerOperatingStatusEnum; + provisioningStatus: LoadBalancerProvisioningStatusEnum; + monitorType: THealthMonitorType; + delay: number; + timeout: number; + maxRetries: number; + maxRetriesDown: number; + httpConfiguration: null | { + method: string; + expectedCodes: number; + urlPath: string; + }; + poolId: string; +}; + +export const getHealthMonitor = async ( + projectId: string, + region: string, + poolId: string, +): Promise<[THealthMonitor]> => { + const { data } = await v6.get<[THealthMonitor]>( + `/cloud/project/${projectId}/region/${region}/loadbalancing/healthMonitor?poolId=${poolId}`, + ); + return data; +}; + +export const deleteHealthMonitor = async ( + projectId: string, + region: string, + healthMonitorId: string, +) => { + const { data } = await v6.delete( + `/cloud/project/${projectId}/region/${region}/loadbalancing/healthMonitor/${healthMonitorId}`, + ); + return data; +}; + +export type THealthMonitorFormState = { + name?: string; + type?: THealthMonitor['monitorType']; + urlPath?: string; + expectedCode?: number; + maxRetriesDown: number; + delay: number; + maxRetries: number; + timeout: number; +}; + +export const createHealthMonitor = ( + projectId: string, + region: string, + poolId: string, + model: THealthMonitorFormState, +) => { + const body = { + maxRetries: model.maxRetries, + maxRetriesDown: model.maxRetriesDown, + monitorType: model.type, + name: model.name, + delay: model.delay, + poolId, + timeout: model.timeout, + ...(model.urlPath && model.expectedCode + ? { + httpConfiguration: { + expectedCodes: `${model.expectedCode}`, + httpMethod: 'GET', + httpVersion: '1.0', + urlPath: model.urlPath, + }, + } + : {}), + }; + + return v6.post( + `/cloud/project/${projectId}/region/${region}/loadbalancing/healthMonitor`, + body, + ); +}; + +export const editHealthMonitor = ( + projectId: string, + region: string, + healthMonitorId: string, + model: THealthMonitorFormState, +) => { + const body = { + maxRetries: model.maxRetries, + maxRetriesDown: model.maxRetriesDown, + name: model.name, + delay: model.delay, + timeout: model.timeout, + ...(model.urlPath && model.expectedCode + ? { + httpConfiguration: { + expectedCodes: model.expectedCode.toString(), + httpMethod: 'GET', + httpVersion: '1.0', + urlPath: model.urlPath, + }, + } + : {}), + }; + + return v6.put( + `/cloud/project/${projectId}/region/${region}/loadbalancing/healthMonitor/${healthMonitorId}`, + body, + ); +}; diff --git a/packages/manager/apps/pci-load-balancer/src/api/hook/useHealthMonitor.tsx b/packages/manager/apps/pci-load-balancer/src/api/hook/useHealthMonitor.tsx new file mode 100644 index 000000000000..7f52893cbcba --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/api/hook/useHealthMonitor.tsx @@ -0,0 +1,122 @@ +import { useMutation, useQuery } from '@tanstack/react-query'; +import { + createHealthMonitor, + deleteHealthMonitor, + editHealthMonitor, + getHealthMonitor, + THealthMonitorFormState, +} from '../data/health-monitor'; +import queryClient from '@/queryClient'; + +export const useGetHealthMonitor = ({ + projectId, + region, + poolId, +}: { + projectId: string; + region: string; + poolId: string; +}) => + useQuery({ + queryKey: ['health-monitor', projectId, region, poolId], + queryFn: () => getHealthMonitor(projectId, region, poolId), + select: (data) => data[0], + throwOnError: true, + }); + +type DeleteHealthMonitorProps = { + projectId: string; + region: string; + onError: (cause: Error) => void; + onSuccess: () => void; +}; + +export const useDeleteHealthMonitor = ({ + projectId, + region, + onError, + onSuccess, +}: DeleteHealthMonitorProps) => { + const mutation = useMutation({ + mutationFn: async (healthMonitorId: string) => + deleteHealthMonitor(projectId, region, healthMonitorId), + onError, + onSuccess: async () => { + await queryClient.invalidateQueries({ + queryKey: ['health-monitor'], + }); + onSuccess(); + }, + }); + return { + deleteHealthMonitor: (healthMonitorId: string) => + mutation.mutate(healthMonitorId), + ...mutation, + }; +}; + +type CreateHealthMonitorProps = { + projectId: string; + region: string; + poolId: string; + onError: (cause: Error) => void; + onSuccess: () => void; +}; + +export const useCreateHealthMonitor = ({ + projectId, + region, + poolId, + onError, + onSuccess, +}: CreateHealthMonitorProps) => { + const mutation = useMutation({ + mutationFn: async (model: THealthMonitorFormState) => + createHealthMonitor(projectId, region, poolId, model), + onError, + onSuccess: async () => { + await queryClient.invalidateQueries({ + queryKey: ['health-monitor'], + }); + onSuccess(); + }, + }); + return { + createHealthMonitor: (model: THealthMonitorFormState) => + mutation.mutate(model), + ...mutation, + }; +}; + +type EditHealthMonitorProps = { + projectId: string; + region: string; + healthMonitorId: string; + onError: (cause: Error) => void; + onSuccess: () => void; +}; + +export const useEditHealthMonitor = ({ + projectId, + region, + healthMonitorId, + onError, + onSuccess, +}: EditHealthMonitorProps) => { + const mutation = useMutation({ + mutationFn: async (model: THealthMonitorFormState) => + editHealthMonitor(projectId, region, healthMonitorId, model), + onError, + onSuccess: async () => { + await queryClient.invalidateQueries({ + queryKey: ['health-monitor'], + }); + onSuccess(); + }, + }); + return { + editHealthMonitor: (model: THealthMonitorFormState) => + mutation.mutate(model), + ...mutation, + }; +}; diff --git a/packages/manager/apps/pci-load-balancer/src/components/detail/TileLine.component.tsx b/packages/manager/apps/pci-load-balancer/src/components/detail/TileLine.component.tsx index 6ef406de708b..8983808702a7 100644 --- a/packages/manager/apps/pci-load-balancer/src/components/detail/TileLine.component.tsx +++ b/packages/manager/apps/pci-load-balancer/src/components/detail/TileLine.component.tsx @@ -33,7 +33,7 @@ export default function TileLine({ case 'text': return ( void; + onSubmit: (state: THealthMonitorFormState) => void; + onCancel: () => void; +}; + +export default function HealthMonitorForm({ + title, + associatedPool, + formState, + onChange, + isEditing = false, + isPending, + onCancel, + onSubmit, + submitLabel, +}: HealthMonitorFormProps) { + const { t: tCommon } = useTranslation('pci-common'); + const { t } = useTranslation('octavia-load-balancer-health-monitor-form'); + + const displayHttpSpecificFields = useMemo( + () => formState?.type && isTypeHttpOrHttps(formState?.type), + [formState?.type], + ); + + const healthMonitorTypes = useMemo( + () => POOL_HEALTH_MONITOR_TYPE[associatedPool?.protocol] || [], + [associatedPool?.protocol], + ); + + const [errors, setErrors] = useState({}); + + const [isNameTouched, setIsNameTouched] = useState(false); + + const validateField = (name: keyof THealthMonitorFormState, value: any) => { + const newErrors: THealthMonitorFormErrors = { ...errors }; + + if (name === 'name' && isNameTouched) { + if (!value) { + newErrors.name = tCommon('common_field_error_required'); + } else if (!HEALTH_MONITOR_NAME_REGEX.test(value)) { + newErrors.name = tCommon('common_field_error_pattern'); + } else { + delete newErrors.name; + } + } + + if (isTypeHttpOrHttps(formState.type)) { + if (name === 'expectedCode') { + if (!value) { + newErrors.expectedCode = tCommon('common_field_error_required'); + } else if (!EXPECTED_STATUS_CODE_REGEX.test(`${value}`)) { + newErrors.expectedCode = tCommon('common_field_error_pattern'); + } else { + delete newErrors.expectedCode; + } + } + + if (name === 'urlPath') { + if (!value) { + newErrors.urlPath = tCommon('common_field_error_required'); + } else { + delete newErrors.urlPath; + } + } + } + + setErrors(newErrors); + }; + + const isFormValid = Object.keys(errors).length === 0 && formState?.type; + + const handle = { + change: (key: keyof THealthMonitorFormState, value) => { + switch (key) { + case 'delay': + onChange((actual) => ({ + ...actual, + delay: value, + timeout: actual.timeout >= value ? value - 1 : actual.timeout, + })); + break; + + case 'type': + if (isTypeHttpOrHttps(value)) { + onChange((actual) => ({ + ...actual, + type: value, + urlPath: '/', + expectedCode: 200, + })); + } else { + onChange((actual) => { + const { urlPath, expectedCode, ...rest } = actual; + return { ...rest, type: value }; + }); + } + break; + + default: + onChange((actual) => ({ + ...actual, + [key]: value, + })); + break; + } + + validateField(key, value); + }, + /** + * Fixes an issue with the `odsInput` component where the `onOdsValueChange` event + * is triggered during the initial render of the input, although it should not be. + */ + keyDown: (key: keyof THealthMonitorFormState) => { + if (key === 'name') setIsNameTouched(true); + }, + }; + + if (isPending) { + return ; + } + + return ( +
+
+ + {title} + + + {t('octavia_load_balancer_health_monitor_form_description_1')} + + + {t('octavia_load_balancer_health_monitor_form_description_2')} + + +
+ +
+ + + + + handle.change('name', event.detail.value) + } + onKeyDown={() => handle.keyDown('name')} + /> + + + {t('octavia_load_balancer_health_monitor_form_name_help')} + + + + + + + + handle.change('type', event.detail.value) + } + disabled={isEditing || undefined} + > + + {t('octavia_load_balancer_health_monitor_form_type_default')} + + {healthMonitorTypes.map((type: THealthMonitorType) => ( + + {type} + + ))} + + + + {displayHttpSpecificFields && ( +
+ + + + + handle.change('urlPath', event.detail.value) + } + /> + + + + + + + handle.change('expectedCode', event.detail.value) + } + /> + + {t( + 'octavia_load_balancer_health_monitor_form_expected_code_help', + )} + + +
+ )} + +
+ handle.change('maxRetriesDown', value)} + labelHelpText={t( + 'octavia_load_balancer_health_monitor_form_max_retries_down_tooltip', + )} + /> + + handle.change('delay', value)} + labelHelpText={t( + 'octavia_load_balancer_health_monitor_form_delay_tooltip', + )} + /> + + handle.change('maxRetries', value)} + /> + + handle.change('timeout', value)} + /> +
+ +
+ + {tCommon('common_cancel')} + + onSubmit(formState)} + disabled={!isFormValid || undefined} + > + {submitLabel} + +
+
+
+ ); +} diff --git a/packages/manager/apps/pci-load-balancer/src/components/form/Label.component.tsx b/packages/manager/apps/pci-load-balancer/src/components/form/Label.component.tsx index 4a371a00f815..c153109edb5a 100644 --- a/packages/manager/apps/pci-load-balancer/src/components/form/Label.component.tsx +++ b/packages/manager/apps/pci-load-balancer/src/components/form/Label.component.tsx @@ -42,14 +42,13 @@ export default function LabelComponent({ {helpText && ( - - - + {helpText} )} diff --git a/packages/manager/apps/pci-load-balancer/src/constants.ts b/packages/manager/apps/pci-load-balancer/src/constants.ts index 48765492e1d2..0eef3cdaff39 100644 --- a/packages/manager/apps/pci-load-balancer/src/constants.ts +++ b/packages/manager/apps/pci-load-balancer/src/constants.ts @@ -377,3 +377,94 @@ export const KEY_REGEX = "^[a-zA-Z0-9!#$%&'*+-.^_`|~]+$"; export const REGEX = { ip: /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, }; + +export const LABELS = { + MAX_RETRIES_DOWN: 'Max Retries Down', + MAX_RETRIES: 'Max Retries', + DELAY: 'Delay', + TIMEOUT: 'Timeout', + URL_PATH: 'URL Path', +}; + +export const HEALTH_MONITOR_TYPE = { + HTTP: 'http', + HTTPS: 'https', + PING: 'ping', + SCTP: 'sctp', + TCP: 'tcp', + TLS_HELLO: 'tls-hello', + UDP_CONNECT: 'udp-connect', +}; + +export const BOUNDS = { + MAX_RETRIES_DOWN: { + MIN: 1, + MAX: 10, + }, + MAX_RETRIES: { + MIN: 1, + MAX: 10, + }, + DELAY: { + MIN: 1, + }, + TIMEOUT: { + MIN: 0, + }, +}; + +export const HEALTH_MONITOR_NAME_REGEX = /^[A-Za-z0-9_.-]+$/; +export const EXPECTED_STATUS_CODE_REGEX = /^([1-5][0-9]{2}(\s*,\s*[1-5][0-9]{2})*)$|^([1-5][0-9]{2}-[1-5][0-9]{2})$/; + +export const POOL_HEALTH_MONITOR_TYPE = { + http: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.HTTPS, + HEALTH_MONITOR_TYPE.PING, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.TLS_HELLO, + ], + https: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.HTTPS, + HEALTH_MONITOR_TYPE.PING, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.TLS_HELLO, + ], + proxy: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.HTTPS, + HEALTH_MONITOR_TYPE.PING, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.TLS_HELLO, + ], + proxyV2: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.HTTPS, + HEALTH_MONITOR_TYPE.PING, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.TLS_HELLO, + ], + sctp: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.SCTP, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.UDP_CONNECT, + ], + tcp: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.HTTPS, + HEALTH_MONITOR_TYPE.PING, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.TLS_HELLO, + ], + udp: [ + HEALTH_MONITOR_TYPE.HTTP, + HEALTH_MONITOR_TYPE.SCTP, + HEALTH_MONITOR_TYPE.TCP, + HEALTH_MONITOR_TYPE.UDP_CONNECT, + ], +}; + +export const HORIZON_LINK = + 'https://horizon.cloud.ovh.net/project/load_balancer'; diff --git a/packages/manager/apps/pci-load-balancer/src/helpers/index.ts b/packages/manager/apps/pci-load-balancer/src/helpers/index.ts index 045f46ecc062..216c2850bd41 100644 --- a/packages/manager/apps/pci-load-balancer/src/helpers/index.ts +++ b/packages/manager/apps/pci-load-balancer/src/helpers/index.ts @@ -5,6 +5,8 @@ import * as dateFnsLocales from 'date-fns/locale'; import { useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { getDateFnsLocale } from '@ovh-ux/manager-core-utils'; +import { THealthMonitor, THealthMonitorType } from '@/api/data/health-monitor'; +import { HEALTH_MONITOR_TYPE } from '@/constants'; export const paginateResults = ( items: T[], @@ -64,3 +66,6 @@ export const getFormattedDate = (date: string | null, formatStr = 'PPpp') => { return displayDate; }; + +export const isTypeHttpOrHttps = (type: THealthMonitorType) => + [HEALTH_MONITOR_TYPE.HTTP, HEALTH_MONITOR_TYPE.HTTPS].includes(type); diff --git a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/Detail.page.tsx b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/Detail.page.tsx index ac85bd883194..74ab14f84a1d 100644 --- a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/Detail.page.tsx +++ b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/Detail.page.tsx @@ -3,6 +3,7 @@ import { Headers, Links, LinkType, + Notifications, useProjectUrl, } from '@ovh-ux/manager-react-components'; import { ODS_SPINNER_SIZE } from '@ovhcloud/ods-components'; @@ -52,7 +53,7 @@ export default function PoolDetailPage() { title: tPoolsDetail( 'load_balancer_pools_detail_health_monitor_tab_title', ), - to: null, + to: useResolvedPath(ROUTE_PATHS.POOL_HEALTH_MONITOR).pathname, }, { name: 'load_balancer_pools_detail_members_tab_title', @@ -102,7 +103,7 @@ export default function PoolDetailPage() { ]} /> -
+
@@ -111,11 +112,14 @@ export default function PoolDetailPage() { 'load_balancer_pools_detail_previous_page_label', )}"`} type={LinkType.back} - className="mb-10" href={hrefPools} /> -
+
+ +
+ +
diff --git a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/HealthMonitor.tsx b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/HealthMonitor.tsx new file mode 100644 index 000000000000..02547bf2727c --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/HealthMonitor.tsx @@ -0,0 +1,216 @@ +import { + Notifications, + RedirectionGuard, +} from '@ovh-ux/manager-react-components'; +import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; +import { + ODS_BUTTON_SIZE, + ODS_BUTTON_VARIANT, + ODS_DIVIDER_SIZE, + ODS_ICON_NAME, + ODS_ICON_SIZE, + ODS_SKELETON_SIZE, + ODS_TEXT_LEVEL, + ODS_TEXT_SIZE, + ODS_TILE_VARIANT, +} from '@ovhcloud/ods-components'; +import { + OsdsButton, + OsdsDivider, + OsdsIcon, + OsdsSkeleton, + OsdsText, + OsdsTile, +} from '@ovhcloud/ods-components/react'; +import { useTranslation } from 'react-i18next'; +import { Outlet, useHref, useParams } from 'react-router-dom'; +import { useGetHealthMonitor } from '@/api/hook/useHealthMonitor'; +import TileButton from '@/components/detail/pools/TileButton.component'; +import TileLine from '@/components/detail/TileLine.component'; +import OperatingStatusComponent from '@/components/listing/OperatingStatus.component'; +import ProvisioningStatusComponent from '@/components/listing/ProvisioningStatus.component'; +import { HEALTH_MONITOR_TYPE, LABELS } from '@/constants'; + +export default function HealthMonitor() { + const { t } = useTranslation([ + 'octavia-load-balancer-health-monitor', + 'octavia-load-balancer', + ]); + + const { projectId, region, poolId } = useParams(); + + const { data: healthMonitor, isPending } = useGetHealthMonitor({ + projectId, + region, + poolId, + }); + + return ( + +
+ +
+ + {t( + 'octavia_load_balancer_health_monitor_overview_management_title', + )} + + + + + +
+
+ + +
+ + {t('octavia_load_balancer_health_monitor_overview_info_title')} + + + + + + + {healthMonitor?.name} + + + + +
+ } + /> + + + + {[HEALTH_MONITOR_TYPE.HTTP, HEALTH_MONITOR_TYPE.HTTPS].includes( + healthMonitor?.monitorType, + ) && ( + + )} + + {[HEALTH_MONITOR_TYPE.HTTP, HEALTH_MONITOR_TYPE.HTTPS].includes( + healthMonitor?.monitorType, + ) && ( + + )} + + + + + + + + + + + {healthMonitor?.provisioningStatus ? ( + + ) : ( + + )} +
+ } + /> + + {healthMonitor?.operatingStatus ? ( + + ) : ( + + )} +
+ } + /> +
+ + + + + + ); +} diff --git a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/create/HealthMonitorCreate.page.tsx b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/create/HealthMonitorCreate.page.tsx new file mode 100644 index 000000000000..76075f77187e --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/create/HealthMonitorCreate.page.tsx @@ -0,0 +1,103 @@ +import { ApiError } from '@ovh-ux/manager-core-api'; +import { + RedirectionGuard, + useNotifications, +} from '@ovh-ux/manager-react-components'; +import { Trans, useTranslation } from 'react-i18next'; +import { useNavigate, useParams } from 'react-router-dom'; +import { useState } from 'react'; +import HealthMonitorForm from '@/components/form/HealthMonitorForm.page'; +import { useGetPool } from '@/api/hook/usePool'; +import { + useCreateHealthMonitor, + useGetHealthMonitor, +} from '@/api/hook/useHealthMonitor'; +import { THealthMonitorFormState } from '@/api/data/health-monitor'; + +export default function HealthMonitorCreatePage() { + const { t } = useTranslation('octavia-load-balancer-health-monitor-create'); + + const navigate = useNavigate(); + const { addSuccess, addError } = useNotifications(); + + const { projectId, region, poolId } = useParams(); + + const [formState, setFormState] = useState({ + maxRetriesDown: 3, + delay: 5, + maxRetries: 4, + timeout: 4, + }); + + const { data: pool, isPending: isPoolPending } = useGetPool({ + projectId, + region, + poolId, + }); + + const { + data: healthMonitor, + isPending: isHealthMonitorPending, + } = useGetHealthMonitor({ + projectId, + region, + poolId, + }); + + const { + createHealthMonitor, + isPending: isCreationPending, + } = useCreateHealthMonitor({ + projectId, + region, + poolId, + onError(error: ApiError) { + addError( + , + true, + ); + navigate('../health-monitor'); + }, + onSuccess() { + addSuccess( + , + true, + ); + navigate('../health-monitor'); + }, + }); + + const isPending = isPoolPending || isHealthMonitorPending; + + return ( + + navigate('../health-monitor')} + onChange={setFormState} + onSubmit={createHealthMonitor} + submitLabel={t( + 'octavia_load_balancer_health_monitor_create_submit_label', + )} + /> + + ); +} diff --git a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/delete/DeleteHealthMonitor.page.tsx b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/delete/DeleteHealthMonitor.page.tsx new file mode 100644 index 000000000000..af49dc48cdea --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/delete/DeleteHealthMonitor.page.tsx @@ -0,0 +1,103 @@ +import { ApiError } from '@ovh-ux/manager-core-api'; +import { DeletionModal } from '@ovh-ux/manager-pci-common'; +import { useNotifications } from '@ovh-ux/manager-react-components'; +import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming'; +import { ODS_TEXT_LEVEL, ODS_TEXT_SIZE } from '@ovhcloud/ods-components'; +import { OsdsText } from '@ovhcloud/ods-components/react'; +import { Trans, useTranslation } from 'react-i18next'; +import { useNavigate, useParams } from 'react-router-dom'; +import { useGetPool } from '@/api/hook/usePool'; +import { + useDeleteHealthMonitor, + useGetHealthMonitor, +} from '@/api/hook/useHealthMonitor'; + +export default function DeleteHealthMonitorPage() { + const { t } = useTranslation('octavia-load-balancer-health-monitor-delete'); + + const navigate = useNavigate(); + const { addSuccess, addError } = useNotifications(); + + const { projectId, region, poolId } = useParams(); + + const { data: pool, isPending: isGetPoolPending } = useGetPool({ + projectId, + region, + poolId, + }); + + const { + data: healthMonitor, + isPending: isGetHealthMonitorPending, + } = useGetHealthMonitor({ + projectId, + region, + poolId, + }); + + const { + deleteHealthMonitor, + isPending: isDeletePending, + } = useDeleteHealthMonitor({ + projectId, + region, + onError(error: ApiError) { + navigate('..'); + addError( + , + true, + ); + }, + onSuccess() { + navigate('../..'); + addSuccess( + , + true, + ); + }, + }); + + return ( + deleteHealthMonitor(healthMonitor?.id)} + onClose={() => navigate('..')} + onCancel={() => navigate('..')} + isPending={ + isGetPoolPending || isGetHealthMonitorPending || isDeletePending + } + type="warning" + submitText={t( + 'octavia_load_balancer_health_monitor_detail_overview_delete_confirm', + )} + cancelText={t( + 'octavia_load_balancer_health_monitor_detail_overview_delete_cancel', + )} + > + + + + + ); +} diff --git a/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/edit/HealthMonitorEdit.page.tsx b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/edit/HealthMonitorEdit.page.tsx new file mode 100644 index 000000000000..bd0ec402f3dc --- /dev/null +++ b/packages/manager/apps/pci-load-balancer/src/pages/detail/pools/detail/health-monitor/edit/HealthMonitorEdit.page.tsx @@ -0,0 +1,107 @@ +import { ApiError } from '@ovh-ux/manager-core-api'; +import { useNotifications } from '@ovh-ux/manager-react-components'; +import { Trans, useTranslation } from 'react-i18next'; +import { useNavigate, useParams } from 'react-router-dom'; +import { useEffect, useState } from 'react'; +import HealthMonitorForm from '@/components/form/HealthMonitorForm.page'; +import { useGetPool } from '@/api/hook/usePool'; +import { + useEditHealthMonitor, + useGetHealthMonitor, +} from '@/api/hook/useHealthMonitor'; +import { THealthMonitorFormState } from '@/api/data/health-monitor'; +import { isTypeHttpOrHttps } from '@/helpers'; + +export default function HealthMonitorEditPage() { + const { t } = useTranslation('octavia-load-balancer-health-monitor-edit'); + + const navigate = useNavigate(); + const { addSuccess, addError } = useNotifications(); + + const { projectId, region, poolId } = useParams(); + + const [formState, setFormState] = useState(null); + + const { data: pool, isPending: isPoolPending } = useGetPool({ + projectId, + region, + poolId, + }); + + const { + data: healthMonitor, + isPending: isHealthMonitorPending, + } = useGetHealthMonitor({ + projectId, + region, + poolId, + }); + + const { editHealthMonitor, isPending: isEditPending } = useEditHealthMonitor({ + projectId, + region, + healthMonitorId: healthMonitor?.id, + onError(error: ApiError) { + addError( + , + true, + ); + navigate('../health-monitor'); + }, + onSuccess() { + addSuccess( + , + true, + ); + navigate('../health-monitor'); + }, + }); + + const isPending = + isPoolPending || isHealthMonitorPending || isEditPending || !formState; + + useEffect(() => { + if (healthMonitor) { + setFormState({ + name: healthMonitor.name, + type: healthMonitor.monitorType, + maxRetriesDown: healthMonitor.maxRetriesDown, + delay: healthMonitor.delay, + maxRetries: healthMonitor.maxRetries, + timeout: healthMonitor.timeout, + ...(healthMonitor.httpConfiguration && + isTypeHttpOrHttps(healthMonitor.monitorType) + ? { + urlPath: healthMonitor.httpConfiguration.urlPath, + expectedCode: healthMonitor.httpConfiguration.expectedCodes, + } + : {}), + }); + } + }, [healthMonitor]); + + return ( + navigate('../health-monitor')} + onSubmit={editHealthMonitor} + submitLabel={t('octavia_load_balancer_health_monitor_edit_submit_label')} + /> + ); +} diff --git a/packages/manager/apps/pci-load-balancer/src/pages/listing/Listing.page.tsx b/packages/manager/apps/pci-load-balancer/src/pages/listing/Listing.page.tsx index a6c1b12e0eb0..2ac434858560 100644 --- a/packages/manager/apps/pci-load-balancer/src/pages/listing/Listing.page.tsx +++ b/packages/manager/apps/pci-load-balancer/src/pages/listing/Listing.page.tsx @@ -60,7 +60,7 @@ export default function ListingPage() { const PoolOverviewPage = lazy(() => import('@/pages/detail/pools/detail/overview/PoolOverview'), ); +const PoolHealthMonitorPage = lazy(() => + import('@/pages/detail/pools/detail/health-monitor/HealthMonitor'), +); +const HealthMonitorDeletePage = lazy(() => + import( + '@/pages/detail/pools/detail/health-monitor/delete/DeleteHealthMonitor.page' + ), +); +const HealthMonitorCreatePage = lazy(() => + import( + '@/pages/detail/pools/detail/health-monitor/create/HealthMonitorCreate.page' + ), +); +const HealthMonitorEditPage = lazy(() => + import( + '@/pages/detail/pools/detail/health-monitor/edit/HealthMonitorEdit.page' + ), +); const StatisticsPage = lazy(() => import('@/pages/detail/statistics/Statistics.page'), @@ -216,6 +237,27 @@ const Routes = ( Component={PoolDeletePage} /> + + + + + void; @@ -34,6 +37,7 @@ export interface QuantitySelectorProps { export function QuantitySelector({ label, + labelHelpText, description, value, onValueChange, @@ -56,15 +60,29 @@ export function QuantitySelector({ return ( - {label && ( - - {label} - - )} +
+ {label && ( + + {label} + + )} + {labelHelpText && ( + + + {labelHelpText} + + )} +
+ {description && ( max ? true : undefined} > + {error.min && ( {t('common_field_error_min', { min })}