Skip to content

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

Add anchor id to project panel to avoid warning

天舟5206112e3754
diff --git a/frontend/src/components/ProjectVersionControlPanel.vue b/frontend/src/components/ProjectVersionControlPanel.vue
index c69e20617b..ed62c4e673 100644
--- a/frontend/src/components/ProjectVersionControlPanel.vue
+++ b/frontend/src/components/ProjectVersionControlPanel.vue
@@ -1,94 +1,96 @@
<template>
- <template v-if="state.showWizardForCreate || state.showWizardForChange">
- <RepositorySetupWizard
- :create="state.showWizardForCreate"
- :project="project"
- @cancel="cancelWizard"
- @finish="finishWizard"
- />
- </template>
- <template v-else>
- <!-- Use the persistent workflowType here -->
- <template v-if="project.workflowType == 'UI'">
- <div class="text-lg leading-6 font-medium text-main">
- Current workflow
- </div>
- <div class="mt-4 flex flex-col space-y-4">
- <div class="flex space-x-4">
- <input
- name="UI workflow"
- tabindex="-1"
- type="radio"
- class="btn"
- value="UI"
- v-model="state.workflowType"
- />
- <div class="-mt-0.5">
- <div class="textlabel">UI workflow (no version control)</div>
- <div class="mt-1 textinfolabel">
- Classic SQL Review workflow where the developer submits a SQL
- review ticket directly from Bytebase and waits for the assigned
- DBA or peer developer to review. Bytebase applies the SQL change
- after review approved.
+ <div>
+ <template v-if="state.showWizardForCreate || state.showWizardForChange">
+ <RepositorySetupWizard
+ :create="state.showWizardForCreate"
+ :project="project"
+ @cancel="cancelWizard"
+ @finish="finishWizard"
+ />
+ </template>
+ <template v-else>
+ <!-- Use the persistent workflowType here -->
+ <template v-if="project.workflowType == 'UI'">
+ <div class="text-lg leading-6 font-medium text-main">
+ Current workflow
+ </div>
+ <div class="mt-4 flex flex-col space-y-4">
+ <div class="flex space-x-4">
+ <input
+ name="UI workflow"
+ tabindex="-1"
+ type="radio"
+ class="btn"
+ value="UI"
+ v-model="state.workflowType"
+ />
+ <div class="-mt-0.5">
+ <div class="textlabel">UI workflow (no version control)</div>
+ <div class="mt-1 textinfolabel">
+ Classic SQL Review workflow where the developer submits a SQL
+ review ticket directly from Bytebase and waits for the assigned
+ DBA or peer developer to review. Bytebase applies the SQL change
+ after review approved.
+ </div>
</div>
</div>
- </div>
- <div class="flex space-x-4">
- <input
- name="Version control workflow"
- tabindex="-1"
- type="radio"
- class="btn"
- value="VCS"
- v-model="state.workflowType"
- />
- <div class="-mt-0.5">
- <div class="textlabel">Version control workflow</div>
- <div class="mt-1 textinfolabel">
- Database migration scripts are stored in a git repository. To make
- schema changes, a developer would create a migration script and
- submit for review in the corresponding VCS such as GitLab. After
- the script is approved and merged into the configured branch,
- Bytebase will automatically kicks off the task to apply the new
- schema change.
+ <div class="flex space-x-4">
+ <input
+ name="Version control workflow"
+ tabindex="-1"
+ type="radio"
+ class="btn"
+ value="VCS"
+ v-model="state.workflowType"
+ />
+ <div class="-mt-0.5">
+ <div class="textlabel">Version control workflow</div>
+ <div class="mt-1 textinfolabel">
+ Database migration scripts are stored in a git repository. To
+ make schema changes, a developer would create a migration script
+ and submit for review in the corresponding VCS such as GitLab.
+ After the script is approved and merged into the configured
+ branch, Bytebase will automatically kicks off the task to apply
+ the new schema change.
+ </div>
</div>
</div>
</div>
- </div>
- <template v-if="state.workflowType == 'VCS'">
- <div class="mt-4 flex items-center justify-end">
- <button
- type="button"
- class="btn-primary inline-flex justify-center py-2 px-2"
- @click.prevent="enterWizard(true)"
- >
- Configure version control
- <svg
- class="ml-1 w-5 h-5"
- fill="none"
- stroke="currentColor"
- viewBox="0 0 24 24"
- xmlns="http://www.w3.org/2000/svg"
+ <template v-if="state.workflowType == 'VCS'">
+ <div class="mt-4 flex items-center justify-end">
+ <button
+ type="button"
+ class="btn-primary inline-flex justify-center py-2 px-2"
+ @click.prevent="enterWizard(true)"
>
- <path
- stroke-linecap="round"
- stroke-linejoin="round"
- stroke-width="2"
- d="M9 5l7 7-7 7"
- ></path>
- </svg>
- </button>
- </div>
+ Configure version control
+ <svg
+ class="ml-1 w-5 h-5"
+ fill="none"
+ stroke="currentColor"
+ viewBox="0 0 24 24"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M9 5l7 7-7 7"
+ ></path>
+ </svg>
+ </button>
+ </div>
+ </template>
+ </template>
+ <template v-else-if="project.workflowType == 'VCS'">
+ <RepositoryDetail
+ :project="project"
+ :repository="repository"
+ @change-repository="enterWizard(false)"
+ />
</template>
</template>
- <template v-else-if="project.workflowType == 'VCS'">
- <RepositoryDetail
- :project="project"
- :repository="repository"
- @change-repository="enterWizard(false)"
- />
- </template>
- </template>
+ </div>
</template>
<script lang="ts">
diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vue
index 8a25e61779..99f779550f 100644
--- a/frontend/src/views/ProjectDetail.vue
+++ b/frontend/src/views/ProjectDetail.vue
@@ -17,7 +17,11 @@
"
/>
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
- <div v-if="state.selectedIndex == OVERVIEW_TAB" class="space-y-6">
+ <div
+ v-if="state.selectedIndex == OVERVIEW_TAB"
+ class="space-y-6"
+ id="overview"
+ >
<div class="space-y-2">
<p class="text-lg font-medium leading-7 text-main">Databases</p>
<DatabaseTable :mode="'PROJECT'" :databaseList="databaseList" />
@@ -40,10 +44,10 @@
</div>
</div>
<template v-else-if="state.selectedIndex == VERSION_CONTROL_TAB">
- <ProjectVersionControlPanel :project="project" />
+ <ProjectVersionControlPanel :project="project" id="version-control" />
</template>
<template v-else-if="state.selectedIndex == SETTING_TAB">
- <div class="max-w-3xl mx-auto space-y-4">
+ <div class="max-w-3xl mx-auto space-y-4" id="setting">
<div class="divide-y divide-block-border space-y-6">
<ProjectGeneralSettingPanel :project="project" />
<ProjectMemberPanel class="pt-4" :project="project" />