Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: make SQL Review paywall less intrusive (#4709)
Tianzhou (天舟)5ebd1fee365e
diff --git a/frontend/src/components/Issue/IssueDetailLayout.vue b/frontend/src/components/Issue/IssueDetailLayout.vueindex e1925798a2..b627c4555f 100644--- a/frontend/src/components/Issue/IssueDetailLayout.vue+++ b/frontend/src/components/Issue/IssueDetailLayout.vue@@ -14,14 +14,6 @@</IssueHighlightPanel></div>- <!-- Remind banner for bb.feature.sql-review -->- <FeatureAttention- v-if="!hasSQLReviewPolicyFeature"- custom-class="m-5 mt-0"- feature="bb.feature.sql-review"- :description="$t('subscription.features.bb-feature-sql-review.desc')"- />-<!-- Stage Flow Bar --><template v-if="showPipelineFlowBar"><template v-if="isGhostMode">@@ -134,12 +126,7 @@ import type {MigrationType,} from "@/types";import { defaultTemplate, templateForType } from "@/plugins";-import {- featureToRef,- useInstanceStore,- useProjectStore,- useTaskStore,-} from "@/store";+import { useInstanceStore, useProjectStore, useTaskStore } from "@/store";import {provideIssueLogic,TenantModeProvider,@@ -307,8 +294,6 @@ onMounted(() => {}});-const hasSQLReviewPolicyFeature = featureToRef("bb.feature.sql-review");-watch([create,diff --git a/frontend/src/components/Issue/IssueTaskStatementPanel.vue b/frontend/src/components/Issue/IssueTaskStatementPanel.vueindex 2938d37787..f697010597 100644--- a/frontend/src/components/Issue/IssueTaskStatementPanel.vue+++ b/frontend/src/components/Issue/IssueTaskStatementPanel.vue@@ -9,6 +9,18 @@><template v-if="language === 'sql'">{{ $t("common.sql") }}+ <button+ v-if="!hasFeature('bb.feature.sql-review')"+ type="button"+ class="ml-1 btn-small py-0.5 inline-flex items-center text-accent"+ @click.prevent="+ () => {+ state.showFeatureModal = true;+ }+ "+ >+ 🎈{{ $t("sql-review.unlock-full-feature") }}+ </button></template><template v-else>{{ $t("common.statement") }}@@ -167,6 +179,12 @@</div></div></BBModal>++ <FeatureModal+ v-if="state.showFeatureModal"+ feature="bb.feature.sql-review"+ @cancel="state.showFeatureModal = false"+ /></template><script lang="ts" setup>@@ -174,6 +192,7 @@ import { useDialog } from "naive-ui";import { onMounted, reactive, watch, computed, ref, nextTick } from "vue";import { useI18n } from "vue-i18n";import {+ hasFeature,pushNotification,useDBSchemaStore,useRepositoryStore,@@ -203,6 +222,7 @@ interface LocalState {editStatement: string;showVCSGuideModal: boolean;isUploadingFile: boolean;+ showFeatureModal: boolean;}type LocalEditState = Pick<LocalState, "editing" | "editStatement">;@@ -245,6 +265,7 @@ const state = reactive<LocalState>({editStatement: statement.value,showVCSGuideModal: false,isUploadingFile: false,+ showFeatureModal: false,});const useTempEditState = (state: LocalState) => {diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 94a981b450..6c2a27db8c 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1645,8 +1645,8 @@"desc": "Approval issue with IM integration."},"bb-feature-sql-review": {- "title": "SQL review policy",- "desc": "Customize the SQL review policy for different environments, can only use limited rules in the free plan."+ "title": "Unlock 100+ SQL Review checks",+ "desc": "Specify SQL lint rules to adopt SQL best practice and enforce schema consistency across the engineering organization."},"bb-feature-vcs-schema-write-back": {"title": "Schema write-back",@@ -1741,6 +1741,7 @@"delete": "Delete SQL review policy","input-then-press-enter": "Input the value then press enter to add","not-available-for-free": "Rule is not available for {plan}",+ "unlock-full-feature": "Unlock 100+ SQL lint rules","create": {"breadcrumb": "Create SQL review policy","basic-info": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex b2a37c924f..363fd4d108 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1646,8 +1646,8 @@"desc": "通过集成 IM 来批准工单。"},"bb-feature-sql-review": {- "title": "Schema 审核策略",- "desc": "给不同的环境定制 schema 审核策略,免费版仅可使用部分规则。"+ "title": "解锁 100+ SQL 审核策略",+ "desc": "配置各种 SQL lint 规则,以在研发组织中落地 SQL 最佳实践,保障 Schema 的规范一致性。"},"bb-feature-vcs-schema-write-back": {"title": "Schema 回写",@@ -1742,6 +1742,7 @@"delete": "删除审核策略","input-then-press-enter": "输入后按下回车来添加","not-available-for-free": "{plan}订阅不能使用该规则",+ "unlock-full-feature": "解锁 100+ SQL Review 规则","create": {"breadcrumb": "创建审核策略","basic-info": {