From f8ec70f8130a93c1f6e350da25ed247c269761f3 Mon Sep 17 00:00:00 2001 From: "Thibault Barske (Tibs)" Date: Fri, 18 Oct 2024 10:22:51 +0200 Subject: [PATCH] feat(hycu): add product HYCU for OVHCloud (#13244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref: MANAGER-14488 Signed-off-by: Thibault Barske Co-authored-by: David Arsène --- .../src/hooks/services/services.type.ts | 2 +- .../src/assets/images/sidebar/hycu-logo.svg | 12 + .../assets/images/sidebar/infinity-cloud.png | Bin 0 -> 919 bytes .../container/src/container/legacy/index.tsx | 2 +- .../legacy/server-sidebar/SidebarVirtual.tsx | 2 +- .../server-sidebar/universe/GetIcon.tsx | 2 - .../universe/HostedPrivateCloudSidebar.tsx | 39 +++ .../services/hostedPrivateCloud.ts | 15 +- .../translations/sidebar/Messages_de_DE.json | 4 +- .../translations/sidebar/Messages_en_GB.json | 4 +- .../translations/sidebar/Messages_es_ES.json | 4 +- .../translations/sidebar/Messages_fr_CA.json | 2 + .../translations/sidebar/Messages_fr_FR.json | 2 + .../translations/sidebar/Messages_it_IT.json | 4 +- .../translations/sidebar/Messages_pl_PL.json | 4 +- .../translations/sidebar/Messages_pt_PT.json | 4 +- packages/manager/apps/hycu/.gitignore | 2 + packages/manager/apps/hycu/README.md | 3 + packages/manager/apps/hycu/cucumber.js | 20 ++ packages/manager/apps/hycu/index.html | 22 ++ .../apps/hycu/mocks/example/example-data.json | 11 + .../apps/hycu/mocks/example/example.ts | 30 ++ packages/manager/apps/hycu/mocks/index.ts | 1 + packages/manager/apps/hycu/package.json | 66 +++++ packages/manager/apps/hycu/postcss.config.js | 6 + .../dashboard/Messages_de_DE.json | 7 + .../dashboard/Messages_en_GB.json | 7 + .../dashboard/Messages_es_ES.json | 7 + .../dashboard/Messages_fr_CA.json | 7 + .../dashboard/Messages_fr_FR.json | 7 + .../dashboard/Messages_it_IT.json | 7 + .../dashboard/Messages_pl_PL.json | 7 + .../dashboard/Messages_pt_PT.json | 7 + .../translations/hycu/Messages_de_DE.json | 6 + .../translations/hycu/Messages_en_GB.json | 6 + .../translations/hycu/Messages_es_ES.json | 6 + .../translations/hycu/Messages_fr_CA.json | 6 + .../translations/hycu/Messages_fr_FR.json | 6 + .../translations/hycu/Messages_it_IT.json | 6 + .../translations/hycu/Messages_pl_PL.json | 6 + .../translations/hycu/Messages_pt_PT.json | 6 + .../hycu/error/Messages_de_DE.json | 8 + .../hycu/error/Messages_en_GB.json | 8 + .../hycu/error/Messages_es_ES.json | 8 + .../hycu/error/Messages_fr_CA.json | 8 + .../hycu/error/Messages_fr_FR.json | 8 + .../hycu/error/Messages_it_IT.json | 8 + .../hycu/error/Messages_pl_PL.json | 8 + .../hycu/error/Messages_pt_PT.json | 8 + .../hycu/listing/Messages_de_DE.json | 14 + .../hycu/listing/Messages_en_GB.json | 14 + .../hycu/listing/Messages_es_ES.json | 14 + .../hycu/listing/Messages_fr_CA.json | 14 + .../hycu/listing/Messages_fr_FR.json | 14 + .../hycu/listing/Messages_it_IT.json | 14 + .../hycu/listing/Messages_pl_PL.json | 14 + .../hycu/listing/Messages_pt_PT.json | 14 + .../hycu/onboarding/Messages_de_DE.json | 11 + .../hycu/onboarding/Messages_en_GB.json | 11 + .../hycu/onboarding/Messages_es_ES.json | 11 + .../hycu/onboarding/Messages_fr_CA.json | 11 + .../hycu/onboarding/Messages_fr_FR.json | 11 + .../hycu/onboarding/Messages_it_IT.json | 11 + .../hycu/onboarding/Messages_pl_PL.json | 11 + .../hycu/onboarding/Messages_pt_PT.json | 11 + packages/manager/apps/hycu/src/App.tsx | 35 +++ .../hycu/src/assets/error-banner-oops.png | Bin 0 -> 60234 bytes .../Breadcrumb/Breadcrumb.component.tsx | 25 ++ .../apps/hycu/src/components/Error/Error.scss | 18 ++ .../apps/hycu/src/components/Error/Error.tsx | 52 ++++ .../components/Loading/Loading.component.tsx | 10 + packages/manager/apps/hycu/src/constants.ts | 9 + .../manager/apps/hycu/src/data/api/hycu.ts | 52 ++++ .../src/hooks/breadcrumb/useBreadcrumb.tsx | 49 ++++ .../hycu/src/hooks/guide/useGuideUtils.tsx | 170 +++++++++++ .../src/hooks/service/usePackLabel.spec.ts | 47 +++ .../hycu/src/hooks/service/usePackLabel.ts | 11 + packages/manager/apps/hycu/src/hycu.config.ts | 8 + packages/manager/apps/hycu/src/index.scss | 1 + packages/manager/apps/hycu/src/index.tsx | 51 ++++ packages/manager/apps/hycu/src/mocks/index.ts | 1 + .../src/mocks/licenseHycu/licenseHycu.data.ts | 28 ++ .../hycu/src/mocks/licenseHycu/licenseHycu.ts | 25 ++ packages/manager/apps/hycu/src/pages/404.tsx | 7 + .../src/pages/dashboard/Dashboard.page.tsx | 89 ++++++ .../DashboardGeneralInformation.page.tsx | 7 + .../hycu/src/pages/dashboard/tab2/index.tsx | 7 + .../manager/apps/hycu/src/pages/index.tsx | 13 + .../manager/apps/hycu/src/pages/layout.tsx | 31 ++ .../hycu/src/pages/listing/Listing.page.tsx | 229 +++++++++++++++ .../hycu/src/pages/listing/Listing.spec.tsx | 48 ++++ .../listing/menu/HycuActionMenu.component.tsx | 31 ++ .../src/pages/onboarding/Onboarding.page.tsx | 65 +++++ .../src/pages/onboarding/hycu-x-ovhcloud.svg | 37 +++ .../apps/hycu/src/pages/onboarding/index.scss | 10 + .../apps/hycu/src/routes/routes.constant.ts | 12 + .../manager/apps/hycu/src/routes/routes.tsx | 84 ++++++ packages/manager/apps/hycu/src/setupTests.tsx | 39 +++ .../apps/hycu/src/tracking.constant.ts | 20 ++ .../hycu/src/type/hycu.details.interface.ts | 42 +++ .../apps/hycu/src/utils/statusColor.ts | 18 ++ .../apps/hycu/src/utils/tests/TestApp.tsx | 21 ++ .../apps/hycu/src/utils/tests/init.i18n.ts | 52 ++++ .../hycu/src/utils/tests/renderTestApp.tsx | 59 ++++ packages/manager/apps/hycu/src/vite-hmr.ts | 5 + packages/manager/apps/hycu/tailwind.config.js | 14 + packages/manager/apps/hycu/tsconfig.json | 27 ++ packages/manager/apps/hycu/tsconfig.test.json | 6 + packages/manager/apps/hycu/vite.config.mjs | 8 + packages/manager/apps/hycu/vitest.config.js | 39 +++ .../config/src/locale/country-code.enum.ts | 4 + yarn.lock | 269 +++++++++++++++++- 112 files changed, 2493 insertions(+), 23 deletions(-) create mode 100644 packages/manager/apps/container/src/assets/images/sidebar/hycu-logo.svg create mode 100644 packages/manager/apps/container/src/assets/images/sidebar/infinity-cloud.png create mode 100644 packages/manager/apps/hycu/.gitignore create mode 100644 packages/manager/apps/hycu/README.md create mode 100644 packages/manager/apps/hycu/cucumber.js create mode 100644 packages/manager/apps/hycu/index.html create mode 100644 packages/manager/apps/hycu/mocks/example/example-data.json create mode 100644 packages/manager/apps/hycu/mocks/example/example.ts create mode 100644 packages/manager/apps/hycu/mocks/index.ts create mode 100644 packages/manager/apps/hycu/package.json create mode 100644 packages/manager/apps/hycu/postcss.config.js create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_de_DE.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_en_GB.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_es_ES.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_fr_CA.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_fr_FR.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_it_IT.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_pl_PL.json create mode 100644 packages/manager/apps/hycu/public/translations/dashboard/Messages_pt_PT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_de_DE.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_en_GB.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_es_ES.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_fr_CA.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_fr_FR.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_it_IT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_pl_PL.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/Messages_pt_PT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_de_DE.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_en_GB.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_es_ES.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_fr_CA.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_fr_FR.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_it_IT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_pl_PL.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/error/Messages_pt_PT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_de_DE.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_en_GB.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_es_ES.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_fr_CA.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_fr_FR.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_it_IT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_pl_PL.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/listing/Messages_pt_PT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_de_DE.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_en_GB.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_es_ES.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_fr_CA.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_fr_FR.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_it_IT.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_pl_PL.json create mode 100644 packages/manager/apps/hycu/public/translations/hycu/onboarding/Messages_pt_PT.json create mode 100644 packages/manager/apps/hycu/src/App.tsx create mode 100644 packages/manager/apps/hycu/src/assets/error-banner-oops.png create mode 100644 packages/manager/apps/hycu/src/components/Breadcrumb/Breadcrumb.component.tsx create mode 100644 packages/manager/apps/hycu/src/components/Error/Error.scss create mode 100644 packages/manager/apps/hycu/src/components/Error/Error.tsx create mode 100644 packages/manager/apps/hycu/src/components/Loading/Loading.component.tsx create mode 100644 packages/manager/apps/hycu/src/constants.ts create mode 100644 packages/manager/apps/hycu/src/data/api/hycu.ts create mode 100644 packages/manager/apps/hycu/src/hooks/breadcrumb/useBreadcrumb.tsx create mode 100644 packages/manager/apps/hycu/src/hooks/guide/useGuideUtils.tsx create mode 100644 packages/manager/apps/hycu/src/hooks/service/usePackLabel.spec.ts create mode 100644 packages/manager/apps/hycu/src/hooks/service/usePackLabel.ts create mode 100644 packages/manager/apps/hycu/src/hycu.config.ts create mode 100644 packages/manager/apps/hycu/src/index.scss create mode 100644 packages/manager/apps/hycu/src/index.tsx create mode 100644 packages/manager/apps/hycu/src/mocks/index.ts create mode 100644 packages/manager/apps/hycu/src/mocks/licenseHycu/licenseHycu.data.ts create mode 100644 packages/manager/apps/hycu/src/mocks/licenseHycu/licenseHycu.ts create mode 100644 packages/manager/apps/hycu/src/pages/404.tsx create mode 100644 packages/manager/apps/hycu/src/pages/dashboard/Dashboard.page.tsx create mode 100644 packages/manager/apps/hycu/src/pages/dashboard/general-information/DashboardGeneralInformation.page.tsx create mode 100644 packages/manager/apps/hycu/src/pages/dashboard/tab2/index.tsx create mode 100644 packages/manager/apps/hycu/src/pages/index.tsx create mode 100644 packages/manager/apps/hycu/src/pages/layout.tsx create mode 100644 packages/manager/apps/hycu/src/pages/listing/Listing.page.tsx create mode 100644 packages/manager/apps/hycu/src/pages/listing/Listing.spec.tsx create mode 100644 packages/manager/apps/hycu/src/pages/listing/menu/HycuActionMenu.component.tsx create mode 100644 packages/manager/apps/hycu/src/pages/onboarding/Onboarding.page.tsx create mode 100644 packages/manager/apps/hycu/src/pages/onboarding/hycu-x-ovhcloud.svg create mode 100644 packages/manager/apps/hycu/src/pages/onboarding/index.scss create mode 100644 packages/manager/apps/hycu/src/routes/routes.constant.ts create mode 100644 packages/manager/apps/hycu/src/routes/routes.tsx create mode 100644 packages/manager/apps/hycu/src/setupTests.tsx create mode 100644 packages/manager/apps/hycu/src/tracking.constant.ts create mode 100644 packages/manager/apps/hycu/src/type/hycu.details.interface.ts create mode 100644 packages/manager/apps/hycu/src/utils/statusColor.ts create mode 100644 packages/manager/apps/hycu/src/utils/tests/TestApp.tsx create mode 100644 packages/manager/apps/hycu/src/utils/tests/init.i18n.ts create mode 100644 packages/manager/apps/hycu/src/utils/tests/renderTestApp.tsx create mode 100644 packages/manager/apps/hycu/src/vite-hmr.ts create mode 100644 packages/manager/apps/hycu/tailwind.config.js create mode 100644 packages/manager/apps/hycu/tsconfig.json create mode 100644 packages/manager/apps/hycu/tsconfig.test.json create mode 100644 packages/manager/apps/hycu/vite.config.mjs create mode 100644 packages/manager/apps/hycu/vitest.config.js diff --git a/packages/manager-react-components/src/hooks/services/services.type.ts b/packages/manager-react-components/src/hooks/services/services.type.ts index 4e35a725fe2a..9b3f00f70a03 100644 --- a/packages/manager-react-components/src/hooks/services/services.type.ts +++ b/packages/manager-react-components/src/hooks/services/services.type.ts @@ -80,7 +80,7 @@ export type ServiceDetails = { actions: LifecycleAction[]; }; current: { - createDate: string; + creationDate: string; pendingActions: LifecycleAction[]; state: LifecycleState; terminationDate: string; diff --git a/packages/manager/apps/container/src/assets/images/sidebar/hycu-logo.svg b/packages/manager/apps/container/src/assets/images/sidebar/hycu-logo.svg new file mode 100644 index 000000000000..e3856dac5f9e --- /dev/null +++ b/packages/manager/apps/container/src/assets/images/sidebar/hycu-logo.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/packages/manager/apps/container/src/assets/images/sidebar/infinity-cloud.png b/packages/manager/apps/container/src/assets/images/sidebar/infinity-cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..79586e21da7bc0206e9a337366d83428a835579a GIT binary patch literal 919 zcmV;I18Dq-P)BBDAhT zn1*c|gyY$Y)Ci%SLkx8vKk8o|nris~@|}GM)qoORxIfP^_z=zpcj8fB6%rn_Y~gnI z98ZS)NgFH2fld2E;4I}&LV8+RX6YGVCpqcaZ%(l^9*nBM$$1O!v)!supSGlmyWOkB z0w{C}Q0gP4unZ%5k(DXZyNG*A>jL{agV$%9aC8^K*+>f9jXBq&z&aLA1vkqvIuX3` zRiB8ds?<7~@0K$yJ!-NjZBmyz*REh_Hu2P8ebBUhnc(#2{jd02 z$orr1>U4enx5U4KHa)oX%#~$S1rz2oZtGhQPBvM|_q}T@11?LW+Emv?2zQHl7G*%w zPlM}B=N#ljfO6QN+_e(z*oJMBFxUxkQ?F2!1tjH7{w1b$dQ&eY4&r{HTUHln3JR2> zM~@~cYCN;B;-$gkPs!U)YPo{4c_(bKV`OQQg1xi z?xA(AL>qT|2Q%8iE0?YZhqj8dI1h;ndV5?RCVBOK2P%KjpaFuN%FNhoQ3`9Pu3Iqa-%zEPBp diff --git a/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/GetIcon.tsx b/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/GetIcon.tsx index b56e62ca5a57..d0dae552d056 100644 --- a/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/GetIcon.tsx +++ b/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/GetIcon.tsx @@ -1,5 +1,3 @@ -import React from "react"; - const getIcon = (iconClass:string ): JSX.Element => { return