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: remove bb.feature.data-source (#6621)
Tianzhou (天舟)9824afaa0f84
diff --git a/backend/legacyapi/plan.go b/backend/legacyapi/plan.goindex 9ad4aeefa5..b4ca618a8a 100644--- a/backend/legacyapi/plan.go+++ b/backend/legacyapi/plan.go@@ -80,17 +80,6 @@ const (// Change Workflow.- // FeatureDataSource exposes the data source concept.- //- // Currently, we DO NOT expose this feature.- //- // Internally Bytebase stores instance username/password in a separate data source model.- // This allows a single instance to have multiple data sources (e.g. one RW and one RO).- // And from the user's perspective, the username/password- // look like the property of the instance, which are not. They are the property of data source which- // in turns belongs to the instance.- // - Support defining extra data source for a database and exposing the related data source UI.- FeatureDataSource FeatureType = "bb.feature.data-source"// FeatureDBAWorkflow enforces the DBA workflow.//// - Developers can't create and view instances since they are exclusively by DBA, they can@@ -205,8 +194,6 @@ func (e FeatureType) Name() string {case FeatureBranding:return "Branding"// Change Workflow- case FeatureDataSource:- return "Data source"case FeatureDBAWorkflow:return "DBA workflow"case FeatureIMApproval:@@ -299,7 +286,6 @@ var FeatureMatrix = map[FeatureType][3]bool{// BrandingFeatureBranding: {false, false, true},// Change Workflow- FeatureDataSource: {false, false, false},FeatureDBAWorkflow: {false, false, true},FeatureIMApproval: {false, false, true},FeatureMultiTenancy: {false, false, true},diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 1dbce94c34..8b76842da8 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -1289,22 +1289,6 @@ router.beforeEach((to, from, next) => {}}- if (to.name?.toString().startsWith("workspace.database.datasource")) {- if (- !hasFeature("bb.feature.data-source") ||- !hasWorkspacePermissionV1(- "bb.permission.workspace.manage-instance",- currentUserV1.value.userRole- )- ) {- next({- name: "error.403",- replace: false,- });- return;- }- }-if (to.name === "error.403" ||to.name === "error.404" ||diff --git a/frontend/src/types/plan.ts b/frontend/src/types/plan.tsindex b00346ba05..ff5751cbd0 100644--- a/frontend/src/types/plan.ts+++ b/frontend/src/types/plan.ts@@ -19,7 +19,6 @@ export type FeatureType =// Branding| "bb.feature.branding"// Change Workflow- | "bb.feature.data-source"| "bb.feature.dba-workflow"| "bb.feature.lgtm"| "bb.feature.im.approval"diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vueindex 3bb40b8af0..f9a78d9b19 100644--- a/frontend/src/views/InstanceDetail.vue+++ b/frontend/src/views/InstanceDetail.vue@@ -4,57 +4,45 @@<div class="px-6 space-y-6"><InstanceForm :instance="instance" />- <div- v-if="hasDataSourceFeature"- class="py-6 space-y-4 border-t divide-control-border"- >- <!--- it's always false here,- we could postpone to migrate DataSourceTable to v1- -->- <!-- <DataSourceTable :instance="instance" /> -->- </div>- <div v-else>- <NTabs>- <template #suffix>- <div class="flex items-center gap-x-4">- <NButton- v-if="allowEdit"- :loading="state.syncingSchema"- @click.prevent="syncSchema"- >- <template v-if="state.syncingSchema">- {{ $t("instance.syncing") }}- </template>- <template v-else>- {{ $t("common.sync-now") }}- </template>- </NButton>- <NButton- v-if="- instance.state === State.ACTIVE &&- instanceV1HasCreateDatabase(instance)- "- type="primary"- @click.prevent="createDatabase"- >- {{ $t("instance.new-database") }}- </NButton>- </div>- </template>+ <NTabs>+ <template #suffix>+ <div class="flex items-center gap-x-4">+ <NButton+ v-if="allowEdit"+ :loading="state.syncingSchema"+ @click.prevent="syncSchema"+ >+ <template v-if="state.syncingSchema">+ {{ $t("instance.syncing") }}+ </template>+ <template v-else>+ {{ $t("common.sync-now") }}+ </template>+ </NButton>+ <NButton+ v-if="+ instance.state === State.ACTIVE &&+ instanceV1HasCreateDatabase(instance)+ "+ type="primary"+ @click.prevent="createDatabase"+ >+ {{ $t("instance.new-database") }}+ </NButton>+ </div>+ </template>- <NTabPane name="DATABASES" :tab="$t('common.databases')">- <DatabaseV1Table- mode="INSTANCE"- :scroll-on-page-change="false"- :database-list="databaseV1List"- />- </NTabPane>- <NTabPane name="USERS" :tab="$t('instance.users')">- <InstanceRoleTable :instance-role-list="instanceRoleList" />- </NTabPane>- </NTabs>- </div>+ <NTabPane name="DATABASES" :tab="$t('common.databases')">+ <DatabaseV1Table+ mode="INSTANCE"+ :scroll-on-page-change="false"+ :database-list="databaseV1List"+ />+ </NTabPane>+ <NTabPane name="USERS" :tab="$t('instance.users')">+ <InstanceRoleTable :instance-role-list="instanceRoleList" />+ </NTabPane>+ </NTabs><template v-if="allowArchiveOrRestore"><template v-if="instance.state === State.ACTIVE"><BBButtonConfirm@@ -127,7 +115,6 @@ import InstanceForm from "@/components/InstanceForm/";import { CreateDatabasePrepPanel } from "@/components/CreateDatabasePrepForm";import { InstanceRoleTable, DatabaseV1Table, Drawer } from "@/components/v2";import {- featureToRef,pushNotification,useSubscriptionV1Store,useDBSchemaV1Store,@@ -177,8 +164,6 @@ const environment = computed(() => {);});-const hasDataSourceFeature = featureToRef("bb.feature.data-source");-watchEffect(() => {databaseStore.searchDatabaseList({parent: instance.value.name,