Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: go to spec (#16772)
boojackc043bab8ac04
diff --git a/frontend/src/components/Plan/components/CurrentSpecSelector.vue b/frontend/src/components/Plan/components/CurrentSpecSelector.vueindex 772c4125b9..4f6a10a002 100644--- a/frontend/src/components/Plan/components/CurrentSpecSelector.vue+++ b/frontend/src/components/Plan/components/CurrentSpecSelector.vue@@ -105,12 +105,12 @@ const getSpecTypeName = (spec: Plan_Spec): string => {};const handleSpecChange = (specId: string) => {- gotoSpec(router, plan.value, specId);+ gotoSpec(router, specId);};const handleSpecCreated = async (spec: Plan_Spec) => {// Add the new spec to the planplan.value.specs.push(spec);- gotoSpec(router, plan.value, spec.id);+ gotoSpec(router, spec.id);};</script>diff --git a/frontend/src/components/Plan/components/SpecDetailView/context.ts b/frontend/src/components/Plan/components/SpecDetailView/context.tsindex 54f6ec4134..1b482ce558 100644--- a/frontend/src/components/Plan/components/SpecDetailView/context.ts+++ b/frontend/src/components/Plan/components/SpecDetailView/context.ts@@ -52,7 +52,7 @@ export const providePlanSpecContext = (refs: {if (!foundSpec) {throw new Error("No specs available in the plan to redirect to.");}- gotoSpec(router, plan.value, foundSpec.id);+ gotoSpec(router, foundSpec.id);}});diff --git a/frontend/src/components/Plan/components/common/utils.ts b/frontend/src/components/Plan/components/common/utils.tsindex a495d347de..a3abf1b661 100644--- a/frontend/src/components/Plan/components/common/utils.ts+++ b/frontend/src/components/Plan/components/common/utils.ts@@ -1,9 +1,7 @@import { type Router } from "vue-router";import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/router/dashboard/projectV1";-import type { Plan } from "@/types/proto-es/v1/plan_service_pb";-import { extractPlanUID } from "@/utils";-export const gotoSpec = (router: Router, plan: Plan, specId: string) => {+export const gotoSpec = (router: Router, specId: string) => {// Defensive check for router and currentRouteif (!router || !router.currentRoute?.value) {console.error("Router or currentRoute is not available in gotoSpec");@@ -15,7 +13,6 @@ export const gotoSpec = (router: Router, plan: Plan, specId: string) => {name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,params: {...(currentRoute.params || {}),- planId: extractPlanUID(plan.name),specId,},query: currentRoute.query || {},diff --git a/frontend/src/views/project/CICDLayout.vue b/frontend/src/views/project/CICDLayout.vueindex 59d499eece..801ce246df 100644--- a/frontend/src/views/project/CICDLayout.vue+++ b/frontend/src/views/project/CICDLayout.vue@@ -53,7 +53,6 @@ import { HeaderSection } from "@/components/Plan/components";import CurrentSpecSelector from "@/components/Plan/components/CurrentSpecSelector.vue";import RefreshIndicator from "@/components/Plan/components/RefreshIndicator.vue";import { useSpecsValidation } from "@/components/Plan/components/common";-import { gotoSpec } from "@/components/Plan/components/common/utils";import { provideIssueReviewContext } from "@/components/Plan/logic/issue-review";import { useBodyLayoutContext } from "@/layouts/common";import {@@ -245,7 +244,14 @@ const handleTabChange = (tab: TabKey) => {// Auto select the first spec when switching to Specifications tab.const spec = head(plan.value.specs);if (spec) {- gotoSpec(router, plan.value, spec.id);+ router.push({+ name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,+ params: {+ ...params,+ specId: spec.id,+ },+ query: query,+ });} else {router.push({name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,