From 0b1005eb719566d66a13f7e8ef60146b566583fc Mon Sep 17 00:00:00 2001 From: Wes Date: Mon, 13 May 2024 18:17:42 -0700 Subject: [PATCH] fix: verb page redirection when new modules are deployed (#1471) Because the deployment key format changed a bit to have the prefix `dpl-` the verb page redirection wasn't working. This PR should correct that issue. --- frontend/src/features/verbs/VerbPage.tsx | 3 ++- frontend/src/features/verbs/VerbRightPanel.tsx | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/verbs/VerbPage.tsx b/frontend/src/features/verbs/VerbPage.tsx index 1ff022b170..525cf32ff4 100644 --- a/frontend/src/features/verbs/VerbPage.tsx +++ b/frontend/src/features/verbs/VerbPage.tsx @@ -28,7 +28,8 @@ export const VerbPage = () => { if (!module) { const lastIndex = deploymentKey.lastIndexOf('-') if (lastIndex !== -1) { - module = modules.modules.find((module) => module.name === deploymentKey.substring(0, lastIndex)) + const moduleName = deploymentKey.substring(0, lastIndex).replaceAll('dpl-', '') + module = modules.modules.find((module) => module.name === moduleName) navgation(`/deployments/${module?.deploymentKey}/verbs/${verbName}`) notification.showNotification({ title: 'Showing latest deployment', diff --git a/frontend/src/features/verbs/VerbRightPanel.tsx b/frontend/src/features/verbs/VerbRightPanel.tsx index e6cba3868f..da14c11951 100644 --- a/frontend/src/features/verbs/VerbRightPanel.tsx +++ b/frontend/src/features/verbs/VerbRightPanel.tsx @@ -7,7 +7,6 @@ import { ingress, isHttpIngress, httpRequestPath, verbCalls } from './verb.utils export const verbPanels = (verb?: Verb) => { const panels = [] as ExpandablePanelProps[] - console.log(verb?.schema) if (isHttpIngress(verb)) { const http = ingress(verb) const path = httpRequestPath(verb)