Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: feature switch for database ci/cd (#16805)

boojack0e37b88c7c39
diff --git a/frontend/src/components/IssueV1/IssueDetailPage.vue b/frontend/src/components/IssueV1/IssueDetailPage.vue
index 4eb86226ab..3e7046491b 100644
--- a/frontend/src/components/IssueV1/IssueDetailPage.vue
+++ b/frontend/src/components/IssueV1/IssueDetailPage.vue
@@ -1,76 +1,95 @@
<template>
<div ref="containerRef" class="h-full flex flex-col">
- <div class="border-b">
- <BannerSection v-if="!isCreating" />
- <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
-
- <HeaderSection />
+ <div v-if="isLoading" class="flex items-center justify-center h-full">
+ <BBSpin />
</div>
- <div class="flex-1 flex flex-row">
- <div
- class="flex-1 flex flex-col hide-scrollbar divide-y overflow-x-hidden"
- >
- <StageSection />
+ <template v-else>
+ <div class="border-b">
+ <BannerSection v-if="!isCreating" />
+ <FeatureAttention :feature="PlanFeature.FEATURE_APPROVAL_WORKFLOW" />
- <TaskListSection />
+ <HeaderSection />
+ </div>
+ <div class="flex-1 flex flex-row">
+ <div
+ class="flex-1 flex flex-col hide-scrollbar divide-y overflow-x-hidden"
+ >
+ <StageSection />
- <TaskRunSection v-if="!isCreating" />
+ <TaskListSection />
- <SQLCheckSection v-if="isCreating" />
- <PlanCheckSection v-if="!isCreating" />
+ <TaskRunSection v-if="!isCreating" />
- <StatementSection />
+ <SQLCheckSection v-if="isCreating" />
+ <PlanCheckSection v-if="!isCreating" />
- <DescriptionSection />
+ <StatementSection />
- <IssueCommentSection v-if="!isCreating" />
- </div>
+ <DescriptionSection />
- <div
- v-if="sidebarMode == 'DESKTOP'"
- class="hide-scrollbar border-l"
- :style="{
- width: `${desktopSidebarWidth}px`,
- }"
- >
- <Sidebar />
- </div>
- </div>
- </div>
+ <IssueCommentSection v-if="!isCreating" />
+ </div>
- <template v-if="sidebarMode === 'MOBILE'">
- <!-- mobile sidebar -->
- <Drawer :show="mobileSidebarOpen" @close="mobileSidebarOpen = false">
- <div
- style="min-width: 240px; width: 80vw; max-width: 320px; padding: 0.5rem"
- >
- <Sidebar v-if="sidebarMode === 'MOBILE'" />
+ <div
+ v-if="sidebarMode == 'DESKTOP'"
+ class="hide-scrollbar border-l"
+ :style="{
+ width: `${desktopSidebarWidth}px`,
+ }"
+ >
+ <Sidebar />
+ </div>
</div>
- </Drawer>
- </template>
-
- <IssueReviewActionPanel
- :action="ongoingIssueReviewAction?.action"
- @close="ongoingIssueReviewAction = undefined"
- />
- <IssueStatusActionPanel
- :action="ongoingIssueStatusAction?.action"
- @close="ongoingIssueStatusAction = undefined"
- />
- <TaskRolloutActionPanel
- :action="ongoingTaskRolloutAction?.action"
- :task-list="ongoingTaskRolloutAction?.taskList ?? []"
- @close="ongoingTaskRolloutAction = undefined"
- />
+
+ <template v-if="sidebarMode === 'MOBILE'">
+ <!-- mobile sidebar -->
+ <Drawer :show="mobileSidebarOpen" @close="mobileSidebarOpen = false">
+ <div
+ style="
+ min-width: 240px;
+ width: 80vw;
+ max-width: 320px;
+ padding: 0.5rem;
+ "
+ >
+ <Sidebar v-if="sidebarMode === 'MOBILE'" />
+ </div>
+ </Drawer>
+ </template>
+
+ <IssueReviewActionPanel
+ :action="ongoingIssueReviewAction?.action"
+ @close="ongoingIssueReviewAction = undefined"
+ />
+ <IssueStatusActionPanel
+ :action="ongoingIssueStatusAction?.action"
+ @close="ongoingIssueStatusAction = undefined"
+ />
+ <TaskRolloutActionPanel
+ :action="ongoingTaskRolloutAction?.action"
+ :task-list="ongoingTaskRolloutAction?.taskList ?? []"
+ @close="ongoingTaskRolloutAction = undefined"
+ />
+ </template>
+ </div>
</template>
<script setup lang="ts">
-import { computed, ref } from "vue";
+import { computed, onMounted, ref } from "vue";
+import { useRoute, useRouter } from "vue-router";
+import { BBSpin } from "@/bbkit";
import { FeatureAttention } from "@/components/FeatureGuard";
+import { useIssueLayoutVersion } from "@/composables/useIssueLayoutVersion";
+import {
+ PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,
+ PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,
+} from "@/router/dashboard/projectV1";
import { useCurrentProjectV1 } from "@/store";
+import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";
import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";
import { type Task } from "@/types/proto-es/v1/rollout_service_pb";
import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
+import { extractIssueUID, extractProjectResourceName } from "@/utils";
import { SQLCheckSection } from "../Plan/components";
import { providePlanSQLCheckContext } from "../Plan/components/SQLCheckSection";
import { provideSidebarContext } from "../Plan/logic";
@@ -97,9 +116,13 @@ import type {
} from "./logic";
import { specForTask, useIssueContext, usePollIssue } from "./logic";
-const containerRef = ref<HTMLElement>();
+const router = useRouter();
+const route = useRoute();
+const { enabledNewLayout } = useIssueLayoutVersion();
const { isCreating, issue, selectedTask, events } = useIssueContext();
const { project } = useCurrentProjectV1();
+const containerRef = ref<HTMLElement>();
+const isLoading = ref(true);
const ongoingIssueReviewAction = ref<{
action: IssueReviewAction;
@@ -151,4 +174,37 @@ const {
desktopSidebarWidth,
mobileSidebarOpen,
} = provideSidebarContext(containerRef);
+
+onMounted(() => {
+ if (
+ enabledNewLayout.value &&
+ issue.value.type === Issue_Type.DATABASE_CHANGE &&
+ issue.value.planEntity?.specs.every(
+ (spec) => spec.config.case === "changeDatabaseConfig"
+ )
+ ) {
+ if (isCreating.value) {
+ // Redirect to plans creation page with original query parameters
+ router.replace({
+ name: PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,
+ params: {
+ projectId: extractProjectResourceName(project.value.name),
+ planId: "create",
+ },
+ query: route.query,
+ });
+ } else {
+ router.replace({
+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,
+ params: {
+ projectId: extractProjectResourceName(project.value.name),
+ issueId: extractIssueUID(issue.value.name),
+ },
+ query: route.query,
+ });
+ }
+ } else {
+ isLoading.value = false;
+ }
+});
</script>
diff --git a/frontend/src/components/Plan/components/Overview.vue b/frontend/src/components/Plan/components/Overview.vue
index fa49984090..8b54d7861e 100644
--- a/frontend/src/components/Plan/components/Overview.vue
+++ b/frontend/src/components/Plan/components/Overview.vue
@@ -45,7 +45,7 @@
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-control-light">
- {{ $t("plan.overview.check-status") }}
+ {{ $t("plan.navigator.checks") }}
</p>
<div class="flex items-center gap-3 mt-1">
<div
diff --git a/frontend/src/components/Plan/components/StatementSection/StatementSection.vue b/frontend/src/components/Plan/components/StatementSection/StatementSection.vue
index fac79a86b7..cc482d78fb 100644
--- a/frontend/src/components/Plan/components/StatementSection/StatementSection.vue
+++ b/frontend/src/components/Plan/components/StatementSection/StatementSection.vue
@@ -1,5 +1,5 @@
<template>
- <div v-if="viewMode !== 'NONE'" class="px-4 flex flex-col gap-y-2">
+ <div v-show="viewMode !== 'NONE'" class="px-4 flex flex-col gap-y-2">
<EditorView v-if="viewMode === 'EDITOR'" :key="selectedSpec.id" />
<ReleaseView v-else-if="viewMode === 'RELEASE'" />
</div>
diff --git a/frontend/src/components/ProfileDropdown.vue b/frontend/src/components/ProfileDropdown.vue
index 9e64a98142..775d5e9e8a 100644
--- a/frontend/src/components/ProfileDropdown.vue
+++ b/frontend/src/components/ProfileDropdown.vue
@@ -13,12 +13,14 @@
</NDropdown>
</template>
-<script lang="ts" setup>
+<script lang="tsx" setup>
import type { DropdownOption } from "naive-ui";
import { NSwitch, NDropdown } from "naive-ui";
import { storeToRefs } from "pinia";
-import { computed, ref, h } from "vue";
+import { twMerge } from "tailwind-merge";
+import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
+import { useIssueLayoutVersion } from "@/composables/useIssueLayoutVersion";
import { useLanguage } from "@/composables/useLanguage";
import {
useActuatorV1Store,
@@ -101,6 +103,8 @@ const switchDebug = () => {
});
};
+const { enabledNewLayout, toggleLayout } = useIssueLayoutVersion();
+
const toggleLocale = (lang: string) => {
setLocale(lang);
showDropdown.value = false;
@@ -147,21 +151,21 @@ const languageOptions = computed((): DropdownOption[] => {
key: item.value,
type: "render",
render() {
- return h(
- "div",
- {
- key: item.value,
- class: classes.join(" "),
- onClick: () => toggleLocale(item.value),
- },
- h("div", { class: "radio cursor-pointer text-sm" }, [
- h("input", {
- type: "radio",
- class: "btn",
- checked: locale.value === item.value,
- }),
- h("label", { class: "ml-2 cursor-pointer" }, item.label),
- ])
+ return (
+ <div
+ key={item.value}
+ class={twMerge(classes)}
+ onClick={() => toggleLocale(item.value)}
+ >
+ <div class="radio cursor-pointer text-sm">
+ <input
+ type="radio"
+ class="btn"
+ checked={locale.value === item.value}
+ />
+ <label class="ml-2 cursor-pointer">{item.label}</label>
+ </div>
+ </div>
);
},
};
@@ -197,21 +201,21 @@ const licenseOptions = computed((): DropdownOption[] => {
key: item.plan,
type: "render",
render() {
- return h(
- "div",
- {
- key: item.value,
- class: classes.join(" "),
- onClick: () => switchPlan(item.value),
- },
- h("div", { class: "radio cursor-pointer text-sm" }, [
- h("input", {
- type: "radio",
- class: "btn",
- checked: currentPlan.value === item.plan,
- }),
- h("label", { class: "ml-2 cursor-pointer" }, item.label),
- ])
+ return (
+ <div
+ key={item.value}
+ class={classes.join(" ")}
+ onClick={() => switchPlan(item.value)}
+ >
+ <div class="radio cursor-pointer text-sm">
+ <input
+ type="radio"
+ class="btn"
+ checked={currentPlan.value === item.plan}
+ />
+ <label class="ml-2 cursor-pointer">{item.label}</label>
+ </div>
+ </div>
);
},
};
@@ -223,10 +227,7 @@ const options = computed((): DropdownOption[] => [
key: "profile",
type: "render",
render() {
- return h(ProfilePreview, {
- link: props.link,
- onClick: () => (showDropdown.value = false),
- });
+ return <ProfilePreview link={props.link} />;
},
},
{
@@ -237,21 +238,14 @@ const options = computed((): DropdownOption[] => [
key: "language",
type: "render",
render() {
- return h(
- NDropdown,
- {
- key: "switch-language",
- options: languageOptions.value,
- placement: "left-start",
- },
- () =>
- h(
- "div",
- {
- class: "menu-item",
- },
- t("common.language")
- )
+ return (
+ <NDropdown
+ key="switch-language"
+ options={languageOptions.value}
+ placement="left-start"
+ >
+ <div class="menu-item">{t("common.language")}</div>
+ </NDropdown>
);
},
},
@@ -260,21 +254,14 @@ const options = computed((): DropdownOption[] => [
type: "render",
show: isDev(),
render() {
- return h(
- NDropdown,
- {
- key: "switch-license",
- options: licenseOptions.value,
- placement: "left-start",
- },
- () =>
- h(
- "div",
- {
- class: "menu-item",
- },
- t("common.license")
- )
+ return (
+ <NDropdown
+ key="switch-license"
+ options={licenseOptions.value}
+ placement="left-start"
+ >
+ <div class="menu-item">{t("common.license")}</div>
+ </NDropdown>
);
},
},
@@ -283,13 +270,10 @@ const options = computed((): DropdownOption[] => [
type: "render",
show: !hideQuickstart.value,
render() {
- return h(
- "div",
- {
- class: "menu-item",
- onClick: resetQuickstart,
- },
- t("quick-start.self")
+ return (
+ <div class="menu-item" onClick={resetQuickstart}>
+ {t("quick-start.self")}
+ </div>
);
},
},
@@ -298,14 +282,14 @@ const options = computed((): DropdownOption[] => [
type: "render",
show: !hideHelp.value,
render() {
- return h(
- "a",
- {
- class: "menu-item",
- target: "_blank",
- href: "https://docs.bytebase.com/introduction/what-is-bytebase/?source=console",
- },
- t("common.help")
+ return (
+ <a
+ class="menu-item"
+ target="_blank"
+ href="https://docs.bytebase.com/introduction/what-is-bytebase/?source=console"
+ >
+ {t("common.help")}
+ </a>
);
},
},
@@ -317,7 +301,7 @@ const options = computed((): DropdownOption[] => [
key: "version",
type: "render",
render() {
- return h(Version, { tooltipProps: { placement: "left" } });
+ return <Version tooltipProps={{ placement: "left" }} />;
},
},
{
@@ -325,46 +309,50 @@ const options = computed((): DropdownOption[] => [
type: "render",
show: allowToggleDebug.value,
render() {
- return h(
- "div",
- {
- class: "menu-item",
- },
- [
- h(
- "div",
- {
- class: "flex flex-row items-center space-x-2 justify-between",
- },
- [
- h("span", {}, "Debug"),
- h(NSwitch, {
- size: "small",
- value: isDebug.value,
- "onUpdate:value": switchDebug,
- }),
- ]
- ),
- ]
+ return (
+ <div class="menu-item">
+ <div class="flex flex-row items-center space-x-2 justify-between">
+ <span>Debug</span>
+ <NSwitch
+ size="small"
+ value={isDebug.value}
+ onUpdate:value={switchDebug}
+ />
+ </div>
+ </div>
+ );
+ },
+ },
+ {
+ key: "enable-new-layout",
+ type: "render",
+ render() {
+ return (
+ <div class="menu-item">
+ <div class="flex flex-row items-center gap-2 justify-between">
+ <span>{t("issue.new-layout")}</span>
+ <NSwitch
+ size="small"
+ value={enabledNewLayout.value}
+ onUpdate:value={toggleLayout}
+ />
+ </div>
+ </div>
);
},
},
{
key: "header-divider",
type: "divider",
- show: allowToggleDebug.value,
},
{
key: "logout",
type: "render",
render() {
- return h(
- "div",
- {
- class: "menu-item",
- onClick: logout,
- },
- t("common.logout")
+ return (
+ <div class="menu-item" onClick={logout}>
+ {t("common.logout")}
+ </div>
);
},
},
diff --git a/frontend/src/components/Project/useProjectSidebar.ts b/frontend/src/components/Project/useProjectSidebar.ts
index ba456ba01b..6867af1e24 100644
--- a/frontend/src/components/Project/useProjectSidebar.ts
+++ b/frontend/src/components/Project/useProjectSidebar.ts
@@ -8,12 +8,13 @@ import {
PackageIcon,
LayoutList,
PlayCircle,
+ Workflow,
} from "lucide-vue-next";
import { computed, h, unref } from "vue";
-import type { RouteLocationNormalizedLoaded } from "vue-router";
import { useRoute } from "vue-router";
import type { SidebarItem } from "@/components/v2/Sidebar/type";
import { getFlattenRoutes } from "@/components/v2/Sidebar/utils.ts";
+import { useIssueLayoutVersion } from "@/composables/useIssueLayoutVersion";
import { t } from "@/plugins/i18n";
import projectV1Routes, {
PROJECT_V1_ROUTE_DATABASES,
@@ -44,11 +45,9 @@ interface ProjectSidebarItem extends SidebarItem {
children?: ProjectSidebarItem[];
}
-export const useProjectSidebar = (
- project: MaybeRef<ComposedProject>,
- _route?: RouteLocationNormalizedLoaded
-) => {
- const route = _route ?? useRoute();
+export const useProjectSidebar = (project: MaybeRef<ComposedProject>) => {
+ const route = useRoute();
+ const { enabledNewLayout } = useIssueLayoutVersion();
const databaseChangeMode = useAppFeature("bb.feature.database-change-mode");
const isDefaultProject = computed((): boolean => {
@@ -78,14 +77,75 @@ export const useProjectSidebar = (
};
const projectSidebarItemList = computed((): ProjectSidebarItem[] => {
- const sidebarList: ProjectSidebarItem[] = [
- {
- title: t("common.issues"),
- path: PROJECT_V1_ROUTE_ISSUES,
- icon: () => h(CircleDot),
- type: "div",
- hide: isDefaultProject.value,
- },
+ const cicdRoutes: ProjectSidebarItem[] = enabledNewLayout.value
+ ? [
+ {
+ title: "CI/CD",
+ icon: () => h(Workflow),
+ type: "div",
+ expand: true,
+ hide:
+ isDefaultProject.value ||
+ databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ children: [
+ {
+ title: t("release.releases"),
+ path: PROJECT_V1_ROUTE_RELEASES,
+ type: "div",
+ },
+ {
+ title: t("plan.plans"),
+ path: PROJECT_V1_ROUTE_PLANS,
+ type: "div",
+ },
+ {
+ title: t("rollout.rollouts"),
+ path: PROJECT_V1_ROUTE_ROLLOUTS,
+ type: "div",
+ },
+ ],
+ },
+ ]
+ : [
+ {
+ title: t("changelist.changelists"),
+ path: PROJECT_V1_ROUTE_CHANGELISTS,
+ icon: () => h(PencilRuler),
+ type: "div",
+ hide:
+ isDefaultProject.value ||
+ databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ },
+ {
+ title: t("release.releases"),
+ path: PROJECT_V1_ROUTE_RELEASES,
+ icon: () => h(PackageIcon),
+ type: "div",
+ hide:
+ isDefaultProject.value ||
+ databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ },
+ {
+ title: t("plan.plans"),
+ icon: () => h(LayoutList),
+ path: PROJECT_V1_ROUTE_PLANS,
+ type: "div",
+ hide:
+ isDefaultProject.value ||
+ databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ },
+ {
+ title: t("rollout.rollouts"),
+ path: PROJECT_V1_ROUTE_ROLLOUTS,
+ icon: () => h(PlayCircle),
+ type: "div",
+ hide:
+ isDefaultProject.value ||
+ databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ },
+ ];
+
+ const databaseRoutes: ProjectSidebarItem[] = [
{
title: t("common.database"),
icon: () => h(Database),
@@ -111,42 +171,19 @@ export const useProjectSidebar = (
},
],
},
+ ];
+
+ const sidebarList: ProjectSidebarItem[] = [
{
- title: t("changelist.changelists"),
- path: PROJECT_V1_ROUTE_CHANGELISTS,
- icon: () => h(PencilRuler),
- type: "div",
- hide:
- isDefaultProject.value ||
- databaseChangeMode.value === DatabaseChangeMode.EDITOR,
- },
- {
- title: t("release.releases"),
- path: PROJECT_V1_ROUTE_RELEASES,
- icon: () => h(PackageIcon),
- type: "div",
- hide:
- isDefaultProject.value ||
- databaseChangeMode.value === DatabaseChangeMode.EDITOR,
- },
- {
- title: t("plan.plans"),
- icon: () => h(LayoutList),
- path: PROJECT_V1_ROUTE_PLANS,
- type: "div",
- hide:
- isDefaultProject.value ||
- databaseChangeMode.value === DatabaseChangeMode.EDITOR,
- },
- {
- title: t("rollout.rollouts"),
- path: PROJECT_V1_ROUTE_ROLLOUTS,
- icon: () => h(PlayCircle),
+ title: t("common.issues"),
+ path: PROJECT_V1_ROUTE_ISSUES,
+ icon: () => h(CircleDot),
type: "div",
- hide:
- isDefaultProject.value ||
- databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ hide: isDefaultProject.value,
},
+ ...(enabledNewLayout.value
+ ? [...cicdRoutes, ...databaseRoutes]
+ : [...databaseRoutes, ...cicdRoutes]),
{
title: t("export-center.self"),
icon: () => h(DownloadIcon),
diff --git a/frontend/src/components/Rollout/RolloutDataTable.vue b/frontend/src/components/Rollout/RolloutDataTable.vue
index d3b700acf2..9b41e831c1 100644
--- a/frontend/src/components/Rollout/RolloutDataTable.vue
+++ b/frontend/src/components/Rollout/RolloutDataTable.vue
@@ -98,7 +98,7 @@ const columnList = computed(
},
},
{
- key: "taskStatus",
+ key: "tasks",
title: t("common.tasks"),
render: (rollout) => {
return (
diff --git a/frontend/src/composables/useIssueLayoutVersion.ts b/frontend/src/composables/useIssueLayoutVersion.ts
new file mode 100644
index 0000000000..1a22391708
--- /dev/null
+++ b/frontend/src/composables/useIssueLayoutVersion.ts
@@ -0,0 +1,39 @@
+import { useLocalStorage } from "@vueuse/core";
+
+const STORAGE_KEY = "bb.issue.layout";
+
+// When releasing a new version as default, increment this number.
+// This helps to reset user preferences to the new default layout.
+const CURRENT_DEFAULT_VERSION = 1;
+
+export function useIssueLayoutVersion() {
+ // Store whether user prefers the new layout (true) or old layout (false)
+ const enabled = useLocalStorage<boolean>(STORAGE_KEY, true);
+
+ // Store the version number when user last made a choice
+ const lastVersion = useLocalStorage<number>(
+ `${STORAGE_KEY}.version`,
+ CURRENT_DEFAULT_VERSION
+ );
+
+ // If a new version is released and user hasn't made a choice for it,
+ // reset to the new default (true)
+ if (lastVersion.value < CURRENT_DEFAULT_VERSION) {
+ enabled.value = true;
+ lastVersion.value = CURRENT_DEFAULT_VERSION;
+ }
+
+ // Toggle between layouts
+ const toggleLayout = () => {
+ enabled.value = !enabled.value;
+ lastVersion.value = CURRENT_DEFAULT_VERSION;
+
+ // Reload the window to ensure clean state transition.
+ window.location.reload();
+ };
+
+ return {
+ enabledNewLayout: enabled,
+ toggleLayout,
+ };
+}
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index f0e8d393ea..6368fbc329 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1046,7 +1046,8 @@
"pending-description": "This issue is waiting for approval. Force rollout is required to proceed.",
"rejected-error": "Issue approval has been rejected. Please enable force rollout to proceed.",
"pending-error": "Issue approval is pending. Please enable force rollout to proceed."
- }
+ },
+ "new-layout": "New CI/CD Layout"
},
"plan": {
"self": "Plan",
@@ -1064,7 +1065,6 @@
"description": "View and manage all specifications in this plan",
"total-specs": "Total Specs",
"total-targets": "Total Targets",
- "check-status": "Check Status",
"no-checks": "No checks",
"affected-resources": "Affected Resources"
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 2f9f2acbbb..79854df847 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1046,7 +1046,8 @@
"pending-description": "Este problema está pendiente de aprobación. Se requiere una implementación forzada para continuar.",
"rejected-error": "Se ha rechazado la aprobación del problema. Habilite la implementación forzada para continuar.",
"pending-error": "La aprobación del problema está pendiente. Habilite la implementación forzada para continuar."
- }
+ },
+ "new-layout": "Nuevo diseño de CI/CD"
},
"plan": {
"self": "Plan",
@@ -1064,7 +1065,6 @@
"description": "Ver y administrar todas las especificaciones de este plan",
"total-specs": "Especificaciones totales",
"total-targets": "Objetivos totales",
- "check-status": "Verificar estado",
"no-checks": "Sin controles",
"affected-resources": "Recursos afectados"
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 830fa012d1..4933bc6998 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1046,7 +1046,8 @@
"pending-description": "この問題は承認待ちです。続行するには強制ロールアウトが必要です。",
"rejected-error": "問題の承認が拒否されました。続行するには強制ロールアウトを有効にしてください。",
"pending-error": "問題の承認が保留中です。続行するには強制ロールアウトを有効にしてください。"
- }
+ },
+ "new-layout": "新しいCI/CDレイアウト"
},
"plan": {
"self": "プラン",
@@ -1064,7 +1065,6 @@
"description": "このプランのすべての仕様を表示および管理します",
"total-specs": "合計スペック",
"total-targets": "合計ターゲット",
- "check-status": "ステータスを確認する",
"no-checks": "チェックなし",
"affected-resources": "影響を受けるリソース"
},
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 44a1fab1d4..84a8a1d63b 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1046,7 +1046,8 @@
"pending-description": "Sự cố này đang chờ phê duyệt. Cần phải triển khai bắt buộc để tiếp tục.",
"rejected-error": "Đã từ chối phê duyệt vấn đề. Vui lòng bật triển khai bắt buộc để tiếp tục.",
"pending-error": "Đang chờ phê duyệt vấn đề. Vui lòng bật triển khai bắt buộc để tiếp tục."
- }
+ },
+ "new-layout": "Bố cục CI/CD mới"
},
"plan": {
"self": "Kế hoạch",
@@ -1064,7 +1065,6 @@
"description": "Xem và quản lý tất cả các thông số kỹ thuật trong kế hoạch này",
"total-specs": "Tổng số thông số kỹ thuật",
"total-targets": "Tổng số mục tiêu",
- "check-status": "Kiểm tra trạng thái",
"no-checks": "Không kiểm tra",
"affected-resources": "Tài nguyên bị ảnh hưởng"
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 463d28a543..f7614a937a 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1046,7 +1046,8 @@
"pending-description": "此工单正在等待审批。需要强制发布才能继续。",
"rejected-error": "此工单已被退回。请确认并勾选强制发布才能继续。",
"pending-error": "此工单正在等待审批。请确认并勾选强制发布才能继续。"
- }
+ },
+ "new-layout": "使用新版 CI/CD 页面"
},
"plan": {
"self": "变更计划",
@@ -1064,7 +1065,6 @@
"description": "查看和管理此变更计划中的所有变更项",
"total-specs": "变更项",
"total-targets": "变更对象",
- "check-status": "检查状态",
"no-checks": "没有检查",
"affected-resources": "受影响的资源"
},
diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.ts
index aadf622387..757964b596 100644
--- a/frontend/src/router/dashboard/projectV1.ts
+++ b/frontend/src/router/dashboard/projectV1.ts
@@ -79,7 +79,7 @@ const cicdRoutes: RouteRecordRaw[] = [
meta: {
requiredPermissionList: () => ["bb.issues.get"],
},
- component: () => import("@/views/project/IssueDetailView.vue"),
+ component: () => import("@/views/project/IssueDetailV1View.vue"),
props: true,
},
{
@@ -249,13 +249,14 @@ const projectV1Routes: RouteRecordRaw[] = [
title: () => t("plan.plans"),
requiredPermissionList: () => ["bb.databases.list", "bb.plans.list"],
},
- component: () => import("@/views/ReviewCenter/index.vue"),
+ component: () => import("@/views/project/ProjectPlanDashboard.vue"),
props: true,
},
{
path: "rollouts",
name: PROJECT_V1_ROUTE_ROLLOUTS,
meta: {
+ title: () => t("rollout.rollouts"),
requiredPermissionList: () => ["bb.rollouts.list"],
},
component: () => import("@/views/project/ProjectRolloutDashboard.vue"),
diff --git a/frontend/src/views/project/IssueDetailV1View.vue b/frontend/src/views/project/IssueDetailV1View.vue
new file mode 100644
index 0000000000..710c329ac5
--- /dev/null
+++ b/frontend/src/views/project/IssueDetailV1View.vue
@@ -0,0 +1,47 @@
+<template>
+ <div v-if="isLoading" class="flex items-center justify-center h-full">
+ <BBSpin />
+ </div>
+ <IssueReviewView v-else />
+</template>
+
+<script lang="ts" setup>
+import { onMounted, ref } from "vue";
+import { useRoute, useRouter } from "vue-router";
+import { BBSpin } from "@/bbkit";
+import { IssueReviewView } from "@/components/Plan/components/IssueReviewView";
+import { useIssueLayoutVersion } from "@/composables/useIssueLayoutVersion";
+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
+import { issueV1Slug } from "@/utils";
+
+const props = defineProps<{
+ projectId: string;
+ issueId: string;
+}>();
+
+const router = useRouter();
+const route = useRoute();
+const { enabledNewLayout } = useIssueLayoutVersion();
+const isLoading = ref(true);
+
+onMounted(() => {
+ // Redirect to legacy layout if new layout is disabled
+ if (!enabledNewLayout.value) {
+ const legacyIssueSlug = issueV1Slug(
+ `projects/${props.projectId}/issues/${props.issueId}`,
+ "issue"
+ );
+ router.replace({
+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL,
+ params: {
+ projectId: props.projectId,
+ issueSlug: legacyIssueSlug,
+ },
+ query: route.query,
+ });
+ } else {
+ // New layout enabled, set loading to false
+ isLoading.value = false;
+ }
+});
+</script>
diff --git a/frontend/src/views/project/IssueDetailView.vue b/frontend/src/views/project/IssueDetailView.vue
deleted file mode 100644
index 8ea4562072..0000000000
--- a/frontend/src/views/project/IssueDetailView.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-<template>
- <IssueReviewView />
-</template>
-
-<script lang="ts" setup>
-import { IssueReviewView } from "@/components/Plan/components/IssueReviewView";
-</script>
diff --git a/frontend/src/views/ReviewCenter/index.vue b/frontend/src/views/project/ProjectPlanDashboard.vue
similarity index 100%
rename from frontend/src/views/ReviewCenter/index.vue
rename to frontend/src/views/project/ProjectPlanDashboard.vue