Skip to content

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

fix: some frontend fix (#18286)

ecmadaoa7f35a99a8bd
diff --git a/frontend/src/components/AdvancedSearch/AdvancedSearch.vue b/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
index 24c43de706..b8739af42a 100644
--- a/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
+++ b/frontend/src/components/AdvancedSearch/AdvancedSearch.vue
@@ -151,7 +151,7 @@ const me = useCurrentUserV1();
const cachedQuery = useDynamicLocalStorage<string>(
computed(
() =>
- `bb.advanced-search.${me.value.name}.${router.currentRoute.value.name?.toString()}`
+ `bb.advanced-search.${me.value.name}.${router.currentRoute.value.path}`
),
""
);
@@ -634,10 +634,21 @@ onMounted(() => {
map.set(scope.id, scope.readonly ?? false);
return map;
}, new Map<SearchScopeId, boolean>());
- params.scopes = params.scopes.map((scope) => ({
- ...scope,
- readonly: existedScopes.get(scope.id),
- }));
+ params.scopes = params.scopes
+ .filter((scope) => {
+ const option = props.scopeOptions.find((op) => op.id === scope.id);
+ if (!option) {
+ return false;
+ }
+ if (existedScopes.has(option.id)) {
+ return option.allowMultiple ?? false;
+ }
+ return true;
+ })
+ .map((scope) => ({
+ ...scope,
+ readonly: existedScopes.get(scope.id),
+ }));
emit("update:params", mergeSearchParams(cloneDeep(props.params), params));
}
});
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
index 12018f2926..d933700919 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
@@ -18,7 +18,7 @@
</h2>
</div>
- <div class="flex-1 flex flex-col px-6 py-4 overflow-hidden gap-y-4">
+ <div class="flex-1 flex flex-col px-6 py-4 gap-y-4 overflow-y-auto">
<div v-if="mode === 'create'" class="flex flex-col gap-y-2">
<h3 class="font-medium text-sm text-control">
{{ $t("custom-approval.approval-flow.template.presets-title") }}
@@ -68,7 +68,7 @@
/>
</div>
- <div class="flex-1 flex flex-col gap-y-2 overflow-y-auto">
+ <div class="flex-1 flex flex-col gap-y-2">
<h3 class="font-medium text-sm text-control">
{{ $t("cel.condition.self") }} <RequiredStar />
</h3>
diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue
index e62b5e2a2d..e8f4ad368c 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/PotentialApprovers.vue
@@ -3,7 +3,7 @@
<!-- Show tooltip with text when there are more than 3 users -->
<NPopover
v-if="users.length > 3"
- placement="bottom-start"
+ placement="bottom-end"
:show-arrow="false"
>
<template #trigger>
diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vue
index 8221513c47..7df881da68 100644
--- a/frontend/src/components/ProjectWebhookForm.vue
+++ b/frontend/src/components/ProjectWebhookForm.vue
@@ -252,6 +252,7 @@ import { useRouter } from "vue-router";
import { BBAttention, BBButtonConfirm } from "@/bbkit";
import RequiredStar from "@/components/RequiredStar.vue";
import FormLayout from "@/components/v2/Form/FormLayout.vue";
+import { useBodyLayoutContext } from "@/layouts/common";
import {
PROJECT_V1_ROUTE_WEBHOOK_DETAIL,
PROJECT_V1_ROUTE_WEBHOOKS,
@@ -299,6 +300,9 @@ const { t } = useI18n();
const settingStore = useSettingV1Store();
const projectStore = useProjectV1Store();
const projectWebhookV1Store = useProjectWebhookV1Store();
+const { overrideMainContainerClass } = useBodyLayoutContext();
+
+overrideMainContainerClass("!pb-0");
const state = reactive<LocalState>({
webhook: cloneDeep(props.webhook),
diff --git a/frontend/src/components/ProjectWebhookPanel.vue b/frontend/src/components/ProjectWebhookPanel.vue
index d8a2e326e4..9784476c07 100644
--- a/frontend/src/components/ProjectWebhookPanel.vue
+++ b/frontend/src/components/ProjectWebhookPanel.vue
@@ -65,6 +65,7 @@ const columnList = computed((): DataTableColumn<Webhook>[] => {
key: "url",
title: "URL",
resizable: true,
+ ellipsis: true,
render: (webhook) => webhook.url,
},
{
diff --git a/frontend/src/components/v2/Form/FormLayout.vue b/frontend/src/components/v2/Form/FormLayout.vue
index 91108b9a45..9931be31ab 100644
--- a/frontend/src/components/v2/Form/FormLayout.vue
+++ b/frontend/src/components/v2/Form/FormLayout.vue
@@ -1,6 +1,6 @@
<template>
<div class="h-full flex flex-col">
- <div class="flex-1 pb-4">
+ <div class="flex-1 mb-6">
<slot name="title">
<div v-if="title" class="text-lg leading-6 font-medium text-main">
{{ title }}
@@ -9,9 +9,12 @@
</slot>
<slot name="body" />
</div>
- <div class="w-full sticky bottom-0 pb-2 bg-white">
- <NDivider />
- <slot name="footer" />
+ <div class="w-full sticky bottom-0 z-10">
+ <div
+ class="w-full py-4 border-t border-block-border bg-white"
+ >
+ <slot name="footer" />
+ </div>
</div>
</div>
</template>
diff --git a/frontend/src/views/project/ProjectMaskingExemptionCreate.vue b/frontend/src/views/project/ProjectMaskingExemptionCreate.vue
index ab1646b11a..f6dc0967ae 100644
--- a/frontend/src/views/project/ProjectMaskingExemptionCreate.vue
+++ b/frontend/src/views/project/ProjectMaskingExemptionCreate.vue
@@ -11,6 +11,7 @@
import { computed } from "vue";
import { useRouter } from "vue-router";
import GrantAccessForm from "@/components/SensitiveData/GrantAccessForm.vue";
+import { useBodyLayoutContext } from "@/layouts/common";
import { useProjectByName } from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
@@ -22,4 +23,8 @@ const { project } = useProjectByName(
computed(() => `${projectNamePrefix}${props.projectId}`)
);
const router = useRouter();
+
+const { overrideMainContainerClass } = useBodyLayoutContext();
+
+overrideMainContainerClass("!pb-0");
</script>
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
index 0980940dd5..4ec093e7e8 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/ConnectionPane.vue
@@ -655,6 +655,7 @@ watch(
);
const prepareDatabases = async () => {
+ treeByEnvironment.value.clear();
await Promise.all(
[...environmentList.value, unknownEnvironment()].map(
async (environment) => {
diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/tree.ts b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/tree.ts
index 9c1222af35..d0815c8fc9 100644
--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/tree.ts
+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/tree.ts
@@ -18,7 +18,7 @@ import type {
StatefulSQLEditorTreeFactor as StatefulFactor,
SQLEditorTreeNode as TreeNode,
} from "@/types";
-import { DEBOUNCE_SEARCH_DELAY } from "@/types";
+import { DEBOUNCE_SEARCH_DELAY, unknownEnvironment } from "@/types";
import {
getDefaultPagination,
isDatabaseV1Queryable,
@@ -53,6 +53,7 @@ export const useSQLEditorTreeByEnvironment = (
const { project } = storeToRefs(useSQLEditorStore());
const currentUser = useCurrentUserV1();
const environmentStore = useEnvironmentV1Store();
+ const unknownEnv = unknownEnvironment();
const tree = ref<TreeNode[]>([]);
const showMissingQueryDatabases = ref<boolean>(false);
@@ -106,9 +107,17 @@ export const useSQLEditorTreeByEnvironment = (
environment,
},
});
- response.push(...databases);
+ response.push(
+ ...databases.filter((db) => {
+ const dbEnv = db.effectiveEnvironment || unknownEnv.name;
+ return dbEnv === environment;
+ })
+ );
pageToken = nextPageToken;
+ if (!pageToken) {
+ break;
+ }
if (showMissingQueryDatabases.value) {
break;
}