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: support changelist in project detail page (#8905)
ecmadao2927821802d6
diff --git a/frontend/src/components/Breadcrumb.vue b/frontend/src/components/Breadcrumb.vueindex c175ad6465..fedffe9dd2 100644--- a/frontend/src/components/Breadcrumb.vue+++ b/frontend/src/components/Breadcrumb.vue@@ -244,8 +244,8 @@ export default defineComponent({});}if (route.name === "workspace.changelist.detail") {- const project = useProjectV1Store().getProjectByName(- `projects/${route.params.projectName}`+ const project = useProjectV1Store().getProjectByUID(+ String(idFromSlug(route.params.projectSlug as string)));list.push({name: project.title,@@ -253,7 +253,7 @@ export default defineComponent({});list.push({name: t("changelist.self"),- path: `/changelists?project=${project.name}`,+ path: `/project/${projectSlug}#changelists`,});}if (route.name === "workspace.branch.detail") {diff --git a/frontend/src/views/Changelist/ChangelistDashboard/ChangelistDashboard.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vuesimilarity index 83%rename from frontend/src/views/Changelist/ChangelistDashboard/ChangelistDashboard.vuerename to frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vueindex 449ebb5aac..28d3ecea69 100644--- a/frontend/src/views/Changelist/ChangelistDashboard/ChangelistDashboard.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue@@ -1,6 +1,6 @@<template>- <div class="flex flex-col gap-y-2 px-4">- <NavBar />+ <div class="flex flex-col gap-y-2">+ <NavBar :disable-project-select="!!project" /><ChangelistTable:changelists="filteredChangelists"@@ -8,7 +8,10 @@:keyword="filter.keyword"/>- <CreateChangelistPanel />+ <CreateChangelistPanel+ :project-uid="project?.uid"+ :disable-project-select="!!project"+ /></div></template>@@ -20,6 +23,7 @@ import {useCurrentUserV1,useProjectV1Store,} from "@/store";+import { ComposedProject } from "@/types";import { Changelist } from "@/types/proto/v1/changelist_service";import { extractProjectResourceName, isMemberOfProjectV1 } from "@/utils";import ChangelistTable from "./ChangelistTable.vue";@@ -27,8 +31,14 @@ import CreateChangelistPanel from "./CreateChangelistPanel.vue";import NavBar from "./NavBar.vue";import { provideChangelistDashboardContext } from "./context";+const props = defineProps<{+ project?: ComposedProject;+}>();+const me = useCurrentUserV1();-const { filter, events } = provideChangelistDashboardContext();+const { filter, events } = provideChangelistDashboardContext(+ props.project?.name+);const isFetching = ref(false);const changelists = ref<Changelist[]>([]);diff --git a/frontend/src/views/Changelist/ChangelistDashboard/ChangelistTable.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vuesimilarity index 93%rename from frontend/src/views/Changelist/ChangelistDashboard/ChangelistTable.vuerename to frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vueindex 3e2311c99c..e998ed0ed9 100644--- a/frontend/src/views/Changelist/ChangelistDashboard/ChangelistTable.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistTable.vue@@ -45,6 +45,8 @@ import {extractProjectResourceName,extractUserResourceName,getHighlightHTMLByRegExp,+ projectV1Slug,+ extractChangelistResourceName,} from "@/utils";const props = defineProps<{@@ -81,8 +83,11 @@ const handleClickRow = (row: number,e: MouseEvent) => {+ const project = projectForChangelist(item);const url = router.resolve({- path: `/${item.name}`,+ path: `/project/${projectV1Slug(+ project+ )}/changelists/${extractChangelistResourceName(item.name)}`,}).fullPath;if (e.ctrlKey || e.metaKey) {window.open(url, "_blank");diff --git a/frontend/src/views/Changelist/ChangelistDashboard/CreateChangelistPanel.vue b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vuesimilarity index 96%rename from frontend/src/views/Changelist/ChangelistDashboard/CreateChangelistPanel.vuerename to frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vueindex 68074f8333..f17fecbe9d 100644--- a/frontend/src/views/Changelist/ChangelistDashboard/CreateChangelistPanel.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue@@ -15,6 +15,7 @@<ProjectSelectv-model:project="projectUID":include-all="false"+ :disabled="disableProjectSelect"style="width: 14rem"/></div>@@ -103,12 +104,17 @@ import { Changelist } from "@/types/proto/v1/changelist_service";import { getErrorCode } from "@/utils/grpcweb";import { useChangelistDashboardContext } from "./context";+const props = defineProps<{+ projectUid?: string;+ disableProjectSelect?: boolean;+}>();+const router = useRouter();const { t } = useI18n();const { showCreatePanel, events } = useChangelistDashboardContext();const title = ref("");-const projectUID = ref<string>();+const projectUID = ref<string | undefined>(props.projectUid);const isLoading = ref(false);const resourceId = ref("");const resourceIdField = ref<InstanceType<typeof ResourceIdField>>();diff --git a/frontend/src/views/Changelist/ChangelistDashboard/NavBar.vue b/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vuesimilarity index 91%rename from frontend/src/views/Changelist/ChangelistDashboard/NavBar.vuerename to frontend/src/components/Changelist/ChangelistDashboard/NavBar.vueindex fd03794c0f..70e9e20760 100644--- a/frontend/src/views/Changelist/ChangelistDashboard/NavBar.vue+++ b/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue@@ -1,7 +1,11 @@<template><div class="flex flex-row items-center justify-between py-0.5"><div class="flex items-center justify-start">- <ProjectSelect v-model:project="projectUID" :include-all="true" />+ <ProjectSelect+ v-if="!disableProjectSelect"+ v-model:project="projectUID"+ :include-all="true"+ /></div><div class="flex items-center justify-end gap-x-2"><SearchBoxdiff --git a/frontend/src/views/Changelist/ChangelistDashboard/context.ts b/frontend/src/components/Changelist/ChangelistDashboard/context.tssimilarity index 94%rename from frontend/src/views/Changelist/ChangelistDashboard/context.tsrename to frontend/src/components/Changelist/ChangelistDashboard/context.tsindex 6eaac36940..513902f427 100644--- a/frontend/src/views/Changelist/ChangelistDashboard/context.ts+++ b/frontend/src/components/Changelist/ChangelistDashboard/context.ts@@ -25,13 +25,15 @@ export const useChangelistDashboardContext = () => {return inject(KEY)!;};-export const provideChangelistDashboardContext = () => {+export const provideChangelistDashboardContext = (+ project: string = "projects/-"+) => {const route = useRoute();const router = useRouter();const context: ChangelistDashboardContext = {filter: ref({- project: "projects/-",+ project,keyword: "",}),showCreatePanel: ref(false),diff --git a/frontend/src/views/Changelist/ChangelistDashboard/index.ts b/frontend/src/components/Changelist/ChangelistDashboard/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDashboard/index.tsrename to frontend/src/components/Changelist/ChangelistDashboard/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/context.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/context.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryChangeItem.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/IssueUID.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/SQL.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/Tables.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vuerename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/form/utils.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/AddChangePanel/utils.tsrename to frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vuerename to frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vuerename to frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vuerename to frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/BranchDetailPanel/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/ChangeHistoryDetailPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/ChangeHistoryDetailPanel.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/ChangeHistoryDetailPanel.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/ChangeHistoryDetailPanel.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/ChangeHistoryDetailPanel/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/SQL.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/SQL.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/Source.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/Source.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangeTable/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangeTable/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/ChangeTable/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/ChangelistDetail.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/ChangelistDetail.vuerename to frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/DeleteChangelistButton.vue b/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/DeleteChangelistButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/AddChangeButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/AddChangeButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/AddChangeButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/AddChangeButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/ExportButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ExportButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/ExportButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/ExportButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/NavBar.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/NavBar.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/NavBar.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/NavBar.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/ReorderButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ReorderButton.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/ReorderButton.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/ReorderButton.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/TitleEditor.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/TitleEditor.vuerename to frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/export.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/export.tsrename to frontend/src/components/Changelist/ChangelistDetail/NavBar/export.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/index.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/NavBar/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/NavBar/reorder.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/reorder.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/NavBar/reorder.tsrename to frontend/src/components/Changelist/ChangelistDetail/NavBar/reorder.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vue b/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vuerename to frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/RawSQLEditor/index.ts b/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/RawSQLEditor/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vuesimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vuerename to frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vuediff --git a/frontend/src/views/Changelist/ChangelistDetail/RawSQLPanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/RawSQLPanel/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/index.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/common.ts b/frontend/src/components/Changelist/ChangelistDetail/common.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/common.tsrename to frontend/src/components/Changelist/ChangelistDetail/common.tsdiff --git a/frontend/src/views/Changelist/ChangelistDetail/context.ts b/frontend/src/components/Changelist/ChangelistDetail/context.tssimilarity index 90%rename from frontend/src/views/Changelist/ChangelistDetail/context.tsrename to frontend/src/components/Changelist/ChangelistDetail/context.tsindex 1ca2e92acd..c2361acda8 100644--- a/frontend/src/views/Changelist/ChangelistDetail/context.ts+++ b/frontend/src/components/Changelist/ChangelistDetail/context.ts@@ -12,6 +12,7 @@ import {Changelist_Change as Change,} from "@/types/proto/v1/changelist_service";import {+ idFromSlug,extractUserResourceName,hasWorkspacePermissionV1,isOwnerOfProjectV1,@@ -46,8 +47,17 @@ export const useChangelistDetailContext = () => {export const provideChangelistDetailContext = () => {const me = useCurrentUserV1();const route = useRoute();+ const projectV1Store = useProjectV1Store();++ const project = computed(() => {+ const proj = projectV1Store.getProjectByUID(+ String(idFromSlug(route.params.projectSlug as string))+ );+ return proj;+ });+const name = computed(() => {- return `projects/${route.params.projectName}/changelists/${route.params.changelistName}`;+ return `${project.value.name}/changelists/${route.params.changelistName}`;});const changelist = computed(() => {return (@@ -55,11 +65,7 @@ export const provideChangelistDetailContext = () => {unknownChangelist());});- const project = computed(() => {- return useProjectV1Store().getProjectByName(- `projects/${route.params.projectName}`- );- });+const allowEdit = computed(() => {if (hasWorkspacePermissionV1(diff --git a/frontend/src/views/Changelist/ChangelistDetail/index.ts b/frontend/src/components/Changelist/ChangelistDetail/index.tssimilarity index 100%rename from frontend/src/views/Changelist/ChangelistDetail/index.tsrename to frontend/src/components/Changelist/ChangelistDetail/index.tsdiff --git a/frontend/src/components/Project/ProjectSidebar.vue b/frontend/src/components/Project/ProjectSidebar.vueindex 41ac502d07..064bd002d4 100644--- a/frontend/src/components/Project/ProjectSidebar.vue+++ b/frontend/src/components/Project/ProjectSidebar.vue@@ -37,6 +37,7 @@ import {Link,Settings,RefreshCcw,+ PencilRuler,} from "lucide-vue-next";import { computed, VNode, h, reactive, watch, nextTick } from "vue";import { useI18n } from "vue-i18n";@@ -138,8 +139,16 @@ const projectSidebarItemList = computed((): ProjectSidebarItem[] => {project.value.name),},- // TODO: Changelists- // TODO: Sync schema+ {+ title: t("changelist.changelists"),+ hash: "changelists",+ icon: h(PencilRuler),+ hide:+ isDefaultProject.value ||+ !currentUserIamPolicy.allowToChangeDatabaseOfProject(+ project.value.name+ ),+ },{title: t("database.sync-schema.title"),hash: "sync-schema",diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 402943921d..873b3474b3 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -7,6 +7,7 @@ import {RouteLocationNormalized,RouteRecordRaw,} from "vue-router";+import ProjectSidebar from "@/components/Project/ProjectSidebar.vue";import BodyLayout from "@/layouts/BodyLayout.vue";import DashboardLayout from "@/layouts/DashboardLayout.vue";import DatabaseLayout from "@/layouts/DatabaseLayout.vue";@@ -247,7 +248,7 @@ const routes: Array<RouteRecordRaw> = [name: "workspace.changelist.dashboard",meta: { title: () => t("changelist.changelists") },components: {- content: () => import("../views/Changelist/ChangelistDashboard/"),+ content: () => import("../views/ChangelistDashboard.vue"),leftSidebar: DashboardSidebar,},props: {@@ -256,15 +257,16 @@ const routes: Array<RouteRecordRaw> = [},},{- path: "/projects/:projectName/changelists/:changelistName",+ path: "/project/:projectSlug/changelists/:changelistName",name: "workspace.changelist.detail",meta: {allowBookmark: true,overrideTitle: true,},components: {- content: () => import("../views/Changelist/ChangelistDetail/"),- leftSidebar: DashboardSidebar,+ content: () =>+ import("../components/Changelist/ChangelistDetail/"),+ leftSidebar: ProjectSidebar,},props: {content: true,@@ -703,8 +705,7 @@ const routes: Array<RouteRecordRaw> = [path: "project/:projectSlug",components: {content: () => import("../layouts/ProjectLayout.vue"),- leftSidebar: () =>- import("../components/Project/ProjectSidebar.vue"),+ leftSidebar: ProjectSidebar,},meta: {quickActionListByRole: (route) => {@@ -1402,9 +1403,7 @@ router.beforeEach((to, from, next) => {projectV1Store.fetchProjectByUID(String(idFromSlug(projectSlug))).then((project) => {- if (!projectWebhookSlug) {- next();- } else {+ if (projectWebhookSlug) {const webhook =projectWebhookV1Store.getProjectWebhookFromProjectById(project,@@ -1419,6 +1418,30 @@ router.beforeEach((to, from, next) => {});throw new Error("not found");}+ } else if (to.name === "workspace.changelist.detail") {+ const name = `${project.name}/changelists/${to.params.changelistName}`;+ useChangelistStore()+ .fetchChangelistByName(name)+ .then((changelist) => {+ if (changelist) {+ next();+ } else {+ next({+ name: "error.404",+ replace: false,+ });+ return;+ }+ })+ .catch((error) => {+ next({+ name: "error.404",+ replace: false,+ });+ throw error;+ });+ } else {+ next();}}).catch((error) => {@@ -1602,31 +1625,6 @@ router.beforeEach((to, from, next) => {return;}- if (to.name === "workspace.changelist.detail") {- const name = `projects/${to.params.projectName}/changelists/${to.params.changelistName}`;- useChangelistStore()- .fetchChangelistByName(name)- .then((changelist) => {- if (changelist) {- next();- } else {- next({- name: "error.404",- replace: false,- });- return;- }- })- .catch((error) => {- next({- name: "error.404",- replace: false,- });- throw error;- });- return;- }-next({name: "error.404",replace: false,diff --git a/frontend/src/views/ChangelistDashboard.vue b/frontend/src/views/ChangelistDashboard.vuenew file mode 100644index 0000000000..5696fce5b2--- /dev/null+++ b/frontend/src/views/ChangelistDashboard.vue@@ -0,0 +1,8 @@+<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/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vueindex 7f3eac7e73..6f6a406169 100644--- a/frontend/src/views/ProjectDetail.vue+++ b/frontend/src/views/ProjectDetail.vue@@ -17,6 +17,9 @@:database-list="databaseV1List"/></template>+ <template v-if="hash === 'changelists'">+ <ChangelistDashboard :project="project" />+ </template><template v-if="hash === 'sync-schema'"><SyncDatabaseSchema :project="project" /></template>@@ -68,6 +71,7 @@ import {useProjectV1Store,} from "@/store";import { DEFAULT_PROJECT_V1_NAME } from "@/types";+import ChangelistDashboard from "../components/Changelist/ChangelistDashboard";import ProjectIssuesPanel from "../components/Project/ProjectIssuesPanel.vue";import ProjectActivityPanel from "../components/ProjectActivityPanel.vue";import ProjectChangeHistoryPanel from "../components/ProjectChangeHistoryPanel.vue";