Skip to content

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

fix(frontend): minor bug fixes (#6551)

Liu Ji906ef8bdadbc
diff --git a/frontend/src/bbkit/BBModal.vue b/frontend/src/bbkit/BBModal.vue
index 77d7ac95fc..f48f46f54c 100644
--- a/frontend/src/bbkit/BBModal.vue
+++ b/frontend/src/bbkit/BBModal.vue
@@ -6,15 +6,12 @@
>
<div
v-bind="$attrs"
- class="absolute m-auto w-full max-w-max max-h-[calc(100vh-80px)] bg-white shadow-lg rounded-lg pt-4 pb-4 flex pointer-events-auto flex-col"
+ class="bb-modal"
:data-bb-modal-id="id"
:data-bb-modal-index="index"
:data-bb-modal-active="active"
>
- <div
- class="relative mx-8 pb-2 flex items-center justify-between border-b border-block-border"
- :class="headerClass"
- >
+ <div class="modal-header" :class="headerClass">
<div class="text-xl text-main mr-2 flex-1 overflow-hidden">
<slot name="title"><component :is="renderTitle" /></slot>
<component :is="renderSubtitle" />
@@ -30,10 +27,7 @@
<heroicons-solid:x class="w-6 h-6" />
</button>
</div>
- <div
- class="px-8 pt-2 max-h-screen overflow-auto w-full"
- :class="containerClass"
- >
+ <div class="modal-container" :class="containerClass">
<slot />
</div>
</div>
@@ -229,3 +223,20 @@ export const useOverrideSubtitle = (
});
};
</script>
+
+<style scoped lang="postcss">
+.bb-modal {
+ @apply absolute m-auto w-full max-w-max bg-white shadow-lg rounded-lg pt-4 pb-4 flex pointer-events-auto;
+ @apply flex-col;
+
+ max-height: calc(100vh - 80px);
+}
+
+.modal-header {
+ @apply relative mx-8 pb-2 flex items-center justify-between border-b border-block-border;
+}
+
+.modal-container {
+ @apply px-8 pt-2 max-h-screen overflow-auto w-full;
+}
+</style>
diff --git a/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue b/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
index 001451bfe0..937b90ef7c 100644
--- a/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/ProjectTenantView.vue
@@ -53,14 +53,12 @@
<script lang="ts" setup>
/* eslint-disable vue/no-mutating-props */
-import { computed, watchEffect, h } from "vue";
-import { Translation, useI18n } from "vue-i18n";
+import { computed, watchEffect } from "vue";
import { RouterLink } from "vue-router";
import type { ComposedDatabase, LabelKeyType } from "@/types";
import { DeployDatabaseTable } from "../TenantDatabaseTable";
import { getPipelineFromDeploymentScheduleV1, projectV1Slug } from "@/utils";
import { useDeploymentConfigV1ByProject } from "@/store";
-import { useOverrideSubtitle } from "@/bbkit/BBModal.vue";
import { Environment } from "@/types/proto/v1/environment_service";
import { Project } from "@/types/proto/v1/project_service";
@@ -77,12 +75,10 @@ const props = defineProps<{
state: ProjectTenantViewState;
}>();
-const emit = defineEmits<{
+defineEmits<{
(event: "dismiss"): void;
}>();
-const { t } = useI18n();
-
const { deploymentConfig, ready } = useDeploymentConfigV1ByProject(
computed(() => {
return props.project?.name ?? "projects/-1";
@@ -104,36 +100,6 @@ watchEffect(() => {
const databaseIdList = stages.flatMap((stage) => stage.map((db) => db.uid));
props.state.deployingTenantDatabaseList = databaseIdList;
});
-
-useOverrideSubtitle(() => {
- return h(
- Translation,
- {
- tag: "p",
- class: "textinfolabel",
- keypath: "deployment-config.pipeline-generated-from-deployment-config",
- },
- {
- deployment_config: () =>
- h(
- RouterLink,
- {
- to: {
- path: `/project/${projectV1Slug(props.project!)}`,
- hash: "#databases",
- },
- activeClass: "",
- exactActiveClass: "",
- class: "underline hover:bg-link-hover",
- onClick: () => emit("dismiss"),
- },
- {
- default: () => t("common.deployment-config"),
- }
- ),
- }
- );
-});
</script>
<style scoped lang="postcss">
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table.vue b/frontend/src/components/v2/Model/DatabaseV1Table.vue
index e9ed6e50de..1319307d64 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table.vue
@@ -48,7 +48,11 @@
@goto-sql-editor-failed="
handleGotoSQLEditorFailed(database as ComposedDatabase)
"
- />
+ >
+ <template v-if="showSelectionColumn" #selection>
+ <slot name="selection" :database="database" />
+ </template>
+ </DatabaseTableRow>
</template>
<template v-else>
<div class="bb-grid-cell">