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: add tooltips to issue options (#16376)
boojack928ca19b98e8
diff --git a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vueindex d057339ed7..ebfb1dec17 100644--- a/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue+++ b/frontend/src/components/IssueV1/components/Sidebar/Sidebar.vue@@ -5,15 +5,36 @@<ReviewSection /><IssueLabels />- <div class="border-t -mx-3" />-- <PreBackupSection />- <GhostSection v-if="shouldShowGhostSection" />+ <template v-if="selectedSpec">+ <div class="border-t -mx-3" />+ <NTooltip :arrow="false">+ <template #trigger>+ <p class="textinfolabel -mb-2">+ {{ $t("plan.options.self") }}+ <span class="opacity-80">+ ({{+ targetsForSpec(selectedSpec).length === flattenSpecCount+ ? $t("plan.options.applies-to-all-tasks")+ : $t("plan.options.applies-to-some-tasks", {+ count: targetsForSpec(selectedSpec).length,+ total: flattenSpecCount,+ })+ }})+ </span>+ </p>+ </template>+ {{ $t("plan.options.split-into-multiple-issues-tip") }}+ </NTooltip>+ <PreBackupSection />+ <GhostSection v-if="shouldShowGhostSection" />+ </template></div></template><script lang="ts" setup>+import { NTooltip } from "naive-ui";import { computed } from "vue";+import { targetsForSpec } from "@/components/Plan";import { GhostSection } from "@/components/Plan/components/Sidebar";import { provideGhostSettingContext } from "@/components/Plan/components/Sidebar/GhostSection/context";import { useCurrentProjectV1 } from "@/store";@@ -28,14 +49,24 @@ import TaskCheckSummarySection from "./TaskCheckSummarySection";const { isCreating, selectedTask, issue, events } = useIssueContext();const { project } = useCurrentProjectV1();+const selectedSpec = computed(() =>+ specForTask(issue.value.planEntity as Plan, selectedTask.value)+);++const flattenSpecCount = computed(+ () =>+ issue.value.planEntity?.specs.reduce(+ (acc, spec) => acc + targetsForSpec(spec).length,+ 0+ ) || 0+);+const { shouldShow: shouldShowGhostSection, events: ghostEvents } =provideGhostSettingContext({isCreating,project,plan: computed(() => issue.value.planEntity as Plan),- selectedSpec: computed(() =>- specForTask(issue.value.planEntity as Plan, selectedTask.value)- ),+ selectedSpec,selectedTask: selectedTask,issue,});diff --git a/frontend/src/components/Plan/components/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/Sidebar/Sidebar.vueindex 12c47ef83e..89dae171f1 100644--- a/frontend/src/components/Plan/components/Sidebar/Sidebar.vue+++ b/frontend/src/components/Plan/components/Sidebar/Sidebar.vue@@ -1,15 +1,33 @@<template><div v-if="shouldShow" class="flex flex-col gap-y-3 py-2 px-3">- <p class="textinfolabel -mb-2">{{ $t("common.options") }}</p>+ <NTooltip :arrow="false">+ <template #trigger>+ <p class="textinfolabel -mb-1">+ {{ $t("plan.options.self") }}+ <span class="opacity-80">+ ({{+ targetsForSpec(selectedSpec).length === flattenSpecCount+ ? $t("plan.options.applies-to-all-tasks")+ : $t("plan.options.applies-to-some-tasks", {+ count: targetsForSpec(selectedSpec).length,+ total: flattenSpecCount,+ })+ }})+ </span>+ </p>+ </template>+ {{ $t("plan.options.split-into-multiple-issues-tip") }}+ </NTooltip><GhostSection v-if="shouldShowGhostSection" /><PreBackupSection v-if="shouldShowPreBackupSection" /></div></template><script lang="ts" setup>+import { NTooltip } from "naive-ui";import { computed } from "vue";import { useCurrentProjectV1 } from "@/store";-import { usePlanContext } from "../../logic";+import { targetsForSpec, usePlanContext } from "../../logic";import GhostSection from "./GhostSection";import { provideGhostSettingContext } from "./GhostSection/context";import PreBackupSection from "./PreBackupSection";@@ -18,11 +36,15 @@ import { providePreBackupSettingContext } from "./PreBackupSection/context";const { project } = useCurrentProjectV1();const { isCreating, plan, selectedSpec, events } = usePlanContext();+const flattenSpecCount = computed(() =>+ plan.value.specs.reduce((acc, spec) => acc + targetsForSpec(spec).length, 0)+);+const { shouldShow: shouldShowGhostSection, events: ghostEvents } =provideGhostSettingContext({project,plan: plan,- selectedSpec: selectedSpec,+ selectedSpec,isCreating,});@@ -30,7 +52,7 @@ const { shouldShow: shouldShowPreBackupSection, events: preBackupEvents } =providePreBackupSettingContext({project,plan: plan,- selectedSpec: selectedSpec,+ selectedSpec,isCreating,});diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 43851cd7d4..d564438563 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -225,7 +225,6 @@"summary": "Summary","errors": "Errors","removed": "Removed",- "options": "Options","submit": "Submit"},"error-page": {@@ -989,6 +988,14 @@"description": "The selected database(s) has schema drift. Please make sure the drift is expected and safe to apply."}},+ "plan": {+ "options": {+ "self": "Options",+ "applies-to-all-tasks": "Applies to all tasks",+ "applies-to-some-tasks": "Applies to some tasks {count}/{total}",+ "split-into-multiple-issues-tip": "If you want to configure different options for each task, please split into multiple issues."+ }+ },"quick-action": {"create-db": "Create database","new-db": "New DB",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 35a01e2d86..f6325ed1bc 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -225,7 +225,6 @@"summary": "Resumen","errors": "Errores","removed": "Remoto",- "options": "Opciones","submit": "Entregar"},"error-page": {@@ -989,6 +988,14 @@"description": "Las bases de datos seleccionadas presentan una desviación de esquema. Asegúrese de que la desviación sea la esperada y de que sea segura para su aplicación."}},+ "plan": {+ "options": {+ "self": "Opciones",+ "applies-to-all-tasks": "Se aplica a todas las tareas.",+ "applies-to-some-tasks": "Se aplica a algunas tareas {count}/{total}",+ "split-into-multiple-issues-tip": "Si desea configurar diferentes opciones para cada tarea, divídala en varios problemas."+ }+ },"quick-action": {"create-db": "Crear base de datos","new-db": "Nueva BD",@@ -2612,4 +2619,4 @@"last-visit": "Última visita","changelog-for-version": "Registro de cambios para {version}"}-}+}\ No newline at end of filediff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 54f7b3ecc7..4cb9cf364f 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -225,7 +225,6 @@"summary": "まとめ","errors": "エラー","removed": "削除されました",- "options": "オプション","submit": "提出する"},"error-page": {@@ -989,6 +988,14 @@"description": "選択したデータベースにはスキーマドリフトがあります。ドリフトが想定どおりであり、適用しても安全であることを確認してください。"}},+ "plan": {+ "options": {+ "self": "オプション",+ "applies-to-all-tasks": "すべてのタスクに適用",+ "applies-to-some-tasks": "一部のタスクに適用されます {count}/{total}",+ "split-into-multiple-issues-tip": "タスクごとに異なるオプションを設定する場合は、複数の問題に分割してください。"+ }+ },"quick-action": {"create-db": "データベースの作成","new-db": "データベースの作成",@@ -2612,4 +2619,4 @@"last-visit": "最終訪問","changelog-for-version": "{version} の変更履歴"}-}+}\ No newline at end of filediff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 011df95169..748f3e89d1 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -225,7 +225,6 @@"summary": "Tóm tắt","errors": "Lỗi","removed": "LOẠI BỎ",- "options": "Tùy chọn","submit": "Nộp"},"error-page": {@@ -989,6 +988,14 @@"description": "Cơ sở dữ liệu được chọn có sự trôi dạt lược đồ. Vui lòng đảm bảo rằng sự trôi dạt này được mong đợi và an toàn để áp dụng."}},+ "plan": {+ "options": {+ "self": "Tùy chọn",+ "applies-to-all-tasks": "Áp dụng cho tất cả các nhiệm vụ",+ "applies-to-some-tasks": "Áp dụng cho một số tác vụ {count}/{total}",+ "split-into-multiple-issues-tip": "Nếu bạn muốn cấu hình các tùy chọn khác nhau cho mỗi tác vụ, vui lòng chia thành nhiều vấn đề."+ }+ },"quick-action": {"create-db": "Tạo cơ sở dữ liệu","new-db": "Cơ sở dữ liệu mới",@@ -2612,4 +2619,4 @@"last-visit": "Lần truy cập cuối","changelog-for-version": "Nhật ký thay đổi cho phiên bản {version}"}-}+}\ No newline at end of filediff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 2e212c4ec4..6f12e52667 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -225,7 +225,6 @@"summary": "总结","errors": "错误","removed": "已移除",- "options": "配置项","submit": "提交"},"error-page": {@@ -989,6 +988,14 @@"description": "所选数据库存在 Schema 偏差,请在变更前确保该偏差符合预期。"}},+ "plan": {+ "options": {+ "self": "配置项",+ "applies-to-all-tasks": "适用于所有任务",+ "applies-to-some-tasks": "适用于某些任务 {count}/{total}",+ "split-into-multiple-issues-tip": "如果您想为每个任务设置不同的配置项,请拆分成多个工单。"+ }+ },"quick-action": {"create-db": "创建数据库","new-db": "创建数据库",