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: deprecate changelist dashboard (#9026)
ecmadao6f14e098725f
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vueindex cdbc4a88b4..aacdb8b210 100644--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue@@ -6,6 +6,7 @@:changelists="filteredChangelists":is-fetching="isFetching":keyword="filter.keyword"+ :hide-project-column="!!project"/><CreateChangelistPaneldiff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vueindex e998ed0ed9..d8045592bb 100644--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue@@ -10,7 +10,7 @@<template #item="{ item: changelist }: BBGridRow<Changelist>"><!-- eslint-disable-next-line vue/no-v-html --><div class="bb-grid-cell" v-html="renderDescription(changelist)"></div>- <div class="bb-grid-cell">+ <div v-if="!hideProjectColumn" class="bb-grid-cell">{{ projectForChangelist(changelist).title }}</div><div class="bb-grid-cell">@@ -39,20 +39,21 @@ import { computed } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { BBGrid, BBGridRow, BBGridColumn } from "@/bbkit";-import { useProjectV1Store, useUserStore } from "@/store";+import { useUserStore } from "@/store";import { Changelist } from "@/types/proto/v1/changelist_service";import {- extractProjectResourceName,extractUserResourceName,getHighlightHTMLByRegExp,projectV1Slug,extractChangelistResourceName,} from "@/utils";+import { projectForChangelist } from "../ChangelistDetail/common";const props = defineProps<{changelists: Changelist[];isFetching: boolean;keyword?: string;+ hideProjectColumn: boolean;}>();const { t } = useI18n();@@ -61,17 +62,12 @@ const router = useRouter();const columns = computed((): BBGridColumn[] => {return [{ title: t("changelist.self"), width: "3fr" },- { title: t("common.project"), width: "1fr" },+ { title: t("common.project"), width: "1fr", hide: props.hideProjectColumn },{ title: t("common.updated-at"), width: "minmax(8rem, auto)" },{ title: t("common.created-at"), width: "minmax(8rem, auto)" },- ];+ ].filter((item) => !item.hide);});-const projectForChangelist = (changelist: Changelist) => {- const proj = extractProjectResourceName(changelist.name);- return useProjectV1Store().getProjectByName(`projects/${proj}`);-};-const getUser = (name: string) => {const email = extractUserResourceName(name);return useUserStore().getUserByEmail(email);diff --git a/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vue b/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vueindex 20521a24bf..31a6dae63c 100644--- a/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vue+++ b/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vue@@ -38,6 +38,8 @@ import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import ErrorList from "@/components/misc/ErrorList.vue";import { pushNotification, useChangelistStore } from "@/store";+import { projectV1Slug } from "@/utils";+import { projectForChangelist } from "./common";import { useChangelistDetailContext } from "./context";const router = useRouter();@@ -57,11 +59,15 @@ const errors = computed(() => {const handleDelete = async () => {isUpdating.value = true;-+ const project = projectForChangelist(changelist.value);try {await useChangelistStore().deleteChangelist(changelist.value.name);- router.push({- name: "workspace.changelist.dashboard",+ router.replace({+ name: "workspace.project.detail",+ hash: "#changelists",+ params: {+ projectSlug: projectV1Slug(project),+ },});pushNotification({module: "bytebase",diff --git a/frontend/src/components/Changelist/ChangelistDetail/common.ts b/frontend/src/components/Changelist/ChangelistDetail/common.tsindex ead72c09b2..57277a37c6 100644--- a/frontend/src/components/Changelist/ChangelistDetail/common.ts+++ b/frontend/src/components/Changelist/ChangelistDetail/common.ts@@ -1,5 +1,8 @@import dayjs from "@/plugins/dayjs";+import { useProjectV1Store } from "@/store";+import { projectNamePrefix } from "@/store/modules/v1/common";import { Changelist } from "@/types/proto/v1/changelist_service";+import { extractProjectResourceName } from "@/utils";export const generateIssueName = (databaseNameList: string[],@@ -19,3 +22,8 @@ export const generateIssueName = (return issueNameParts.join(" ");};++export const projectForChangelist = (changelist: Changelist) => {+ const proj = extractProjectResourceName(changelist.name);+ return useProjectV1Store().getProjectByName(`${projectNamePrefix}${proj}`);+};diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 177ed019f1..cf96783875 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -239,19 +239,6 @@ const routes: Array<RouteRecordRaw> = [leftSidebar: true,},},- {- path: "changelists",- name: "workspace.changelist.dashboard",- meta: { title: () => t("changelist.changelists") },- components: {- content: () => import("../views/ChangelistDashboard.vue"),- leftSidebar: DashboardSidebar,- },- props: {- content: true,- leftSidebar: true,- },- },{path: "/project/:projectSlug/changelists/:changelistName",name: "workspace.changelist.detail",@@ -1207,7 +1194,6 @@ router.beforeEach((to, from, next) => {to.name === "workspace.home" ||to.name === "workspace.inbox" ||to.name === "workspace.slow-query" ||- to.name === "workspace.changelist.dashboard" ||to.name === "workspace.sync-schema" ||to.name === "workspace.export-center" ||to.name === "workspace.anomaly-center" ||diff --git a/frontend/src/views/ChangelistDashboard.vue b/frontend/src/views/ChangelistDashboard.vuedeleted file mode 100644index 5696fce5b2..0000000000--- a/frontend/src/views/ChangelistDashboard.vue+++ /dev/null@@ -1,8 +0,0 @@-<template>- <div class="px-4">- <ChangelistDashboard />- </div>-</template>-<script setup lang="ts">-import ChangelistDashboard from "@/components/Changelist/ChangelistDashboard";-</script>diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vueindex 1acf9ef812..7021d606e7 100644--- a/frontend/src/views/DashboardSidebar.vue+++ b/frontend/src/views/DashboardSidebar.vue@@ -46,15 +46,6 @@<img src="../assets/slow-query.svg" class="w-5 h-auto mr-2" />{{ $t("slow-query.slow-queries") }}</router-link>- <router-link- to="/changelists"- class="outline-item group flex items-center px-2 py-1.5 capitalize"- >- <div class="flex items-center justify-center w-5 h-5 mr-2">- <PencilRuler :size="16" />- </div>- {{ $t("changelist.change-center") }}- </router-link><router-linkto="/export-center"class="outline-item group flex items-center px-2 py-1.5 capitalize"@@ -84,7 +75,6 @@<script lang="ts" setup>import { useKBarHandler } from "@bytebase/vue-kbar";-import { PencilRuler } from "lucide-vue-next";import { computed } from "vue";import BookmarkListSidePanel from "@/components/BookmarkListSidePanel.vue";import BytebaseLogo from "@/components/BytebaseLogo.vue";