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: minor changes (#7504)
Liu Ji9b953a6bfdac
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vue b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vueindex 2e3fdc44e2..beed0de41f 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Approver.vue@@ -4,8 +4,11 @@:class="step.approver?.name === currentUser.name && 'font-bold'"><span>{{ step.approver?.title }}</span>- <span v-if="step.approver?.name === currentUser.name">- ({{ $t("custom-approval.issue-review.you") }})+ <span+ v-if="step.approver?.name === currentUser.name"+ class="ml-1 inline-flex items-center px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"+ >+ {{ $t("custom-approval.issue-review.you") }}</span><spanv-if="step.approver?.name === SYSTEM_BOT_USER_NAME"diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vue b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vueindex d77fc20403..10f34dfddc 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/Candidates.vue@@ -7,7 +7,7 @@v-elseclass="min-w-[8rem] max-w-[12rem] max-h-[18rem] flex flex-col text-control-light overflow-y-hidden">- <div class="flex-1 overflow-auto text-xs">+ <div class="flex-1 overflow-auto text-sm"><divv-for="user in candidates":key="user.name"@@ -19,8 +19,11 @@size="SMALL"/><span class="whitespace-nowrap">{{ user.title }}</span>- <span v-if="user.name === currentUser.name">- ({{ $t("custom-approval.issue-review.you") }})+ <span+ v-if="currentUser.name === user.name"+ class="inline-flex items-center px-1 py-0.5 rounded-lg text-xs font-semibold bg-green-100 text-green-800"+ >+ {{ $t("custom-approval.issue-review.you") }}</span></div></div>diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vueindex 72015e3c33..9cb37cacc8 100644--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBadgeBar.vue@@ -57,227 +57,4 @@ const PlanCheckTypeOrderList: PlanCheckRun_Type[] = [const PlanCheckTypeOrderDict = new Map<PlanCheckRun_Type, number>(PlanCheckTypeOrderList.map((type, order) => [type, order]));--// import { computed, defineComponent, PropType, reactive, watch } from "vue";-// import { groupBy, maxBy } from "lodash-es";-// import { useI18n } from "vue-i18n";--// import { HiddenCheckTypes } from "@/utils";--// interface LocalState {-// selectedTaskCheckType: TaskCheckType | undefined;-// }--// export default defineComponent({-// name: "TaskCheckBadgeBar",-// components: { TaskSpinner },-// props: {-// taskCheckRunList: {-// required: true,-// type: Object as PropType<TaskCheckRun[]>,-// },-// allowSelection: {-// default: true,-// type: Boolean,-// },-// stickySelection: {-// default: false,-// type: Boolean,-// },-// selectedTaskCheckType: {-// type: String as PropType<TaskCheckType>,-// default: undefined,-// },-// },-// emits: ["select-task-check-type"],-// setup(props, { emit }) {-// const { t } = useI18n();-// const state = reactive<LocalState>({-// selectedTaskCheckType: props.selectedTaskCheckType,-// });--// watch(-// () => props.selectedTaskCheckType,-// (curNew, _) => {-// state.selectedTaskCheckType = curNew;-// }-// );--// const buttonStyle = (checkRun: TaskCheckRun): string => {-// let bgColor = "";-// let bgHoverColor = "";-// let textColor = "";-// switch (checkRun.status) {-// case "RUNNING":-// bgColor = "bg-blue-100";-// bgHoverColor = "bg-blue-300";-// textColor = "text-blue-800";-// break;-// case "FAILED":-// bgColor = "bg-red-100";-// bgHoverColor = "bg-red-300";-// textColor = "text-red-800";-// break;-// case "CANCELED":-// bgColor = "bg-yellow-100";-// bgHoverColor = "bg-yellow-300";-// textColor = "text-yellow-800";-// break;-// case "DONE":-// switch (taskCheckStatus(checkRun)) {-// case "SUCCESS":-// bgColor = "bg-gray-100";-// bgHoverColor = "bg-gray-300";-// textColor = "text-gray-800";-// break;-// case "WARN":-// bgColor = "bg-yellow-100";-// bgHoverColor = "bg-yellow-300";-// textColor = "text-yellow-800";-// break;-// case "ERROR":-// bgColor = "bg-red-100";-// bgHoverColor = "bg-red-300";-// textColor = "text-red-800";-// break;-// }-// break;-// }--// const styleList: string[] = [textColor];-// if (props.allowSelection) {-// styleList.push("cursor-pointer", `hover:${bgHoverColor}`);-// if (-// props.stickySelection &&-// checkRun.type == state.selectedTaskCheckType-// ) {-// styleList.push(bgHoverColor);-// } else {-// styleList.push(bgColor);-// }-// } else {-// styleList.push(bgColor);-// styleList.push("cursor-default");-// }--// return styleList.join(" ");-// };--// // For a particular check type, only returns the most recent one-// const filteredTaskCheckRunList = computed((): TaskCheckRun[] => {-// const groupByType = groupBy(-// props.taskCheckRunList.filter((run) => !HiddenCheckTypes.has(run.type)),-// (run) => run.type-// );-// /*-// `groupByType` looks like: {-// "bb.task-check.database.statement.compatibility": [run1, run2, ...],-// "bb.task-check.database.statement.syntax": [run1, run2, ...],-// ...-// }-// `result` is an array of the most recent TaskCheckRun in each group-// */-// const result = Object.keys(groupByType).map((type) => {-// const groupList = groupByType[type];-// const mostRecentInGroup = maxBy(groupList, (run) => run.updatedTs)!;-// return mostRecentInGroup;-// });--// return result.sort((a: TaskCheckRun, b: TaskCheckRun) => {-// const taskCheckRunTypeOrder = (type: TaskCheckType) => {-// const has = TaskCheckTypeOrderDict.has(type);-// console.assert(has, `Missing TaskCheckType order of "${type}"`);-// if (has) {-// return TaskCheckTypeOrderDict.get(type)!;-// }-// // Fallback, types not defined in the dictionary will go to the tail.-// return FAKE_MAX_TASK_CHECK_TYPE_ORDER;-// };--// return taskCheckRunTypeOrder(a.type) - taskCheckRunTypeOrder(b.type);-// });-// });--// // Returns the most severe status-// const taskCheckStatus = (taskCheckRun: TaskCheckRun): TaskCheckStatus => {-// let value: TaskCheckStatus = "SUCCESS";-// for (const result of taskCheckRun.result.resultList ?? []) {-// if (result.status == "ERROR") {-// return "ERROR";-// }-// if (result.status == "WARN") {-// value = "WARN";-// }-// }-// return value;-// };--// const name = (taskCheckRun: TaskCheckRun): string => {-// const { type } = taskCheckRun;-// const has = TaskCheckTypeNameDict.has(type);-// console.assert(has, `Missing TaskCheckType name of "${type}"`);-// if (has) {-// const key = TaskCheckTypeNameDict.get(type)!;-// return t(key);-// }-// return type;-// };--// const selectTaskCheckType = (type: TaskCheckType) => {-// emit("select-task-check-type", type);-// };--// return {-// state,-// buttonStyle,-// filteredTaskCheckRunList,-// taskCheckStatus,-// name,-// selectTaskCheckType,-// };-// },-// });--// // Defines the order of TaskCheckType-// const TaskCheckTypeOrderList: TaskCheckType[] = [-// "bb.task-check.pitr.mysql",-// "bb.task-check.database.ghost.sync",-// "bb.task-check.database.statement.compatibility",-// "bb.task-check.database.statement.syntax",-// "bb.task-check.database.statement.type",-// "bb.task-check.database.connect",-// "bb.task-check.database.statement.advise",-// "bb.task-check.issue.lgtm",-// "bb.task-check.database.statement.affected-rows.report",-// "bb.task-check.database.statement.type.report",-// ];-// const TaskCheckTypeOrderDict = new Map<TaskCheckType, number>(-// TaskCheckTypeOrderList.map((type, index) => [type, index])-// );-// const FAKE_MAX_TASK_CHECK_TYPE_ORDER = 100;-// TaskCheckTypeOrderDict.set(-// "bb.task-check.database.statement.fake-advise",-// FAKE_MAX_TASK_CHECK_TYPE_ORDER-// );--// // Defines the mapping from TaskCheckType to an i18n resource keypath-// const TaskCheckTypeNameDict = new Map<TaskCheckType, string>([-// ["bb.task-check.database.statement.fake-advise", "task.check-type.fake"],-// ["bb.task-check.database.statement.syntax", "task.check-type.syntax"],-// [-// "bb.task-check.database.statement.compatibility",-// "task.check-type.compatibility",-// ],-// ["bb.task-check.database.statement.advise", "task.check-type.sql-review"],-// ["bb.task-check.database.statement.type", "task.check-type.statement-type"],-// ["bb.task-check.database.connect", "task.check-type.connection"],-// ["bb.task-check.database.ghost.sync", "task.check-type.ghost-sync"],-// ["bb.task-check.issue.lgtm", "task.check-type.lgtm"],-// ["bb.task-check.pitr.mysql", "task.check-type.pitr"],-// [-// "bb.task-check.database.statement.affected-rows.report",-// "task.check-type.affected-rows",-// ],-// ["bb.task-check.database.statement.type.report", "task.check-type.sql-type"],-// ]);</script>diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vueindex 8213a23e30..b6ef8df7bc 100644--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckBar.vue@@ -1,64 +1,4 @@<template>- <!-- <div- v-if="task.taskCheckRunList.length > 0"- class="flex items-start space-x-4"- >- <div class="textlabel h-[26px] inline-flex items-center">- {{ $t("task.task-checks") }}- </div>-- <TaskCheckBadgeBar- :task-check-run-list="task.taskCheckRunList"- @select-task-check-type="viewCheckRunDetail"- />-- <RunTaskCheckButton v-if="allowRunTask" @run-checks="runChecks" />-- <BBModal- v-if="state.showModal"- :title="$t('task.check-result.title', { name: task.name })"- class="!w-[56rem]"- header-class="whitespace-pre-wrap break-all gap-x-1"- @close="dismissDialog"- >- <div class="space-y-4">- <div>- <TaskCheckBadgeBar- :task-check-run-list="task.taskCheckRunList"- :allow-selection="true"- :sticky-selection="true"- :selected-task-check-type="state.selectedTaskCheckType"- @select-task-check-type="viewCheckRunDetail"- />- </div>- <BBTabFilter- class="pt-4"- :tab-item-list="tabItemList"- :selected-index="state.selectedTabIndex"- @select-index="- (index: number) => {- state.selectedTabIndex = index;- }- "- />- <TaskCheckRunPanel- v-if="selectedTaskCheckRun"- :task-check-run="selectedTaskCheckRun"- :task="task"- />- <div class="pt-4 flex justify-end">- <button- type="button"- class="btn-primary py-2 px-4"- @click.prevent="dismissDialog"- >- {{ $t("common.close") }}- </button>- </div>- </div>- </BBModal>- </div> -->-<div class="flex items-start gap-x-4"><div class="textlabel h-[26px] inline-flex items-center">{{ $t("task.task-checks") }}diff --git a/frontend/src/views/IssueDetailV1.vue b/frontend/src/views/IssueDetailV1.vueindex bcaf8cb99e..86d666bd50 100644--- a/frontend/src/views/IssueDetailV1.vue+++ b/frontend/src/views/IssueDetailV1.vue@@ -1,5 +1,5 @@<template>- <div class="w-full h-full relative">+ <div class="w-full h-full relative overflow-x-hidden"><IssueDetailPage v-if="ready" /><div v-else class="w-full h-full flex flex-col items-center justify-center"><NSpin />