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: add optional learn more link to BBAttention, and use it in VCS setup (#8971)
Tianzhou (天舟)3844a0e6d0f2
diff --git a/frontend/src/bbkit/BBAttention.vue b/frontend/src/bbkit/BBAttention.vueindex a6725671f2..db20015fe8 100644--- a/frontend/src/bbkit/BBAttention.vue+++ b/frontend/src/bbkit/BBAttention.vue@@ -32,7 +32,10 @@class="mt-2 text-sm":class="`text-${color}-700`">- <p class="whitespace-pre-wrap">{{ $t(description) }}</p>+ <p class="whitespace-pre-wrap">+ {{ $t(description) }}+ <LearnMoreLink v-if="link" :url="link" class="ml-1 text-sm" />+ </p></div></slot></div>@@ -64,6 +67,7 @@ const props = withDefaults(style?: BBAttentionStyle;title?: string;description?: string;+ link?: string;actionText?: string;side?: BBAttentionSide;}>(),diff --git a/frontend/src/components/VCS/VCSSetupWizard.vue b/frontend/src/components/VCS/VCSSetupWizard.vueindex ff58206828..bc5b6dad40 100644--- a/frontend/src/components/VCS/VCSSetupWizard.vue+++ b/frontend/src/components/VCS/VCSSetupWizard.vue@@ -3,6 +3,7 @@v-if="showAttention":style="'WARN'":description="attentionText"+ :link="link"/><BBStepTabclass="mt-4 mb-8"@@ -150,6 +151,25 @@ const attentionText = computed((): string => {return "";});+const link = computed((): string => {+ if (state.config.type === ExternalVersionControl_Type.GITLAB) {+ if (state.config.uiType == "GITLAB_SELF_HOST") {+ return "https://www.bytebase.com/docs/vcs-integration/self-host-gitlab/?source=console";+ }+ return "https://www.bytebase.com/docs/vcs-integration/gitlab-com/?source=console";+ } else if (state.config.type === ExternalVersionControl_Type.GITHUB) {+ if (state.config.uiType == "GITHUB_COM") {+ return "https://www.bytebase.com/docs/vcs-integration/github-com/?source=console";+ }+ return "https://www.bytebase.com/docs/vcs-integration/github-enterprise/?source=console";+ } else if (state.config.type === ExternalVersionControl_Type.BITBUCKET) {+ return "https://www.bytebase.com/docs/vcs-integration/bitbucket-org/?source=console";+ } else if (state.config.type === ExternalVersionControl_Type.AZURE_DEVOPS) {+ return "https://www.bytebase.com/docs/vcs-integration/azure-devops/?source=console";+ }+ return "";+});+const showAttention = computed((): boolean => {return state.currentStep != CONFIRM_STEP;});