Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: SQL review check view style tweaks (#10211)
ecmadao31d4b8acaf4e
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vueindex f847fc68bd..a8c0d210aa 100644--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue@@ -125,6 +125,7 @@"v-model:selected="state.selectedLabels":database-list="rawDatabaseList"+ :placement="'left-start'"/><SearchBoxv-if="state.alterType === 'MULTI_DB'"@@ -149,6 +150,7 @@<DatabaseLabelFilterv-model:selected="state.selectedLabels":database-list="rawDatabaseList"+ :placement="'left-start'"/></div><DatabaseV1Tablediff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vueindex 351b228433..6cf2fdc447 100644--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue@@ -1,13 +1,11 @@<template>- <BBGrid- :column-list="COLUMN_LIST"- :data-source="tableRows"- :show-header="false"- :row-clickable="false"- class="border"- >- <template #item="{ item: row }: BBGridRow<TableRow>">- <div class="bb-grid-cell">+ <div class="space-y-5 divide-y pb-5">+ <div+ v-for="(row, i) in tableRows"+ :key="i"+ class="pt-5 first:pt-2 space-y-2"+ >+ <div class="flex items-center space-x-3"><divclass="relative w-5 h-5 flex flex-shrink-0 items-center justify-center rounded-full select-none":class="statusIconClass(row.checkResult.status)"@@ -27,58 +25,54 @@row.checkResult.status === PlanCheckRun_Result_Status.ERROR">- <span class="text-white font-medium text-base" aria-hidden="true"- >!</span- >+ <span class="text-white font-medium text-base" aria-hidden="true">+ !+ </span></template></div>+ <div v-if="showCategoryColumn">+ {{ row.category }}+ </div>+ <div class="font-semibold">{{ row.title }}</div></div>- <div v-if="showCategoryColumn" class="bb-grid-cell">- {{ row.category }}- </div>- <div class="bb-grid-cell">- {{ row.title }}- </div>- <div class="bb-grid-cell">- <div>- <span>{{ row.checkResult.content }}</span>- <template v-if="row.checkResult.sqlReviewReport?.detail">- <span- class="ml-1 normal-link"- @click="- state.activeResultDefinition =- row.checkResult.sqlReviewReport.detail- "- >{{ $t("sql-review.view-definition") }}</span- >- <span class="border-r border-control-border ml-1"></span>- </template>- <template- v-if="row.checkResult.sqlReviewReport && getActiveRule(row.checkResult.title as RuleType)"+ <div class="textinfolabel">+ <span>{{ row.checkResult.content }}</span>+ <template v-if="row.checkResult.sqlReviewReport?.detail">+ <span+ class="ml-1 normal-link"+ @click="+ state.activeResultDefinition =+ row.checkResult.sqlReviewReport.detail+ "+ >{{ $t("sql-review.view-definition") }}</span>- <span- class="ml-1 normal-link"- @click="setActiveRule(row.checkResult.title as RuleType)"- >{{ $t("sql-review.rule-detail") }}</span- >- <span class="border-r border-control-border ml-1"></span>- </template>- <template v-if="row.checkResult.sqlSummaryReport">- {{ row.checkResult.sqlSummaryReport.affectedRows }}- </template>-- <a- v-if="row.link"+ <span class="border-r border-control-border ml-1"></span>+ </template>+ <template+ v-if="row.checkResult.sqlReviewReport && getActiveRule(row.checkResult.title as RuleType)"+ >+ <spanclass="ml-1 normal-link"- :href="row.link.url"- :target="row.link.target"+ @click="setActiveRule(row.checkResult.title as RuleType)"+ >{{ $t("sql-review.rule-detail") }}</span>- {{ row.link.title }}- </a>- </div>+ <span class="border-r border-control-border ml-1"></span>+ </template>+ <template v-if="row.checkResult.sqlSummaryReport">+ {{ row.checkResult.sqlSummaryReport.affectedRows }}+ </template>++ <a+ v-if="row.link"+ class="ml-1 normal-link"+ :href="row.link.url"+ :target="row.link.target"+ >+ {{ row.link.title }}+ </a></div>- </template>- </BBGrid>+ </div>+ </div><SQLRuleEditDialogv-if="state.activeRule"@@ -99,7 +93,6 @@<script setup lang="ts">import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";-import { BBGridColumn, BBGridRow, BBGrid } from "@/bbkit";import { LocalizedSQLRuleErrorCodes } from "@/components/Issue/const";import { databaseForTask, useIssueContext } from "@/components/IssueV1/logic";import { SQLRuleEditDialog } from "@/components/SQLReview/components";@@ -279,29 +272,6 @@ const showCategoryColumn = computed((): boolean =>tableRows.value.some((row) => row.category !== ""));-const COLUMN_LIST = computed(() => {- const STATUS: BBGridColumn = {- title: "Status",- width: "auto",- };- const CATEGORY: BBGridColumn = {- title: "Category",- width: "minmax(4rem, 6rem)",- };- const TITLE: BBGridColumn = {- title: "Title",- width: "minmax(12rem, 1fr)",- };- const CONTENT: BBGridColumn = {- title: "Detail",- width: "2fr",- };- if (showCategoryColumn.value) {- return [STATUS, CATEGORY, TITLE, CONTENT];- }- return [STATUS, TITLE, CONTENT];-});-const reviewPolicy = useReviewPolicyByEnvironmentId(computed(() => {const task = props.task;diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vueindex 07782e50bb..36134086b4 100644--- a/frontend/src/components/ProjectDatabasesPanel.vue+++ b/frontend/src/components/ProjectDatabasesPanel.vue@@ -13,6 +13,7 @@<DatabaseLabelFilterv-model:selected="state.selectedLabels":database-list="databaseList"+ :placement="'left-start'"/></div>diff --git a/frontend/src/components/SQLCheck/SQLCheckDetail.vue b/frontend/src/components/SQLCheck/SQLCheckDetail.vueindex 5a681ec50d..12550b95d0 100644--- a/frontend/src/components/SQLCheck/SQLCheckDetail.vue+++ b/frontend/src/components/SQLCheck/SQLCheckDetail.vue@@ -1,13 +1,11 @@<template>- <BBGrid- :column-list="COLUMN_LIST"- :data-source="tableRows"- :show-header="false"- :row-clickable="false"- class="border"- >- <template #item="{ item: row }: BBGridRow<TableRow>">- <div class="bb-grid-cell">+ <div class="space-y-5 divide-y pb-5">+ <div+ v-for="(row, i) in tableRows"+ :key="i"+ class="pt-5 first:pt-2 space-y-2"+ >+ <div class="flex items-center space-x-3"><divclass="relative w-5 h-5 flex flex-shrink-0 items-center justify-center rounded-full select-none":class="statusIconClass(row.advice.status)"@@ -19,50 +17,46 @@<heroicons-outline:exclamation class="h-4 w-4" /></template><template v-else-if="row.advice.status === Advice_Status.ERROR">- <span class="text-white font-medium text-base" aria-hidden="true"- >!</span- >+ <span class="text-white font-medium text-base" aria-hidden="true">+ !+ </span></template></div>+ <div v-if="showCategoryColumn">+ {{ row.category }}+ </div>+ <div class="font-semibold">{{ row.title }}</div></div>- <div v-if="showCategoryColumn" class="bb-grid-cell">- {{ row.category }}- </div>- <div class="bb-grid-cell">- {{ row.title }}- </div>- <div class="bb-grid-cell">- <div>- <span>{{ row.content }}</span>- <template v-if="row.advice.detail">- <span- class="ml-1 normal-link"- @click="state.activeResultDefinition = row.advice.detail"- >{{ $t("sql-review.view-definition") }}</span- >- <span class="border-r border-control-border ml-1"></span>- </template>- <template v-if="getActiveRule(row.advice.title as RuleType)">- <span- class="ml-1 normal-link"- @click="setActiveRule(row.advice.title as RuleType)"- >{{ $t("sql-review.rule-detail") }}</span- >- <span class="border-r border-control-border ml-1"></span>- </template>-- <a- v-if="row.link"+ <div class="textinfolabel">+ <span>{{ row.content }}</span>+ <template v-if="row.advice.detail">+ <spanclass="ml-1 normal-link"- :href="row.link.url"- :target="row.link.target"+ @click="state.activeResultDefinition = row.advice.detail"+ >{{ $t("sql-review.view-definition") }}</span>- {{ row.link.title }}- </a>- </div>+ <span class="border-r border-control-border ml-1"></span>+ </template>+ <template v-if="getActiveRule(row.advice.title as RuleType)">+ <span+ class="ml-1 normal-link"+ @click="setActiveRule(row.advice.title as RuleType)"+ >{{ $t("sql-review.rule-detail") }}</span+ >+ <span class="border-r border-control-border ml-1"></span>+ </template>++ <a+ v-if="row.link"+ class="ml-1 normal-link"+ :href="row.link.url"+ :target="row.link.target"+ >+ {{ row.link.title }}+ </a></div>- </template>- </BBGrid>+ </div>+ </div><SQLRuleEditDialogv-if="state.activeRule"@@ -83,7 +77,6 @@<script setup lang="ts">import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";-import { BBGridColumn, BBGridRow, BBGrid } from "@/bbkit";import { LocalizedSQLRuleErrorCodes } from "@/components/Issue/const";import { SQLRuleEditDialog } from "@/components/SQLReview/components";import { PayloadValueType } from "@/components/SQLReview/components/RuleConfigComponents";@@ -100,8 +93,6 @@ import {} from "@/types";import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";-// import PlanCheckResultDefinitionModal from "./PlanCheckResultDefinitionModal.vue";-interface ErrorCodeLink {title: string;target: string;@@ -220,29 +211,6 @@ const showCategoryColumn = computed((): boolean =>tableRows.value.some((row) => row.category !== ""));-const COLUMN_LIST = computed(() => {- const STATUS: BBGridColumn = {- title: "Status",- width: "auto",- };- const CATEGORY: BBGridColumn = {- title: "Category",- width: "minmax(4rem, 6rem)",- };- const TITLE: BBGridColumn = {- title: "Title",- width: "minmax(12rem, 1fr)",- };- const CONTENT: BBGridColumn = {- title: "Detail",- width: "2fr",- };- if (showCategoryColumn.value) {- return [STATUS, CATEGORY, TITLE, CONTENT];- }- return [STATUS, TITLE, CONTENT];-});-const environmentUID = computed(() => props.database.effectiveEnvironmentEntity.uid);diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vueindex 53f0bbdd90..c9a9ad41d4 100644--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseLabelFilter.vue@@ -5,6 +5,7 @@:options="options":placeholder="$t('label.filter-by-label')":render-label="renderLabel"+ :placement="placement":multiple="true":show-path="true":check-strategy="'child'"@@ -41,10 +42,16 @@ type KeyValueOption = CascaderOption & {value: string;};-const props = defineProps<{- selected: KV[];- databaseList: ComposedDatabase[];-}>();+const props = withDefaults(+ defineProps<{+ selected: KV[];+ databaseList: ComposedDatabase[];+ placement?: "bottom-start" | "left-start";+ }>(),+ {+ placement: "bottom-start",+ }+);const emit = defineEmits<{(event: "update:selected", selected: KV[]): void;diff --git a/frontend/src/components/v2/Model/ProjectV1Table.vue b/frontend/src/components/v2/Model/ProjectV1Table.vueindex 821f05a254..6bd8c08111 100644--- a/frontend/src/components/v2/Model/ProjectV1Table.vue+++ b/frontend/src/components/v2/Model/ProjectV1Table.vue@@ -83,7 +83,7 @@ const clickProject = function (if (e.ctrlKey || e.metaKey) {window.open(url, "_blank");} else {- router.push(url);+ window.location.href = url;}emit("click");};diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vueindex e32c104375..e828567e72 100644--- a/frontend/src/views/DatabaseDashboard.vue+++ b/frontend/src/views/DatabaseDashboard.vue@@ -12,6 +12,7 @@<DatabaseLabelFilterv-model:selected="state.selectedLabels":database-list="databaseV1List"+ :placement="'left-start'"/></div>