Skip to content

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

feat(frontend): enhance GitOps page with database group selector and WIF notice (#19591)

zchpeter7d6679758bb2
diff --git a/frontend/src/assets/gitops-workflow.svg b/frontend/src/assets/gitops-workflow.svg
index 6695e403cb..9c6cfdb62d 100644
--- a/frontend/src/assets/gitops-workflow.svg
+++ b/frontend/src/assets/gitops-workflow.svg
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1020 290" fill="none">
<style>
.phase { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
@@ -9,140 +10,141 @@
.connector { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 9px; fill: #9CA3AF; }
</style>
- <!-- Reusable logos -->
- <defs>
- <!-- GitHub logo (viewBox 0 0 26 26, scaled to fit 16x16) -->
- <symbol id="github" viewBox="0 0 26 26">
- <path fill-rule="evenodd" clip-rule="evenodd" d="M13 0.324219C5.85 0.324219 0 6.17422 0 13.3242C0 19.093 3.7375 23.968 8.85625 25.6742C9.50625 25.7555 9.75 25.4305 9.75 25.0242C9.75 24.6992 9.75 23.8867 9.75 22.8305C6.09375 23.643 5.3625 21.1242 5.3625 21.1242C4.79375 19.6617 3.9 19.2555 3.9 19.2555C2.68125 18.443 3.98125 18.443 3.98125 18.443C5.28125 18.5242 6.0125 19.743 6.0125 19.743C7.15 21.693 9.01875 21.1242 9.83125 20.7992C9.9125 19.9867 10.3188 19.418 10.6438 19.093C7.71875 18.768 4.7125 17.6305 4.7125 12.6742C4.7125 11.293 5.2 10.0742 6.0125 9.18047C5.85 8.85547 5.44375 7.55547 6.175 5.76797C6.175 5.76797 7.23125 5.44297 9.75 7.06797C10.8062 6.74297 11.8625 6.66172 13 6.66172C14.1375 6.66172 15.1938 6.82422 16.25 7.06797C18.7687 5.36172 19.825 5.68672 19.825 5.68672C20.5562 7.47422 20.0688 8.77422 19.9875 9.09922C20.8 9.99297 21.2875 11.1305 21.2875 12.593C21.2875 17.5492 18.2812 18.6867 15.3562 19.0117C15.8438 19.418 16.25 20.2305 16.25 21.4492C16.25 23.1555 16.25 24.618 16.25 25.0242C16.25 25.3492 16.4937 25.7555 17.1438 25.6742C22.2625 23.968 26 19.093 26 13.3242C26 6.17422 20.15 0.324219 13 0.324219Z" fill="currentColor"/>
- </symbol>
- <!-- Bytebase logo (viewBox 0 0 160 160, scaled to fit) -->
- <symbol id="bytebase" viewBox="0 0 160 160">
- <path d="M46.1905 152.505C29.9046 144.91 16.6497 132.054 8.56169 116.008C0.473633 99.9615 -1.97652 81.6593 1.60602 64.0506C5.18857 46.4418 14.5952 30.5519 28.3101 18.9414C42.025 7.33087 59.2495 0.675864 77.208 0.0487342C95.1666 -0.578395 112.813 4.85888 127.305 15.4844C141.796 26.11 152.288 41.3049 157.09 58.6209C161.893 75.9369 160.725 94.3654 153.776 110.937C146.827 127.508 134.501 141.258 118.785 149.97L80 80L46.1905 152.505Z" fill="#111827"/>
- <path d="M118.708 150.012C107.686 156.106 95.3806 159.511 82.7937 159.951C70.2068 160.391 57.694 157.853 46.2734 152.543L80 80L118.708 150.012Z" fill="white"/>
- <path d="M35 47.0375L125.88 47.0375L125.88 85.4375C125.88 95.4215 123.533 102.931 118.84 107.965C114.232 113.086 108.259 115.646 100.92 115.646C96.2267 115.646 92.1307 114.494 88.632 112.19C85.2187 109.971 82.616 106.899 80.824 102.974C79.2027 107.24 76.6427 110.611 73.144 113.086C69.6453 115.646 65.5067 116.926 60.728 116.926C52.7067 116.926 46.392 114.366 41.784 109.246C37.2613 104.126 35 96.7442 35 87.1015L35 47.0375ZM109.112 65.2135L89.4 65.2135V85.3095C89.4 88.9788 90.2107 91.7948 91.832 93.7575C93.5387 95.8055 96.0133 96.8295 99.256 96.8295C102.157 96.8295 104.504 95.8482 106.296 93.8855C108.173 92.0082 109.112 89.1495 109.112 85.3095L109.112 65.2135ZM72.504 65.2135H51.768V86.5895C51.768 90.4295 52.664 93.2882 54.456 95.1655C56.248 97.1282 58.808 98.1095 62.136 98.1095C65.2933 98.1095 67.8107 97.1282 69.688 95.1655C71.5653 93.2882 72.504 90.4295 72.504 86.5895V65.2135Z" fill="white"/>
- </symbol>
- </defs>
-
- <!-- Background -->
+
<rect width="1020" height="290" rx="12" fill="#FAFAFA" stroke="#E5E7EB" stroke-width="1"/>
- <!-- ═══════════════════════════════ -->
- <!-- COL 1: DEVELOP (18–178) -->
- <!-- ═══════════════════════════════ -->
+
+
+
<text x="98" y="28" text-anchor="middle" class="phase" fill="#374151">DEVELOP</text>
<g transform="translate(18, 42)">
<rect x="0" y="0" width="160" height="68" rx="8" fill="white" stroke="#E5E7EB" stroke-width="1.5"/>
- <!-- GitHub icon -->
+
<g transform="translate(12, 12)">
- <use href="#github" width="16" height="16" color="#24292f"/>
+ <svg width="16" height="16" viewBox="0 0 26 26">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13 0.324219C5.85 0.324219 0 6.17422 0 13.3242C0 19.093 3.7375 23.968 8.85625 25.6742C9.50625 25.7555 9.75 25.4305 9.75 25.0242C9.75 24.6992 9.75 23.8867 9.75 22.8305C6.09375 23.643 5.3625 21.1242 5.3625 21.1242C4.79375 19.6617 3.9 19.2555 3.9 19.2555C2.68125 18.443 3.98125 18.443 3.98125 18.443C5.28125 18.5242 6.0125 19.743 6.0125 19.743C7.15 21.693 9.01875 21.1242 9.83125 20.7992C9.9125 19.9867 10.3188 19.418 10.6438 19.093C7.71875 18.768 4.7125 17.6305 4.7125 12.6742C4.7125 11.293 5.2 10.0742 6.0125 9.18047C5.85 8.85547 5.44375 7.55547 6.175 5.76797C6.175 5.76797 7.23125 5.44297 9.75 7.06797C10.8062 6.74297 11.8625 6.66172 13 6.66172C14.1375 6.66172 15.1938 6.82422 16.25 7.06797C18.7687 5.36172 19.825 5.68672 19.825 5.68672C20.5562 7.47422 20.0688 8.77422 19.9875 9.09922C20.8 9.99297 21.2875 11.1305 21.2875 12.593C21.2875 17.5492 18.2812 18.6867 15.3562 19.0117C15.8438 19.418 16.25 20.2305 16.25 21.4492C16.25 23.1555 16.25 24.618 16.25 25.0242C16.25 25.3492 16.4937 25.7555 17.1438 25.6742C22.2625 23.968 26 19.093 26 13.3242C26 6.17422 20.15 0.324219 13 0.324219Z" fill="#24292f"/>
+ </svg>
</g>
<text x="36" y="24" class="badge" fill="#24292f">GITHUB</text>
<text x="10" y="44" class="title" fill="#111827">Write SQL files</text>
<text x="10" y="60" class="desc">migration or schema</text>
</g>
- <!-- ═══════════════════════════════ -->
- <!-- TRANSITION 1 (178–296) -->
- <!-- ═══════════════════════════════ -->
+
+
+
<line x1="178" y1="76" x2="294" y2="76" stroke="#D1D5DB" stroke-width="1.5"/>
<polygon points="290,71 300,76 290,81" fill="#D1D5DB"/>
<rect x="200" y="82" width="72" height="18" rx="9" fill="#EEF2FF" stroke="#C7D2FE" stroke-width="1"/>
<text x="236" y="94" text-anchor="middle" class="trans" fill="#4F46E5">PR created</text>
- <!-- ═══════════════════════════════ -->
- <!-- COL 2: CI (302–572) -->
- <!-- ═══════════════════════════════ -->
+
+
+
<text x="437" y="28" text-anchor="middle" class="phase" fill="#4F46E5">CI</text>
<rect x="302" y="38" width="270" height="160" rx="10" fill="white" stroke="#C7D2FE" stroke-width="1.5" stroke-dasharray="6 3"/>
- <!-- GitHub row: Create PR -->
+
<g transform="translate(316, 52)">
<rect x="0" y="0" width="242" height="48" rx="8" fill="#F9FAFB" stroke="#E5E7EB" stroke-width="1"/>
<g transform="translate(12, 14)">
- <use href="#github" width="16" height="16" color="#24292f"/>
+ <svg width="16" height="16" viewBox="0 0 26 26">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13 0.324219C5.85 0.324219 0 6.17422 0 13.3242C0 19.093 3.7375 23.968 8.85625 25.6742C9.50625 25.7555 9.75 25.4305 9.75 25.0242C9.75 24.6992 9.75 23.8867 9.75 22.8305C6.09375 23.643 5.3625 21.1242 5.3625 21.1242C4.79375 19.6617 3.9 19.2555 3.9 19.2555C2.68125 18.443 3.98125 18.443 3.98125 18.443C5.28125 18.5242 6.0125 19.743 6.0125 19.743C7.15 21.693 9.01875 21.1242 9.83125 20.7992C9.9125 19.9867 10.3188 19.418 10.6438 19.093C7.71875 18.768 4.7125 17.6305 4.7125 12.6742C4.7125 11.293 5.2 10.0742 6.0125 9.18047C5.85 8.85547 5.44375 7.55547 6.175 5.76797C6.175 5.76797 7.23125 5.44297 9.75 7.06797C10.8062 6.74297 11.8625 6.66172 13 6.66172C14.1375 6.66172 15.1938 6.82422 16.25 7.06797C18.7687 5.36172 19.825 5.68672 19.825 5.68672C20.5562 7.47422 20.0688 8.77422 19.9875 9.09922C20.8 9.99297 21.2875 11.1305 21.2875 12.593C21.2875 17.5492 18.2812 18.6867 15.3562 19.0117C15.8438 19.418 16.25 20.2305 16.25 21.4492C16.25 23.1555 16.25 24.618 16.25 25.0242C16.25 25.3492 16.4937 25.7555 17.1438 25.6742C22.2625 23.968 26 19.093 26 13.3242C26 6.17422 20.15 0.324219 13 0.324219Z" fill="#24292f"/>
+ </svg>
</g>
<text x="36" y="24" class="title" fill="#111827" font-size="12">Create Pull Request</text>
<text x="36" y="39" class="desc">Open PR with SQL changes</text>
</g>
- <!-- Arrow down: triggers -->
+
<line x1="437" y1="100" x2="437" y2="130" stroke="#D1D5DB" stroke-width="1.5"/>
<polygon points="432,127 437,136 442,127" fill="#D1D5DB"/>
<text x="457" y="120" class="connector">triggers</text>
- <!-- Bytebase row: SQL Review -->
+
<g transform="translate(316, 138)">
<rect x="0" y="0" width="242" height="48" rx="8" fill="#EEF2FF" stroke="#C7D2FE" stroke-width="1"/>
<g transform="translate(10, 10)">
- <use href="#bytebase" width="22" height="22"/>
+ <svg width="22" height="22" viewBox="0 0 160 160">
+ <path d="M46.1905 152.505C29.9046 144.91 16.6497 132.054 8.56169 116.008C0.473633 99.9615 -1.97652 81.6593 1.60602 64.0506C5.18857 46.4418 14.5952 30.5519 28.3101 18.9414C42.025 7.33087 59.2495 0.675864 77.208 0.0487342C95.1666 -0.578395 112.813 4.85888 127.305 15.4844C141.796 26.11 152.288 41.3049 157.09 58.6209C161.893 75.9369 160.725 94.3654 153.776 110.937C146.827 127.508 134.501 141.258 118.785 149.97L80 80L46.1905 152.505Z" fill="#111827"/>
+ <path d="M118.708 150.012C107.686 156.106 95.3806 159.511 82.7937 159.951C70.2068 160.391 57.694 157.853 46.2734 152.543L80 80L118.708 150.012Z" fill="white"/>
+ <path d="M35 47.0375L125.88 47.0375L125.88 85.4375C125.88 95.4215 123.533 102.931 118.84 107.965C114.232 113.086 108.259 115.646 100.92 115.646C96.2267 115.646 92.1307 114.494 88.632 112.19C85.2187 109.971 82.616 106.899 80.824 102.974C79.2027 107.24 76.6427 110.611 73.144 113.086C69.6453 115.646 65.5067 116.926 60.728 116.926C52.7067 116.926 46.392 114.366 41.784 109.246C37.2613 104.126 35 96.7442 35 87.1015L35 47.0375ZM109.112 65.2135L89.4 65.2135V85.3095C89.4 88.9788 90.2107 91.7948 91.832 93.7575C93.5387 95.8055 96.0133 96.8295 99.256 96.8295C102.157 96.8295 104.504 95.8482 106.296 93.8855C108.173 92.0082 109.112 89.1495 109.112 85.3095L109.112 65.2135ZM72.504 65.2135H51.768V86.5895C51.768 90.4295 52.664 93.2882 54.456 95.1655C56.248 97.1282 58.808 98.1095 62.136 98.1095C65.2933 98.1095 67.8107 97.1282 69.688 95.1655C71.5653 93.2882 72.504 90.4295 72.504 86.5895V65.2135Z" fill="white"/>
+ </svg>
</g>
<text x="40" y="24" class="title" fill="#312E81" font-size="12">SQL Review</text>
<text x="40" y="39" class="desc" fill="#4338CA">Check syntax, lint, enforce policy</text>
</g>
- <!-- Arrow up-left from Bytebase back to GitHub: post review -->
+
<path d="M316 162 L286 162 L286 88 L316 88" stroke="#D1D5DB" stroke-width="1.5" fill="none" stroke-dasharray="4 2"/>
<polygon points="313,83 323,88 313,93" fill="#D1D5DB"/>
<text x="284" y="132" text-anchor="end" class="connector" font-size="8">post</text>
<text x="284" y="142" text-anchor="end" class="connector" font-size="8">review</text>
- <!-- ═══════════════════════════════ -->
- <!-- TRANSITION 2 (572–708) -->
- <!-- ═══════════════════════════════ -->
+
+
+
<line x1="572" y1="76" x2="706" y2="76" stroke="#D1D5DB" stroke-width="1.5"/>
<polygon points="702,71 712,76 702,81" fill="#D1D5DB"/>
- <rect x="601" y="82" width="72" height="18" rx="9" fill="#DCFCE7" stroke="#86EFAC" stroke-width="1"/>
- <text x="637" y="94" text-anchor="middle" class="trans" fill="#166534">PR merged</text>
+ <rect x="597" y="82" width="80" height="30" rx="9" fill="#DCFCE7" stroke="#86EFAC" stroke-width="1"/>
+ <text x="637" y="95" text-anchor="middle" class="trans" fill="#166534">Trigger</text>
+ <text x="637" y="107" text-anchor="middle" style="font-family: -apple-system, BlinkMacSystemFont, &apos;Segoe UI&apos;, Roboto, sans-serif; font-size: 7px; fill: #4B5563;">merge, cron, etc.</text>
- <!-- ═══════════════════════════════ -->
- <!-- COL 3: CD (714–1002) -->
- <!-- ═══════════════════════════════ -->
+
+
+
<text x="858" y="28" text-anchor="middle" class="phase" fill="#059669">CD</text>
<rect x="714" y="38" width="288" height="242" rx="10" fill="white" stroke="#A7F3D0" stroke-width="1.5" stroke-dasharray="6 3"/>
- <!-- GitHub row: Merge to branch -->
+
<g transform="translate(728, 52)">
<rect x="0" y="0" width="260" height="48" rx="8" fill="#F9FAFB" stroke="#E5E7EB" stroke-width="1"/>
<g transform="translate(12, 14)">
- <use href="#github" width="16" height="16" color="#24292f"/>
+ <svg width="16" height="16" viewBox="0 0 26 26">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13 0.324219C5.85 0.324219 0 6.17422 0 13.3242C0 19.093 3.7375 23.968 8.85625 25.6742C9.50625 25.7555 9.75 25.4305 9.75 25.0242C9.75 24.6992 9.75 23.8867 9.75 22.8305C6.09375 23.643 5.3625 21.1242 5.3625 21.1242C4.79375 19.6617 3.9 19.2555 3.9 19.2555C2.68125 18.443 3.98125 18.443 3.98125 18.443C5.28125 18.5242 6.0125 19.743 6.0125 19.743C7.15 21.693 9.01875 21.1242 9.83125 20.7992C9.9125 19.9867 10.3188 19.418 10.6438 19.093C7.71875 18.768 4.7125 17.6305 4.7125 12.6742C4.7125 11.293 5.2 10.0742 6.0125 9.18047C5.85 8.85547 5.44375 7.55547 6.175 5.76797C6.175 5.76797 7.23125 5.44297 9.75 7.06797C10.8062 6.74297 11.8625 6.66172 13 6.66172C14.1375 6.66172 15.1938 6.82422 16.25 7.06797C18.7687 5.36172 19.825 5.68672 19.825 5.68672C20.5562 7.47422 20.0688 8.77422 19.9875 9.09922C20.8 9.99297 21.2875 11.1305 21.2875 12.593C21.2875 17.5492 18.2812 18.6867 15.3562 19.0117C15.8438 19.418 16.25 20.2305 16.25 21.4492C16.25 23.1555 16.25 24.618 16.25 25.0242C16.25 25.3492 16.4937 25.7555 17.1438 25.6742C22.2625 23.968 26 19.093 26 13.3242C26 6.17422 20.15 0.324219 13 0.324219Z" fill="#24292f"/>
+ </svg>
</g>
- <text x="36" y="24" class="title" fill="#111827" font-size="12">Merge to branch</text>
- <text x="36" y="39" class="desc">Webhook notifies Bytebase</text>
+ <text x="36" y="24" class="title" fill="#111827" font-size="12">Run release workflow</text>
+ <text x="36" y="39" class="desc">Call Bytebase API</text>
</g>
- <!-- Arrow down: triggers -->
+
<line x1="858" y1="100" x2="858" y2="130" stroke="#D1D5DB" stroke-width="1.5"/>
<polygon points="853,127 858,136 863,127" fill="#D1D5DB"/>
<text x="878" y="120" class="connector">triggers</text>
- <!-- Bytebase row: Create Rollout -->
+
<g transform="translate(728, 138)">
<rect x="0" y="0" width="260" height="48" rx="8" fill="#EEF2FF" stroke="#C7D2FE" stroke-width="1"/>
<g transform="translate(10, 10)">
- <use href="#bytebase" width="22" height="22"/>
+ <svg width="22" height="22" viewBox="0 0 160 160">
+ <path d="M46.1905 152.505C29.9046 144.91 16.6497 132.054 8.56169 116.008C0.473633 99.9615 -1.97652 81.6593 1.60602 64.0506C5.18857 46.4418 14.5952 30.5519 28.3101 18.9414C42.025 7.33087 59.2495 0.675864 77.208 0.0487342C95.1666 -0.578395 112.813 4.85888 127.305 15.4844C141.796 26.11 152.288 41.3049 157.09 58.6209C161.893 75.9369 160.725 94.3654 153.776 110.937C146.827 127.508 134.501 141.258 118.785 149.97L80 80L46.1905 152.505Z" fill="#111827"/>
+ <path d="M118.708 150.012C107.686 156.106 95.3806 159.511 82.7937 159.951C70.2068 160.391 57.694 157.853 46.2734 152.543L80 80L118.708 150.012Z" fill="white"/>
+ <path d="M35 47.0375L125.88 47.0375L125.88 85.4375C125.88 95.4215 123.533 102.931 118.84 107.965C114.232 113.086 108.259 115.646 100.92 115.646C96.2267 115.646 92.1307 114.494 88.632 112.19C85.2187 109.971 82.616 106.899 80.824 102.974C79.2027 107.24 76.6427 110.611 73.144 113.086C69.6453 115.646 65.5067 116.926 60.728 116.926C52.7067 116.926 46.392 114.366 41.784 109.246C37.2613 104.126 35 96.7442 35 87.1015L35 47.0375ZM109.112 65.2135L89.4 65.2135V85.3095C89.4 88.9788 90.2107 91.7948 91.832 93.7575C93.5387 95.8055 96.0133 96.8295 99.256 96.8295C102.157 96.8295 104.504 95.8482 106.296 93.8855C108.173 92.0082 109.112 89.1495 109.112 85.3095L109.112 65.2135ZM72.504 65.2135H51.768V86.5895C51.768 90.4295 52.664 93.2882 54.456 95.1655C56.248 97.1282 58.808 98.1095 62.136 98.1095C65.2933 98.1095 67.8107 97.1282 69.688 95.1655C71.5653 93.2882 72.504 90.4295 72.504 86.5895V65.2135Z" fill="white"/>
+ </svg>
</g>
- <text x="40" y="24" class="title" fill="#312E81" font-size="12">Create Rollout</text>
- <text x="40" y="39" class="desc" fill="#4338CA">Plan and stage changes</text>
+ <text x="40" y="24" class="title" fill="#312E81" font-size="12">Create Release</text>
+ <text x="40" y="39" class="desc" fill="#4338CA">Plan, rollout, and deploy</text>
</g>
- <!-- Arrow down: apply -->
+
<line x1="858" y1="186" x2="858" y2="216" stroke="#D1D5DB" stroke-width="1.5"/>
<polygon points="853,213 858,222 863,213" fill="#D1D5DB"/>
<text x="878" y="208" class="connector">apply</text>
- <!-- Databases section -->
+
<g transform="translate(728, 224)">
<rect x="0" y="0" width="260" height="46" rx="8" fill="#F9FAFB" stroke="#D1D5DB" stroke-width="1"/>
- <!-- Test DB -->
+
<g transform="translate(20, 8)">
<rect x="0" y="0" width="100" height="30" rx="6" fill="white" stroke="#E5E7EB" stroke-width="1"/>
<path d="M14,11 C14,8.5 18,6 24,6 C30,6 34,8.5 34,11" stroke="#9CA3AF" stroke-width="0.8" fill="#E5E7EB"/>
@@ -151,7 +153,7 @@
<text x="44" y="19" class="db-label">Test</text>
</g>
- <!-- Prod DB -->
+
<g transform="translate(140, 8)">
<rect x="0" y="0" width="100" height="30" rx="6" fill="white" stroke="#E5E7EB" stroke-width="1"/>
<path d="M14,11 C14,8.5 18,6 24,6 C30,6 34,8.5 34,11" stroke="#9CA3AF" stroke-width="0.8" fill="#E5E7EB"/>
@@ -160,4 +162,4 @@
<text x="44" y="19" class="db-label">Prod</text>
</g>
</g>
-</svg>
+</svg>
\ No newline at end of file
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index c12e68dde6..85cb410935 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2867,7 +2867,10 @@
"title": "Checks before we start",
"external-url": "External URL",
"workload-identity": "Workload Identity",
- "target-databases": "Target Databases"
+ "target-databases": "Target Databases",
+ "database-group-recommendation": "For databases sharing the same schema, a database group lets you migrate them together in one change. Define the group once and reuse it across migrations without picking individual databases every time.",
+ "wif-notice-text": "Workload Identity Federation is currently supported for GitHub and GitLab only. For other VCS, refer to the tutorials for",
+ "wif-notice-suffix": "to set up GitOps using a service account."
},
"workload-identity": {
"select-placeholder": "Select a workload identity"
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 020a2d0ec3..ed39007cbb 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2867,7 +2867,10 @@
"title": "Verificaciones antes de comenzar",
"external-url": "URL externa",
"workload-identity": "Identidad de carga de trabajo",
- "target-databases": "Bases de datos de destino"
+ "target-databases": "Bases de datos de destino",
+ "database-group-recommendation": "Para bases de datos con el mismo esquema, un grupo de bases de datos permite migrarlas juntas en un solo cambio. Defina el grupo una vez y reutilícelo en las migraciones sin tener que seleccionar bases de datos individuales cada vez.",
+ "wif-notice-text": "Workload Identity Federation actualmente solo es compatible con GitHub y GitLab. Para otros VCS, consulte los tutoriales de",
+ "wif-notice-suffix": "para configurar GitOps con una cuenta de servicio."
},
"workload-identity": {
"select-placeholder": "Seleccionar una identidad de carga de trabajo"
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index d114f2e989..33dc8cba41 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -2867,7 +2867,10 @@
"title": "開始前の確認",
"external-url": "外部URL",
"workload-identity": "ワークロードアイデンティティ",
- "target-databases": "ターゲットデータベース"
+ "target-databases": "ターゲットデータベース",
+ "database-group-recommendation": "同じスキーマを持つデータベースには、データベースグループを使用すると一度の変更でまとめてマイグレーションできます。グループを一度定義すれば、毎回個別にデータベースを選択することなく、マイグレーション全体で再利用できます。",
+ "wif-notice-text": "Workload Identity Federation は現在 GitHub と GitLab のみサポートしています。他の VCS については、チュートリアルを参照してください:",
+ "wif-notice-suffix": "サービスアカウントを使用して GitOps を設定できます。"
},
"workload-identity": {
"select-placeholder": "ワークロードアイデンティティを選択"
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index a73b982ebd..46c01b1838 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -2867,7 +2867,10 @@
"title": "Kiểm tra trước khi bắt đầu",
"external-url": "URL bên ngoài",
"workload-identity": "Workload Identity",
- "target-databases": "Cơ sở dữ liệu đích"
+ "target-databases": "Cơ sở dữ liệu đích",
+ "database-group-recommendation": "Đối với các cơ sở dữ liệu có cùng schema, nhóm cơ sở dữ liệu cho phép bạn migration tất cả cùng lúc trong một thay đổi. Chỉ cần định nghĩa nhóm một lần và tái sử dụng trong các lần migration mà không cần chọn từng cơ sở dữ liệu mỗi lần.",
+ "wif-notice-text": "Workload Identity Federation hiện chỉ hỗ trợ GitHub và GitLab. Đối với các VCS khác, vui lòng tham khảo hướng dẫn cho",
+ "wif-notice-suffix": "để thiết lập GitOps bằng tài khoản dịch vụ."
},
"workload-identity": {
"select-placeholder": "Chọn một workload identity"
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 5653fb13a2..53bc218321 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2867,7 +2867,10 @@
"title": "开始前检查",
"external-url": "外部访问地址",
"workload-identity": "工作负载身份",
- "target-databases": "目标数据库"
+ "target-databases": "目标数据库",
+ "database-group-recommendation": "对于具有相同 Schema 的数据库,数据库分组可以让您在一次变更中同时迁移它们。只需定义一次分组,即可在多次迁移中复用,无需每次都逐个选择数据库。",
+ "wif-notice-text": "Workload Identity Federation 目前仅支持 GitHub 和 GitLab。对于其他 VCS,请参考以下教程:",
+ "wif-notice-suffix": "以使用服务账号配置 GitOps。"
},
"workload-identity": {
"select-placeholder": "选择工作负载身份"
diff --git a/frontend/src/views/project/ProjectGitOpsDashboard.vue b/frontend/src/views/project/ProjectGitOpsDashboard.vue
index 2455a60b9d..5c23b8c34c 100644
--- a/frontend/src/views/project/ProjectGitOpsDashboard.vue
+++ b/frontend/src/views/project/ProjectGitOpsDashboard.vue
@@ -21,7 +21,7 @@
<!-- Documentation link -->
<div>
<a
- href="https://docs.bytebase.com/vcs-integration/overview?source=console"
+ href="https://docs.bytebase.com/gitops/overview?source=console"
target="_blank"
class="text-accent hover:underline"
>
@@ -41,6 +41,24 @@
{{ $t("gitops.checklist.title") }}
</h2>
+ <!-- WIF notice for Bitbucket / Azure DevOps -->
+ <BBAttention :type="'info'" :closable="false">
+ <span>{{ $t("gitops.checklist.wif-notice-text") }}
+ <a
+ href="https://docs.bytebase.com/tutorials/gitops-bitbucket-workflow?source=console"
+ target="_blank"
+ class="text-accent hover:underline"
+ >Bitbucket</a>
+ /
+ <a
+ href="https://docs.bytebase.com/tutorials/gitops-azure-devops-workflow?source=console"
+ target="_blank"
+ class="text-accent hover:underline"
+ >Azure DevOps</a>
+ {{ $t("gitops.checklist.wif-notice-suffix") }}
+ </span>
+ </BBAttention>
+
<!-- Check 1: External URL -->
<div class="flex items-start gap-x-3 py-3">
<CheckIcon
@@ -113,7 +131,7 @@
<!-- Check 3: Target Databases -->
<div class="flex items-start gap-x-3 py-3">
<CheckIcon
- v-if="selectedDatabaseNames.length > 0"
+ v-if="hasTargetSelected"
class="w-5 h-5 text-success shrink-0"
/>
<XCircleIcon
@@ -124,8 +142,37 @@
<span class="text-sm font-medium">{{
$t("gitops.checklist.target-databases")
}}</span>
+ <NButtonGroup size="small">
+ <NButton
+ :type="targetTab === 'GROUP' ? 'primary' : 'default'"
+ :secondary="targetTab === 'GROUP'"
+ @click="handleTargetTabChange('GROUP')"
+ >
+ {{ $t("common.database-group") }}
+ </NButton>
+ <NButton
+ :type="targetTab === 'DATABASE' ? 'primary' : 'default'"
+ :secondary="targetTab === 'DATABASE'"
+ @click="handleTargetTabChange('DATABASE')"
+ >
+ {{ $t("common.databases") }}
+ </NButton>
+ </NButtonGroup>
<div class="max-w-lg">
+ <template v-if="targetTab === 'GROUP'">
+ <NSelect
+ :value="selectedDatabaseGroupName"
+ :options="dbGroupOptions"
+ :placeholder="$t('database-group.select')"
+ clearable
+ @update:value="selectedDatabaseGroupName = $event"
+ />
+ <p class="text-xs text-control-light mt-1">
+ {{ $t("gitops.checklist.database-group-recommendation") }}
+ </p>
+ </template>
<DatabaseSelect
+ v-else
v-model:value="selectedDatabaseNames"
:project-name="projectName"
:multiple="true"
@@ -160,7 +207,7 @@
</p>
</div>
- <NTabs v-model:value="activeTab" type="line" animated>
+ <NTabs v-model:value="activeTab" type="line" animated class="gitops-vcs-tabs">
<NTabPane :name="WorkloadIdentityConfig_ProviderType.GITHUB" tab="GitHub Actions">
<BBAttention v-if="selectedConfig && activeTab !== selectedConfig?.providerType" :type="'error'">
{{ $t("gitops.workflow.provider-not-match", { provider: getWorkloadIdentityProviderText(selectedConfig.providerType) }) }}
@@ -376,8 +423,10 @@ import {
} from "lucide-vue-next";
import {
NButton,
+ NButtonGroup,
NCode,
NConfigProvider,
+ NSelect,
NSwitch,
NTabPane,
NTabs,
@@ -396,6 +445,7 @@ import { MissingExternalURLAttention } from "@/components/v2/Form";
import {
extractWorkloadIdentityId,
useActuatorV1Store,
+ useDBGroupListByProject,
useProjectByName,
useWorkloadIdentityStore,
} from "@/store";
@@ -422,6 +472,8 @@ const { project } = useProjectByName(projectName);
const showCreateDrawer = ref(false);
const selectedIdentityName = ref<string | undefined>(undefined);
const selectedDatabaseNames = ref<string[]>([]);
+const selectedDatabaseGroupName = ref<string | undefined>(undefined);
+const targetTab = ref<"GROUP" | "DATABASE">("GROUP");
const activeTab = ref<WorkloadIdentityConfig_ProviderType>(
WorkloadIdentityConfig_ProviderType.GITHUB
);
@@ -430,6 +482,30 @@ const showSqlReviewYaml = ref(true);
const showReleaseYaml = ref(true);
const showGitlabCiYaml = ref(true);
+const { dbGroupList } = useDBGroupListByProject(projectName);
+
+const dbGroupOptions = computed(() => {
+ return dbGroupList.value.map((group) => ({
+ label: group.title || group.name,
+ value: group.name,
+ }));
+});
+
+const handleTargetTabChange = (tab: string) => {
+ targetTab.value = tab as "GROUP" | "DATABASE";
+ if (tab === "GROUP") {
+ selectedDatabaseNames.value = [];
+ } else {
+ selectedDatabaseGroupName.value = undefined;
+ }
+};
+
+const hasTargetSelected = computed(() => {
+ return targetTab.value === "GROUP"
+ ? !!selectedDatabaseGroupName.value
+ : selectedDatabaseNames.value.length > 0;
+});
+
const selectedIdentity = computed(() => {
if (!selectedIdentityName.value) return undefined;
return workloadIdentityStore.getWorkloadIdentity(selectedIdentityName.value);
@@ -487,6 +563,9 @@ const workloadIdentityEmail = computed(() => {
});
const targetsString = computed(() => {
+ if (targetTab.value === "GROUP" && selectedDatabaseGroupName.value) {
+ return selectedDatabaseGroupName.value;
+ }
if (selectedDatabaseNames.value.length === 0) {
return "";
}
@@ -730,3 +809,10 @@ const handleWorkloadIdentityCreated = (wi: WorkloadIdentity) => {
selectedIdentityName.value = wi.name;
};
</script>
+
+<style scoped>
+.gitops-vcs-tabs :deep(.n-tabs-tab) {
+ width: 140px;
+ justify-content: center;
+}
+</style>