Skip to content

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

chore: hide gitops and webhook tab for default project (#5854)

Tianzhou (天舟)7d5778861264
diff --git a/frontend/src/layouts/ProjectLayout.vue b/frontend/src/layouts/ProjectLayout.vue
index 8756b7d1b6..fb6baa198f 100644
--- a/frontend/src/layouts/ProjectLayout.vue
+++ b/frontend/src/layouts/ProjectLayout.vue
@@ -110,8 +110,12 @@ export default defineComponent({
{ name: startCase(t("slow-query.slow-queries")), hash: "slow-query" },
{ name: t("common.activities"), hash: "activity" },
- { name: t("common.gitops"), hash: "gitops" },
- { name: t("common.webhooks"), hash: "webhook" },
+ isDefaultProject.value
+ ? null
+ : { name: t("common.gitops"), hash: "gitops" },
+ isDefaultProject.value
+ ? null
+ : { name: t("common.webhooks"), hash: "webhook" },
isDefaultProject.value
? null
: { name: t("common.settings"), hash: "setting" },
diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vue
index 2653b93498..0915cc7240 100644
--- a/frontend/src/views/ProjectDetail.vue
+++ b/frontend/src/views/ProjectDetail.vue
@@ -33,14 +33,14 @@
<template v-if="hash === 'activity'">
<ProjectActivityPanel id="activity" :project="project" />
</template>
- <template v-if="hash === 'gitops'">
+ <template v-if="project.id !== DEFAULT_PROJECT_ID && hash === 'gitops'">
<ProjectVersionControlPanel
id="gitops"
:project="project"
:allow-edit="allowEdit"
/>
</template>
- <template v-if="hash === 'webhook'">
+ <template v-if="project.id !== DEFAULT_PROJECT_ID && hash === 'webhook'">
<ProjectWebhookPanel
id="webhook"
:project="project"