Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update plan detail page (#12293)
boojack93b53dafd766
diff --git a/frontend/src/components/Plan/PlanDetailPage.vue b/frontend/src/components/Plan/PlanDetailPage.vueindex d16c1ce148..c08363af61 100644--- a/frontend/src/components/Plan/PlanDetailPage.vue+++ b/frontend/src/components/Plan/PlanDetailPage.vue@@ -21,6 +21,14 @@</template><script setup lang="ts">+import { onMounted } from "vue";+import { useRouter } from "vue-router";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";+import {+ extractIssueUID,+ extractProjectResourceName,+ issueSlug,+} from "@/utils";import { provideSQLCheckContext } from "../SQLCheck";import {HeaderSection,@@ -33,9 +41,26 @@ import {} from "./components";import { usePlanContext, usePollPlan } from "./logic";-const { isCreating } = usePlanContext();+const router = useRouter();+const { isCreating, plan } = usePlanContext();usePollPlan();provideSQLCheckContext();++onMounted(() => {+ if (!plan.value.issue) {+ return;+ }++ // If the plan has an issue, redirect to the issue detail page.+ const relatedIssueUID = extractIssueUID(plan.value.issue);+ router.replace({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL,+ params: {+ projectId: extractProjectResourceName(plan.value.project),+ issueSlug: issueSlug(plan.value.title, relatedIssueUID),+ },+ });+});</script>diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vueindex 5631169a04..dffb8f4767 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue@@ -1,46 +1,16 @@<template><div class="h-full flex flex-row justify-end items-center"><CreateButton v-if="isCreating" />- <template v-else>- <CreateIssueButton v-if="!relatedIssueUID" />- <div- v-else- :to="plan.issue"- class="flex flex-row justify-center items-center text-accent gap-1 cursor-pointer hover:opacity-80"- @click="gotoIssueDetailPage"- >- <span>{{ `${$t("common.issue")}#${relatedIssueUID}` }}</span>- <ExternalLinkIcon class="w-4 h-auto" />- </div>- </template>+ <CreateIssueButton v-else-if="!relatedIssueUID" /></div></template><script setup lang="ts">-import { ExternalLinkIcon } from "lucide-vue-next";import { computed } from "vue";-import { useRouter } from "vue-router";import { usePlanContext } from "@/components/Plan/logic";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";-import {- extractIssueUID,- extractProjectResourceName,- issueSlug,-} from "@/utils";+import { extractIssueUID } from "@/utils";import { CreateButton, CreateIssueButton } from "./create";-const router = useRouter();const { isCreating, plan } = usePlanContext();-const relatedIssueUID = computed(() => extractIssueUID(plan.value.issue));--const gotoIssueDetailPage = () => {- router.push({- name: PROJECT_V1_ROUTE_ISSUE_DETAIL,- params: {- projectId: extractProjectResourceName(plan.value.project),- issueSlug: issueSlug(plan.value.title, relatedIssueUID.value),- },- });-};</script>diff --git a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vueindex 3b5ddb9e5d..fff150c68f 100644--- a/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue+++ b/frontend/src/components/Plan/components/PlanCheckSection/PlanCheckSection.vue@@ -10,6 +10,7 @@<script lang="ts" setup>import { computed } from "vue";import {+ isDatabaseChangeSpec,planCheckRunListForSpec,planSpecHasPlanChecks,usePlanContext,@@ -49,11 +50,16 @@ const allowRunChecks = computed(() => {});const planCheckRunList = computed(() => {- // If a spec is selected, show plan checks for the spec.- if (selectedSpec.value && selectedSpec.value.id !== String(EMPTY_ID)) {+ // If a spec is database change spec, show plan checks for the spec.+ if (+ selectedSpec.value &&+ selectedSpec.value.id !== String(EMPTY_ID) &&+ isDatabaseChangeSpec(selectedSpec.value)+ ) {return planCheckRunListForSpec(plan.value, selectedSpec.value);}// Otherwise, show plan checks for the plan.+ // TODO(steven): update plan check runs display for db group and deployment config.return plan.value.planCheckRunList;});</script>diff --git a/frontend/src/components/Plan/components/PlanDataTable/PlanDataTable.vue b/frontend/src/components/Plan/components/PlanDataTable/PlanDataTable.vueindex 9d510f39f1..c8cf6c2884 100644--- a/frontend/src/components/Plan/components/PlanDataTable/PlanDataTable.vue+++ b/frontend/src/components/Plan/components/PlanDataTable/PlanDataTable.vue@@ -20,7 +20,6 @@ import { NPerformantEllipsis, NDataTable } from "naive-ui";import { computed, ref } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { BBAvatar } from "@/bbkit";import { ProjectNameCell } from "@/components/v2/Model/DatabaseV1Table/cells";import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/router/dashboard/projectV1";import type { ComposedPlan } from "@/types/v1/issue/plan";@@ -65,19 +64,6 @@ const columnList = computed((): DataTableColumn<ComposedPlan>[] => {<ProjectNameCell project={plan.projectEntity} mode={"ALL_SHORT"} />),},- {- key: "creator",- resizable: true,- width: 150,- title: t("issue.table.creator"),- hide: !showExtendedColumns.value,- render: (plan) => (- <div class="flex flex-row items-center overflow-hidden gap-x-2">- <BBAvatar size="SMALL" username={plan.creatorEntity.title} />- <span class="truncate">{plan.creatorEntity.title}</span>- </div>- ),- },{key: "updateTime",title: t("issue.table.updated"),