From 1054e78077342a9b9565f796b4e8af5e2656b1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Wed, 31 Jan 2024 08:04:44 -0500 Subject: [PATCH] Remove all /app in the pathname MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Quentin Guidée --- cypress/e2e/apps/vx-instances.cy.ts | 18 +++--- src/App.tsx | 64 +++++++++---------- .../AdminSettings/SettingsApp/SettingsApp.tsx | 10 +-- .../Containers/pages/Container/Container.tsx | 16 ++--- .../pages/ContainersApp/ContainersApp.tsx | 4 +- .../MonitoringApp/MonitoringApp.tsx | 4 +- .../ReverseProxyApp/ReverseProxyApp.tsx | 2 +- src/apps/Sql/SqlApp/SqlApp.tsx | 4 +- src/apps/Sql/SqlDatabase/SqlDatabase.tsx | 2 +- src/apps/Tunnels/TunnelsApp/TunnelsApp.tsx | 2 +- .../ContainerInstaller/ContainerInstaller.tsx | 2 +- src/components/Dock/Dock.tsx | 2 +- src/components/Dock/DockDrawer.tsx | 2 +- src/components/Header/Header.tsx | 10 +-- 14 files changed, 66 insertions(+), 76 deletions(-) diff --git a/cypress/e2e/apps/vx-instances.cy.ts b/cypress/e2e/apps/vx-instances.cy.ts index cb1ed0eb..9d2e218b 100644 --- a/cypress/e2e/apps/vx-instances.cy.ts +++ b/cypress/e2e/apps/vx-instances.cy.ts @@ -1,41 +1,41 @@ const createContainerAndNavigate = (to: string) => { - cy.visit("/app/containers"); + cy.visit("/containers"); cy.request( "POST", "http://localhost:6130/api/service/postgres/install" ).then((res: any) => { - cy.visit(`/app/containers/${res.body.uuid}${to}`); + cy.visit(`/containers/${res.body.uuid}${to}`); }); }; describe("The Vertex Containers app", () => { it("loads", () => { - cy.visit("/app/containers"); + cy.visit("/containers"); }); it("can create a new container", () => { // Navigate to the create container page - cy.visit("/app/containers"); + cy.visit("/containers"); cy.contains("Create container").click(); - cy.url().should("include", "/app/containers/add"); + cy.url().should("include", "/containers/add"); // Create an container cy.contains("Postgres").click(); cy.get("button").contains("Create container").click(); // Go back - cy.visit("/app/containers"); + cy.visit("/containers"); cy.contains("Postgres"); }); it("can navigate to an container", () => { cy.request( "POST", - "http://localhost:6130/api/app/containers/service/postgres/install" + "http://localhost:6130/api/containers/service/postgres/install" ); // Navigate to - cy.visit("/app/containers"); + cy.visit("/containers"); cy.contains("Postgres").click(); }); @@ -72,7 +72,7 @@ describe("The Vertex Containers app", () => { it("can delete an container", () => { // Go to the containers page - cy.visit("/app/containers"); + cy.visit("/containers"); // Create an container createContainerAndNavigate("/"); diff --git a/src/App.tsx b/src/App.tsx index 83d20c26..f23474fe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -113,115 +113,109 @@ function AllRoutes() { } + element={} index /> + } /> } - /> - } /> } /> - }> + }> } /> } /> - } - > + }> } /> } /> - }> + }> } /> } > } /> } > } /> } /> } /> } /> } /> } /> } /> - }> + }> } /> } /> } /> } /> } /> } /> diff --git a/src/apps/AdminSettings/SettingsApp/SettingsApp.tsx b/src/apps/AdminSettings/SettingsApp/SettingsApp.tsx index 84cc2b9f..2c36b728 100644 --- a/src/apps/AdminSettings/SettingsApp/SettingsApp.tsx +++ b/src/apps/AdminSettings/SettingsApp/SettingsApp.tsx @@ -12,29 +12,29 @@ export default function SettingsApp() { } - link={l("/app/admin/theme")} + link={l("/admin/theme")} /> } - link={l("/app/admin/notifications")} + link={l("/admin/notifications")} /> } - link={l("/app/admin/updates")} + link={l("/admin/updates")} /> } - link={l("/app/admin/checks")} + link={l("/admin/checks")} /> } - link={l("/app/admin/about")} + link={l("/admin/about")} /> diff --git a/src/apps/Containers/pages/Container/Container.tsx b/src/apps/Containers/pages/Container/Container.tsx index 9e5a9f83..95aa502e 100644 --- a/src/apps/Containers/pages/Container/Container.tsx +++ b/src/apps/Containers/pages/Container/Container.tsx @@ -59,7 +59,7 @@ export default function ContainerDetails() { const mutationDeleteContainer = useMutation({ mutationFn: () => API.deleteContainer(uuid), - onSuccess: () => navigate("/app/containers"), + onSuccess: () => navigate("/containers"), }); const { isLoading: isDeleting, @@ -78,38 +78,38 @@ export default function ContainerDetails() { } - link={l(`/app/containers/${uuid}/home`)} + link={l(`/containers/${uuid}/home`)} /> } - link={l(`/app/containers/${uuid}/logs`)} + link={l(`/containers/${uuid}/logs`)} /> } - link={l(`/app/containers/${uuid}/docker`)} + link={l(`/containers/${uuid}/docker`)} /> } - link={l(`/app/containers/${uuid}/environment`)} + link={l(`/containers/${uuid}/environment`)} /> {container?.databases && ( } - link={l(`/app/containers/${uuid}/database`)} + link={l(`/containers/${uuid}/database`)} /> )} } label="Update" - link={l(`/app/containers/${uuid}/update`)} + link={l(`/containers/${uuid}/update`)} notifications={ container?.service_update?.available ? 1 : undefined } @@ -117,7 +117,7 @@ export default function ContainerDetails() { } - link={l(`/app/containers/${uuid}/settings`)} + link={l(`/containers/${uuid}/settings`)} /> {